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

Extend codegen to allow simple typedefs #801

Open
quietust opened this issue Sep 1, 2024 · 0 comments
Open

Extend codegen to allow simple typedefs #801

quietust opened this issue Sep 1, 2024 · 0 comments

Comments

@quietust
Copy link
Member

quietust commented Sep 1, 2024

Dwarf Fortress's code makes use of a wide variety of simple integer typedefs: for example, there's typedef int16_t LocalPos; for local map coordinates, typedef uint16_t Temperature; for (Urist-scaled) temperature values, and typedef int32_t MatGloss; for materials that need to reference creatures, plants, or histfigs.

Historically, some of these have changed - notably, MatGloss changed from int16_t to int32_t between 0.28.181.40d and 0.31.01, and AppearanceModifierValue (used in body/bp appearance modifiers as well as hair length styles) changed from int16_t to int32_t at some point between 0.31.25 and the current version. Being able to reference these types by name could potentially make it easier to consume future structure updates, and it could potentially also make it easier to see what kind of data is stored in a field (if its name happens to be unclear).

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

No branches or pull requests

1 participant