Alchemy
Loading...
Searching...
No Matches

heap_state.h File Reference

The heap's work slots and HeapState. More...

Go to the source code of this file.

Data Structures

union  HeapState
 The heap's 64 work slots, the first two holding the next free EWRAM and IWRAM addresses. More...

Macros

#define WORK_SLOT(n)
 Reads slots through their own addresses; adjacent slots are reached by offsets.

Enumerations

enum  HeapSlot {
  HEAP_SLOT_TRANSFORM_STACK = 2 , HEAP_SLOT_MENU_CONTROL = 6 , HEAP_SLOT_MAP = 8 , HEAP_SLOT_BATTLE = 9 ,
  HEAP_SLOT_CAMERA = 12 , HEAP_SLOT_WINDOW = 15 , HEAP_SLOT_EVENT = 27 , HEAP_SLOT_TRANSITION = 31 ,
  HEAP_SLOT_BATTLE_EFFECT = 39 , HEAP_SLOT_BATTLE_CANVAS = 40 , HEAP_SLOT_BATTLE_SHEET = 41 , HEAP_SLOT_BATTLE_BACKGROUND = 44 ,
  HEAP_SLOT_BLITTER = 46 , HEAP_SLOT_BLITTER_ALTERNATE = 47 , HEAP_SLOT_TEMP_RENDERER = 49 , HEAP_SLOT_SAVE = 51 ,
  HEAP_SLOT_FRAME_SCRATCH = 52 , HEAP_SLOT_FRAME_UPLOADER = 53 , HEAP_SLOT_MENU = 55
}

Functions

 STATIC_ASSERT (sizeof(union HeapState)==0x100)
 STATIC_ASSERT (offsetof(union HeapState, heap.nextIwram)==4)
 STATIC_ASSERT (offsetof(union HeapState, heap.blocks)==8)

Variables

void * gWorkSlot [64]

Detailed Description

The heap's work slots and HeapState.

Definition in file heap_state.h.

Macro Definition Documentation

◆ WORK_SLOT

#define WORK_SLOT ( n)
Value:
(*(gWorkSlot + (n)))
void * gWorkSlot[]

Reads slots through their own addresses; adjacent slots are reached by offsets.

(gWorkSlot[n] instead addresses from the table's start.)

Definition at line 14 of file heap_state.h.

Referenced by Battle_PlaceActorsByFormationKind(), BattleBackground_Load(), BattleCamera_SetRange(), BattleFx_AdvanceBg2OnInterval(), BattleFx_AdvanceScrollOnInterval(), BattleFx_ArmBg2AffineHBlankDma(), BattleFx_ArmPaletteHBlankDma(), BattleFx_BeginCanvasLayer(), BattleFx_ClearActorTimers(), BattleFx_DrawStreaks(), BattleFx_EndCanvasLayer(), BattleFx_OpenCanvasLayer(), BattleFx_PlaceFormationObjects(), BattleFx_ProbeKeysForExtendedActor(), BattleFx_RunAstralBlast(), BattleFx_RunBind(), BattleFx_RunCastingImpact(), BattleFx_RunDrain(), BattleFx_RunFire(), BattleFx_RunFroth(), BattleFx_RunGround(), BattleFx_RunKite(), BattleFx_RunMoteFountain(), BattleFx_RunOrbitingSkulls(), BattleFx_RunQuake(), BattleFx_RunShiningStar(), BattleFx_RunStatBoost(), BattleFx_RunTableEffect(), BattleFx_RunTriangleStrike(), BattleFx_SetupCanvasTileMap(), BattleFx_SpawnObjects(), BattleFx_WipeCanvas(), BattlePres_RunEntryTransition(), BattlePres_RunEscape(), BattlePres_UpdateHBlankScroll(), BattlePresentation_DispatchAction(), BattlePresentation_RunUnitTransition(), BattlePresentation_UpdateCamera(), Camera_ApplyShake(), Camera_ConfigureScene(), Display_ApplyBg2Reference(), DjinnMenu_DrawElementList(), DjinnMenu_ShowHelp(), Event_HurryToThePlaza(), Event_StartRising(), Event_StopRising(), FadeOverlay_DrawMarks(), Field_GetCollisionAheadOfLeader(), Field_ProcessStep(), FieldEffect_UpdateSparkles(), FieldFx_RunReveal(), FieldMotes_Update(), Graphics_ApplyWindowBlendRegisters(), Map_ShowWorldMap(), MapAnimation_ApplyAffineFrame(), MercuryLighthouse_ChargeLights(), MercuryLighthouse_HopAcrossPool(), MercuryLighthouse_LoseLights(), MercuryLighthouse_SparkleAtLeader(), ObjectGroup_TickMemberTimers(), ObjectGroup_UpdateMembers(), Palette_StepFadeTransfer(), PartyStatusDraw(), PsynergyMenu_Run(), Scene_Initialize(), Sprite_ComposeAnimationFrame(), StatusMenu_Run(), TretPalette_UpdateSceneTint(), TretTreeInteriors_EnterRoom(), UiWindow_BuildLayoutBounds(), ValeBabi_Initialize(), VenusLighthouseAerie_PlayShebasFall(), WorldMap_BeginStillView(), and WorldMap_UpdateView().

Enumeration Type Documentation

◆ HeapSlot

enum HeapSlot
Enumerator
HEAP_SLOT_TRANSFORM_STACK 

The 3D transform's one saved level.

HEAP_SLOT_MENU_CONTROL 
HEAP_SLOT_MAP 
HEAP_SLOT_BATTLE 
HEAP_SLOT_CAMERA 
HEAP_SLOT_WINDOW 
HEAP_SLOT_EVENT 
HEAP_SLOT_TRANSITION 
HEAP_SLOT_BATTLE_EFFECT 
HEAP_SLOT_BATTLE_CANVAS 
HEAP_SLOT_BATTLE_SHEET 
HEAP_SLOT_BATTLE_BACKGROUND 
HEAP_SLOT_BLITTER 
HEAP_SLOT_BLITTER_ALTERNATE 
HEAP_SLOT_TEMP_RENDERER 

Copied field row drawer or window tile decoder, released after each call.

HEAP_SLOT_SAVE 
HEAP_SLOT_FRAME_SCRATCH 

Lives for one frame: WaitFrames builds the OAM list in it, and the field sprite decoder keeps its code there between its own uses.

HEAP_SLOT_FRAME_UPLOADER 
HEAP_SLOT_MENU 

Definition at line 33 of file heap_state.h.

Function Documentation

◆ STATIC_ASSERT() [1/3]

STATIC_ASSERT ( sizeof(union HeapState) = =0x100)

◆ STATIC_ASSERT() [2/3]

STATIC_ASSERT ( offsetof(union HeapState, heap.nextIwram) = =4)

◆ STATIC_ASSERT() [3/3]

STATIC_ASSERT ( offsetof(union HeapState, heap.blocks) = =8)

Variable Documentation

◆ gWorkSlot

void* gWorkSlot[64]
extern