diff --git a/mm/src/code/z_play_hireso.c b/mm/src/code/z_play_hireso.c index 2cdb47b48..445171d75 100644 --- a/mm/src/code/z_play_hireso.c +++ b/mm/src/code/z_play_hireso.c @@ -1115,6 +1115,7 @@ void BombersNotebook_Draw(BombersNotebook* this, GraphicsContext* gfxCtx) { void BombersNotebook_LoadFiles(BombersNotebook* this, s32 flag) { switch (this->loadState) { case BOMBERS_NOTEBOOK_LOAD_STATE_NONE: + #if 0 if (this->scheduleDmaSegment == NULL) { break; } @@ -1122,6 +1123,7 @@ void BombersNotebook_LoadFiles(BombersNotebook* this, s32 flag) { osCreateMesgQueue(&this->loadQueue, this->loadMsg, ARRAY_COUNT(this->loadMsg)); DmaMgr_SendRequestImpl(&this->dmaRequest, this->scheduleSegment, this->scheduleSegmentStart, this->scheduleSegmentSize, 0, &this->loadQueue, OS_MESG_PTR(NULL)); + #endif this->loadState = BOMBERS_NOTEBOOK_LOAD_STATE_STARTED; // fallthrough case BOMBERS_NOTEBOOK_LOAD_STATE_STARTED: @@ -1155,7 +1157,8 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input s32 stickAdjY = input->rel.stick_y; s32 cursorEntryScan; - + // #region 2S2H [Port] We don't need to malloc these with our asset setup + #if 0 this->scheduleDmaSegmentStart = SEGMENT_ROM_START(schedule_dma_static_yar); this->scheduleDmaSegmentSize = SEGMENT_ROM_SIZE(schedule_dma_static_syms); this->scheduleSegmentStart = SEGMENT_ROM_START(schedule_static); @@ -1168,7 +1171,7 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input if (this->scheduleSegment == NULL) { this->scheduleSegment = ZeldaArena_Malloc(this->scheduleSegmentSize); } - + #endif BombersNotebook_LoadFiles(this, OS_MESG_NOBLOCK); if (this->loadState == BOMBERS_NOTEBOOK_LOAD_STATE_DONE) { @@ -1348,9 +1351,17 @@ void BombersNotebook_Destroy(BombersNotebook* this) { if (this->loadState == BOMBERS_NOTEBOOK_LOAD_STATE_STARTED) { BombersNotebook_LoadFiles(this, OS_MESG_BLOCK); } + #if 0 if (this->scheduleDmaSegment != NULL) { ZeldaArena_Free(this->scheduleDmaSegment); this->scheduleDmaSegment = NULL; } + + if (this->scheduleSegment != NULL) { + ZeldaArena_Free(this->scheduleSegment); + this->scheduleSegment = NULL; + } + #endif //! @bug: Does not free malloc'd memory for schedule segment + // #region 2S2H [Port] fix the bug by removing the mallocs since they aren't needed for out setup. }