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

Tweak the handling of the LayoutEntity files created by sotn-assets #1817

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bismurphy
Copy link
Collaborator

This changes the formatting of the generated layout entities in order to make the files (in my opinion) more readable. We do the following:

  1. change the types in e_laydef to make the offsets make more sense and reduce casts
  2. Break up e_layout into blocks to more easily see where the boundaries between each room's data are
  3. Add comments between those boundaries with the offsets, to easily cross-reference e_laydef and e_layout
  4. Implement reading of the EntityIDs enum so that entities are listed by ID in e_layout.c to make it easier to identify them
  5. Include the overlay's .h file rather than common.h, to allow access to the EntityIDs enum.

Sounds like we want to make changes here to move this stuff up to the JSON, so I'll mark this as a draft while we determine the long-term desired functionality.

Also, just a heads-up that this is my first time working with Go, so I might have done some bad code practices.

@bismurphy
Copy link
Collaborator Author

Okay, I moved the logic to layout.go, so now the entity name makes it into the JSON during extraction rather than being swapped out when making e_layout.c. The e_layout.c file is identical to what it was in my initial version, but now the entity names make it into the JSON. Example json snippet from NZ0:
image

@bismurphy bismurphy marked this pull request as ready for review October 21, 2024 21:10
Copy link
Collaborator

@sozud sozud left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me but ought to be approved by Xeeynamo

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