Merge pull request #180 from Leon422/master
Added "Exit course at any time", "Huge Mario" and "Tiny Mario" cheats
This commit is contained in:
commit
3a204f25c2
|
@ -55,7 +55,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
|
||||
|
@ -2630,7 +2631,8 @@ s16 render_pause_courses_and_castle(void) {
|
|||
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,9 +1215,24 @@ 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) {
|
||||
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) {
|
||||
m->squishTimer -= 1;
|
||||
|
|
|
@ -88,6 +88,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] = {
|
||||
|
@ -245,6 +248,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 ),
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ struct CheatList {
|
|||
bool InfiniteLives;
|
||||
bool SuperSpeed;
|
||||
bool Responsive;
|
||||
bool ExitAnywhere;
|
||||
bool HugeMario;
|
||||
bool TinyMario;
|
||||
};
|
||||
|
||||
extern struct CheatList Cheats;
|
||||
|
|
Loading…
Reference in New Issue