Revert "Upgrade to CHEATERv9"

This reverts commit 53215764a1.
This commit is contained in:
$4Y$ 2020-10-03 22:26:54 -04:00
parent 941622f054
commit c4dfdad838
8 changed files with 72 additions and 166 deletions

View file

@ -13,7 +13,6 @@ Run `./extract_assets.py --clean && make clean` or `make distclean` to remove RO
## Additional Cheats
* Instant Death/Level Exit L Trigger + R Trigger + A Button + B Button
* Coin Spawner
* FLYER
* All Jumps Triple
* Hold A to Hover
@ -72,7 +71,7 @@ Run `./extract_assets.py --clean && make clean` or `make distclean` to remove RO
* DynOS by PeachyPeach
-Exit to Main Menu by Adya
-Go to Level Select by $4Y$
* And of course, CHEATERv9 by $4Y$, me
* And of course, CHEATERv8 by $4Y$, me
## How to add cheats/mods
* Use `src/game/mario_cheats.c` for code

View file

@ -10,7 +10,6 @@ Ejecuta `./extract_assets.py --clean && make clean` o `make distclean` para elim
## Trucos adicionales
* Muerte Instantanea/Salir del Nivel Gatillo L + Gatillo R + Boton A + Boton B
* "Coin Spawner"
* FLYER
* Todos los saltos triples
* Mantenga presionado Boton A para flotar
@ -69,7 +68,7 @@ Ejecuta `./extract_assets.py --clean && make clean` o `make distclean` para elim
* "DynOS" por PeachyPeach
-"Exit to Main Menu" por Adya incluido
-"Go to Level Select" por $4Y$ incluido
* Y por supuesto, "CHEATERv9" por $4Y$, yo mismo
* Y por supuesto, "CHEATERv8" por $4Y$, yo mismo
## Como agregar los trucos/mods
* Usa `src/game/mario_cheats.c` para el código

View file

@ -4,7 +4,6 @@
#if defined(VERSION_JP) || defined(VERSION_SH)
#define TEXT_OPT_NON _("STAY IN LEVEL AFTER STAR")
#define TEXT_OPT_COIN _("COIN CHEATS (HOLD B)")
#define TEXT_OPT_HOVER _("HOVER MODE (HOLD A)")
#define TEXT_OPT_MOON _("MOON GRAVITY")
#define TEXT_OPT_RUN _("RUN SPEED")
@ -28,11 +27,6 @@
#define TEXT_OPT_TRIPLE _("ALL JUMPS TRIPLE")
#define TEXT_OPT_FLY _("FLYER")
#define TEXT_OPT_COIN1 _("OFF")
#define TEXT_OPT_COIN2 _("COIN")
#define TEXT_OPT_COIN3 _("BLUE COIN")
#define TEXT_OPT_COIN4 _("RED COIN")
#define TEXT_CHEAT_STAY1 _("DISABLED")
#define TEXT_CHEAT_STAY2 _("ENABLED (NORMAL)")
#define TEXT_CHEAT_STAY3 _("ENABLED (NON-STOP)")
@ -112,7 +106,6 @@
#else // VERSION
#define TEXT_OPT_NON _("Stay in Level after Star")
#define TEXT_OPT_COIN _("Coin Cheats Hold [B]")
#define TEXT_OPT_HOVER _("Hover Mode Hold [A]")
#define TEXT_OPT_MOON _("Moon Gravity")
#define TEXT_OPT_RUN _("Run Speed Modifier")
@ -136,11 +129,6 @@
#define TEXT_OPT_TRIPLE _("All Jumps Triple")
#define TEXT_OPT_FLY _("FLYER")
#define TEXT_OPT_COIN1 _("Off")
#define TEXT_OPT_COIN2 _("Coin")
#define TEXT_OPT_COIN3 _("Blue Coin"
#define TEXT_OPT_COIN4 _("Red Coin")
#define TEXT_CHEAT_STAY1 _("Disabled")
#define TEXT_CHEAT_STAY2 _("Hold L to Exit")
#define TEXT_CHEAT_STAY3 _("Non-Stop Mode")

View file

@ -13,20 +13,6 @@ static const u8 *stayInLevelChoices[] = {
optsStayInLevelStr[2],
};
static const u8 optsCoinCheatStr[][32] = {
{ TEXT_OPT_COIN1 },
{ TEXT_OPT_COIN2 },
{ TEXT_OPT_COIN3 },
{ TEXT_OPT_COIN4 },
};
static const u8 *CoinChoices[] = {
optsCoinCheatStr[0],
optsCoinCheatStr[1],
optsCoinCheatStr[2],
optsCoinCheatStr[3],
};
static const u8 optsSeqStr[][64] = {
{ TEXT_OPT_SEQ1 },
{ TEXT_OPT_SEQ2 },
@ -202,8 +188,17 @@ static const u8* bljCheatChoices[] = {
optsBLJCheatStr[12],
};
static const u8 optsCheatsStr2[][64] = {
{ TEXT_OPT_COIN },
static const u8 optsCheatsStr[][64] = {
{ TEXT_OPT_CHEAT1 },
{ TEXT_OPT_CHEAT2 },
{ TEXT_OPT_CHEAT3 },
{ TEXT_OPT_CHEAT4 },
{ TEXT_OPT_CHEAT5 },
{ TEXT_OPT_CHEAT6 },
{ TEXT_OPT_CHEAT7 },
{ TEXT_OPT_CHEAT8 },
{ TEXT_OPT_CHEAT9 },
{ TEXT_OPT_NON },
{ TEXT_OPT_HOVER },
{ TEXT_OPT_MOON },
{ TEXT_OPT_RUN },

View file

@ -90,34 +90,14 @@ void cheats_mario_inputs(struct MarioState *m) {
while (Cheats.EnableCheats == true) {
if (Cheats.Fly) {
if (m->action == ACT_FLYING) {
m->particleFlags |= PARTICLE_SPARKLES;
}
/*100 Coin Star Spawner Prototype*/
if (m->controller->buttonPressed & X_BUTTON) {
spawn_object(m->marioObj, MODEL_STAR, bhvSpawnedStarNoLevelExit);
}
/*Coin Spawner*/
switch (Cheats.Coin) {
case 0:
break;
case 1:
if (m->controller->buttonDown & B_BUTTON) {
obj_spawn_yellow_coins(m->marioObj, 1);
break;
}
break;
case 2:
if (m->controller->buttonDown & B_BUTTON) {
spawn_object(m->marioObj, MODEL_BLUE_COIN, bhvBlueCoinJumping);
break;
}
break;
case 3:
if (m->controller->buttonDown & B_BUTTON) {
spawn_object_relative(0, 0, 70, 150, m->marioObj, MODEL_RED_COIN, bhvRedCoin);
break;
}
break;
/*Coin Spawner Prototype*/
if (m->controller->buttonPressed & Y_BUTTON) {
obj_spawn_yellow_coins(m->marioObj, 1);
}
/*All Jumps Triple Cheat*/
@ -137,7 +117,6 @@ void cheats_mario_inputs(struct MarioState *m) {
while (Cheats.Hover && m->controller->buttonDown & A_BUTTON) {
if (m->action != ACT_GROUND_POUND) {
vec3f_set(m->vel, 0.0f, 2.0f, 300.0f);
m->forwardVel = 52.0f;
break;
}
break;
@ -146,7 +125,7 @@ void cheats_mario_inputs(struct MarioState *m) {
/*Moon Gravity*/
while (Cheats.Moon) {
while ((m->action & ACT_GROUP_MASK) == ACT_GROUP_AIRBORNE) {
if (m->action != ACT_FREEFALL && m->action != ACT_LONG_JUMP) {
if (m->action != ACT_FREEFALL) {
m->vel[1] += 2;
break;
}
@ -175,22 +154,22 @@ void cheats_mario_inputs(struct MarioState *m) {
case 0:
break;
case 1:
if (m->action == ACT_WALKING && m->forwardVel >= 0) {
if (m->action == ACT_WALKING) {
m->forwardVel = (m->forwardVel - 0.5f);
}
break;
case 2:
if (m->action == ACT_WALKING && m->forwardVel >= 0) {
if (m->action == ACT_WALKING) {
m->forwardVel = (m->forwardVel - 0.7f);
}
break;
case 3:
if (m->action == ACT_WALKING && m->forwardVel >= 0) {
if (m->action == ACT_WALKING) {
m->forwardVel = (m->forwardVel * 1.2f);
}
break;
case 4:
if (m->action == ACT_WALKING && m->forwardVel >= 0) {
if (m->action == ACT_WALKING) {
m->forwardVel = (m->forwardVel * 1.8f);
}
break;
@ -205,26 +184,32 @@ void cheats_mario_inputs(struct MarioState *m) {
case 1:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_BLACK_BOBOMB];
m->marioObj->header.gfx.unk38.curAnim = bobomb_seg8_anims_0802396C[0];
is_anim_at_end(m);
break;
case 2:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_BOBOMB_BUDDY];
m->marioObj->header.gfx.unk38.curAnim = bobomb_seg8_anims_0802396C[0];
is_anim_at_end(m);
break;
case 3:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_GOOMBA];
m->marioObj->header.gfx.unk38.curAnim = goomba_seg8_anims_0801DA4C[0];
is_anim_at_end(m);
break;
case 4:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_AMP];
m->marioObj->header.gfx.unk38.curAnim = amp_seg8_anims_08004034[0];
is_anim_at_end(m);
break;
case 5:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_CHUCKYA];
m->marioObj->header.gfx.unk38.curAnim = chuckya_seg8_anims_0800C070[0];
is_anim_at_end(m);
break; //Forgot this in v7
case 6:
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_FLYGUY];
m->marioObj->header.gfx.unk38.curAnim = flyguy_seg8_anims_08011A64[0];
is_anim_at_end(m);
break;
}
while (Cheats.PAC > 0) {
@ -310,7 +295,7 @@ void cheats_mario_inputs(struct MarioState *m) {
};
/*CAP Cheats, this whole thing needs to be refactored, but
I've only been adding to JAGSTAX's original patch*/
I've only been started modifying JAGSTAX's original patch*/
if (Cheats.EnableCheats) {
if (m->controller->buttonPressed & U_DPAD) {
m->flags |= MARIO_WING_CAP;
@ -496,81 +481,43 @@ void cheats_mario_inputs(struct MarioState *m) {
/*JBC is the bool, acting like the on/off*/
switch(Cheats.JB) {
case 0:
play_cap_music(SEQ_EVENT_CUTSCENE_INTRO);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_CUTSCENE_INTRO, 0, 100, 0);
case 1:
play_cap_music(SEQ_LEVEL_GRASS);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_GRASS, 0, 80, 0);
case 2:
play_cap_music(SEQ_LEVEL_INSIDE_CASTLE);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_INSIDE_CASTLE, 0, 80, 0);
case 3:
play_cap_music(SEQ_LEVEL_WATER);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_WATER, 0, 80, 0);
case 4:
play_cap_music(SEQ_LEVEL_HOT);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_HOT, 0, 80, 0);
case 5:
play_cap_music(SEQ_LEVEL_BOSS_KOOPA);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_BOSS_KOOPA, 0, 80, 0);
case 6:
play_cap_music(SEQ_LEVEL_SNOW);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_SNOW, 0, 80, 0);
case 7:
play_cap_music(SEQ_LEVEL_SLIDE);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_SLIDE, 0, 80, 0);
case 8:
play_cap_music(SEQ_LEVEL_SPOOKY);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_SPOOKY, 0, 100, 0);
case 9:
play_cap_music(SEQ_LEVEL_UNDERGROUND);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_UNDERGROUND, 0, 100, 0);
case 10:
play_cap_music(SEQ_LEVEL_KOOPA_ROAD);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_KOOPA_ROAD, 0, 80, 0);
case 11:
play_cap_music(SEQ_LEVEL_BOSS_KOOPA_FINAL);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_LEVEL_BOSS_KOOPA_FINAL, 0, 80, 0);
case 12:
play_cap_music(SEQ_MENU_TITLE_SCREEN);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_MENU_TITLE_SCREEN, 0, 80, 0);
case 13:
play_cap_music(SEQ_MENU_FILE_SELECT);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_MENU_FILE_SELECT, 0, 80, 0);
case 14:
play_cap_music(SEQ_EVENT_POWERUP);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_POWERUP, 0, 80, 0);
case 15:
play_cap_music(SEQ_EVENT_METAL_CAP);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_METAL_CAP, 0, 80, 0);
case 16:
play_cap_music(SEQ_EVENT_BOSS);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_BOSS, 0, 80, 0);
case 17:
play_cap_music(SEQ_EVENT_MERRY_GO_ROUND);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_MERRY_GO_ROUND, 0, 80, 0);
case 18:
play_cap_music(SEQ_EVENT_CUTSCENE_CREDITS);
Cheats.JBC = false;
break;
play_secondary_music(SEQ_EVENT_CUTSCENE_CREDITS, 0, 100, 0);
}
}
break;

View file

@ -94,18 +94,6 @@ static const u8 optsAudioStr[][32] = {
{ TEXT_OPT_ENVVOLUME },
};
static const u8 optsCheatsStr[][64] = {
{ TEXT_OPT_CHEAT1 },
{ TEXT_OPT_CHEAT2 },
{ TEXT_OPT_CHEAT3 },
{ TEXT_OPT_CHEAT4 },
{ TEXT_OPT_CHEAT5 },
{ TEXT_OPT_CHEAT6 },
{ TEXT_OPT_CHEAT7 },
{ TEXT_OPT_CHEAT8 },
{ TEXT_OPT_CHEAT9 },
{ TEXT_OPT_NON },
};
static const u8 bindStr[][32] = {
{ TEXT_OPT_UNBOUND },
{ TEXT_OPT_PRESSKEY },
@ -223,12 +211,6 @@ static void optvideo_apply(UNUSED struct Option *self, s32 arg) {
if (!arg) configWindow.settings_changed = true;
}
static void setJBC(UNUSED struct Option *self, s32 arg) {
if (!arg)
Cheats.JBC = true;
}
/* submenu option lists */
#ifdef BETTERCAMERA
@ -300,29 +282,28 @@ static struct Option optsCheats[] = {
DEF_OPT_TOGGLE(optsCheatsStr[7], &Cheats.HugeMario),
DEF_OPT_TOGGLE(optsCheatsStr[8], &Cheats.TinyMario),
DEF_OPT_CHOICE(optsCheatsStr[9], &Cheats.NON, stayInLevelChoices),
DEF_OPT_CHOICE(optsCheatsStr2[0], &Cheats.Coin, CoinChoices),
DEF_OPT_TOGGLE(optsCheatsStr2[1], &Cheats.Hover),
DEF_OPT_TOGGLE(optsCheatsStr2[2], &Cheats.Moon),
DEF_OPT_CHOICE(optsCheatsStr2[3], &Cheats.Run, SpeedChoices),
DEF_OPT_TOGGLE(optsCheatsStr2[4], &Cheats.NDB),
DEF_OPT_TOGGLE(optsCheatsStr2[5], &Cheats.Jump),
DEF_OPT_TOGGLE(optsCheatsStr2[6], &Cheats.SPD),
DEF_OPT_TOGGLE(optsCheatsStr2[7], &Cheats.TPF),
DEF_OPT_CHOICE(optsCheatsStr2[8], &Cheats.JB, SeqChoices),
DEF_OPT_BUTTON(optsCheatsStr2[9], setJBC),
DEF_OPT_TOGGLE(optsCheatsStr2[10], &Cheats.QuikEnd),
DEF_OPT_CHOICE(optsCheatsStr2[11], &Cheats.Hurt, HurtCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr2[12], &Cheats.Cann),
DEF_OPT_TOGGLE(optsCheatsStr2[13], &Cheats.AutoWK),
DEF_OPT_TOGGLE(optsCheatsStr2[14], &Cheats.GetShell),
DEF_OPT_TOGGLE(optsCheatsStr2[15], &Cheats.GetBob),
DEF_OPT_CHOICE(optsCheatsStr2[16], &Cheats.Spamba, SpamCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr2[17], &Cheats.Swim),
DEF_OPT_TOGGLE(optsCheatsStr2[18], &Cheats.DCM),
DEF_OPT_CHOICE(optsCheatsStr2[19], &Cheats.BLJAnywhere, bljCheatChoices),
DEF_OPT_CHOICE(optsCheatsStr2[20], &Cheats.PAC, PlayAsCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr2[21], &Cheats.Triple),
DEF_OPT_TOGGLE(optsCheatsStr2[22], &Cheats.Fly),
DEF_OPT_TOGGLE(optsCheatsStr[10], &Cheats.Hover),
DEF_OPT_TOGGLE(optsCheatsStr[11], &Cheats.Moon),
DEF_OPT_CHOICE(optsCheatsStr[12], &Cheats.Run, SpeedChoices),
DEF_OPT_TOGGLE(optsCheatsStr[13], &Cheats.NDB),
DEF_OPT_TOGGLE(optsCheatsStr[14], &Cheats.Jump),
DEF_OPT_TOGGLE(optsCheatsStr[15], &Cheats.SPD),
DEF_OPT_TOGGLE(optsCheatsStr[16], &Cheats.TPF),
DEF_OPT_CHOICE(optsCheatsStr[17], &Cheats.JB, SeqChoices),
DEF_OPT_TOGGLE(optsCheatsStr[18], &Cheats.JBC),
DEF_OPT_TOGGLE(optsCheatsStr[19], &Cheats.QuikEnd),
DEF_OPT_CHOICE(optsCheatsStr[20], &Cheats.Hurt, HurtCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr[21], &Cheats.Cann),
DEF_OPT_TOGGLE(optsCheatsStr[22], &Cheats.AutoWK),
DEF_OPT_TOGGLE(optsCheatsStr[23], &Cheats.GetShell),
DEF_OPT_TOGGLE(optsCheatsStr[24], &Cheats.GetBob),
DEF_OPT_CHOICE(optsCheatsStr[25], &Cheats.Spamba, SpamCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr[26], &Cheats.Swim),
DEF_OPT_TOGGLE(optsCheatsStr[27], &Cheats.DCM),
DEF_OPT_CHOICE(optsCheatsStr[28], &Cheats.BLJAnywhere, bljCheatChoices),
DEF_OPT_CHOICE(optsCheatsStr[29], &Cheats.PAC, PlayAsCheatChoices),
DEF_OPT_TOGGLE(optsCheatsStr[30], &Cheats.Triple),
DEF_OPT_TOGGLE(optsCheatsStr[31], &Cheats.Fly),
};

View file

@ -14,7 +14,6 @@ struct CheatList {
bool HugeMario;
bool TinyMario;
unsigned int NON;
unsigned int Coin;
bool Hover;
bool Moon;
unsigned int Run;

View file

@ -7,7 +7,6 @@
#include <ctype.h>
#include "platform.h"
#include "cheats.h"
#include "configfile.h"
#include "cliopts.h"
#include "gfx/gfx_screen_config.h"
@ -165,7 +164,6 @@ static const struct ConfigOption options[] = {
{.name = "exit_anywhere", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.ExitAnywhere },
{.name = "huge_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.HugeMario },
{.name = "tiny_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.TinyMario },
{.name = "coin", .type = CONFIG_TYPE_UINT, .uintValue = &Cheats.Coin },
{.name = "non_stop_mode", .type = CONFIG_TYPE_UINT, .uintValue = &Cheats.NON },
{.name = "hover_mode", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Hover },
{.name = "moon_gravity", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Moon },