-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathitembehaviour.h
33 lines (28 loc) · 1.02 KB
/
itembehaviour.h
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
/*
ItemBehaviour is a struct containing various information about how an item should behave
Contributors:
Seeky (main documentation)
TheLordScruffy (object id field)
References:
http://wiki.tockdom.com/wiki/Filesystem/rel/StaticR.rel#Item_behaviour_modifier
*/
typedef enum : int {
ITEMUSE_USE,
ITEMUSE_FIRE,
ITEMUSE_TAIL,
ITEMUSE_CIRCLE
} ItemUseType;
typedef struct {
uint8_t unknkown_0x0;
uint8_t unknkown_0x1;
uint8_t padding[2]; // Ignored when copying to array
uint32_t objectId; // see http://wiki.tockdom.com/wiki/List_of_Identifiers#Items
uint32_t numberOfItems;
uint32_t unknown_0xc;
uint8_t unknown_0x10;
uint8_t padding2[3]; // Ignored when copying to array
ItemUseType useType;
void * useFunction; // Item is draggable if this is null
} ItemBehaviour; // Total size 0x1c
ItemBehaviour itemBehaviourTable[19]; // 809c36a0, index item id, see http://wiki.tockdom.com/wiki/List_of_Identifiers#Items
void setupItemBehaviourTable(); // 807bcae0, copies individual structs from rodata into table