1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 20:35:13 +00:00
oot/include/z_actor_dlftbls.h
fig02 28cc9d68cf
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>
2025-06-04 14:38:33 -04:00

74 lines
2.3 KiB
C

#ifndef Z_ACTOR_DLFTBLS_H
#define Z_ACTOR_DLFTBLS_H
#include "romfile.h"
#include "actor_profile.h"
/**
* @see ACTOROVL_ALLOC_ABSOLUTE
*/
#if DEBUG_FEATURES
#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x27A0
#else
#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x24E0
#endif
/**
* The actor overlay should be allocated memory for when loading,
* and the memory deallocated when there is no more actor using the overlay.
*
* `ACTOROVL_ALLOC_` defines indicate how an actor overlay should be loaded.
*
* @note Bitwise or-ing `ACTOROVL_ALLOC_` types is not meaningful.
* The `ACTOROVL_ALLOC_` types are 0, 1, 2 but checked against with a bitwise and.
*
* @see ACTOROVL_ALLOC_ABSOLUTE
* @see ACTOROVL_ALLOC_PERSISTENT
* @see actor_table.h
*/
#define ACTOROVL_ALLOC_NORMAL 0
/**
* The actor overlay should be loaded to "absolute space".
*
* Absolute space is a fixed amount of memory allocated once.
* The overlay will still need to be loaded again if at some point there is no more actor using the overlay.
*
* @note Only one such overlay may be loaded at a time.
* This is not checked: a newly loaded overlay will overwrite the previous one in absolute space,
* even if actors are still relying on the previous one. Actors using absolute-allocated overlays should be deleted
* when another absolute-allocated overlay is about to be used.
*
* @see ACTOROVL_ABSOLUTE_SPACE_SIZE
* @see ActorContext.absoluteSpace
* @see ACTOROVL_ALLOC_NORMAL
*/
#define ACTOROVL_ALLOC_ABSOLUTE (1 << 0)
/**
* The actor overlay should be loaded persistently.
* It will stay loaded until the current game state instance ends.
*
* @see ACTOROVL_ALLOC_NORMAL
*/
#define ACTOROVL_ALLOC_PERSISTENT (1 << 1)
typedef struct ActorOverlay {
/* 0x00 */ RomFile file;
/* 0x08 */ void* vramStart;
/* 0x0C */ void* vramEnd;
/* 0x10 */ void* loadedRamAddr; // original name: "allocp"
/* 0x14 */ ActorProfile* profile;
/* 0x18 */ char* name;
/* 0x1C */ u16 allocType; // See `ACTOROVL_ALLOC_` defines
/* 0x1E */ s8 numLoaded; // original name: "clients"
} ActorOverlay; // size = 0x20
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
extern s32 gMaxActorId; // original name: "MaxProfile"
void ActorOverlayTable_LogPrint(void);
void ActorOverlayTable_Init(void);
void ActorOverlayTable_Cleanup(void);
#endif