mm
mm copied to clipboard
Macros for `weekEventReg` and `eventInf`
I made macros for accessing both weekEventReg and eventInf, this will allow us to name those flags. Scripts to automatically convert most uses were made too.
I also tweaked the schedule macros to use the WEEKEVENTREG defines. I updated scheduledis.py to use those macros too.
There are some special accesses to weekEventReg and eventInf in which the new macros won't work. Those probably will need their own custom macros, which should be made on documentation passes on their respective systems.
Looks good overall. Probably need to take a look at RaceDog. It doesn't get touched by this PR, but it as WEEKEVENTREGs, I think it is another special case like HORSE_RACE_FLAGS.
There are a few files with special kinds of weekEventReg accesses which don't fit the new macros. I was thinking on leaving those to documentation passes of their corresponding systems. The files are the following:
z_demo.cz_sram_NES.c: there's a fun array herez_dm_ravine.c: https://decomp.me/scratch/98Qv8z_en_aob_01.c,z_en_dg.candz_en_racedog.cz_en_elfgrp.c
If you think we should try to address those cases in this PR then I'm open to discuss them
Aob01 and the two dog files are the same system, so I can cook up some defines when I'm documenting Aob1
Do you prefer I leave them untouched in this PR then?
It doesn't really matter to me either way. If you don't do it, I'll do it later.
Personally I think we should add a todo to these special cases in this PR. Documenting them later is fine.
I discovered the context of several WeekEventReg values in the context of ovl_En_Go (Link to discussion). The defines are to be removed from ovl_En_Go, due to the work going on here but to avoid losing the information, I can copy them somewhere (spreadsheet?), demote them to comments in ovl_En_Go, add them as suggestions to z64save.h in this PR, etc... whatever is desired. Please let me know if there's any preference.
I discovered the context of several WeekEventReg values in the context of ovl_En_Go (Link to discussion). The defines are to be removed from ovl_En_Go, due to the work going on here but to avoid losing the information, I can copy them somewhere (spreadsheet?), demote them to comments in ovl_En_Go, add them as suggestions to z64save.h in this PR, etc... whatever is desired. Please let me know if there's any preference.
@StickyThwomp sorry it has taken so long, but personally I would say just demote them to comments next to where they are used for now. If this PR gets in before, than it would be better to move them to the central header file.
I've probably missed a few extra and missing ().
It's not perfect, but they're all going to be looked at again anyway.