mirror of
https://github.com/blawar/ooot.git
synced 2024-07-02 09:03:36 +00:00
Cleaned up options object, added blind owl game setting (#150)
* Cleaned up options object, added blind owl game setting to shut up Kaepora Gaebora * Unintentionally commented out a static_assert
This commit is contained in:
parent
ba10617dbe
commit
3149ee7e33
|
@ -27,6 +27,7 @@
|
|||
#include "def/z_play.h"
|
||||
#include "def/z_rcp.h"
|
||||
#include "def/z_skelanime.h"
|
||||
#include <port/options.h>
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4)
|
||||
|
||||
|
@ -276,6 +277,8 @@ s32 EnOwl_CheckInitTalk(EnOwl* pthis, GlobalContext* globalCtx, u16 textId, f32
|
|||
s32 timer;
|
||||
f32 distCheck;
|
||||
|
||||
if (oot::config().game().blindOwl()) return false;
|
||||
|
||||
if (Actor_ProcessTalkRequest(&pthis->actor, globalCtx)) {
|
||||
if (pthis->actor.params == 0xFFF) {
|
||||
pthis->actionFlags |= 0x40;
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace sm64::hid
|
|||
// 0.5x A presses are a good meme
|
||||
buttonDown = m_state.button;
|
||||
|
||||
if(sm64::config().game().mirror())
|
||||
if(oot::config().game().mirror())
|
||||
{
|
||||
rawStickX = -rawStickX;
|
||||
r_rawStickX = -r_rawStickX;
|
||||
|
@ -234,12 +234,12 @@ namespace sm64::hid
|
|||
|
||||
s64 Controller::mouse_x() const
|
||||
{
|
||||
return m_state.mouse_x * (sm64::config().camera().mousexInvert() ? -1 : 1) * sm64::config().camera().mousexScaler();
|
||||
return m_state.mouse_x * (oot::config().camera().mousexInvert() ? -1 : 1) * oot::config().camera().mousexScaler();
|
||||
}
|
||||
|
||||
s64 Controller::mouse_y() const
|
||||
{
|
||||
return m_state.mouse_y * (sm64::config().camera().mouseyInvert() ? -1 : 1) * sm64::config().camera().mouseyScaler();
|
||||
return m_state.mouse_y * (oot::config().camera().mouseyInvert() ? -1 : 1) * oot::config().camera().mouseyScaler();
|
||||
}
|
||||
|
||||
bool Controller::updateRebind(int input)
|
||||
|
|
|
@ -292,8 +292,8 @@ namespace sm64::hid
|
|||
|
||||
if (state[SDL_SCANCODE_F10] && (m_lastKeyState[SDL_SCANCODE_F10] ^ state[SDL_SCANCODE_F10]))
|
||||
{
|
||||
sm64::config().game().fullscreen() = !sm64::config().game().fullscreen();
|
||||
set_fullscreen(sm64::config().game().fullscreen());
|
||||
oot::config().game().fullscreen() = !oot::config().game().fullscreen();
|
||||
set_fullscreen(oot::config().game().fullscreen());
|
||||
}
|
||||
|
||||
if(state[SDL_SCANCODE_F9] && (m_lastKeyState[SDL_SCANCODE_F9] ^ state[SDL_SCANCODE_F9]))
|
||||
|
@ -303,10 +303,10 @@ namespace sm64::hid
|
|||
|
||||
if (state[SDL_SCANCODE_ESCAPE] && (m_lastKeyState[SDL_SCANCODE_ESCAPE] ^ state[SDL_SCANCODE_ESCAPE]))
|
||||
{
|
||||
if (sm64::config().game().fullscreen())
|
||||
if (oot::config().game().fullscreen())
|
||||
{
|
||||
sm64::config().game().fullscreen() = false;
|
||||
set_fullscreen(sm64::config().game().fullscreen());
|
||||
oot::config().game().fullscreen() = false;
|
||||
set_fullscreen(oot::config().game().fullscreen());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ namespace sm64::hid
|
|||
}
|
||||
}
|
||||
|
||||
if(sm64::config().camera().useClassicCamera())
|
||||
if(oot::config().camera().useClassicCamera())
|
||||
{
|
||||
int16_t leftx = SDL_GameControllerGetAxis(m_context, SDL_CONTROLLER_AXIS_LEFTX);
|
||||
int16_t lefty = SDL_GameControllerGetAxis(m_context, SDL_CONTROLLER_AXIS_LEFTY);
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sm64::hid
|
|||
|
||||
if(fp != NULL)
|
||||
{
|
||||
fread(&sm64::config(), 1, sizeof(sm64::config()), fp);
|
||||
fread(&oot::config(), 1, sizeof(oot::config()), fp);
|
||||
g_tasPlaying = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ extern s32 sActSelectorMenuTimer;
|
|||
extern s16 gMenuMode;
|
||||
extern s8 goTogame;*/
|
||||
|
||||
namespace sm64
|
||||
namespace oot
|
||||
{
|
||||
static Options* g_options = nullptr;
|
||||
|
||||
|
@ -268,31 +268,16 @@ namespace sm64
|
|||
return m_mirror;
|
||||
}
|
||||
|
||||
bool& Game::blindOwl()
|
||||
{
|
||||
return m_blindowl;
|
||||
}
|
||||
|
||||
bool& Game::disableSound()
|
||||
{
|
||||
return m_disableSound;
|
||||
}
|
||||
|
||||
bool Game::noStarExit() const
|
||||
{
|
||||
if (!m_noStarExit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/*if (activeStageNo == LEVEL_BOWSER_1 || activeStageNo == LEVEL_BOWSER_2 || activeStageNo == LEVEL_BOWSER_3)
|
||||
{
|
||||
return false;
|
||||
}*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool& Game::setNoStarExit()
|
||||
{
|
||||
return m_noStarExit;
|
||||
}
|
||||
|
||||
bool& Game::disableFramePacing()
|
||||
{
|
||||
return m_paceFrames;
|
||||
|
@ -341,7 +326,7 @@ namespace sm64
|
|||
g_levelLoaded = 0;
|
||||
}
|
||||
|
||||
Cheats::Cheats() : m_invincible(false), m_moonJump(false), m_unlimitedLives(false), m_superJump(false), m_quadrupleJump(false)
|
||||
Cheats::Cheats() : m_invincible(false), m_moonJump(false)
|
||||
{
|
||||
memset(junk, 0, sizeof(junk));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace sm64
|
||||
namespace oot
|
||||
{
|
||||
namespace options
|
||||
{
|
||||
|
@ -116,18 +116,6 @@ namespace sm64
|
|||
{
|
||||
return m_moonJump;
|
||||
}
|
||||
bool& unlimitedLives()
|
||||
{
|
||||
return m_unlimitedLives;
|
||||
}
|
||||
bool& superJump()
|
||||
{
|
||||
return m_superJump;
|
||||
}
|
||||
bool& quadrupleJump()
|
||||
{
|
||||
return m_quadrupleJump;
|
||||
}
|
||||
float& bowserAimAssist()
|
||||
{
|
||||
return m_bowserAimAssist;
|
||||
|
@ -137,18 +125,15 @@ namespace sm64
|
|||
{
|
||||
return m_speed;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
bool m_invincible;
|
||||
bool m_moonJump;
|
||||
bool m_unlimitedLives;
|
||||
bool m_superJump;
|
||||
bool m_quadrupleJump;
|
||||
u8 padding[3];
|
||||
u8 padding[2];
|
||||
float m_bowserAimAssist;
|
||||
float m_speed;
|
||||
|
||||
u8 junk[0x40 - (5 + 7 + 4)];
|
||||
u8 junk[0x40 - (2 + 7 + 4)];
|
||||
};
|
||||
|
||||
static_assert(sizeof(Cheats) == 0x40, "Cheats size incorrect");
|
||||
|
@ -191,9 +176,8 @@ namespace sm64
|
|||
bool& fullscreen();
|
||||
const bool mirror() const;
|
||||
bool& setMirror();
|
||||
bool& blindOwl();
|
||||
|
||||
bool noStarExit() const;
|
||||
bool& setNoStarExit();
|
||||
bool& disableFramePacing();
|
||||
|
||||
bool& recordTas();
|
||||
|
@ -205,7 +189,7 @@ namespace sm64
|
|||
bool m_disableSound;
|
||||
bool m_fullscreen;
|
||||
bool m_mirror;
|
||||
bool m_noStarExit;
|
||||
bool m_blindowl;
|
||||
bool m_paceFrames;
|
||||
bool m_recordTas;
|
||||
bool m_forceMouse;
|
||||
|
@ -272,4 +256,4 @@ namespace sm64
|
|||
typedef options::Base Options;
|
||||
|
||||
Options& config();
|
||||
} // namespace sm64
|
||||
} // namespace oot
|
|
@ -52,7 +52,7 @@ namespace sm64
|
|||
|
||||
m_controller.merge(*controller);
|
||||
}
|
||||
if (m_controllers.size() > 2 && !config().game().forceMouse())
|
||||
if (m_controllers.size() > 2 && !oot::config().game().forceMouse())
|
||||
{
|
||||
m_controller.state().has_mouse = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user