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

Possible misnamed constant in global variable map_type #201

Closed
2TallTyler opened this issue Apr 14, 2021 · 1 comment · Fixed by #203
Closed

Possible misnamed constant in global variable map_type #201

2TallTyler opened this issue Apr 14, 2021 · 1 comment · Fixed by #203

Comments

@2TallTyler
Copy link
Member

Global variable map_type includes three options:

nml/nml/global_constants.py

Lines 644 to 647 in 5f25e4d

# map types (ttdp variable 0x13)
"MAP_TYPE_X_BIGGER" : 0, # bit 0 and 1 clear
"MAP_TYPE_RECTANGULAR" : 1, # bit 0 set
"MAP_TYPE_Y_BIGGER" : 2, # bit 0 clear, bit 1 set

Since this option is returned when x==y, shouldn't MAP_TYPE_RECTANGULAR actually be MAP_TYPE_SQUARE?

@glx22
Copy link
Contributor

glx22 commented Apr 14, 2021

From newgrf spec:

the type of map
- bit 0 set: squared map. Clear : rectangular map
- bit 1 set: Y is the bigger edge(bit 0 is clear). Clear : X is the bigger edge.

So yes, seems naming is wrong.

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 a pull request may close this issue.

2 participants