Skip to content

Conversation

@francescoraves483
Copy link

This pull request proposes a set of enhancements/additional features to CCEdit, in the hope that they may be useful for the next version of the editor.
They include, but are not limited to, a couple of advanced options to show clone buttons that may be related to data resetting in MSCC. Indeed, currently all clone button connections outside the range [0,31] are marked as invalid. However, in few cases, connections to (x,32) may be made on purpose to trigger data resetting.

A more exhaustive list of the enhancements is the following:

  • visualizing clone connections to (x,32) as "INVALID / MSCC Data Res. (<reason>)" in the Advanced Mechanics panel, to show that they may be made on purpose to trigger data resetting on MSCC
  • Possibility to view the clone buttons/clone machines numbers (in a similar way as it was possible with the monster list); they will be reported with red numbers, while the monster list entries have been modified to use blue numbers
  • Possibility to view the trap buttons/traps numbers; they will be reported with brown numbers
  • Possibility to enable the display of button and teleport connections when the mouse hovers over a button, trap, clone machine or teleport
  • A few advanced options, valid for MSCC only and grouped under "View" -> "Advanced (MSCC Only)", including (1) marking clone buttons with connections to (x,32) as data resetting buttons, showing a small icon with the corresponding effect (e.g., resetting the Chip X-coordinate), (2) marking tiles with tanks that may trigger the Multiple Tank Glitch in MSCC

I also updated the year reported in the copyright notice, as I noticed that it was still reporting "2020".

They include:
- visualizing clone connections to (x,32) as "INVALID / MSCC Data Res. (<reason>)" in the Advanced Mechanics panel, to show that they may be made on purpose to trigger data resetting on MSCC
- Possibility to view the clone buttons/clone machines numbers (in a similar way as it was possible with the monster list); they will be reported with red numbers, while the monster list entries have been modified to use blue numbers
- Possibility to view the trap buttons/traps numbers; they will be reported with brown numbers
- Possibility to enable the display of button and teleport connections when the mouse hovers over a button, trap, clone machine or teleport
- A few advanced options, valid for MSCC only and grouped under "View" -> "Advanced (MSCC Only)", including (1) marking clone buttons with connections to (x,32) as data resetting buttons, showing a small icon with the corresponding effect (e.g., resetting the Chip X-coordinate), (2) marking tiles with tanks that may trigger the Multiple Tank Glitch in MSCC

I also updated the year reported in the copyright notice.
Copy link
Owner

@zrax zrax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot to look through here, and I may not be able to get to it (except my basic first pass comments) for a while... The feature sounds like a useful addition though!

Comment on lines 1296 to 1304

// Search starting from the build directory when using CLion
path.setPath(QApplication::applicationDirPath());
for(int i = 0; i < 3; ++i) {
path.cdUp();
}
path.cd(QStringLiteral("share/cctools"));
for (const QString& file : path.entryList(tilesetGlob, QDir::Files | QDir::Readable, QDir::Name))
tilesets << path.absoluteFilePath(file);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really belong here... Personally, I just copy the necessary files into the build dir to make it happy for debugging.

.gitignore Outdated
Comment on lines 16 to 17
cmake-build-debug
cmake-build-optimized
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmake-build-debug
cmake-build-optimized
/cmake-build-*

Comment on lines 306 to 307
QTreeWidgetItem* AdvancedMechanicsDialog::addCloneItem(const ccl::Clone& clone) {
QTreeWidgetItem *item = new QTreeWidgetItem(m_cloneList);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid trivial formatting changes on otherwise unchanged lines...

Comment on lines 479 to 480
// This if() is here just for an additional sanity check, but can be potentially removed, since
// num_img is never expected to assume a value < 0 or > 16
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a Q_ASSERT for that

.gitignore Outdated
/bin/Debug
/build
/res/*.tis
.idea
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.idea
/.idea

@francescoraves483
Copy link
Author

@zrax Thank you very much for your feedback and for your first pass on the pull request. Unfortunately in these days I'm a bit busy with my work, but I'm going to tackle all the first pass comments as soon as I'm able to!

This commit improves the code for the visualization features with support to MSCC data resetting, based on the first pull request comments.
@francescoraves483
Copy link
Author

Unfortunately it took me a bit of time, but I was finally able to work on it today, and I should have tackled the first PR comments with the last commit. Thank you for the comments!

This commit fixes the text that was previously shown when the mouse
hovers a possibly invalid connection to a (32,y) location.
Previously, the text "←?" was displayed. However, while this was
properly rendered under Linux, it was under Windows.
Thus, the text has been modified to "32,y".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants