2021-09-15 23:24:19 +00:00
|
|
|
#ifndef Z64OBJECT_H
|
|
|
|
#define Z64OBJECT_H
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2023-08-15 16:21:19 +00:00
|
|
|
#include "ultra64.h"
|
|
|
|
#include "z64dma.h"
|
|
|
|
|
|
|
|
typedef struct {
|
2023-09-19 18:10:12 +00:00
|
|
|
/* 0x00 */ s16 id;
|
|
|
|
/* 0x04 */ void* segment;
|
|
|
|
/* 0x08 */ DmaRequest dmaRequest;
|
2023-08-15 16:21:19 +00:00
|
|
|
/* 0x28 */ OSMesgQueue loadQueue;
|
2023-09-19 18:10:12 +00:00
|
|
|
/* 0x40 */ OSMesg loadMsg;
|
|
|
|
} ObjectEntry; // size = 0x44
|
2023-08-15 16:21:19 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2023-09-19 18:10:12 +00:00
|
|
|
/* 0x0000 */ void* spaceStart;
|
|
|
|
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
|
|
|
|
/* 0x0008 */ u8 numEntries; // total amount of used entries
|
|
|
|
/* 0x0009 */ u8 numPersistentEntries; // amount of entries that won't be reused when loading a new object list (when loading a new room)
|
|
|
|
/* 0x000A */ u8 mainKeepSlot; // "gameplay_keep" slot
|
|
|
|
/* 0x000B */ u8 subKeepSlot; // "gameplay_field_keep" or "gameplay_dangeon_keep" slot
|
|
|
|
/* 0x000C */ ObjectEntry slots[19];
|
2023-08-15 16:21:19 +00:00
|
|
|
} ObjectContext; // size = 0x518
|
|
|
|
|
2021-08-30 01:24:32 +00:00
|
|
|
#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 {
|
2021-08-30 01:24:32 +00:00
|
|
|
#include "tables/object_table.h"
|
2021-01-20 18:15:17 +00:00
|
|
|
/* 0x0192 */ OBJECT_ID_MAX
|
2023-09-19 18:10:12 +00:00
|
|
|
} ObjectId;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-08-30 01:24:32 +00:00
|
|
|
#undef DEFINE_OBJECT
|
|
|
|
#undef DEFINE_OBJECT_NULL
|
|
|
|
#undef DEFINE_OBJECT_UNSET
|
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
#endif
|