summaryrefslogtreecommitdiff
path: root/include/z_en_a_keep.h
blob: 5a48b331fea9f894fd75e923bccb02d2e99317ac (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
#ifndef Z_EN_A_KEEP_H
#define Z_EN_A_KEEP_H

#include "z64actor.h"
#include "z64collision_check.h"

struct EnAObj;
struct PlayState;

typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*);

typedef struct EnAObj {
    /* 0x000 */ Actor actor;
    /* 0x144 */ EnAObjActionFunc actionFunc;
    /* 0x148 */ ColliderCylinder collision;
} EnAObj; // size = 0x194

typedef enum {
    /* 0 */ AOBJ_SIGNPOST_OBLONG,
    /* 1 */ AOBJ_SIGNPOST_ARROW
} AObjType;

#define AOBJ_GET_TEXTID(thisx) ((((thisx)->params >> 8) & 0xFF) | 0x300)
#define AOBJ_GET_TYPE(thisx) (((thisx)->params & 0xFF) - 9)

#define AOBJ_PARAMS(textId, type) ((((textId - 0x300) & 0xFF) << 8) | (type + 9))

#endif