Skip to content

Commit

Permalink
Fix arcResAccessor::dt
Browse files Browse the repository at this point in the history
  • Loading branch information
SeekyCt committed Sep 3, 2024
1 parent 4fad84c commit 3b7f262
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 7 additions & 0 deletions spm-headers/include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ typedef u8 unk8;
#define DECOMP_STATIC(expr) extern expr;
#endif

// Macro for something that is deadstripped outside of decomp
#ifdef DECOMP
#define STRIPPED(expr) expr;
#else
#define STRIPPED(expr)
#endif

// Use extern "C" in C++, use namespacing in mods
#ifdef __cplusplus
#ifndef DECOMP
Expand Down
1 change: 1 addition & 0 deletions spm-headers/include/spm/seq_title.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void seq_titleMain(SeqWork * work);
void seq_titleExit(SeqWork * work);
void seqTitleDispCb(s32 cameraId, void * param);
void seqTitleInitLayout();
STRIPPED(void seqTitleDeleteLayout())
void seqTitleDisp();

// No idea why this is in this file of all places, but it is
Expand Down
16 changes: 11 additions & 5 deletions src/seq_title.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ void seq_titleExit(SeqWork * seqWork)
{
(void) seqWork;

delete wp->layout;
delete wp->arcResAccessor;

__memFree(HEAP_MAP, wp->arc);
__memFree(HEAP_MAP, wp->heap);
seqTitleDeleteLayout();
memClear(HEAP_MAP);
}

Expand Down Expand Up @@ -220,6 +216,16 @@ void seqTitleInitLayout()
spsndSFXOn("SFX_SYS_TITLE_APPEAR1");
}

// ALways inlined
void seqTitleDeleteLayout()
{
delete wp->layout;
delete wp->arcResAccessor;

__memFree(HEAP_MAP, wp->arc);
__memFree(HEAP_MAP, wp->heap);
}

void seqTitleDisp()
{
// Setup draw info
Expand Down

0 comments on commit 3b7f262

Please sign in to comment.