1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 12:54:51 +00:00
oot/include/z64object.h

41 lines
1.1 KiB
C
Raw Normal View History

#ifndef Z64OBJECT_H
#define Z64OBJECT_H
2020-03-17 04:31:30 +00:00
#include "ultra64.h"
#include "z64dma.h"
2020-03-17 04:31:30 +00:00
#define OBJECT_EXCHANGE_BANK_MAX 19
typedef struct {
/* 0x00 */ s16 id;
/* 0x04 */ void* segment;
/* 0x08 */ DmaRequest dmaRequest;
/* 0x28 */ OSMesgQueue loadQueue;
/* 0x40 */ OSMesg loadMsg;
} ObjectStatus; // size = 0x44
typedef struct {
/* 0x0000 */ void* spaceStart;
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
/* 0x0008 */ u8 num; // number of objects in bank
/* 0x0009 */ u8 unk_09;
/* 0x000A */ u8 mainKeepIndex; // "gameplay_keep" index in bank
/* 0x000B */ u8 subKeepIndex; // "gameplay_field_keep" or "gameplay_dangeon_keep" index in bank
/* 0x000C */ ObjectStatus status[OBJECT_EXCHANGE_BANK_MAX];
} ObjectContext; // size = 0x518
#define DEFINE_OBJECT(_0, enum) enum,
#define DEFINE_OBJECT_NULL(_0, enum) enum,
#define DEFINE_OBJECT_UNSET(enum) enum,
2020-03-22 21:50:11 +00:00
typedef enum {
#include "tables/object_table.h"
/* 0x0192 */ OBJECT_ID_MAX
2020-03-17 04:31:30 +00:00
} ObjectID;
#undef DEFINE_OBJECT
#undef DEFINE_OBJECT_NULL
#undef DEFINE_OBJECT_UNSET
2020-03-17 04:31:30 +00:00
#endif