Removed huge/tiny mario and exit anywhere cheats
This commit is contained in:
parent
8779460b87
commit
a75113c665
|
@ -2760,7 +2760,7 @@ s16 render_pause_courses_and_castle(void) {
|
||||||
render_pause_red_coins();
|
render_pause_red_coins();
|
||||||
|
|
||||||
/* Always allow exiting from course */
|
/* Always allow exiting from course */
|
||||||
if (TRUE || (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) || (Cheats.EnableCheats && Cheats.ExitAnywhere)) {
|
if (TRUE || (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT)) {
|
||||||
render_pause_course_options(99, 93, &gDialogLineNum, 15);
|
render_pause_course_options(99, 93, &gDialogLineNum, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1261,21 +1261,7 @@ void squish_mario_model(struct MarioState *m) {
|
||||||
// If no longer squished, scale back to default.
|
// If no longer squished, scale back to default.
|
||||||
// Also handles the Tiny Mario and Huge Mario cheats.
|
// Also handles the Tiny Mario and Huge Mario cheats.
|
||||||
if (m->squishTimer == 0) {
|
if (m->squishTimer == 0) {
|
||||||
if (Cheats.EnableCheats) {
|
vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
|
||||||
if (Cheats.HugeMario) {
|
|
||||||
vec3f_set(m->marioObj->header.gfx.scale, 2.5f, 2.5f, 2.5f);
|
|
||||||
}
|
|
||||||
else if (Cheats.TinyMario) {
|
|
||||||
vec3f_set(m->marioObj->header.gfx.scale, 0.2f, 0.2f, 0.2f);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// If timer is less than 16, rubber-band Mario's size scale up and down.
|
// If timer is less than 16, rubber-band Mario's size scale up and down.
|
||||||
else if (m->squishTimer <= 16) {
|
else if (m->squishTimer <= 16) {
|
||||||
|
@ -1847,21 +1833,6 @@ static u8 prevent_hang(u32 hangPreventionActions[], u8* hangPreventionIndex) {
|
||||||
*/
|
*/
|
||||||
s32 execute_mario_action(UNUSED struct Object *o) {
|
s32 execute_mario_action(UNUSED struct Object *o) {
|
||||||
s32 inLoop = TRUE;
|
s32 inLoop = TRUE;
|
||||||
/**
|
|
||||||
* Cheat stuff
|
|
||||||
*/
|
|
||||||
if (Cheats.EnableCheats)
|
|
||||||
{
|
|
||||||
if (Cheats.GodMode)
|
|
||||||
gMarioState->health = 0x880;
|
|
||||||
|
|
||||||
if (Cheats.InfiniteLives && gMarioState->numLives < 99)
|
|
||||||
gMarioState->numLives += 1;
|
|
||||||
|
|
||||||
if (Cheats.SuperSpeed && gMarioState->forwardVel > 0)
|
|
||||||
gMarioState->forwardVel += 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
// hide unconnected players
|
// hide unconnected players
|
||||||
if (gNetworkPlayers[gMarioState->playerIndex].type != NPT_LOCAL) {
|
if (gNetworkPlayers[gMarioState->playerIndex].type != NPT_LOCAL) {
|
||||||
if (!gNetworkPlayers[gMarioState->playerIndex].connected) {
|
if (!gNetworkPlayers[gMarioState->playerIndex].connected) {
|
||||||
|
@ -1871,9 +1842,23 @@ s32 execute_mario_action(UNUSED struct Object *o) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cheat stuff
|
||||||
|
*/
|
||||||
|
if (Cheats.EnableCheats) {
|
||||||
|
if (Cheats.GodMode)
|
||||||
|
gMarioState->health = 0x880;
|
||||||
|
|
||||||
|
if (Cheats.InfiniteLives && gMarioState->numLives < 99)
|
||||||
|
gMarioState->numLives += 1;
|
||||||
|
|
||||||
|
if (Cheats.SuperSpeed && gMarioState->controller->stickMag > 0.5f)
|
||||||
|
gMarioState->forwardVel += 100;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* End of cheat stuff
|
* End of cheat stuff
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (gMarioState->action) {
|
if (gMarioState->action) {
|
||||||
if (gMarioState->action != ACT_BUBBLED) {
|
if (gMarioState->action != ACT_BUBBLED) {
|
||||||
gMarioState->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
gMarioState->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||||
|
|
|
@ -280,9 +280,6 @@ static struct Option optsCheats[] = {
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[3], &Cheats.InfiniteLives ),
|
DEF_OPT_TOGGLE( optsCheatsStr[3], &Cheats.InfiniteLives ),
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[4], &Cheats.SuperSpeed ),
|
DEF_OPT_TOGGLE( optsCheatsStr[4], &Cheats.SuperSpeed ),
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[5], &Cheats.Responsive ),
|
DEF_OPT_TOGGLE( optsCheatsStr[5], &Cheats.Responsive ),
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[6], &Cheats.ExitAnywhere ),
|
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[7], &Cheats.HugeMario ),
|
|
||||||
DEF_OPT_TOGGLE( optsCheatsStr[8], &Cheats.TinyMario ),
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,6 @@ struct CheatList {
|
||||||
bool InfiniteLives;
|
bool InfiniteLives;
|
||||||
bool SuperSpeed;
|
bool SuperSpeed;
|
||||||
bool Responsive;
|
bool Responsive;
|
||||||
bool ExitAnywhere;
|
|
||||||
bool HugeMario;
|
|
||||||
bool TinyMario;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct CheatList Cheats;
|
extern struct CheatList Cheats;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static u8 warpToLevel = LEVEL_SSL;
|
static u8 warpToLevel = LEVEL_CCM;
|
||||||
|
|
||||||
#define SCANCODE_0 0x0B
|
#define SCANCODE_0 0x0B
|
||||||
#define SCANCODE_3 0x04
|
#define SCANCODE_3 0x04
|
||||||
|
|
Loading…
Reference in New Issue