Fixed the shitty naming of many config variables 👍
This commit is contained in:
parent
805126d529
commit
82a010f140
|
|
@ -271,7 +271,7 @@ void load_mario_area(void) {
|
|||
|
||||
if (gCurrDemoInput == NULL)
|
||||
gCanMirror = 1;
|
||||
if (gEncoreMode)
|
||||
if (configEncoreMode)
|
||||
gReimportTextures = 1;
|
||||
|
||||
if (gCurrentArea->index == gMarioSpawnInfo->areaIndex) {
|
||||
|
|
@ -279,7 +279,7 @@ void load_mario_area(void) {
|
|||
spawn_objects_from_info(0, gMarioSpawnInfo);
|
||||
}
|
||||
|
||||
if (gGreenDemon > 1 && gCurrLevelNum != LEVEL_CASTLE && gCurrLevelNum != LEVEL_CASTLE_COURTYARD && gCurrLevelNum != LEVEL_CASTLE_GROUNDS && gCurrLevelNum != LEVEL_BOWSER_1 && gCurrLevelNum != LEVEL_BOWSER_2 && gCurrLevelNum != LEVEL_BOWSER_3) {
|
||||
if (configGreenDemon > 1 && gCurrLevelNum != LEVEL_CASTLE && gCurrLevelNum != LEVEL_CASTLE_COURTYARD && gCurrLevelNum != LEVEL_CASTLE_GROUNDS && gCurrLevelNum != LEVEL_BOWSER_1 && gCurrLevelNum != LEVEL_BOWSER_2 && gCurrLevelNum != LEVEL_BOWSER_3) {
|
||||
spawn_object_relative(0, 0, 256, 0, gMarioObject, MODEL_1UP, bhvGreenDemon);
|
||||
}
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ void render_game(void) {
|
|||
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT - BORDER_HEIGHT);
|
||||
if (!gHideHud) {
|
||||
if (!configHideHud) {
|
||||
render_hud();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1275,7 +1275,7 @@ s32 bowser_dead_default_stage_ending(void) {
|
|||
set_mario_npc_dialog(MARIO_DIALOG_STOP);
|
||||
ret = TRUE;
|
||||
|
||||
if (gGreenDemon > 1) {
|
||||
if (configGreenDemon > 1) {
|
||||
spawn_object_relative(0, 0, 256, 0, gMarioObject, MODEL_1UP, bhvHidden1upInPole);
|
||||
}
|
||||
}
|
||||
|
|
@ -1320,7 +1320,7 @@ s32 bowser_dead_final_stage_ending(void) {
|
|||
bowser_dead_hide();
|
||||
ret = TRUE;
|
||||
|
||||
if (gGreenDemon > 1) {
|
||||
if (configGreenDemon > 1) {
|
||||
spawn_object_relative(0, 0, 256, 0, gMarioObject, MODEL_1UP, bhvGreenDemon);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ void bhv_celebration_star_init(void) {
|
|||
o->oMoveAngleYaw = gMarioObject->header.gfx.angle[1] + 0x8000;
|
||||
o->oCelebStarDiameterOfRotation = 100;
|
||||
#if BUGFIX_STAR_BOWSER_KEY
|
||||
if ((!gReplaceKeysWithStars) && (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2)) {
|
||||
if ((!configReplaceKeysWithStars) && (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2)) {
|
||||
o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_BOWSER_KEY];
|
||||
o->oFaceAnglePitch = 0;
|
||||
o->oFaceAngleRoll = 49152;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ void bhv_1up_interact(void) {
|
|||
|
||||
if (obj_check_if_collided_with_object(o, gMarioObject) == 1) {
|
||||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
if (gGreenDemon != 0) {
|
||||
if (configGreenDemon != 0) {
|
||||
gMarioState->health = 0;
|
||||
}
|
||||
else if (gLifeMode || save_file_get_flags() & SAVE_FLAG_HARDCORE_MODE) {
|
||||
if (!gNoHealingMode) {
|
||||
else if (configLifeMode || save_file_get_flags() & SAVE_FLAG_HARDCORE_MODE) {
|
||||
if (!configNoHealingMode) {
|
||||
gMarioState->healCounter += 31.75;
|
||||
if (gMarioState->healCounter > 31.75)
|
||||
gMarioState->healCounter = 31.75;
|
||||
|
|
@ -324,7 +324,7 @@ void bhv_1up_green_demon_loop(void) {
|
|||
break;
|
||||
|
||||
case 1:
|
||||
pole_1up_move_towards_mario((gGreenDemon > 2) ? 30.0f : 20.0f);
|
||||
pole_1up_move_towards_mario((configGreenDemon > 2) ? 30.0f : 20.0f);
|
||||
sp26 = object_step();
|
||||
break;
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ void bhv_1up_green_demon_loop(void) {
|
|||
|
||||
one_up_loop_in_air();
|
||||
|
||||
if (o->oTimer == ((gGreenDemon > 2) ? 105 : 90)) {
|
||||
if (o->oTimer == ((configGreenDemon > 2) ? 105 : 90)) {
|
||||
cur_obj_become_tangible();
|
||||
o->oAction = 1;
|
||||
o->oForwardVel = 10.0f;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void bhv_recovery_heart_loop(void) {
|
|||
o->oSpinningHeartTotalSpin -= 0x10000;
|
||||
}
|
||||
|
||||
if (gNoHealingMode)
|
||||
if (configNoHealingMode)
|
||||
obj_mark_for_deletion(o);
|
||||
|
||||
o->oFaceAngleYaw += o->oAngleVelYaw;
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ Gfx *geo_switch_tuxie_mother_eyes(s32 run, struct GraphNode *node, UNUSED Mat4 *
|
|||
|
||||
// Sad penguin eyes. Very sad times.
|
||||
// Blinking looks weird with these eyes so it's disabled.
|
||||
if ((gPenguinSadEyes) && (obj->oAction != 2) && (obj->behavior == segmented_to_virtual(bhvTuxiesMother))) {
|
||||
if ((configPenguinSadEyes) && (obj->oAction != 2) && (obj->behavior == segmented_to_virtual(bhvTuxiesMother))) {
|
||||
switchCase->selectedCase = 4;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ void yoshi_finish_jumping_and_despawn_loop(void) {
|
|||
void yoshi_give_present_loop(void) {
|
||||
s32 sp1C = gGlobalTimer;
|
||||
|
||||
if ((!gLifeMode && gHudDisplay.lives == 100)
|
||||
|| (gLifeMode && gHudDisplay.lives == 0)) {
|
||||
if ((!configLifeMode && gHudDisplay.lives == 100)
|
||||
|| (configLifeMode && gHudDisplay.lives == 0)) {
|
||||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
gSpecialTripleJump = TRUE;
|
||||
o->oAction = YOSHI_ACT_WALK_JUMP_OFF_ROOF;
|
||||
|
|
@ -143,7 +143,7 @@ void yoshi_give_present_loop(void) {
|
|||
|
||||
if ((sp1C & 0x03) == 0) {
|
||||
play_sound(SOUND_MENU_YOSHI_GAIN_LIVES, gGlobalSoundSource);
|
||||
if (gLifeMode) {
|
||||
if (configLifeMode) {
|
||||
gMarioState->numLives--;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ struct DemoInput gRecordedDemoInput = { 0 };
|
|||
// ----------------------------------------------------------------------------------------------------
|
||||
|
||||
s8 get_mirror() {
|
||||
if (gEncoreMode == 0 || gEncoreMode == 2 || gCurrCourseNum == COURSE_CAKE_END) {
|
||||
if (configEncoreMode == 0 || configEncoreMode == 2 || gCurrCourseNum == COURSE_CAKE_END) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ s8 get_mirror() {
|
|||
}
|
||||
|
||||
s16 get_palette() {
|
||||
if (gEncoreMode == 0 || gEncoreMode == 3 || !gCanMirror) {
|
||||
if (configEncoreMode == 0 || configEncoreMode == 3 || !gCanMirror) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -627,7 +627,7 @@ void read_controller_inputs(void) {
|
|||
controller->rawStickX = controller->controllerData->stick_x;
|
||||
controller->rawStickY = controller->controllerData->stick_y;
|
||||
|
||||
if (configDpadControls && !gDebugMovementMode) {
|
||||
if (configDpadControls && !configDebugMovementMode) {
|
||||
controller->rawStickX += (((controller->buttonDown & R_JPAD) > 0) - ((controller->buttonDown & L_JPAD) > 0))*80;
|
||||
controller->rawStickY += (((controller->buttonDown & U_JPAD) > 0) - ((controller->buttonDown & D_JPAD) > 0))*80;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ void handle_power_meter_actions(s16 numHealthWedges) {
|
|||
void render_hud_power_meter(void) {
|
||||
s16 shownHealthWedges = gHudDisplay.wedges;
|
||||
|
||||
if ((configHudLayout < 2) && (!gAlwaysShowHealth)) {
|
||||
if ((configHudLayout < 2) && (!configAlwaysShowHealth)) {
|
||||
if (sPowerMeterHUD.animation != POWER_METER_HIDING) {
|
||||
handle_power_meter_actions(shownHealthWedges);
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ void render_hud_power_meter(void) {
|
|||
|
||||
render_dl_power_meter(shownHealthWedges);
|
||||
|
||||
if ((configHudLayout < 2) && (!gAlwaysShowHealth)) {
|
||||
if ((configHudLayout < 2) && (!configAlwaysShowHealth)) {
|
||||
sPowerMeterVisibleTimer += 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -790,7 +790,7 @@ void render_hud(void) {
|
|||
render_hud_cannon_reticle();
|
||||
}
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_LIVES && !(save_file_get_flags() & SAVE_FLAG_HARDCORE_MODE) && gLifeMode != 1) {
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_LIVES && !(save_file_get_flags() & SAVE_FLAG_HARDCORE_MODE) && configLifeMode != 1) {
|
||||
render_hud_mario_lives();
|
||||
}
|
||||
|
||||
|
|
@ -816,7 +816,7 @@ void render_hud(void) {
|
|||
render_hud_timer();
|
||||
}
|
||||
|
||||
if (gHudStars && gCurrDemoInput == NULL
|
||||
if (configHudStars && gCurrDemoInput == NULL
|
||||
&& gCurrLevelNum != LEVEL_CASTLE_GROUNDS && gCurrLevelNum != LEVEL_CASTLE && gCurrLevelNum != LEVEL_CASTLE_COURTYARD
|
||||
&& gCurrLevelNum != LEVEL_BOWSER_1 && gCurrLevelNum != LEVEL_BOWSER_2 && gCurrLevelNum != LEVEL_BOWSER_3 && gCurrLevelNum != LEVEL_ENDING)
|
||||
{
|
||||
|
|
@ -829,7 +829,7 @@ void render_hud(void) {
|
|||
render_hud_level_stars(2);
|
||||
}
|
||||
else {
|
||||
render_hud_level_stars(6 + (gShow100CoinStar || (save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1) & (1 << 6))));
|
||||
render_hud_level_stars(6 + (configShow100CoinStar || (save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1) & (1 << 6))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2944,7 +2944,7 @@ void print_hud_course_complete_coins(s16 x, s16 y) {
|
|||
|
||||
if (gCourseCompleteCoins == 50 || gCourseCompleteCoins == 100 || gCourseCompleteCoins == 150) {
|
||||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
if (!gLifeMode) {
|
||||
if (!configLifeMode) {
|
||||
gMarioState->numLives++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ void reset_mario_pitch(struct MarioState *m) {
|
|||
|
||||
u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
|
||||
m->numCoins += o->oDamageOrCoinValue;
|
||||
if (!gNoHealingMode)
|
||||
if (!configNoHealingMode)
|
||||
m->healCounter += 4 * o->oDamageOrCoinValue;
|
||||
|
||||
o->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
|
|
@ -765,7 +765,7 @@ u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
|||
}
|
||||
|
||||
u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
|
||||
if (!gNoHealingMode)
|
||||
if (!configNoHealingMode)
|
||||
m->healCounter += 4 * o->oDamageOrCoinValue;
|
||||
o->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
|||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
save_file_erase(gCurrSaveFileNum - 1);
|
||||
}
|
||||
if (m->numLives == 0 && gLifeMode == 0) {
|
||||
if (m->numLives == 0 && configLifeMode == 0) {
|
||||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
}
|
||||
sDelayedWarpTimer = 48;
|
||||
|
|
@ -887,7 +887,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
|||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
save_file_erase(gCurrSaveFileNum - 1);
|
||||
}
|
||||
else if (m->numLives == 0 && gLifeMode == 0) {
|
||||
else if (m->numLives == 0 && configLifeMode == 0) {
|
||||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1379,14 +1379,14 @@ s32 init_level(void) {
|
|||
val4 = 1;
|
||||
}
|
||||
}
|
||||
if (gHardSave) {
|
||||
if (configHardSave) {
|
||||
gMarioState->flags &= ~(MARIO_NORMAL_CAP | MARIO_CAP_ON_HEAD);
|
||||
save_file_set_flags(SAVE_FLAG_HARD_MODE);
|
||||
}
|
||||
if (gHardcoreSave) {
|
||||
if (configHardcoreSave) {
|
||||
save_file_set_flags(SAVE_FLAG_HARDCORE_MODE);
|
||||
}
|
||||
if (gDaredevilSave) {
|
||||
if (configDaredevilSave) {
|
||||
save_file_set_flags(SAVE_FLAG_DAREDEVIL_MODE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1263,7 +1263,7 @@ void squish_mario_model(struct MarioState *m) {
|
|||
|
||||
vec3f_set(m->marioObj->header.gfx.scale, 1.4f, 0.4f, 1.4f);
|
||||
}
|
||||
if (gPaperMode) {
|
||||
if (configPaperMode) {
|
||||
m->marioObj->header.gfx.scale[0] *= 1.0625f;
|
||||
m->marioObj->header.gfx.scale[1] *= 1.0625f;
|
||||
m->marioObj->header.gfx.scale[2] *= 0.03125f;
|
||||
|
|
@ -1516,14 +1516,14 @@ void update_mario_health(struct MarioState *m) {
|
|||
// when in snow terrains lose 3 health.
|
||||
// If using the debug level select, do not lose any HP to water.
|
||||
if ((m->pos[1] >= (m->waterLevel - 140)) && !terrainIsSnow) {
|
||||
if ((!(save_file_get_flags() & SAVE_FLAG_HARD_MODE)) && (!gNoHealingMode)) {
|
||||
if ((!(save_file_get_flags() & SAVE_FLAG_HARD_MODE)) && (!configNoHealingMode)) {
|
||||
m->health += 0x1A;
|
||||
}
|
||||
} else if (!(save_file_get_flags() & SAVE_FLAG_DAREDEVIL_MODE) && !gNoHealingMode) {
|
||||
} else if (!(save_file_get_flags() & SAVE_FLAG_DAREDEVIL_MODE) && !configNoHealingMode) {
|
||||
if (save_file_get_flags() & SAVE_FLAG_HARD_MODE) {
|
||||
m->health -= (terrainIsSnow ? 4 : 2);
|
||||
}
|
||||
else if (gCasualMode) {
|
||||
else if (configCasualMode) {
|
||||
if (terrainIsSnow)
|
||||
m->health -= 1;
|
||||
}
|
||||
|
|
@ -1540,7 +1540,7 @@ void update_mario_health(struct MarioState *m) {
|
|||
m->healCounter--;
|
||||
}
|
||||
if (m->hurtCounter > 0) {
|
||||
if (gCasualMode)
|
||||
if (configCasualMode)
|
||||
m->health -= 0x20;
|
||||
else
|
||||
m->health -= 0x40;
|
||||
|
|
@ -1776,7 +1776,7 @@ void func_sh_8025574C(void) {
|
|||
s32 execute_mario_action(UNUSED struct Object *o) {
|
||||
s32 inLoop = TRUE;
|
||||
|
||||
if (gDebugCapChanger) {
|
||||
if (configDebugCapChanger) {
|
||||
|
||||
debug_update_mario_cap(CONT_LEFT, MARIO_WING_CAP, 1800, SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP));
|
||||
debug_update_mario_cap(CONT_UP, MARIO_METAL_CAP, 600, SEQUENCE_ARGS(4, SEQ_EVENT_METAL_CAP));
|
||||
|
|
@ -2020,7 +2020,7 @@ void init_mario_from_save_file(void) {
|
|||
gMarioState->numKeys = 0;
|
||||
|
||||
s8 savedLives = save_file_get_num_lives();
|
||||
gMarioState->numLives = ((savedLives > 0) ? savedLives : (gLifeMode ? 0 : 4));
|
||||
gMarioState->numLives = ((savedLives > 0) ? savedLives : (configLifeMode ? 0 : 4));
|
||||
|
||||
if (save_file_get_flags() & SAVE_FLAG_DAREDEVIL_MODE) {
|
||||
gMarioState->health = 0x180;
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ s32 act_double_jump(struct MarioState *m) {
|
|||
}
|
||||
|
||||
s32 act_triple_jump(struct MarioState *m) {
|
||||
if (gTwirlTripleJump) {
|
||||
if (configTwirlTripleJump) {
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAHOO);
|
||||
return set_mario_action(m, ACT_TWIRLING, 0);
|
||||
}
|
||||
|
|
@ -1105,7 +1105,7 @@ s32 act_ground_pound(struct MarioState *m) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gOdysseyDive && m->input & INPUT_B_PRESSED) {
|
||||
if (configOdysseyDive && m->input & INPUT_B_PRESSED) {
|
||||
set_mario_action(m, ACT_DIVE, 0);
|
||||
mario_set_forward_vel(m, 40.0f);
|
||||
m->vel[1] = 28;
|
||||
|
|
@ -1278,7 +1278,7 @@ u32 common_air_knockback_step(struct MarioState *m, u32 landAction, u32 hardFall
|
|||
s32 check_wall_kick(struct MarioState *m) {
|
||||
if ((m->input & INPUT_A_PRESSED) && m->wallKickTimer != 0 && m->prevAction == ACT_AIR_HIT_WALL) {
|
||||
m->faceAngle[1] += 0x8000;
|
||||
if (gWallSliding) {
|
||||
if (configWallSliding) {
|
||||
m->particleFlags |= PARTICLE_VERTICAL_STAR;
|
||||
}
|
||||
return set_mario_action(m, ACT_WALL_KICK_AIR, 0);
|
||||
|
|
@ -1475,7 +1475,7 @@ s32 act_air_hit_wall(struct MarioState *m) {
|
|||
if (m->heldObj != NULL) {
|
||||
mario_drop_held_object(m);
|
||||
}
|
||||
if (gWallSliding) {
|
||||
if (configWallSliding) {
|
||||
if (++(m->actionTimer) <= 2) {
|
||||
if (m->input & INPUT_A_PRESSED) {
|
||||
m->vel[1] = 52.0f;
|
||||
|
|
@ -1539,7 +1539,7 @@ s32 act_forward_rollout(struct MarioState *m) {
|
|||
m->actionState = 1;
|
||||
}
|
||||
|
||||
if (!gFlashbackPound)
|
||||
if (!configFlashbackGroundPound)
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
|
||||
|
||||
update_air_without_turn(m, 0);
|
||||
|
|
@ -1581,7 +1581,7 @@ s32 act_backward_rollout(struct MarioState *m) {
|
|||
m->actionState = 1;
|
||||
}
|
||||
|
||||
if (!gFlashbackPound)
|
||||
if (!configFlashbackGroundPound)
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
|
||||
|
||||
update_air_without_turn(m, 0);
|
||||
|
|
@ -2323,7 +2323,7 @@ s32 mario_execute_airborne_action(struct MarioState *m) {
|
|||
}
|
||||
/* clang-format on */
|
||||
|
||||
if ((gDebugMovementMode) && (gPlayer1Controller->buttonDown & L_TRIG)) {
|
||||
if ((configDebugMovementMode) && (gPlayer1Controller->buttonDown & L_TRIG)) {
|
||||
set_mario_action(gMarioState, ACT_DEBUG_FREE_MOVE, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ s32 act_in_cannon(struct MarioState *m) {
|
|||
m->faceAngle[0] = 0;
|
||||
}
|
||||
|
||||
if (gFlexibleCannons) {
|
||||
if (configFlexibleCannons) {
|
||||
if (marioObj->oMarioCannonInputYaw > 0x10000) {
|
||||
marioObj->oMarioCannonInputYaw = 0x10000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1110,10 +1110,10 @@ s32 act_spawn_spin_airborne(struct MarioState *m) {
|
|||
// landed on floor, play spawn land animation
|
||||
if (perform_air_step(m, 0.0) == AIR_STEP_LANDED) {
|
||||
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING);
|
||||
if (gSpawnSparkles)
|
||||
if (configSpawnSparkles)
|
||||
tempActionState = m->actionState;
|
||||
set_mario_action(m, ACT_SPAWN_SPIN_LANDING, 0);
|
||||
if (gSpawnSparkles)
|
||||
if (configSpawnSparkles)
|
||||
m->actionState = tempActionState;
|
||||
}
|
||||
|
||||
|
|
@ -1125,12 +1125,12 @@ s32 act_spawn_spin_airborne(struct MarioState *m) {
|
|||
}
|
||||
|
||||
// under 300 units above floor, enter freefall animation
|
||||
else if (!gSpawnSparkles || m->actionState == 1) {
|
||||
else if (!configSpawnSparkles || m->actionState == 1) {
|
||||
m->actionState = 1;
|
||||
set_mario_animation(m, MARIO_ANIM_GENERAL_FALL);
|
||||
}
|
||||
|
||||
if (gSpawnSparkles)
|
||||
if (configSpawnSparkles)
|
||||
m->particleFlags |= PARTICLE_SPARKLES;
|
||||
|
||||
return FALSE;
|
||||
|
|
@ -1138,7 +1138,7 @@ s32 act_spawn_spin_airborne(struct MarioState *m) {
|
|||
|
||||
s32 act_spawn_spin_landing(struct MarioState *m) {
|
||||
|
||||
if (!gSpawnSparkles || m->actionState == 1) {
|
||||
if (!configSpawnSparkles || m->actionState == 1) {
|
||||
stop_and_set_height_to_floor(m);
|
||||
set_mario_animation(m, MARIO_ANIM_GENERAL_LAND);
|
||||
if (is_anim_at_end(m)) {
|
||||
|
|
@ -1146,7 +1146,7 @@ s32 act_spawn_spin_landing(struct MarioState *m) {
|
|||
set_mario_action(m, ACT_IDLE, 0);
|
||||
}
|
||||
}
|
||||
else if (gSpawnSparkles) {
|
||||
else if (configSpawnSparkles) {
|
||||
m->vel[1] = 32.0f;
|
||||
set_mario_action(m, ACT_SPAWN_SPIN_AIRBORNE, 1);
|
||||
m->actionState = 1;
|
||||
|
|
@ -1290,7 +1290,7 @@ s32 act_death_exit(struct MarioState *m) {
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gLifeMode) {
|
||||
if (configLifeMode) {
|
||||
m->numLives++;
|
||||
}
|
||||
else if (m->numLives > 0) {
|
||||
|
|
@ -1312,7 +1312,7 @@ s32 act_unused_death_exit(struct MarioState *m) {
|
|||
#else
|
||||
play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
|
||||
#endif
|
||||
if (gLifeMode) {
|
||||
if (configLifeMode) {
|
||||
m->numLives++;
|
||||
}
|
||||
else if (m->numLives > 0) {
|
||||
|
|
@ -1337,7 +1337,7 @@ s32 act_falling_death_exit(struct MarioState *m) {
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gLifeMode) {
|
||||
if (configLifeMode) {
|
||||
m->numLives++;
|
||||
}
|
||||
else if (m->numLives > 0) {
|
||||
|
|
@ -1390,7 +1390,7 @@ s32 act_special_death_exit(struct MarioState *m) {
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gLifeMode) {
|
||||
if (configLifeMode) {
|
||||
m->numLives++;
|
||||
}
|
||||
else if (m->numLives > 0) {
|
||||
|
|
|
|||
|
|
@ -1532,7 +1532,7 @@ s32 act_slide_kick_slide(struct MarioState *m) {
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gFlashbackPound)
|
||||
if (configFlashbackGroundPound)
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
|
||||
return set_jumping_action(m, ACT_FORWARD_ROLLOUT, 0);
|
||||
}
|
||||
|
|
@ -1566,7 +1566,7 @@ s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s3
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gFlashbackPound)
|
||||
if (configFlashbackGroundPound)
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
|
||||
return drop_and_set_mario_action(
|
||||
m, m->forwardVel >= 0.0f ? ACT_FORWARD_ROLLOUT : ACT_BACKWARD_ROLLOUT, 0);
|
||||
|
|
@ -1604,13 +1604,13 @@ s32 act_dive_slide(struct MarioState *m) {
|
|||
#if ENABLE_RUMBLE
|
||||
queue_rumble_data(5, 80);
|
||||
#endif
|
||||
if (gSunshineDive && m->input & INPUT_B_PRESSED) {
|
||||
if (configSunshineDive && m->input & INPUT_B_PRESSED) {
|
||||
mario_set_forward_vel(m, 20.0f);
|
||||
m->vel[1] = 21.0f;
|
||||
return set_mario_action(m, ACT_DIVE, 0);
|
||||
}
|
||||
else {
|
||||
if (gFlashbackPound)
|
||||
if (configFlashbackGroundPound)
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
|
||||
return set_mario_action(m, m->forwardVel > 0.0f ? ACT_FORWARD_ROLLOUT : ACT_BACKWARD_ROLLOUT,
|
||||
0);
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ s32 act_twirl_land(struct MarioState *m) {
|
|||
|
||||
s32 act_ground_pound_land(struct MarioState *m) {
|
||||
m->actionState = 1;
|
||||
if (gFlashbackPound) {
|
||||
if (configFlashbackGroundPound) {
|
||||
if (m->input & INPUT_OFF_FLOOR) {
|
||||
return set_mario_action(m, ACT_FREEFALL, 0);
|
||||
}
|
||||
|
|
@ -1064,7 +1064,7 @@ s32 act_ground_pound_land(struct MarioState *m) {
|
|||
return set_mario_action(m, ACT_CROUCHING, 0);
|
||||
}
|
||||
}
|
||||
else if ((gGroundPoundJump) && (gPlayer1Controller->buttonDown & A_BUTTON)) {
|
||||
else if ((configGroundPoundJump) && (gPlayer1Controller->buttonDown & A_BUTTON)) {
|
||||
set_mario_action(m, ACT_DOUBLE_JUMP, 0);
|
||||
m->vel[1] = 60.0f;
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING, SOUND_MARIO_YAHOO);
|
||||
|
|
@ -1079,7 +1079,7 @@ s32 act_ground_pound_land(struct MarioState *m) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if ((gGroundPoundJump) && (gPlayer1Controller->buttonPressed & A_BUTTON)) {
|
||||
if ((configGroundPoundJump) && (gPlayer1Controller->buttonPressed & A_BUTTON)) {
|
||||
set_mario_action(m, ACT_DOUBLE_JUMP, 0);
|
||||
m->vel[1] = 60.0f;
|
||||
play_mario_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING, SOUND_MARIO_YAHOO);
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ unsigned int configGraphicsBackend = 0;
|
|||
float configOverallVolume = 1;
|
||||
float configSeqVolume[] = {1, 1, 1};
|
||||
|
||||
// TODO (Mors): Rename these with a config prefix.
|
||||
unsigned int configFrameRate = 1;
|
||||
float configDrawDistanceMultiplier = 0.0f;
|
||||
unsigned int configLevelOfDetail = 2;
|
||||
|
|
@ -218,65 +217,65 @@ float configAdditionalFOV = 0.0f;
|
|||
s8 configQuitOption = 1;
|
||||
unsigned int configHudLayout = 2;
|
||||
s8 config4by3Hud = 0;
|
||||
s8 gHudStars = 0;
|
||||
s8 configHudStars = 0;
|
||||
s8 configAddZeroes = 0;
|
||||
s8 gShow100CoinStar = 0;
|
||||
s8 gAlwaysShowHealth = 0;
|
||||
s8 gHUDFiltering = 0;
|
||||
s8 gHideHud = 0;
|
||||
s8 configShow100CoinStar = 0;
|
||||
s8 configAlwaysShowHealth = 0;
|
||||
s8 configHUDFiltering = 0;
|
||||
s8 configHideHud = 0;
|
||||
|
||||
s8 gMouseCam = 1;
|
||||
float gMouseSensitivity = 4.0f;
|
||||
s8 configMouseCam = 1;
|
||||
float configMouseSensitivity = 4.0f;
|
||||
unsigned int configMouseLeft = A_BUTTON;
|
||||
unsigned int configMouseRight = B_BUTTON;
|
||||
unsigned int configMouseMiddle = Z_TRIG;
|
||||
unsigned int configMouseWheelUp = U_CBUTTONS;
|
||||
unsigned int configMouseWheelDown = D_CBUTTONS;
|
||||
|
||||
s8 gWallSliding = 1;
|
||||
s8 gGroundPoundJump = 0;
|
||||
s8 gSunshineDive = 0;
|
||||
s8 gOdysseyDive = 0;
|
||||
s8 configWallSliding = 1;
|
||||
s8 configGroundPoundJump = 0;
|
||||
s8 configSunshineDive = 0;
|
||||
s8 configOdysseyDive = 0;
|
||||
s8 configRolling = 0;
|
||||
s8 gFlashbackPound = 0;
|
||||
s8 configFlashbackGroundPound = 0;
|
||||
|
||||
s8 configUnusedPyramidCutscene = 1;
|
||||
s8 configRestoreUnusedSounds = 1;
|
||||
s8 gPenguinSadEyes = 1;
|
||||
s8 gTwirlTripleJump = 0;
|
||||
s8 configPenguinSadEyes = 1;
|
||||
s8 configTwirlTripleJump = 0;
|
||||
s8 configBetaLikeCamera = 0;
|
||||
s8 gSpawnSparkles = 0;
|
||||
s8 gReplaceKeysWithStars = 0;
|
||||
s8 configSpawnSparkles = 0;
|
||||
s8 configReplaceKeysWithStars = 0;
|
||||
|
||||
unsigned int gLifeMode = 0;
|
||||
unsigned int gEncoreMode = 0;
|
||||
unsigned int gGreenDemon = 0;
|
||||
s8 gNoHealingMode = 0;
|
||||
s8 gHardSave = 0;
|
||||
s8 gDaredevilSave = 0;
|
||||
s8 gHardcoreSave = 0;
|
||||
s8 gCasualMode = 0;
|
||||
unsigned int configLifeMode = 0;
|
||||
unsigned int configEncoreMode = 0;
|
||||
unsigned int configGreenDemon = 0;
|
||||
s8 configNoHealingMode = 0;
|
||||
s8 configHardSave = 0;
|
||||
s8 configDaredevilSave = 0;
|
||||
s8 configHardcoreSave = 0;
|
||||
s8 configCasualMode = 0;
|
||||
s8 configInvisibleMode = 0;
|
||||
|
||||
s8 gDebugMovementMode = 0;
|
||||
s8 gDebugCapChanger = 0;
|
||||
s8 configDebugMovementMode = 0;
|
||||
s8 configDebugCapChanger = 0;
|
||||
s8 configDebugObjectSpawner = 0;
|
||||
unsigned int configMoonJump = 0;
|
||||
s8 configEasyBowserThrows = 0;
|
||||
unsigned int configBLJEverywhere = 0;
|
||||
s8 configGodMode = 0;
|
||||
s8 configHyperspeedMode = 0;
|
||||
s8 gFlexibleCannons = 0;
|
||||
s8 configFlexibleCannons = 0;
|
||||
unsigned int configCoinStarCoins = 100;
|
||||
|
||||
s8 configRockPaperScissors = 0;
|
||||
s8 configAngryPenguin = 0;
|
||||
s8 gPaperMode = 0;
|
||||
s8 gFXMode = 0;
|
||||
s8 configPaperMode = 0;
|
||||
s8 configFXMode = 0;
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
s8 gWireframeMode = 0;
|
||||
s8 configWireframeMode = 0;
|
||||
#endif
|
||||
s8 gDisableLighting = 0;
|
||||
s8 configDisableLighting = 0;
|
||||
|
||||
unsigned int configColorPalette = 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,65 +67,65 @@ extern float configAdditionalFOV;
|
|||
extern s8 configQuitOption;
|
||||
extern unsigned int configHudLayout;
|
||||
extern s8 config4by3Hud;
|
||||
extern s8 gHudStars;
|
||||
extern s8 configHudStars;
|
||||
extern s8 configAddZeroes;
|
||||
extern s8 gShow100CoinStar;
|
||||
extern s8 gAlwaysShowHealth;
|
||||
extern s8 gHUDFiltering;
|
||||
extern s8 gHideHud;
|
||||
extern s8 configShow100CoinStar;
|
||||
extern s8 configAlwaysShowHealth;
|
||||
extern s8 configHUDFiltering;
|
||||
extern s8 configHideHud;
|
||||
|
||||
extern s8 gMouseCam;
|
||||
extern float gMouseSensitivity;
|
||||
extern s8 configMouseCam;
|
||||
extern float configMouseSensitivity;
|
||||
extern unsigned int configMouseLeft;
|
||||
extern unsigned int configMouseRight;
|
||||
extern unsigned int configMouseMiddle;
|
||||
extern unsigned int configMouseWheelUp;
|
||||
extern unsigned int configMouseWheelDown;
|
||||
|
||||
extern s8 gWallSliding;
|
||||
extern s8 gGroundPoundJump;
|
||||
extern s8 gSunshineDive;
|
||||
extern s8 gOdysseyDive;
|
||||
extern s8 configWallSliding;
|
||||
extern s8 configGroundPoundJump;
|
||||
extern s8 configSunshineDive;
|
||||
extern s8 configOdysseyDive;
|
||||
extern s8 configRolling;
|
||||
extern s8 gFlashbackPound;
|
||||
extern s8 configFlashbackGroundPound;
|
||||
|
||||
extern s8 configUnusedPyramidCutscene;
|
||||
extern s8 configRestoreUnusedSounds;
|
||||
extern s8 gPenguinSadEyes;
|
||||
extern s8 gTwirlTripleJump;
|
||||
extern s8 configPenguinSadEyes;
|
||||
extern s8 configTwirlTripleJump;
|
||||
extern s8 configBetaLikeCamera;
|
||||
extern s8 gSpawnSparkles;
|
||||
extern s8 gReplaceKeysWithStars;
|
||||
extern s8 configSpawnSparkles;
|
||||
extern s8 configReplaceKeysWithStars;
|
||||
|
||||
extern unsigned int gLifeMode;
|
||||
extern unsigned int gEncoreMode;
|
||||
extern unsigned int gGreenDemon;
|
||||
extern s8 gNoHealingMode;
|
||||
extern s8 gHardSave;
|
||||
extern s8 gDaredevilSave;
|
||||
extern s8 gHardcoreSave;
|
||||
extern s8 gCasualMode;
|
||||
extern unsigned int configLifeMode;
|
||||
extern unsigned int configEncoreMode;
|
||||
extern unsigned int configGreenDemon;
|
||||
extern s8 configNoHealingMode;
|
||||
extern s8 configHardSave;
|
||||
extern s8 configDaredevilSave;
|
||||
extern s8 configHardcoreSave;
|
||||
extern s8 configCasualMode;
|
||||
extern s8 configInvisibleMode;
|
||||
|
||||
extern s8 gDebugMovementMode;
|
||||
extern s8 gDebugCapChanger;
|
||||
extern s8 configDebugMovementMode;
|
||||
extern s8 configDebugCapChanger;
|
||||
extern s8 configDebugObjectSpawner;
|
||||
extern unsigned int configMoonJump;
|
||||
extern s8 configEasyBowserThrows;
|
||||
extern unsigned int configBLJEverywhere;
|
||||
extern s8 configGodMode;
|
||||
extern s8 configHyperspeedMode;
|
||||
extern s8 gFlexibleCannons;
|
||||
extern s8 configFlexibleCannons;
|
||||
extern unsigned int configCoinStarCoins;
|
||||
|
||||
extern s8 configRockPaperScissors;
|
||||
extern s8 configAngryPenguin;
|
||||
extern s8 gPaperMode;
|
||||
extern s8 gFXMode;
|
||||
extern s8 configPaperMode;
|
||||
extern s8 configFXMode;
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
extern s8 gWireframeMode;
|
||||
extern s8 configWireframeMode;
|
||||
#endif
|
||||
extern s8 gDisableLighting;
|
||||
extern s8 configDisableLighting;
|
||||
|
||||
extern unsigned int configColorPalette;
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ void grabbable_joint_update_func(struct ObjJoint *self) {
|
|||
self->mat128[3][2] += self->velocity.z;
|
||||
|
||||
if (self->header.drawFlags & OBJ_PICKED
|
||||
&& (!gMouseCam || (ABS(gPlayer1Controller->controllerData->stick2_x) < 0.1 && ABS(gPlayer1Controller->controllerData->stick2_y) < 0.1))) {
|
||||
&& (!configMouseCam || (ABS(gPlayer1Controller->controllerData->stick2_x) < 0.1 && ABS(gPlayer1Controller->controllerData->stick2_y) < 0.1))) {
|
||||
gGdCtrl.csrX -= (gGdCtrl.csrX - gGdCtrl.dragStartX) * 0.2;
|
||||
gGdCtrl.csrY -= (gGdCtrl.csrY - gGdCtrl.dragStartY) * 0.2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2455,12 +2455,12 @@ void parse_p1_controller(void) {
|
|||
currInputs = &sGdContPads[0];
|
||||
prevInputs = &sPrevFrameCont[0];
|
||||
// stick values
|
||||
gdctrl->stickXf = (f32) currInputs->stick_x + (gMouseCam ? currInputs->stick2_x : 0);
|
||||
gdctrl->stickYf = (f32) currInputs->stick_y - (gMouseCam ? currInputs->stick2_y : 0);
|
||||
gdctrl->stickXf = (f32) currInputs->stick_x + (configMouseCam ? currInputs->stick2_x : 0);
|
||||
gdctrl->stickYf = (f32) currInputs->stick_y - (configMouseCam ? currInputs->stick2_y : 0);
|
||||
gdctrl->stickDeltaX = gdctrl->stickX;
|
||||
gdctrl->stickDeltaY = gdctrl->stickY;
|
||||
gdctrl->stickX = (s32) currInputs->stick_x + (gMouseCam ? currInputs->stick2_x : 0);
|
||||
gdctrl->stickY = (s32) currInputs->stick_y - (gMouseCam ? currInputs->stick2_y : 0);
|
||||
gdctrl->stickX = (s32) currInputs->stick_x + (configMouseCam ? currInputs->stick2_x : 0);
|
||||
gdctrl->stickY = (s32) currInputs->stick_y - (configMouseCam ? currInputs->stick2_y : 0);
|
||||
gdctrl->stickDeltaX -= gdctrl->stickX;
|
||||
gdctrl->stickDeltaY -= gdctrl->stickY;
|
||||
// button values (as bools)
|
||||
|
|
|
|||
|
|
@ -1683,8 +1683,8 @@ void handle_controller_cursor_input(void) {
|
|||
}
|
||||
|
||||
// Move cursor
|
||||
sCursorPos[0] += (rawStickX + (gMouseCam ? gPlayer1Controller->rawStick2X : 0)) / 8;
|
||||
sCursorPos[1] += (rawStickY - (gMouseCam ? gPlayer1Controller->rawStick2Y : 0)) / 8;
|
||||
sCursorPos[0] += (rawStickX + (configMouseCam ? gPlayer1Controller->rawStick2X : 0)) / 8;
|
||||
sCursorPos[1] += (rawStickY - (configMouseCam ? gPlayer1Controller->rawStick2Y : 0)) / 8;
|
||||
|
||||
// Stop cursor from going offscreen
|
||||
if (config4by3Hud || configForce4by3) {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ void render_100_coin_star(u8 stars) {
|
|||
sStarSelectorModels[6]->oStarSelectorSize = 0.8;
|
||||
sStarSelectorModels[6]->oStarSelectorType = STAR_SELECTOR_100_COINS;
|
||||
}
|
||||
else if (gShow100CoinStar) {
|
||||
else if (configShow100CoinStar) {
|
||||
sStarSelectorModels[6] = spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_TRANSPARENT_STAR,
|
||||
bhvActSelectorStarType, 370, 24, -300, 0, 0, 0);
|
||||
sStarSelectorModels[6]->oStarSelectorSize = 0.8;
|
||||
|
|
|
|||
|
|
@ -108,16 +108,16 @@ static const struct ConfigOption options[] = {
|
|||
{ .name = "add_quit_option", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configQuitOption },
|
||||
{ .name = "hud_layout", .type = CONFIG_TYPE_UINT, .uintValue = &configHudLayout },
|
||||
{ .name = "4by3_hud", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&config4by3Hud },
|
||||
{ .name = "show_the_collected_stars", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gHudStars },
|
||||
{ .name = "show_the_collected_stars", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHudStars },
|
||||
{ .name = "add_zeroes_to_counters", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configAddZeroes },
|
||||
{ .name = "always_show_the_100_coin_star", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gShow100CoinStar },
|
||||
{ .name = "always_show_the_health_meter", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gAlwaysShowHealth },
|
||||
{ .name = "hud_filtering", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gHUDFiltering },
|
||||
{ .name = "hide_hud", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gHideHud },
|
||||
{ .name = "always_show_the_100_coin_star", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configShow100CoinStar },
|
||||
{ .name = "always_show_the_health_meter", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configAlwaysShowHealth },
|
||||
{ .name = "hud_filtering", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHUDFiltering },
|
||||
{ .name = "hide_hud", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHideHud },
|
||||
|
||||
{ .name = "MOUSE", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "mouse_support", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gMouseCam },
|
||||
{ .name = "mouse_sensitivity", .type = CONFIG_TYPE_FLOAT, .floatValue = &gMouseSensitivity },
|
||||
{ .name = "mouse_support", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configMouseCam },
|
||||
{ .name = "mouse_sensitivity", .type = CONFIG_TYPE_FLOAT, .floatValue = &configMouseSensitivity },
|
||||
{ .name = "left_mouse_button_action", .type = CONFIG_TYPE_UINT, .uintValue = &configMouseLeft },
|
||||
{ .name = "right_mouse_button_action", .type = CONFIG_TYPE_UINT, .uintValue = &configMouseRight },
|
||||
{ .name = "middle_mouse_button_action", .type = CONFIG_TYPE_UINT, .uintValue = &configMouseMiddle },
|
||||
|
|
@ -125,31 +125,31 @@ static const struct ConfigOption options[] = {
|
|||
{ .name = "mouse_wheel_down_action", .type = CONFIG_TYPE_UINT, .uintValue = &configMouseWheelDown },
|
||||
|
||||
{ .name = "EXTRA MOVES", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "wall_sliding", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gWallSliding },
|
||||
{ .name = "ground_pound_jump", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gGroundPoundJump },
|
||||
{ .name = "sunshine_dive_hop", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gSunshineDive },
|
||||
{ .name = "odyssey_ground_pound_dive", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gOdysseyDive },
|
||||
{ .name = "wall_sliding", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configWallSliding },
|
||||
{ .name = "ground_pound_jump", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configGroundPoundJump },
|
||||
{ .name = "sunshine_dive_hop", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configSunshineDive },
|
||||
{ .name = "odyssey_ground_pound_dive", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configOdysseyDive },
|
||||
{ .name = "odyssey_rolling", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configRolling },
|
||||
{ .name = "flashback_ground_pound", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gFlashbackPound },
|
||||
{ .name = "flashback_ground_pound", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configFlashbackGroundPound },
|
||||
|
||||
{ .name = "RESTORATIONS", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "enable_the_unused_pyramid_cutscene", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configUnusedPyramidCutscene },
|
||||
{ .name = "restore_unused_sound_effects", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configRestoreUnusedSounds },
|
||||
{ .name = "restore_mother_penguins_sad_eyes", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gPenguinSadEyes },
|
||||
{ .name = "replace_triple_jump_with_twirl", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gTwirlTripleJump },
|
||||
{ .name = "restore_mother_penguins_sad_eyes", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configPenguinSadEyes },
|
||||
{ .name = "replace_triple_jump_with_twirl", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configTwirlTripleJump },
|
||||
{ .name = "use_beta_like_camera", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configBetaLikeCamera },
|
||||
{ .name = "make_mario_sparkle_at_course_start", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gSpawnSparkles },
|
||||
{ .name = "replace_keys_with_stars_when_collected", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gReplaceKeysWithStars },
|
||||
{ .name = "make_mario_sparkle_at_course_start", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configSpawnSparkles },
|
||||
{ .name = "replace_keys_with_stars_when_collected", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configReplaceKeysWithStars },
|
||||
|
||||
{ .name = "BONUS MODES", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "infinite_lives_mode", .type = CONFIG_TYPE_UINT, .uintValue = &gLifeMode },
|
||||
{ .name = "encore_mode", .type = CONFIG_TYPE_UINT, .uintValue = &gEncoreMode },
|
||||
{ .name = "green_demon_mode", .type = CONFIG_TYPE_UINT, .uintValue = &gGreenDemon },
|
||||
{ .name = "no_healing_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gNoHealingMode },
|
||||
{ .name = "hard_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gHardSave },
|
||||
{ .name = "daredevil_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gDaredevilSave },
|
||||
{ .name = "permadeath_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gHardcoreSave },
|
||||
{ .name = "casual_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gCasualMode },
|
||||
{ .name = "infinite_lives_mode", .type = CONFIG_TYPE_UINT, .uintValue = &configLifeMode },
|
||||
{ .name = "encore_mode", .type = CONFIG_TYPE_UINT, .uintValue = &configEncoreMode },
|
||||
{ .name = "green_demon_mode", .type = CONFIG_TYPE_UINT, .uintValue = &configGreenDemon },
|
||||
{ .name = "no_healing_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configNoHealingMode },
|
||||
{ .name = "hard_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHardSave },
|
||||
{ .name = "daredevil_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configDaredevilSave },
|
||||
{ .name = "permadeath_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHardcoreSave },
|
||||
{ .name = "casual_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configCasualMode },
|
||||
{ .name = "invisible_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configInvisibleMode },
|
||||
|
||||
{ .name = "COLORS", .type = CONFIG_TYPE_SECTION },
|
||||
|
|
@ -200,26 +200,26 @@ static const struct ConfigOption options[] = {
|
|||
|
||||
{ .name = "CHEATS", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "level_select", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gDebugLevelSelect },
|
||||
{ .name = "debug_movement_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gDebugMovementMode },
|
||||
{ .name = "debug_cap_changer", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gDebugCapChanger },
|
||||
{ .name = "debug_movement_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configDebugMovementMode },
|
||||
{ .name = "debug_cap_changer", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configDebugCapChanger },
|
||||
{ .name = "debug_object_spawner", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configDebugObjectSpawner },
|
||||
{ .name = "moon_jump", .type = CONFIG_TYPE_UINT, .uintValue = &configMoonJump },
|
||||
{ .name = "easy_bowser_throws", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configEasyBowserThrows },
|
||||
{ .name = "blj_everywhere", .type = CONFIG_TYPE_UINT, .uintValue = &configBLJEverywhere },
|
||||
{ .name = "god_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configGodMode },
|
||||
{ .name = "hyperspeed_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configHyperspeedMode },
|
||||
{ .name = "no_cannon_limits", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gFlexibleCannons },
|
||||
{ .name = "no_cannon_limits", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configFlexibleCannons },
|
||||
{ .name = "coins_required_for_the_coin_stars", .type = CONFIG_TYPE_UINT, .uintValue = &configCoinStarCoins },
|
||||
|
||||
{ .name = "FOR FUN", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "rock_paper_scissors", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configRockPaperScissors },
|
||||
{ .name = "mad_penguin", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configAngryPenguin },
|
||||
{ .name = "paper_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gPaperMode },
|
||||
{ .name = "fx_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gFXMode },
|
||||
{ .name = "paper_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configPaperMode },
|
||||
{ .name = "fx_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configFXMode },
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
{ .name = "wireframe_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gWireframeMode },
|
||||
{ .name = "wireframe_mode", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configWireframeMode },
|
||||
#endif
|
||||
{ .name = "disable_lighting", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gDisableLighting },
|
||||
{ .name = "disable_lighting", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&configDisableLighting },
|
||||
|
||||
{ .name = "ADVANCED", .type = CONFIG_TYPE_SECTION },
|
||||
{ .name = "show_debug_display", .type = CONFIG_TYPE_BOOL, .boolValue = (bool*)&gShowDebugText },
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void keyboard_on_mouse_move(long x, long y) {
|
|||
}
|
||||
|
||||
void keyboard_on_mouse_press(s8 left, s8 right, s8 middle, s8 wheel) {
|
||||
if (!gMouseCam)
|
||||
if (!configMouseCam)
|
||||
return;
|
||||
|
||||
if (left > 0)
|
||||
|
|
@ -116,11 +116,11 @@ static void keyboard_init(void) {
|
|||
|
||||
static void keyboard_read(OSContPad *pad) {
|
||||
// Camera movement with mouse
|
||||
if (gMouseCam) {
|
||||
if (configMouseCam) {
|
||||
if (mouse_x != 0)
|
||||
pad->stick2_x = mouse_x*gMouseSensitivity;
|
||||
pad->stick2_x = mouse_x*configMouseSensitivity;
|
||||
if (mouse_y != 0)
|
||||
pad->stick2_y = mouse_y*gMouseSensitivity;
|
||||
pad->stick2_y = mouse_y*configMouseSensitivity;
|
||||
if (mouse_wheel < -1) {
|
||||
keyboard_buttons_down &= ~configMouseWheelDown;
|
||||
mouse_wheel = 0;
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ static void gfx_d3d11_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_t
|
|||
D3D11_RASTERIZER_DESC rasterizer_desc;
|
||||
ZeroMemory(&rasterizer_desc, sizeof(D3D11_RASTERIZER_DESC));
|
||||
|
||||
rasterizer_desc.FillMode = gWireframeMode ? D3D11_FILL_WIREFRAME : D3D11_FILL_SOLID;
|
||||
rasterizer_desc.FillMode = configWireframeMode ? D3D11_FILL_WIREFRAME : D3D11_FILL_SOLID;
|
||||
rasterizer_desc.CullMode = D3D11_CULL_NONE;
|
||||
rasterizer_desc.FrontCounterClockwise = true;
|
||||
rasterizer_desc.DepthBias = 0;
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ static void gfx_direct3d12_draw_triangles(float buf_vbo[], size_t buf_vbo_len, s
|
|||
desc.RasterizerState.SlopeScaledDepthBias = -2.0f;
|
||||
}
|
||||
desc.RasterizerState.CullMode = D3D12_CULL_MODE_NONE;
|
||||
desc.RasterizerState.FillMode = gWireframeMode ? D3D12_FILL_MODE_WIREFRAME : D3D12_FILL_MODE_SOLID;
|
||||
desc.RasterizerState.FillMode = configWireframeMode ? D3D12_FILL_MODE_WIREFRAME : D3D12_FILL_MODE_SOLID;
|
||||
if (prg->shader_id & SHADER_OPT_ALPHA) {
|
||||
D3D12_BLEND_DESC bd = {};
|
||||
bd.AlphaToCoverageEnable = FALSE;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ static void toggle_borderless_window_full_screen(bool enable, bool call_callback
|
|||
ShowWindow(dxgi.h_wnd, SW_RESTORE);
|
||||
}
|
||||
|
||||
if (!gMouseCam) {
|
||||
if (!configMouseCam) {
|
||||
ShowCursor(TRUE);
|
||||
mouse_visible = true;
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ static void gfx_dxgi_init(const char *game_name, bool start_in_fullscreen) {
|
|||
if (start_in_fullscreen) {
|
||||
toggle_borderless_window_full_screen(true, false);
|
||||
}
|
||||
if (start_in_fullscreen || gMouseCam) {
|
||||
if (start_in_fullscreen || configMouseCam) {
|
||||
ShowCursor(FALSE);
|
||||
mouse_visible = false;
|
||||
}
|
||||
|
|
@ -471,7 +471,7 @@ static uint64_t qpc_to_us(uint64_t qpc) {
|
|||
static bool gfx_dxgi_start_frame(void) {
|
||||
|
||||
// Before rendering, center the mouse cursor and set the mouse movement variables.
|
||||
if (gMouseCam) {
|
||||
if (configMouseCam) {
|
||||
if (mouse_capture) {
|
||||
POINT cursorPoint;
|
||||
GetCursorPos(&cursorPoint);
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ static bool gfx_texture_cache_lookup(int tile, struct TextureHashmapNode **n, co
|
|||
while (*node != NULL && *node - gfx_texture_cache.pool < (int)gfx_texture_cache.pool_pos) {
|
||||
if ((*node)->texture_addr == orig_addr && (*node)->fmt == fmt && (*node)->siz == siz) {
|
||||
gfx_rapi->select_texture(tile, (*node)->texture_id);
|
||||
if (gEncoreMode)
|
||||
if (configEncoreMode)
|
||||
(*node)->linear_filter = (get_palette() == 12);
|
||||
*n = *node;
|
||||
return true;
|
||||
|
|
@ -1005,7 +1005,7 @@ static void gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx *verti
|
|||
short U = v->tc[0] * rsp.texture_scaling_factor.s >> 16;
|
||||
short V = v->tc[1] * rsp.texture_scaling_factor.t >> 16;
|
||||
|
||||
if (gFXMode) {
|
||||
if (configFXMode) {
|
||||
U = 1;
|
||||
V = 1;
|
||||
}
|
||||
|
|
@ -1075,7 +1075,7 @@ static void gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx *verti
|
|||
|
||||
for (int i = 0; i < rsp.current_num_lights - 1; i++) {
|
||||
float intensity = 0;
|
||||
if (gDisableLighting) {
|
||||
if (configDisableLighting) {
|
||||
intensity = 0.5f;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1147,7 +1147,7 @@ static void gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx *verti
|
|||
doty += vn->n[1] * rsp.current_lookat_coeffs[1][1];
|
||||
doty += vn->n[2] * rsp.current_lookat_coeffs[1][2];
|
||||
|
||||
if (gFXMode || gDisableLighting) {
|
||||
if (configFXMode || configDisableLighting) {
|
||||
U = 1;
|
||||
V = 1;
|
||||
}
|
||||
|
|
@ -1328,7 +1328,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx) {
|
|||
import_texture(i);
|
||||
rdp.textures_changed[i] = false;
|
||||
}
|
||||
bool linear_filter = (rdp.other_mode_h & (3U << G_MDSFT_TEXTFILT)) != G_TF_POINT || gHUDFiltering;
|
||||
bool linear_filter = (rdp.other_mode_h & (3U << G_MDSFT_TEXTFILT)) != G_TF_POINT || configHUDFiltering;
|
||||
if (linear_filter != rendering_state.textures[i]->linear_filter || rdp.texture_tile.cms != rendering_state.textures[i]->cms || rdp.texture_tile.cmt != rendering_state.textures[i]->cmt) {
|
||||
gfx_flush();
|
||||
gfx_rapi->set_sampler_parameters(i, linear_filter, rdp.texture_tile.cms, rdp.texture_tile.cmt);
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen) {
|
|||
set_fullscreen(true, false);
|
||||
}
|
||||
|
||||
if (gMouseCam) {
|
||||
if (configMouseCam) {
|
||||
SDL_SetRelativeMouseMode(true);
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ static void gfx_sdl_set_keyboard_callbacks(bool (*on_key_down)(int scancode), bo
|
|||
static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
|
||||
while (1) {
|
||||
run_one_game_iter();
|
||||
if (gMouseCam) {
|
||||
if (configMouseCam) {
|
||||
SDL_SetRelativeMouseMode((SDL_GetWindowFlags(wnd) & SDL_WINDOW_INPUT_FOCUS) == SDL_WINDOW_INPUT_FOCUS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue