summaryrefslogtreecommitdiff
path: root/include/m_actor_dlftbls.h
blob: 9daaeed9eeba868dae296cb5a81c7dac2265a31c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef M_ACTOR_DLFTBLS_H
#define M_ACTOR_DLFTBLS_H

#include "ultra64.h"
#include "libc/stdint.h"
#include "other_types.h"

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