Conversation
Thar0
left a comment
There was a problem hiding this comment.
imo it would make the most sense to split title_static into multiple files that are each included separately in the spec rather than combining the files through includes. The gameplay_keep split takes this more spec-based approach so would be a good reference.
|
That doesn't work due to file padding, there's no padding between the assets. |
|
Every texture in this file is aligned to 0x10, you can introduce splits anywhere and it will still match. The only place where splitting would cause unwanted new padding to appear is between the display lists. |
|
Did the change, there are still some messy places but idk if those are worth to clean up right now. |
Thar0
left a comment
There was a problem hiding this comment.
Last things I think.
The naming style of some of the new files are inconsistent with each other and with the rest of the files in the codebase. We have two prevailing naming styles for asset files: either match the symbol name for files with one symbol, otherwise use lower_snake_case like for source files. See #2612 for examples of the latter.
| // A lot of assets where reordered between NTSC and PAL as well as N64 vs GC for PAL due to the language select | ||
| #if OOT_NTSC | ||
| #include "assets/textures/title_static/title_static_ntsc.h" | ||
| #elif OOT_PAL | ||
| #if PLATFORM_GC | ||
| #include "assets/textures/title_static/title_static_pal_gc.h" | ||
| #else | ||
| #include "assets/textures/title_static/title_static_pal_n64.h" | ||
| #endif | ||
| #endif |
There was a problem hiding this comment.
How much isn't shared between these? I think it makes more sense to only ifdef around the differences, the order of the externs shouldn't matter so diffs due to reorderings can be removed in the header.
There was a problem hiding this comment.
The order does matter due to bss, some stuff was completely reordered:
eng
ger
fra
eng
ger
fra
...
eng
eng
...
ger
ger
...
fra
fra
...
Using bss pragmas is not a good idea as we'd need multiple of them inside the .h file itself.
There was a problem hiding this comment.
I don't understand the point about bss, this is all data so IDO (thankfully) orders it in the expected order
The main file is split for NTSC, N64 PAL & GC PAL as a lot of stuff was reordered between them (as an example, NTSC & N64 PAL have most of the language specific textures split by language while GC PAL groups them).
In order to not do this, a lot of
#pragma increment_block_numbers would have to be intitle_static.hitself which would imo be worse due to the clutter.I extracted most of the stuff that's in common into some
.inc.c&.hfiles that are included in the right spots for each version.