Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RDY] Rollback recent spawn function changes in hardcoded mapgen #22898

Merged

Conversation

5 participants
@ZhilkinSerg
Copy link
Contributor

commented Feb 7, 2018

Fixes #22895.

What was changed

  • rollback changes from #22847;
  • rollback most changes from #22852 (start_location.h left intact);
  • rollback changes from #22854.
@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2018

I believe it would be better to properly fix #3951 while moving hard-coded mapgen to json.

@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2018

Not strictly related:

I want to change SEEX * 2 and SEEY * 2 in mapgen.cpp and mapgen_functions.cpp to make translation to json somewhat easier.

Will it be correct to name defs like this?

#def SUBMAP_WIDTH (SEEX * 2)
#def SUBMAP_MAX_X (SUBMAP_WIDTH - 1)

#def SUBMAP_HEIGHT (SEEY * 2)
#def SUBMAP_MAX_Y (SUBMAP_HEIGHT - 1)

In other words:

How do we call square with SEEX * 2 and SEEY * 2 dimensions? Is it submap?

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2018

How do we call square with SEEX * 2 and SEEY * 2 dimensions? Is it submap?

A submap contains lots of foo_type foo[SEEX][SEEY];, so a submap is SEEX times SEEY map squares large.

SEEX * 2 is the size of the overmap terrain, expressed as number of map squares. It's also the number of map squares of the map used for mapgen (tinymap), maybe that can give it the name (which should probably be local to the mapgen files).

@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2018

Thanks, @BevapDin! So it is like this:

SM = SUBMAP = SEEX * SEEY OMT = OVERMAP_TERRAIN = SM * 2 * 2 = SEEX * 2 * SEEY * 2

And I can probably go with this names:

#def OMT_WIDTH (SEEX * 2)
#def OMT_MAX_X (OMT_WIDTH - 1)

#def OMT_HEIGHT (SEEY * 2)
#def OMT_MAX_Y (OMT_HEIGHT - 1)

Edit: Also found #11880, so OMT_ could be bad name, but if that issue is addressed SEEX/SEEY will be doubled and SEEX * 2 will simply disappear from code.

@boydkr

This comment has been minimized.

Copy link
Contributor

commented Feb 11, 2018

Can we prioritize a merge on this? The bug is pretty game-breaking

@anubiann00b

This comment has been minimized.

Copy link
Contributor

commented Feb 12, 2018

There's a linked build here, for any players seeing this and wanting a quick fix: #22895 (comment)

@Rivet-the-Zombie Rivet-the-Zombie merged commit fbae814 into CleverRaven:master Feb 13, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.07%) to 22.766%
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg deleted the ZhilkinSerg:mapgen-spawn-rollback branch Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.