mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-01 03:10:14 -04:00
Rename and format
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "global.h"
|
||||
|
||||
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
|
||||
frameAdvCtx->timer = 0;
|
||||
frameAdvCtx->enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Frame advance allows you to advance through the game one frame at a time on command.
|
||||
* To advance a frame, hold Z and press R on the spceified controller.
|
||||
* Holding Z and R will advance a frame every half second.
|
||||
*
|
||||
* This function returns true when frame advance is not active (game will run normally)
|
||||
*
|
||||
* Note: There is no way to enable it
|
||||
*/
|
||||
s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
|
||||
if (!frameAdvCtx->enabled || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
|
||||
frameAdvCtx->timer = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
void func_80122660(FrameAdvanceContext* frameAdvCtx) {
|
||||
frameAdvCtx->timer = 0;
|
||||
frameAdvCtx->enabled = false;
|
||||
}
|
||||
|
||||
s32 func_80122670(FrameAdvanceContext* frameAdvCtx, Input* input) {
|
||||
if (!frameAdvCtx->enabled || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
|
||||
frameAdvCtx->timer = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user