forked from zeldaret/mm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
198 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include <ultra64.h> | ||
#include <global.h> | ||
|
||
void PreNMI_Stop(PreNMIContext* prenmiCtx) { | ||
prenmiCtx->state.running = 0; | ||
prenmiCtx->state.nextGameStateInit = NULL; | ||
prenmiCtx->state.nextGameStateSize = 0; | ||
} | ||
|
||
void PreNMI_Update(PreNMIContext* prenmiCtx) { | ||
if (prenmiCtx->timer == 0) { | ||
ViConfig_UpdateVi(1); | ||
PreNMI_Stop(prenmiCtx); | ||
return; | ||
} | ||
|
||
prenmiCtx->timer--; | ||
} | ||
|
||
#ifdef NON_MATCHING | ||
// Minor reordering around call to func_8012C470 | ||
void PreNMI_Draw(PreNMIContext* prenmiCtx) { | ||
GraphicsContext* gfxCtx = prenmiCtx->state.gfxCtx; | ||
|
||
func_8012CF0C(gfxCtx, 1, 1, 0, 0, 0); | ||
func_8012C470(gfxCtx); | ||
|
||
gDPSetFillColor(gfxCtx->polyOpa.p++, | ||
(GPACK_RGBA5551(0xFF, 0xFF, 0xFF, 1) << 16) | GPACK_RGBA5551(0xFF, 0xFF, 0xFF, 1)); | ||
gDPFillRectangle(gfxCtx->polyOpa.p++, 0, prenmiCtx->timer + 100, 320 /*SCREEN_WIDTH*/ - 1, prenmiCtx->timer + 100); | ||
} | ||
#else | ||
GLOBAL_ASM("asm/non_matchings/z_prenmi/PreNMI_Draw.asm") | ||
#endif | ||
|
||
void PreNMI_Main(PreNMIContext* prenmiCtx) { | ||
PreNMI_Update(prenmiCtx); | ||
PreNMI_Draw(prenmiCtx); | ||
|
||
prenmiCtx->state.unkA3 = 1; | ||
} | ||
|
||
void PreNMI_Destroy(PreNMIContext* prenmiCtx) {} | ||
|
||
void PreNMI_Init(PreNMIContext* prenmiCtx) { | ||
prenmiCtx->state.main = (func_ptr)PreNMI_Main; | ||
prenmiCtx->state.destroy = (func_ptr)PreNMI_Destroy; | ||
prenmiCtx->timer = 30; | ||
prenmiCtx->unkA8 = 10; | ||
|
||
Game_SetFramerateDivisor(&prenmiCtx->state, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ z_std_dma | |
z_scene | ||
z_view | ||
z_rcp | ||
z_prenmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.