mirror of
https://github.com/PrimeDecomp/echoes.git
synced 2024-11-26 23:00:24 +00:00
CGameOptions
This commit is contained in:
parent
a96b24548e
commit
289df2c57f
@ -178,7 +178,7 @@ fn_80008B60 = .text:0x80008B60; // type:function size:0xC8
|
||||
fn_80008C28 = .text:0x80008C28; // type:function size:0xB8
|
||||
fn_80008CE0 = .text:0x80008CE0; // type:function size:0x88
|
||||
fn_80008D68 = .text:0x80008D68; // type:function size:0x80
|
||||
fn_80008DE8 = .text:0x80008DE8; // type:function size:0xAC
|
||||
reserve__Q24rstl47vector<10SObjectTag,Q24rstl17rmemory_allocator>Fi = .text:0x80008DE8; // type:function size:0xAC
|
||||
fn_80008E94 = .text:0x80008E94; // type:function size:0xAC
|
||||
ReleaseData__Q24rstl34rc_ptr<24IArchitectureMessageParm>Fv = .text:0x80008F40; // type:function size:0x64 scope:global
|
||||
ReleaseData__Q24rstl15rc_ptr<6CIOWin>Fv = .text:0x80008FA4; // type:function size:0x64 scope:global
|
||||
|
@ -4,18 +4,23 @@
|
||||
#include "Kyoto/Graphics/CGraphics.hpp"
|
||||
#include "Kyoto/Graphics/CMoviePlayer.hpp"
|
||||
#include "Kyoto/Math/CMath.hpp"
|
||||
#include "Kyoto/Streams/CMemoryStreamOut.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
#include "Kyoto/Streams/CMemoryStreamOut.hpp"
|
||||
|
||||
|
||||
#include "dolphin/os.h"
|
||||
|
||||
extern "C" void fn_8029AF00(int, uchar);
|
||||
extern "C" rstl::pair<bool, bool> fn_80227694();
|
||||
extern "C" void fn_802275B8(rstl::pair<bool, bool>&, CMemoryStreamOut& out);
|
||||
extern "C" rstl::pair<bool, bool> fn_80227624(CInputStream& in);
|
||||
extern "C" rstl::pair< bool, bool > fn_80227694();
|
||||
extern "C" void fn_802275B8(rstl::pair< bool, bool >&, CMemoryStreamOut& out);
|
||||
extern "C" rstl::pair< bool, bool > fn_80227624(CInputStream& in);
|
||||
|
||||
extern "C" bool lbl_804191E0;
|
||||
|
||||
SObjectTag sControllerAssets[] = {
|
||||
SObjectTag(0x2A13423E, 0xF13452F8),
|
||||
};
|
||||
|
||||
int CGameOptions_CalculateBits(uint v) {
|
||||
int iVar1;
|
||||
|
||||
@ -65,7 +70,7 @@ CGameOptions::CGameOptions()
|
||||
InitSoundMode();
|
||||
}
|
||||
|
||||
CGameOptions::CGameOptions(CInputStream& in)
|
||||
CGameOptions::CGameOptions(CInputStream& in)
|
||||
|
||||
: soundMode(CAudioSys::kSM_Stereo)
|
||||
, screenBrightness(4)
|
||||
@ -82,10 +87,9 @@ CGameOptions::CGameOptions(CInputStream& in)
|
||||
, swapBeamsControls(false)
|
||||
, hintSystem(true)
|
||||
, unk(false)
|
||||
, vec()
|
||||
{
|
||||
, vec() {
|
||||
in.ReadBits(32);
|
||||
soundMode = (CAudioSys::ESurroundModes) in.ReadBits(CGameOptions_CalculateBits(2));
|
||||
soundMode = (CAudioSys::ESurroundModes)in.ReadBits(CGameOptions_CalculateBits(2));
|
||||
screenBrightness = in.ReadBits(CGameOptions_CalculateBits(8));
|
||||
screenXOffset = in.ReadBits(CGameOptions_CalculateBits(60)) - 30;
|
||||
screenYOffset = in.ReadBits(CGameOptions_CalculateBits(60)) - 30;
|
||||
@ -95,14 +99,14 @@ CGameOptions::CGameOptions(CInputStream& in)
|
||||
musicVol = in.ReadBits(CGameOptions_CalculateBits(0x69));
|
||||
hudAlpha = in.ReadBits(CGameOptions_CalculateBits(0xff));
|
||||
helmetAlpha = in.ReadBits(CGameOptions_CalculateBits(0xff));
|
||||
|
||||
|
||||
hudLag = in.ReadBits(1);
|
||||
hintSystem = in.ReadBits(1);
|
||||
invertY = in.ReadBits(1);
|
||||
rumble = in.ReadBits(1);
|
||||
swapBeamsControls = in.ReadBits(1);
|
||||
unk = in.ReadBits(1);
|
||||
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
unk2.push_back(fn_80227624(in));
|
||||
}
|
||||
@ -129,7 +133,7 @@ void CGameOptions::PutTo(CMemoryStreamOut& out) {
|
||||
out.WriteBits(unk != 0, 1);
|
||||
|
||||
int i = 0;
|
||||
rstl::pair<bool, bool>* data = unk2.data();
|
||||
rstl::pair< bool, bool >* data = unk2.data();
|
||||
for (; i < 4; ++i) {
|
||||
fn_802275B8(*data, out);
|
||||
++data;
|
||||
@ -306,6 +310,20 @@ void CGameOptions::ToggleControls(bool flag) {
|
||||
}
|
||||
}
|
||||
|
||||
void CGameOptions::ResetControllerAssets(int controls) {}
|
||||
void CGameOptions::ResetControllerAssets(int controls) {
|
||||
switch (controls) {
|
||||
case 1:
|
||||
vec.reserve(15);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
vec.push_back(sControllerAssets[i]);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
vec = rstl::vector<SObjectTag>();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CGameOptions::SetControls(int controls) { ResetControllerAssets(controls); }
|
||||
|
Loading…
Reference in New Issue
Block a user