Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TheGLander
Copy link
Contributor

Adds multiple small fixes and features which I don't think are too controversial:

  • Bug fix: There are some tiles after the hook tile (post-hook tiles) for which CC2 requires additional data for them (layer and/or direction), but CC2Edit doesn't handle that.
  • Bug fix: CC2Edit assumes the default Blob Pattern setting is Deterministic (0), which is not the case, 4 Patterns (1) is.
  • Feature: An option which automatically kills the old test processes when trying to spawn a new one.
  • Feature: A preference menu where the default author name and map size (CC2Edit only) can be set.

@TheGLander
Copy link
Contributor Author

Huh, apparently non-Linux builds failed. It's due to the constexpr I used for post-hook tiles, I am guessing this is some compiler incompatibility?

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.

I haven't finished reviewing this yet... But in the future, please submit separate PRs for each bug fix or feature. It makes it much easier to review and discuss the changes that way.

case UNUSED_94:
case UNUSED_9f:
case UNUSED_a3:
case UNUSED_f3:
Copy link
Owner

Choose a reason for hiding this comment

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

The trouble with "supporting" these (and why I didn't do it originally) is that the tile definitions in CC2 are essentially reading "random" data beyond the end of the array, meaning that these behaviors change from one version to another of CC2. You can already see this by checking out older releases of CC2 and observing that tiles beyond Hook load differently than they do in the latest release. If we really want to support extended tiles, we'll need to have some sort of executable version support added as well :/

if (start + (long)size != stream->tell())
throw ccl::FormatError(ccl::RuntimeError::tr("Failed to parse map data"));
if (start + (long)size < stream->tell())
throw ccl::FormatError(ccl::RuntimeError::tr("Failed to parse map data (%1 extra bytes in map data)").arg(start + (long)size - stream->tell()));
Copy link
Owner

Choose a reason for hiding this comment

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

It would probably be good to break this long line up

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