mirror of https://github.com/sm64pc/sm64pc.git
Add option to remove Yoshi in settings
This commit is contained in:
parent
7ad78dd09e
commit
64745d3abc
|
@ -7,13 +7,15 @@
|
||||||
// so o->oHomeY is never updated.
|
// so o->oHomeY is never updated.
|
||||||
static s16 sYoshiHomeLocations[] = { 0, -5625, -1364, -5912, -1403, -4609, -1004, -5308 };
|
static s16 sYoshiHomeLocations[] = { 0, -5625, -1364, -5912, -1403, -4609, -1004, -5308 };
|
||||||
|
|
||||||
|
u8 enableYoshi;
|
||||||
|
|
||||||
void bhv_yoshi_init(void) {
|
void bhv_yoshi_init(void) {
|
||||||
o->oGravity = 2.0f;
|
o->oGravity = 2.0f;
|
||||||
o->oFriction = 0.9f;
|
o->oFriction = 0.9f;
|
||||||
o->oBuoyancy = 1.3f;
|
o->oBuoyancy = 1.3f;
|
||||||
o->oInteractionSubtype = INT_SUBTYPE_NPC;
|
o->oInteractionSubtype = INT_SUBTYPE_NPC;
|
||||||
|
|
||||||
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, 0, 24) < 120 || sYoshiDead == TRUE) {
|
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, 0, 24) < 120 || sYoshiDead == TRUE || enableYoshi == 0) {
|
||||||
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +24,10 @@ void yoshi_walk_loop(void) {
|
||||||
UNUSED s16 sp26;
|
UNUSED s16 sp26;
|
||||||
s16 sp24 = o->header.gfx.unk38.animFrame;
|
s16 sp24 = o->header.gfx.unk38.animFrame;
|
||||||
|
|
||||||
|
if (enableYoshi == 0) {
|
||||||
|
o->oAction = YOSHI_ACT_WALK_JUMP_OFF_ROOF;
|
||||||
|
}
|
||||||
|
|
||||||
o->oForwardVel = 10.0f;
|
o->oForwardVel = 10.0f;
|
||||||
sp26 = object_step();
|
sp26 = object_step();
|
||||||
o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oYoshiTargetYaw, 0x500);
|
o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oYoshiTargetYaw, 0x500);
|
||||||
|
@ -47,6 +53,10 @@ void yoshi_idle_loop(void) {
|
||||||
s16 chosenHome;
|
s16 chosenHome;
|
||||||
UNUSED s16 sp1C = o->header.gfx.unk38.animFrame;
|
UNUSED s16 sp1C = o->header.gfx.unk38.animFrame;
|
||||||
|
|
||||||
|
if (enableYoshi == 0) {
|
||||||
|
o->oAction = YOSHI_ACT_WALK_JUMP_OFF_ROOF;
|
||||||
|
}
|
||||||
|
|
||||||
if (o->oTimer > 90) {
|
if (o->oTimer > 90) {
|
||||||
chosenHome = random_float() * 3.99;
|
chosenHome = random_float() * 3.99;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef YoshiInc
|
||||||
|
#define YoshiInc
|
||||||
|
|
||||||
|
extern u8 enableYoshi;
|
||||||
|
|
||||||
|
#endif
|
|
@ -645,6 +645,7 @@ namespace MoonInternal {
|
||||||
ImGui::SliderInt("###rumble_strength", (int*)&configRumbleStrength, 0, 50);
|
ImGui::SliderInt("###rumble_strength", (int*)&configRumbleStrength, 0, 50);
|
||||||
ImGui::Checkbox("Precache Textures", &configPrecacheRes);
|
ImGui::Checkbox("Precache Textures", &configPrecacheRes);
|
||||||
ImGui::Checkbox("Skip Intro", &configSkipIntro);
|
ImGui::Checkbox("Skip Intro", &configSkipIntro);
|
||||||
|
ImGui::Checkbox("Enable Yoshi", &enable_yoshi);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
|
@ -24,6 +24,8 @@ extern "C" {
|
||||||
#include "game/level_update.h"
|
#include "game/level_update.h"
|
||||||
#include "game/mario.h"
|
#include "game/mario.h"
|
||||||
#include "sm64.h"
|
#include "sm64.h"
|
||||||
|
#include "game/behavior_actions.h"
|
||||||
|
#include "game/behaviors/yoshi.inc.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_frozen;
|
bool camera_frozen;
|
||||||
|
@ -36,11 +38,13 @@ bool show_menu_bar;
|
||||||
float camera_speed = 0.8f;
|
float camera_speed = 0.8f;
|
||||||
bool enable_cap_logo;
|
bool enable_cap_logo;
|
||||||
bool enable_overall_buttons;
|
bool enable_overall_buttons;
|
||||||
|
bool enable_yoshi;
|
||||||
|
|
||||||
// Second Check
|
// Second Check
|
||||||
|
|
||||||
bool has_changed_cap_logo;
|
bool has_changed_cap_logo;
|
||||||
bool has_changed_overall_buttons;
|
bool has_changed_overall_buttons;
|
||||||
|
bool has_changed_yoshi;
|
||||||
|
|
||||||
namespace MoonInternal {
|
namespace MoonInternal {
|
||||||
|
|
||||||
|
@ -66,6 +70,7 @@ namespace MoonInternal {
|
||||||
enable_shadows = true;
|
enable_shadows = true;
|
||||||
enable_cap_logo = true;
|
enable_cap_logo = true;
|
||||||
enable_overall_buttons = true;
|
enable_overall_buttons = true;
|
||||||
|
enable_yoshi = false;
|
||||||
|
|
||||||
MoonInternal::load_cc_directory();
|
MoonInternal::load_cc_directory();
|
||||||
|
|
||||||
|
@ -142,6 +147,10 @@ namespace MoonInternal {
|
||||||
saturn_toggle_m_buttons();
|
saturn_toggle_m_buttons();
|
||||||
has_changed_overall_buttons = false;
|
has_changed_overall_buttons = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Yoshi
|
||||||
|
|
||||||
|
enableYoshi = (enable_yoshi) ? 1 : 0;
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,6 @@ extern bool show_menu_bar;
|
||||||
extern float camera_speed;
|
extern float camera_speed;
|
||||||
extern bool enable_cap_logo;
|
extern bool enable_cap_logo;
|
||||||
extern bool enable_overall_buttons;
|
extern bool enable_overall_buttons;
|
||||||
|
extern bool enable_yoshi;
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue