-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate enhancements to ShipInit pattern
- Loading branch information
1 parent
3917e3b
commit 8655fa9
Showing
59 changed files
with
1,014 additions
and
1,216 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#include <libultraship/bridge.h> | ||
#include "2s2h/GameInteractor/GameInteractor.h" | ||
#include "2s2h/ShipInit.hpp" | ||
|
||
#define CVAR_NAME "gCheats.ElegyAnywhere" | ||
#define CVAR CVarGetInteger(CVAR_NAME, 0) | ||
|
||
void RegisterElegyAnywhere() { | ||
REGISTER_VB_SHOULD(VB_ELEGY_CHECK_SCENE, { | ||
if (CVarGetInteger("gCheats.ElegyAnywhere", 0)) { | ||
*should = true; | ||
} | ||
}); | ||
COND_VB_SHOULD(VB_ELEGY_CHECK_SCENE, CVAR, { *should = true; }); | ||
} | ||
|
||
static RegisterShipInitFunc initFunc(RegisterElegyAnywhere, { CVAR_NAME }); |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#include <libultraship/bridge.h> | ||
#include "GameInteractor/GameInteractor.h" | ||
#include "2s2h/GameInteractor/GameInteractor.h" | ||
#include "2s2h/ShipInit.hpp" | ||
|
||
#define CVAR_NAME "gCheats.HookshotAnywhere" | ||
#define CVAR CVarGetInteger(CVAR_NAME, 0) | ||
|
||
void RegisterHookshotAnywhere() { | ||
REGISTER_VB_SHOULD(VB_BE_HOOKSHOT_SURFACE, { | ||
if (CVarGetInteger("gCheats.HookshotAnywhere", 0)) { | ||
*should = true; | ||
} | ||
}); | ||
COND_VB_SHOULD(VB_BE_HOOKSHOT_SURFACE, CVAR, { *should = true; }); | ||
} | ||
|
||
static RegisterShipInitFunc initFunc(RegisterHookshotAnywhere, { CVAR_NAME }); |
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 |
---|---|---|
@@ -1,16 +1,22 @@ | ||
#include <libultraship/bridge.h> | ||
#include "2s2h/ShipInit.hpp" | ||
|
||
extern "C" { | ||
#include "z64.h"; | ||
#include "variables.h"; | ||
extern f32 D_8085D958[2]; | ||
} | ||
|
||
#define CVAR_NAME "gCheats.LongerFlowerGlide" | ||
#define CVAR CVarGetInteger(CVAR_NAME, 0) | ||
|
||
void RegisterLongerFlowerGlide() { | ||
if (CVarGetInteger("gCheats.LongerFlowerGlide", 0)) { | ||
if (CVAR) { | ||
D_8085D958[0] = 99999.9f; | ||
D_8085D958[1] = 99999.9f; | ||
} else { | ||
D_8085D958[0] = 600.0f; | ||
D_8085D958[1] = 960.0f; | ||
} | ||
} | ||
|
||
static RegisterShipInitFunc initFunc(RegisterLongerFlowerGlide, { CVAR_NAME }); |
Oops, something went wrong.