mirror of https://github.com/sm64pc/sm64pc.git
Added "Exit course at any time", "Huge Mario" and "Tiny Mario" cheats
The exit course at any time cheat clears up one of the TODO items while keeping purists happy since it's optional :)
This commit is contained in:
parent
34e5ff3fc7
commit
8586c7657a
|
@ -53,7 +53,9 @@
|
|||
#define TEXT_OPT_CHEAT4 _("Infinite lives")
|
||||
#define TEXT_OPT_CHEAT5 _("Super speed")
|
||||
#define TEXT_OPT_CHEAT6 _("Super responsive controls")
|
||||
|
||||
#define TEXT_OPT_CHEAT7 _("Exit course at any time")
|
||||
#define TEXT_OPT_CHEAT8 _("Huge Mario")
|
||||
#define TEXT_OPT_CHEAT9 _("Tiny Mario")
|
||||
/**
|
||||
* Global Symbols
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "print.h"
|
||||
#include "engine/math_util.h"
|
||||
#include "course_table.h"
|
||||
#include "pc/cheats.h"
|
||||
#ifdef BETTERCAMERA
|
||||
#include "bettercamera.h"
|
||||
#endif
|
||||
|
@ -2629,8 +2630,9 @@ s16 render_pause_courses_and_castle(void) {
|
|||
shade_screen();
|
||||
render_pause_my_score_coins();
|
||||
render_pause_red_coins();
|
||||
|
||||
if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) {
|
||||
|
||||
/* Added support for the "Exit course at any time" cheat */
|
||||
if ((gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) || (Cheats.EnableCheats && Cheats.ExitAnywhere)) {
|
||||
render_pause_course_options(99, 93, &gDialogLineNum, 15);
|
||||
}
|
||||
|
||||
|
|
|
@ -1215,8 +1215,23 @@ u8 sSquishScaleOverTime[16] = { 0x46, 0x32, 0x32, 0x3C, 0x46, 0x50, 0x50, 0x3C,
|
|||
void squish_mario_model(struct MarioState *m) {
|
||||
if (m->squishTimer != 0xFF) {
|
||||
// If no longer squished, scale back to default.
|
||||
// Also handles the Tiny Mario and Huge Mario cheats.
|
||||
if (m->squishTimer == 0) {
|
||||
vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
|
||||
if (Cheats.EnableCheats) {
|
||||
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.
|
||||
else if (m->squishTimer <= 16) {
|
||||
|
|
|
@ -86,6 +86,9 @@ static const u8 optsCheatsStr[][64] = {
|
|||
{ TEXT_OPT_CHEAT4 },
|
||||
{ TEXT_OPT_CHEAT5 },
|
||||
{ TEXT_OPT_CHEAT6 },
|
||||
{ TEXT_OPT_CHEAT7 },
|
||||
{ TEXT_OPT_CHEAT8 },
|
||||
{ TEXT_OPT_CHEAT9 },
|
||||
};
|
||||
|
||||
static const u8 bindStr[][32] = {
|
||||
|
@ -232,6 +235,9 @@ static struct Option optsCheats[] = {
|
|||
DEF_OPT_TOGGLE( optsCheatsStr[3], &Cheats.InfiniteLives ),
|
||||
DEF_OPT_TOGGLE( optsCheatsStr[4], &Cheats.SuperSpeed),
|
||||
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),
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ struct CheatList
|
|||
bool InfiniteLives;
|
||||
bool SuperSpeed;
|
||||
bool Responsive;
|
||||
bool ExitAnywhere;
|
||||
bool HugeMario;
|
||||
bool TinyMario;
|
||||
};
|
||||
|
||||
extern struct CheatList Cheats;
|
||||
|
|
Loading…
Reference in New Issue