1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00
oot/include/z64object.h
Dragorn421 ccae1f7387
Split z64.h: move various things, state, sram, gfx, jpeg, prerender, speedmeter (#1487)
* Split z64.h more

* fix speedmeter.h (expect this kind of issue resolution to pop up eventually)

* fix z64object.h

* fix z64state.h

* fix (probably only partially) z64play.h

* fix fix speedmeter.h :)

* revert making a play header (sadge), add/split transition & transition_instances

* move stuff to cutscene, interface

* Move `TransitionCircle%` enums to `z64transition_instances.h`

* z64state.h -> z64game.h with a "this is not final" comment

* forward declare GraphicsContext in z64game.h instead of including the header file for it

* don't comment on where the forward declarations are from

reasoning:
1) it's easy to go out of sync (like this comment, it was outdated anyway)
2) any IDE can easily find the struct anyway
2023-08-15 12:21:19 -04:00

41 lines
1.1 KiB
C

#ifndef Z64OBJECT_H
#define Z64OBJECT_H
#include "ultra64.h"
#include "z64dma.h"
#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,
typedef enum {
#include "tables/object_table.h"
/* 0x0192 */ OBJECT_ID_MAX
} ObjectID;
#undef DEFINE_OBJECT
#undef DEFINE_OBJECT_NULL
#undef DEFINE_OBJECT_UNSET
#endif