Flatten g_Vram struct to an array of RECT - #3371
Conversation
|
Seems sensible to me |
Xeeynamo
left a comment
There was a problem hiding this comment.
I'd argue this change is a downgrade. That g_Vram (wrong name, should be g_VramUploadRect) has fixed values through its entire lifecycle.
If we keep using the struct, we could document each field is used for what. For example D_800ACDB8 is for the first chunk of the stage tileset, D_800ACD98 is used for the stage palette, D_800ACDA0 to clear the screen and the stage graphics, and so on.
WDYT?
By using a system like we have with AluTimers, we can keep the benefits of naming while still avoiding having structs that only exist a single time. In this case, we would do: and so on. If this is seen as inferior that's fine, just a suggestion. |
IMHO I'd prefer
|
Understood, in that case we should create those names like |
I noticed in game.h we have the Vram struct, which only exists in g_Vram. Every member of the struct is a RECT and they all still have address-based D_whatever names. I think it makes more sense for this to just be an array accessed by index instead of having a dedicated name for each one.
Perhaps it would be useful to have an enum for each index in this array (just like we have for AluTimers), but I think having it as an array rather than a dedicated struct makes more sense here.