diff options
| author | fig02 <fig02srl@gmail.com> | 2025-06-04 14:38:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-04 14:38:33 -0400 |
| commit | 28cc9d68cfe4a037eb232d5465b84a943539bca3 (patch) | |
| tree | 4001d36dccb035576f3cbf17cf9a548cdc9c5b3f /include/object.h | |
| parent | e8b708a4480e568f409c8e53986c2e96595b9405 (diff) | |
Remove "z64" prefix from all headers (#2518)
* z64 - a
* z64 - b
* z64 - c
* z64 - d
* z64 - e
* z64 - f
* z64 - g
* z64 - h
* z64 - i
* z64 - l
* z64 - m
* z64 - o
* z64 - p
* z64 - q
* z64 - r
* z64 - s
* z64 - t
* z64 - v
* restore file
* fix merge
* fix merge
---------
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Diffstat (limited to 'include/object.h')
| -rw-r--r-- | include/object.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/object.h b/include/object.h new file mode 100644 index 000000000..e40e67112 --- /dev/null +++ b/include/object.h @@ -0,0 +1,49 @@ +#ifndef OBJECT_H +#define OBJECT_H + +#include "ultra64.h" +#include "dma.h" + +struct PlayState; + +typedef struct ObjectEntry { + /* 0x00 */ s16 id; + /* 0x04 */ void* segment; + /* 0x08 */ DmaRequest dmaRequest; + /* 0x28 */ OSMesgQueue loadQueue; + /* 0x40 */ OSMesg loadMsg; +} ObjectEntry; // size = 0x44 + +typedef struct ObjectContext { + /* 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]; +} ObjectContext; // size = 0x518 + +#define DEFINE_OBJECT(_0, enum) enum, +#define DEFINE_OBJECT_EMPTY(_0, enum) enum, +#define DEFINE_OBJECT_UNSET(enum) enum, + +typedef enum ObjectId { + #include "tables/object_table.h" + /* 0x0192 */ OBJECT_ID_MAX +} ObjectId; + +#undef DEFINE_OBJECT +#undef DEFINE_OBJECT_EMPTY +#undef DEFINE_OBJECT_UNSET + +void Object_InitContext(struct PlayState* play, ObjectContext* objectCtx); +void Object_UpdateEntries(ObjectContext* objectCtx); +s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId); +s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot); +void func_800981B8(ObjectContext* objectCtx); + +extern u32 gObjectTableSize; +extern RomFile gObjectTable[OBJECT_ID_MAX]; + +#endif |
