diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-08-05 10:58:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-05 10:58:09 -0400 |
| commit | 94b300b0d0e228dc38dcb08ca160334fa2ba128f (patch) | |
| tree | c818f04c5948982e0c3932cb04fe4c4575fb9889 /include/m_actor_dlftbls.h | |
| parent | 5b54707958ca7fe5455436cf732cdf034232cd50 (diff) | |
`m_actor_dlftbls.c` (#32)
* start
* match the file
* actor_dlftbls_num
* script to extract the actor table
* bootstrap actor table
* ActorId enum
* migrate actor table
* reorganize overlays in subfolders
* Fix Player
* migrate bss
* cleanup and format
* ActorProfile
* Move player_actor to actors folder
* RomOffset
* ACTOR_ID_MAX
Diffstat (limited to 'include/m_actor_dlftbls.h')
| -rw-r--r-- | include/m_actor_dlftbls.h | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/include/m_actor_dlftbls.h b/include/m_actor_dlftbls.h index 660c79d..9daaeed 100644 --- a/include/m_actor_dlftbls.h +++ b/include/m_actor_dlftbls.h @@ -2,11 +2,42 @@ #define M_ACTOR_DLFTBLS_H #include "ultra64.h" +#include "libc/stdint.h" +#include "other_types.h" -// void stub_80058A10(); -// void func_80058A18_jp(); -// void func_80058AF0_jp(); -// void actor_dlftbls_init(); -// void actor_dlftbls_cleanup(); +struct ActorProfile; + + +#define DEFINE_ACTOR(_name, enumValue, _allocType) enumValue, +#define DEFINE_ACTOR_INTERNAL(_name, enumValue, _allocType) enumValue, +#define DEFINE_ACTOR_UNSET(enumValue) enumValue, + +typedef enum ActorId { + #include "tables/actor_table.h" + /* 0xC9 */ ACTOR_ID_MAX +} ActorId; + +#undef DEFINE_ACTOR +#undef DEFINE_ACTOR_INTERNAL +#undef DEFINE_ACTOR_UNSET + +typedef struct ActorOverlay { + /* 0x00 */ RomOffset vromStart; + /* 0x04 */ RomOffset vromEnd; + /* 0x08 */ void* vramStart; + /* 0x0C */ void* vramEnd; + /* 0x10 */ void* loadedRamAddr; + /* 0x14 */ struct ActorProfile* profile; + /* 0x18 */ char* name; + /* 0x1C */ u16 allocType; + /* 0x1E */ s8 numLoaded; +} ActorOverlay; // size = 0x20 + + +void actor_dlftbls_init(void); +void actor_dlftbls_cleanup(void); + +extern ActorOverlay actor_dlftbls[ACTOR_ID_MAX]; +extern ActorId actor_dlftbls_num; #endif |
