mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
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
5 changed files with 32 additions and 4 deletions
|
@ -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
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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 a new issue