From eaf3a181a149b95d7e8b9633b3f4a2881c46a772 Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 00:31:01 +0100 Subject: [PATCH 01/13] implemented MainMenu::BeginStartup --- config/mapping.csv | 4 ++-- config/stubbed.csv | 2 ++ scripts/configure.py | 1 + src/MainMenu.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/MainMenu.hpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/Supervisor.hpp | 2 ++ 6 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 src/MainMenu.cpp diff --git a/config/mapping.csv b/config/mapping.csv index 0bbcbc63..d8c68d58 100644 --- a/config/mapping.csv +++ b/config/mapping.csv @@ -423,7 +423,7 @@ MainMenu::OnUpdate,0x43579f,0x1d31,__stdcall,u32,MainMenu* MainMenu::MoveCursor,0x43753c,0x136,__stdcall,i32,MainMenu*,i32 MainMenu::FUN_00437672,0x437672,0x131,__stdcall,void,MainMenu*,i16,u16,i32 FUN_004377a3,0x4377a3,0xff,__stdcall,void,MainMenu*,i32,i32,u32,u32,i32 -MainMenu::beginStartup,0x4378a2,0x142,__fastcall,ZunResult,MainMenu* +MainMenu::BeginStartup,0x4378a2,0x142,__thiscall,ZunResult,MainMenu* MainMenu::FUN_004379e4,0x4379e4,0x15d,__thiscall,i32,MainMenu* MainMenu::FUN_00437b41,0x437b41,0x68b,__thiscall,u32,MainMenu* MainMenu::ReplayHandling,0x4381ec,0x9d5,__thiscall,void,MainMenu* @@ -432,7 +432,7 @@ MainMenu::setSavedCursorPosition,0x438ef8,0x23f,__thiscall,void,MainMenu*,AnmVm* MainMenu::FUN_00439137,0x439137,0x82e,__thiscall,u32,MainMenu* MainMenu::FUN_00439965,0x439965,0x171,__thiscall,u32,MainMenu* MainMenu::OnDraw,0x439ad6,0x2ca,unknown,u8,MainMenu* -MainMenu::loadTitleAnm,0x439da0,0x1e8,__stdcall,u32,MainMenu* +LoadTitleAnm,0x439da0,0x1e8,__stdcall,ZunResult,MainMenu* MainMenu::loadMenu,0x439f88,0x264,default,ZunResult,u32 LoadReplayMenu,0x43a1ec,0x14c,__stdcall,ZunResult,MainMenu* MainMenu::RegisterChain,0x43a338,0x12c,unknown,ZunResult,u32 diff --git a/config/stubbed.csv b/config/stubbed.csv index cea10dd1..8da3c3ee 100644 --- a/config/stubbed.csv +++ b/config/stubbed.csv @@ -10,6 +10,7 @@ StageMenu::OnDrawRetryMenu AsciiManager::DrawPopupsWithHwVertexProcessing AsciiManager::DrawPopupsWithoutHwVertexProcessing GameWindow::Render +LoadTitleAnm MidiDevice::Close MidiTimer::StopTimer MidiOutput::ClearTracks @@ -27,6 +28,7 @@ Supervisor::CreateBackBuffer Supervisor::SetupDInput Supervisor::TickTimer Supervisor::ReleasePbg3 +Supervisor::PlayAudio GameManager::RegisterChain GameManager::CutChain Ending::RegisterChain diff --git a/scripts/configure.py b/scripts/configure.py index 3d24612f..035d4256 100644 --- a/scripts/configure.py +++ b/scripts/configure.py @@ -92,6 +92,7 @@ def configure(build_type): "Supervisor", "GameErrorContext", "GameWindow", + "MainMenu", "MidiOutput", "SoundPlayer", "Stage", diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp new file mode 100644 index 00000000..7a4ffb32 --- /dev/null +++ b/src/MainMenu.cpp @@ -0,0 +1,44 @@ +#include +#include + +#include "MainMenu.hpp" +#include "Supervisor.hpp" + +#pragma optimize("s", on) +ZunResult MainMenu::BeginStartup() { + D3DXVECTOR3 vector3Ptr; // we have to add Ptr, + // because otherwise it gets 0.7% less on decomp.me for some reason + DWORD time; + int i; + + if(LoadTitleAnm(this) != ZUN_SUCCESS) { + g_Supervisor.curState = 4; + return ZUN_ERROR; + } else { + if(g_Supervisor.startupTimeBeforeMenuMusic > 0) { + time = timeGetTime(); + while((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) + && (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) { + time = timeGetTime(); + } + g_Supervisor.startupTimeBeforeMenuMusic = 0; + g_Supervisor.PlayAudio("bgm/th06_01.mid"); + } + for(i = 0; i < 122; i++) { + this->vm[i].pendingInterrupt = 1; + this->vm[i].flags |= 8; + if((g_Supervisor.cfg.opts & 1) == 0) { + this->vm[i].color = 0xff000000; + } else { + this->vm[i].color = 0xffffffff; + } + vector3Ptr.x = 0.0; + vector3Ptr.y = 0.0; + vector3Ptr.z = 0.0; + this->vm[i].pos2 = vector3Ptr; + } + this->gameState = STATE_PRE_INPUT; + return ZUN_SUCCESS; + } +} +#pragma optimize("", on) diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index ec60ed95..d88decda 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -1,8 +1,52 @@ #pragma once +#include + +#include "AnmVm.hpp" +#include "inttypes.hpp" #include "ZunResult.hpp" + +enum GameState { + STATE_STARTUP, + STATE_PRE_INPUT, + STATE_MAIN_MENU, + STATE_OPTIONS, + STATE_QUIT, + STATE_KEYCONFIG, + STATE_DIFFICULTY_LOAD, + STATE_DIFFICULTY_SELECT, + STATE_CHARACTER_LOAD, + STATE_CHARACTER_SELECT, + STATE_SCORE, + STATE_SHOT_SELECT, + STATE_REPLAY_LOAD, + STATE_REPLAY_ANIM, + STATE_REPLAY_UNLOAD, + STATE_REPLAY_SELECT, + STATE_MUSIC_ROOM, +}; + struct MainMenu { + ZunResult BeginStartup(); static ZunResult RegisterChain(u32 is_demo); + + AnmVm vm[122]; + i32 cursor; + i8 padding[68]; + u32 unk_81e4; + i32 chosenReplay; + i32 replayFilesNum; + GameState gameState; + i32 stateTimer; + i32 idleFrames; + f32 unk_81fc; + D3DCOLOR maybeMenuTextColor; + D3DCOLOR color2; + D3DCOLOR color1; + u32 unk_820c; + i8 padding2[0x8D24]; }; + +ZunResult LoadTitleAnm(MainMenu* menu); diff --git a/src/Supervisor.hpp b/src/Supervisor.hpp index 3171a3e3..21d0f2a6 100644 --- a/src/Supervisor.hpp +++ b/src/Supervisor.hpp @@ -94,6 +94,8 @@ struct Supervisor static ZunResult AddedCallback(Supervisor *s); static ZunResult DeletedCallback(Supervisor *s); static void DrawFpsCounter(); + + static void PlayAudio(char* path); static void CreateBackBuffer(); From 9d5486c072ff2a271a40ff9f38862ce41c7e863b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 23:32:43 +0000 Subject: [PATCH 02/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/MainMenu.cpp | 36 +++++++++++++++++++++++------------- src/MainMenu.hpp | 8 ++++---- src/Supervisor.hpp | 4 ++-- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index 7a4ffb32..50615ded 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -1,35 +1,45 @@ -#include #include +#include #include "MainMenu.hpp" #include "Supervisor.hpp" #pragma optimize("s", on) -ZunResult MainMenu::BeginStartup() { - D3DXVECTOR3 vector3Ptr; // we have to add Ptr, - // because otherwise it gets 0.7% less on decomp.me for some reason +ZunResult MainMenu::BeginStartup() +{ + D3DXVECTOR3 vector3Ptr; // we have to add Ptr, + // because otherwise it gets 0.7% less on decomp.me for some reason DWORD time; int i; - - if(LoadTitleAnm(this) != ZUN_SUCCESS) { + + if (LoadTitleAnm(this) != ZUN_SUCCESS) + { g_Supervisor.curState = 4; return ZUN_ERROR; - } else { - if(g_Supervisor.startupTimeBeforeMenuMusic > 0) { + } + else + { + if (g_Supervisor.startupTimeBeforeMenuMusic > 0) + { time = timeGetTime(); - while((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) - && (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) { + while ((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) && + (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) + { time = timeGetTime(); } g_Supervisor.startupTimeBeforeMenuMusic = 0; g_Supervisor.PlayAudio("bgm/th06_01.mid"); } - for(i = 0; i < 122; i++) { + for (i = 0; i < 122; i++) + { this->vm[i].pendingInterrupt = 1; this->vm[i].flags |= 8; - if((g_Supervisor.cfg.opts & 1) == 0) { + if ((g_Supervisor.cfg.opts & 1) == 0) + { this->vm[i].color = 0xff000000; - } else { + } + else + { this->vm[i].color = 0xffffffff; } vector3Ptr.x = 0.0; diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index d88decda..affe4254 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -3,11 +3,11 @@ #include #include "AnmVm.hpp" -#include "inttypes.hpp" #include "ZunResult.hpp" +#include "inttypes.hpp" - -enum GameState { +enum GameState +{ STATE_STARTUP, STATE_PRE_INPUT, STATE_MAIN_MENU, @@ -49,4 +49,4 @@ struct MainMenu i8 padding2[0x8D24]; }; -ZunResult LoadTitleAnm(MainMenu* menu); +ZunResult LoadTitleAnm(MainMenu *menu); diff --git a/src/Supervisor.hpp b/src/Supervisor.hpp index 21d0f2a6..226b1728 100644 --- a/src/Supervisor.hpp +++ b/src/Supervisor.hpp @@ -94,8 +94,8 @@ struct Supervisor static ZunResult AddedCallback(Supervisor *s); static ZunResult DeletedCallback(Supervisor *s); static void DrawFpsCounter(); - - static void PlayAudio(char* path); + + static void PlayAudio(char *path); static void CreateBackBuffer(); From 99e15aab1add0985f84e9ee4790beb921d287964 Mon Sep 17 00:00:00 2001 From: PieVieRo Date: Sat, 23 Mar 2024 00:44:21 +0100 Subject: [PATCH 03/13] Apply suggestions from code review Co-authored-by: Robin Lambertz --- src/MainMenu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index 50615ded..5ef82254 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -14,7 +14,7 @@ ZunResult MainMenu::BeginStartup() if (LoadTitleAnm(this) != ZUN_SUCCESS) { - g_Supervisor.curState = 4; + g_Supervisor.curState = SUPERVISOR_STATE_EXITSUCCESS; return ZUN_ERROR; } else @@ -33,8 +33,8 @@ ZunResult MainMenu::BeginStartup() for (i = 0; i < 122; i++) { this->vm[i].pendingInterrupt = 1; - this->vm[i].flags |= 8; - if ((g_Supervisor.cfg.opts & 1) == 0) + this->vm[i].flags |= AnmVmFlags_8; + if ((g_Supervisor.cfg.opts & (1 << GCOS_USE_D3D_HW_TEXTURE_BLENDING)) == 0) { this->vm[i].color = 0xff000000; } From f2c75de8debd65894bc9fde8ac4cedaea28ad9a7 Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 00:46:33 +0100 Subject: [PATCH 04/13] removed the `else` from MainMenu::BeginStartup --- src/MainMenu.cpp | 49 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index 5ef82254..22d0ca60 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -17,38 +17,35 @@ ZunResult MainMenu::BeginStartup() g_Supervisor.curState = SUPERVISOR_STATE_EXITSUCCESS; return ZUN_ERROR; } - else + if (g_Supervisor.startupTimeBeforeMenuMusic > 0) { - if (g_Supervisor.startupTimeBeforeMenuMusic > 0) + time = timeGetTime(); + while ((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) && + (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) { time = timeGetTime(); - while ((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) && - (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) - { - time = timeGetTime(); - } - g_Supervisor.startupTimeBeforeMenuMusic = 0; - g_Supervisor.PlayAudio("bgm/th06_01.mid"); } - for (i = 0; i < 122; i++) + g_Supervisor.startupTimeBeforeMenuMusic = 0; + g_Supervisor.PlayAudio("bgm/th06_01.mid"); + } + for (i = 0; i < 122; i++) + { + this->vm[i].pendingInterrupt = 1; + this->vm[i].flags |= AnmVmFlags_8; + if ((g_Supervisor.cfg.opts & (1 << GCOS_USE_D3D_HW_TEXTURE_BLENDING)) == 0) + { + this->vm[i].color = 0xff000000; + } + else { - this->vm[i].pendingInterrupt = 1; - this->vm[i].flags |= AnmVmFlags_8; - if ((g_Supervisor.cfg.opts & (1 << GCOS_USE_D3D_HW_TEXTURE_BLENDING)) == 0) - { - this->vm[i].color = 0xff000000; - } - else - { - this->vm[i].color = 0xffffffff; - } - vector3Ptr.x = 0.0; - vector3Ptr.y = 0.0; - vector3Ptr.z = 0.0; - this->vm[i].pos2 = vector3Ptr; + this->vm[i].color = 0xffffffff; } - this->gameState = STATE_PRE_INPUT; - return ZUN_SUCCESS; + vector3Ptr.x = 0.0; + vector3Ptr.y = 0.0; + vector3Ptr.z = 0.0; + this->vm[i].pos2 = vector3Ptr; } + this->gameState = STATE_PRE_INPUT; + return ZUN_SUCCESS; } #pragma optimize("", on) From aa85912b4f0360a8bdc2574cdef540594a177d87 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 23:47:16 +0000 Subject: [PATCH 05/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/MainMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index 22d0ca60..e6552296 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -21,7 +21,7 @@ ZunResult MainMenu::BeginStartup() { time = timeGetTime(); while ((time - g_Supervisor.startupTimeBeforeMenuMusic >= 0) && - (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) + (3000 > time - g_Supervisor.startupTimeBeforeMenuMusic)) { time = timeGetTime(); } From 2853985c4cf9ed08860bd49a5f5c7b355113da89 Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 00:48:25 +0100 Subject: [PATCH 06/13] added BeginStartup to `implemented.csv` i swear i added this before --- config/implemented.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/config/implemented.csv b/config/implemented.csv index 142831e2..844d3502 100644 --- a/config/implemented.csv +++ b/config/implemented.csv @@ -55,6 +55,7 @@ DebugPrint DebugPrint2 FileSystem::OpenPath FileSystem::WriteDataToFile +MainMenu::BeginStartup MidiDevice::MidiDevice MidiDevice::~MidiDevice MidiOutput::MidiOutput From 3cdcc79e839464a7f082235ff8cce88eeba347df Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 12:46:54 +0100 Subject: [PATCH 07/13] moved `LoadTitleAnm` to `MainMenu` game doesn't work tho --- config/mapping.csv | 128 ++++++++++++++++++++++----------------------- config/stubbed.csv | 2 +- src/MainMenu.hpp | 2 +- 3 files changed, 66 insertions(+), 66 deletions(-) diff --git a/config/mapping.csv b/config/mapping.csv index d8c68d58..13769198 100644 --- a/config/mapping.csv +++ b/config/mapping.csv @@ -27,10 +27,10 @@ Stage::OnUpdate,0x403810,0x89c,__stdcall,ChainCallbackResult,Stage* Stage::OnDrawHighPrio,0x4040d0,0xa2,__stdcall,i32,Stage* Stage::OnDrawLowPrio,0x404180,0x180,__stdcall,i32,Stage* Stage::AddedCallback,0x404300,0x1b4,__thiscall,i32,Stage*,Stage* -Stage::RegisterChain,0x4044c0,0x11e,__stdcall,u32,u32 +Stage::RegisterChain,0x4044c0,0x11e,__stdcall,ZunResult,u32 Stage::DeletedCallback,0x4045e0,0x66,__stdcall,i32,Stage* Stage::CutChain,0x404650,0x32,__stdcall,void -Stage::LoadStageData,0x404690,0x1c1,__thiscall,u32,Stage*,char*,char* +Stage::LoadStageData,0x404690,0x1c1,__thiscall,ZunResult,Stage*,char*,char* Stage::FUN_00404860,0x404860,0x101,__thiscall,u32,Stage* Stage::FUN_00404970,0x404970,0x83d,__thiscall,u32,Stage*,i32 AnmManager::ExecuteAnmIdx,0x4051b0,0xa9,__thiscall,void,AnmManager*,AnmVm*,i32 @@ -43,15 +43,15 @@ Player::BombMarisaACalc,0x4066f0,0x411,default,u8,Player* Player::BombMarisaADraw,0x406b10,0x354,default,u8,Player* Player::BombMarisaBCalc,0x406e70,0x33e,default,u8,Player* Player::BombMarisaBDraw,0x4071b0,0x185,__stdcall,void,Player* -EclManager::FUN_00407340,0x407340,0xb2,__thiscall,u32,EclManager*,char* +EclManager::FUN_00407340,0x407340,0xb2,__thiscall,ZunResult,EclManager*,char* COleDispParams::~COleDispParams,0x407400,0x32,__thiscall,void,COleDispParams* EclManager::FUN_00407440,0x407440,0x54,__thiscall,u32,EclManager*,EnemyEclContext*,i16 -EclManager::run_ecl,0x4074a0,0x3504,unknown,u8,u32 +EclManager::run_ecl,0x4074a0,0x3504,__stdcall,u32,Enemy* FUN_0040abe0,0x40abe0,0x123,__cdecl,void,Enemy*,EclRawInstr* FUN_0040ad10,0x40ad10,0x166,__cdecl,void,Enemy*,EclRawInstr* FUN_0040ae80,0x40ae80,0x12c,unknown,void,Enemy*,EclRawInstr* Enemy::get_var,0x40afb0,0x36c,__stdcall,i32*,Enemy*,i32*,EclValueType* -Enemy::get_var_float,0x40b380,0x40,__stdcall,f32*,Enemy*,f32*,u32* +Enemy::get_var_float,0x40b380,0x40,__stdcall,f32*,Enemy*,f32*,EclValueType* Enemy::set_var,0x40b3c0,0x58,__stdcall,void,Enemy*,u32,i32* Enemy::math_add,0x40b420,0xa1,__stdcall,void,Enemy*,u32,f32*,f32* Enemy::math_sub,0x40b4d0,0xa1,unknown,u8,u32,u8,u32,u32 @@ -60,23 +60,23 @@ Enemy::math_div,0x40b650,0xa4,__stdcall,void,Enemy*,u32,f32*,f32* Enemy::math_mod,0x40b700,0xca,unknown,u8,u32,u8,u32,u32 Enemy::math_atan2,0x40b7d0,0xbe,unknown,u8,u32,u8,u32,u32,u32,u32 FUN_0040b890,0x40b890,0x4a,__stdcall,float10*,f32* -FUN_0040b8e0,0x40b8e0,0x19e,default,void,Enemy*,EclRawInstr* -FUN_0040ba80,0x40ba80,0xf4,unknown,u8,Enemy*,EclRawInstr* +FUN_0040b8e0,0x40b8e0,0x19e,__stdcall,void,Enemy*,EclRawInstr* +enemyShootBullet,0x40ba80,0xf4,__stdcall,void,Enemy*,EclRawInstr* FUN_0040bb80,0x40bb80,0x574,unknown,void,Enemy*,EclRawInstr* FUN_0040c100,0x40c100,0x75,default,void,Enemy*,EclRawInstr* FUN_0040c180,0x40c180,0x42a,default,void,Enemy*,EclRawInstr* -FUN_0040c5b0,0x40c5b0,0x533,default,void,Enemy*,AnmRawInstr* +FUN_0040c5b0,0x40c5b0,0x533,__stdcall,void,Enemy*,AnmRawInstr* FUN_0040caf0,0x40caf0,0x550,__stdcall,void,Enemy*,AnmRawInstr* -FUN_0040d040,0x40d040,0x3bb,unknown,u8,Enemy*,AnmRawInstr* -FUN_0040d400,0x40d400,0x125,unknown,void,Enemy*,AnmRawInstr* +FUN_0040d040,0x40d040,0x3bb,__stdcall,void,Enemy*,AnmRawInstr* +FUN_0040d400,0x40d400,0x125,__cdecl,void,Enemy*,AnmRawInstr* FUN_0040d530,0x40d530,0x238,unknown,void,Enemy*,AnmRawInstr* FUN_0040d770,0x40d770,0x1b6,unknown,void,Enemy*,AnmRawInstr* FUN_0040d930,0x40d930,0x164,default,void,Enemy*,u32 FUN_0040daa0,0x40daa0,0x114,__cdecl,void,Enemy*,AnmRawInstr* FUN_0040dbc0,0x40dbc0,0xf2,__cdecl,void,Enemy*,AnmRawInstr* FUN_0040dcc0,0x40dcc0,0x139,unknown,void,Enemy*,AnmRawInstr* -FUN_0040de00,0x40de00,0x3ae,unknown,u8,Enemy*,AnmRawInstr* -FUN_0040e1b0,0x40e1b0,0x114,unknown,u8,Enemy*,AnmRawInstr* +FUN_0040de00,0x40de00,0x3ae,__stdcall,void,Enemy*,AnmRawInstr* +FUN_0040e1b0,0x40e1b0,0x114,__stdcall,void,Enemy*,AnmRawInstr* EffectManager::EffectManager,0x40e2d0,0x65,__thiscall,u32*,EffectManager* EffectManager::Reset,0x40e340,0x19,__thiscall,void,EffectManager* EffectManager::FUN_0040e360,0x40e360,0x24d,default,i32,Effect* @@ -123,17 +123,17 @@ Enemy::FUN_00413380,0x413380,0xaa,__thiscall,void,Enemy* BulletManager::InitializeToZero,0x413430,0x19,__thiscall,void,BulletManager* BulletManager::BulletManager,0x413450,0x10e,__thiscall,AnmVm*,BulletManager* BulletTypeVms::BulletTypeVms,0x413560,0x50,__thiscall,AnmVm*,BulletTypeVms* -BulletManager::FUN_004135b0,0x4135b0,0xb8b,__thiscall,u32,BulletManager*,EnemyBulletShooter*,u32,i32,f32 +BulletManager::SetBulletAngle,0x4135b0,0xb8b,__thiscall,u32,BulletManager*,EnemyBulletShooter*,u32,i32,f32 BulletManager::FUN_00414160,0x414160,0x1d2,__thiscall,void,BulletManager*,i32 BulletManager::FUN_00414340,0x414340,0x15,__thiscall,void,BulletManager* BulletManager::FUN_00414360,0x414360,0x25f,__thiscall,i32,BulletManager*,i32,i32 -BulletManager::FUN_004145c0,0x4145c0,0xa5,__thiscall,u32,BulletManager*,EnemyBulletShooter* +BulletManager::SpawnBullet,0x4145c0,0xa5,__thiscall,u32,BulletManager*,EnemyBulletShooter* AnmVm::FUN_00414670,0x414670,0x27b,unknown,void*,EnemyLaserShooter* BulletManager::RegisterChain,0x4148f0,0xd3,__stdcall,i32,char* BulletManager::OnUpdate,0x4149d0,0x1b10,__stdcall,u32,BulletManager* BulletManager::OnDraw,0x416500,0x647,__stdcall,ChainCallbackResult,BulletManager* -FUN_00416b50,0x416b50,0xea,unknown,u8,u32 -FUN_00416c50,0x416c50,0xf4,unknown,u8,u32 +FUN_00416b50,0x416b50,0xea,__stdcall,void,Bullet* +FUN_00416c50,0x416c50,0xf4,__stdcall,void,Bullet* BulletManager::AddedCallback,0x416d60,0x509,__stdcall,ZunResult,BulletManager* BulletManager::DeletedCallback,0x417270,0x31,__stdcall,ZunResult,BulletManager* CutBulletManagerChains,0x4172b0,0x23,unknown,u8 @@ -143,30 +143,30 @@ Gui::Vm6SetInterruptTo1,0x41732c,0x18,__thiscall,void,Gui* Gui::is_dialogue_skippable,0x417344,0x16,__fastcall,u8,Gui* Gui::FUN_0041735a,0x41735a,0x7f,__thiscall,void,Gui*,u32 Gui::FUN_004173d9,0x4173d9,0x7f,__thiscall,void,Gui*,i32 -FUN_00417458,0x417458,0x7f,__thiscall,void,void*,u32 +Gui::FUN_00417458,0x417458,0x7f,__thiscall,void,Gui*,u32 Gui::OnUpdate,0x4174d7,0x2b,unknown,u8,Gui* Gui::OnDraw,0x417502,0x5cb,__stdcall,void,Gui* -Gui::FUN_00417acd,0x417acd,0x130,__thiscall,void,Gui*,u32,char* -FUN_00417bfd,0x417bfd,0x12c,unknown,u8,i32,u32 +Gui::string_related,0x417acd,0x130,__thiscall,void,Gui*,u32,char* +Gui::FUN_00417bfd,0x417bfd,0x12c,__thiscall,void,Gui*,i32,char* Gui::FUN_00417d29,0x417d29,0x93c,__fastcall,ZunResult,Gui* Gui::FUN_00418665,0x418665,0xc5,__thiscall,ZunResult,Gui*,char* Gui::FreeMsgFile,0x41872a,0x3e,__thiscall,void,Gui* -FUN_00418768,0x418768,0x23,unknown,u8,u32 -FUN_0041878b,0x41878b,0x13e,unknown,u8,u32 +Gui::FUN_00418768,0x418768,0x23,__thiscall,void,Gui*,i32 +GuiImpl::FUN_0041878b,0x41878b,0x13e,__thiscall,void,GuiImpl*,i32 GuiImpl::run_msg,0x4188c9,0x7eb,__thiscall,u32,GuiImpl* Gui::FUN_004190ec,0x4190ec,0x486,__fastcall,u8,Gui* -FUN_00419572,0x419572,0x30,unknown,u8 +Gui::FUN_00419572,0x419572,0x30,__thiscall,u8,Gui* Gui::HasCurrentMsgIdx,0x4195a2,0x1d,__thiscall,i32,Gui* -FUN_004195bf,0x4195bf,0x6da,unknown,u8 +Gui::calculateStageScore,0x4195bf,0x6da,__thiscall,void,Gui* Gui::FUN_00419c99,0x419c99,0x115a,__thiscall,void,Gui* Gui::FUN_0041adf3,0x41adf3,0x3b1,__thiscall,void,Gui* Gui::AddedCallback,0x41b1a4,0xd,unknown,u8,u32 Gui::DeletedCallback,0x41b1b1,0xa1,unknown,u8,u32 Gui::RegisterChain,0x41b252,0xf9,default,ZunResult -FUN_0041b34b,0x41b34b,0x179,unknown,u8 -FUN_0041b4c4,0x41b4c4,0xc8,__fastcall,i32,i32 +GuiImpl::GuiImpl,0x41b34b,0x179,__thiscall,GuiImpl*,GuiImpl* +GuiMsgVm::GuiMsgVm,0x41b4c4,0xc8,__thiscall,GuiMsgVm*,GuiMsgVm* FUN_0041b58c,0x41b58c,0x23,unknown,u8 -FUN_0041b5af,0x41b5af,0x32,unknown,u8 +ZunTimer::nextTick,0x41b5af,0x32,__thiscall,i32,ZunTimer* GameManager::collision_related,0x41b5e1,0x82,unknown,i32,u32,u32,u32,u32 GameManager::OnUpdate,0x41b663,0x3e7,default,ChainCallbackResult,GameManager* GameManager::OnDraw,0x41ba4a,0x20,default,ChainCallbackResult,GameManager* @@ -211,18 +211,18 @@ Rng::GetRandomF32ZeroToOne,0x41e820,0x2e,__thiscall,f32,Rng* add_normalize_angle,0x41e850,0x7f,__stdcall,f32,f32,f32 FUN_0041e8d0,0x41e8d0,0x6f,__stdcall,void,f32*,f32*,f32 DebugPrint2,0x41e940,0x5,__stdcall,void,char* -FUN_0041e945,0x41e945,0x3c,__fastcall,u32*,u32* -FUN_0041e981,0x41e981,0x11,__fastcall,void,u32* -FUN_0041e992,0x41e992,0x72,__fastcall,u32,u32* -FUN_0041ea04,0x41ea04,0x5f,unknown,u8,u32,u32,u32 -FUN_0041ea63,0x41ea63,0x1bf,unknown,u8,u32,u32,u32 -FUN_0041ec22,0x41ec22,0x50,unknown,u8,u32 -FUN_0041ec72,0x41ec72,0x29f,__thiscall,u32,u32*,u32,i32,i32,i32 +FUN_0041e945,0x41e945,0x3c,__thiscall,u32*,void* +FUN_0041e981,0x41e981,0x11,__thiscall,void,void* +FUN_0041e992,0x41e992,0x72,__thiscall,u32,void* +FUN_0041ea04,0x41ea04,0x5f,unknown,u8,u32,u32,_D3DFORMAT +FUN_0041ea63,0x41ea63,0x1bf,unknown,char,u32,u32,_D3DFORMAT +FUN_0041ec22,0x41ec22,0x50,unknown,u8,_D3DFORMAT +FUN_0041ec72,0x41ec72,0x29f,__thiscall,u32,long*,u32,i32,i32,i32 FUN_0041ef11,0x41ef11,0xf7,__thiscall,u32,i32*,IDirect3DSurface8* Supervisor::CreateBackBuffer,0x41f008,0x23,default,void Supervisor::ReleaseBackBuffer,0x41f02b,0x25,default,void -FUN_0041f050,0x41f050,0x1e0,__stdcall,u8,u32,u32,u32,u32,u32,u32,u32,u32,u32,IDirect3DTexture8* -ItemManager_conflict2::FUN_0041f230,0x41f230,0x5a,__thiscall,ItemManager*,void* +FUN_0041f050,0x41f050,0x1e0,__stdcall,void,long,long,long,long,long,i32,unsigned long,unsigned long,char*,IDirect3DTexture8* +ItemManager::FUN_0041f230,0x41f230,0x5a,__thiscall,ItemManager*,ItemManager* ItemManager::SpawnItem,0x41f290,0x205,__thiscall,void,ItemManager*,_D3DVECTOR*,i32,i32 ItemManager::FUN_0041f4a0,0x41f4a0,0xc58,__thiscall,void,ItemManager* ItemManager::FUN_00420130,0x420130,0x56,__thiscall,void,ItemManager* @@ -251,7 +251,7 @@ MidiTimer::FUN_00421c90,0x421c90,0x73,__thiscall,u32,MidiTimer*,u32,TIMECALLBACK MidiTimer::StopTimer,0x421d10,0x3d,__thiscall,i32,MidiTimer* MidiTimer::DefaultTimerCallback,0x421d50,0x1a,__stdcall,u8,u32,u32,MidiOutput* FUN_00421d70,0x421d70,0x18,unknown,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8 -FUN_00421d90,0x421d90,0x55,__stdcall,i32,u8** +FUN_00421d90,0x421d90,0x55,__stdcall,i32,void* MidiOutput::MidiOutput,0x421df0,0x155,__thiscall,u32*,MidiOutput* MidiOutput::~MidiOutput,0x421f50,0x93,__thiscall,void,MidiOutput* MidiOutput::ReadFileData,0x421ff0,0x79,__thiscall,u32,MidiOutput*,i32,char* @@ -286,7 +286,7 @@ Supervisor::ReleasePbg3,0x4242f3,0x82,__thiscall,void,Supervisor*,i32 Supervisor::LoadPbg3,0x424375,0x2d8,__thiscall,i32,Supervisor*,i32,char* Supervisor::LoadConfig,0x42464d,0x45f,__thiscall,ZunResult,Supervisor*,char* readMidiFile,0x424aac,0x38,unknown,u8,u32,u32 -FUN_00424ae4,0x424ae4,0x4b,unknown,i32,u32 +PlayMidiFile,0x424ae4,0x4b,__stdcall,i32,i32 isMusicMutedWtf,0x424b2f,0x2e,__stdcall,ZunResult Supervisor::PlayAudio,0x424b5d,0x1db,__stdcall,void,char* Supervisor::FUN_00424d38,0x424d38,0x4a,__thiscall,u32,Supervisor* @@ -303,7 +303,7 @@ MusicRoom::FUN_00425d97,0x425d97,0x6c,__cdecl,u32,i32 Player::Player,0x425e10,0x1e8,__thiscall,Player*,Player* PlayerInner::PlayerInner,0x426000,0xc2,__thiscall,PlayerInner*,PlayerInner*,PlayerInner* FUN_004260d0,0x4260d0,0x22,unknown,u8,u32,u32,u32,u32 -FUN_00426100,0x426100,0x31b,unknown,u8,AnmVm*,u32,u32,u32,u32 +FUN_00426100,0x426100,0x31b,unknown,ZunResult,AnmVm*,u32,u32,u32,u32 FUN_00426420,0x426420,0x22,unknown,u8,u32,u32,u32,u32 FUN_00426450,0x426450,0x22,unknown,u8,u32,u32,u32,u32 FUN_00426480,0x426480,0x22,unknown,u8,u32,u32,u32,u32 @@ -317,7 +317,7 @@ Player::FUN_00427770,0x427770,0xe6,__thiscall,void,Player* Player::CalcMove,0x427860,0xd9a,__thiscall,u32,Player* Player::FUN_00428630,0x428630,0x45,default,void,Player* Player::FUN_00428680,0x428680,0x7a,__thiscall,float10*,Player*,float10*,f32* -Player::FUN_00428700,0x428700,0x7a,__thiscall,f32,Player*,f32* +Player::FUN_00428700,0x428700,0x7a,__thiscall,f32,Player*,_D3DVECTOR* Player::RegisterChain,0x428780,0x135,unknown,ZunResult,u8 Player::OnUpdate,0x4288c0,0x8ea,__stdcall,ChainCallbackResult,Player* Player::FUN_004291b0,0x4291b0,0x55b,default,void,Player* @@ -344,14 +344,14 @@ ReplayDoStuff,0x42ab30,0x5a9,__stdcall,void,char*,char* OpenScore,0x42b0d9,0x1a7,default,ScoreDat*,char* GetHighScore,0x42b280,0x126,__stdcall,u32,ScoreDat*,ResultScreenUnk3ab0*,i32,i32 FUN_0042b3a6,0x42b3a6,0x91,default,i32,ResultScreenUnk3ab0*,Hscr* -ZunFree,0x42b437,0x2f,__stdcall,void,i32* +ZunFreeArray,0x42b437,0x2f,__stdcall,void,void* ParseCatk,0x42b466,0x9c,default,u32,ScoreDat*,Catk* ParseClrd,0x42b502,0x15c,unknown,u8,ScoreDat*,Clrd* ParsePscr,0x42b65e,0x17e,__stdcall,u32,ScoreDat*,Pscr* ScoreDat::FUN_0042b7dc,0x42b7dc,0x2d,__cdecl,void,void*,ScoreDat* WriteScore,0x42b809,0x424,unknown,u8,u32 ResultScreen::FUN_0042bc2d,0x42bc2d,0x2e,__thiscall,void,ResultScreen*,Hscr*,i32,i32 -FUN_0042bc5b,0x42bc5b,0x2a,unknown,u8,u32,u32 +ResultScreen::FUN_0042bc5b,0x42bc5b,0x2a,__thiscall,void,ResultScreen*,i32,i32 ResultScreen::FUN_0042bc85,0x42bc85,0x64f,__thiscall,u32,ResultScreen* ResultScreen::FUN_0042c2d4,0x42c2d4,0xdd0,__thiscall,void,ResultScreen* ResultScreen::FUN_0042d0a4,0x42d0a4,0xeb,__stdcall,void,ResultScreen*,i32 @@ -367,19 +367,19 @@ ResultScreen::DeletedCallback,0x42f5bc,0x108,__thiscall,u32,ResultScreen*,Result DebugPrint,0x42f6c4,0x5,__stdcall,void,char* Clear,0x42f6d0,0xb8,unknown,u8,u32 SetViewport,0x42f790,0x66,default,void,unsigned long -FUN_0042f800,0x42f800,0xae,default,u32,ScreenEffect* +ScreenEffect::calcChainElementCallback,0x42f800,0xae,default,u32,ScreenEffect* DrawSquare,0x42f8b0,0x3c8,__stdcall,void,zRect*,unsigned long -FUN_0042fc80,0x42fc80,0xa8,unknown,u8,u32 +calcChainElementCallback_3,0x42fc80,0xa8,unknown,u8,ScreenEffect* ScreenEffect::RegisterChain,0x42fd30,0x1ac,unknown,u8,u32,u32,u32,u32,u32 -FUN_0042fee0,0x42fee0,0x88,unknown,u8,u32 -FUN_0042ff70,0x42ff70,0x47,unknown,u8,u32 -FUN_0042ffc0,0x42ffc0,0x22c,unknown,u8,ScreenEffect* +ScreenEffect::drawChainCallback,0x42fee0,0x88,unknown,u8,ScreenEffect* +drawChainCallback_2,0x42ff70,0x47,unknown,u8,ScreenEffect* +calcChainElementCallback_2,0x42ffc0,0x22c,unknown,u8,ScreenEffect* screenEffectAddCallback,0x4301f0,0x30,default,u32,ScreenEffect* ScreenEffect::screenEffectDeletedCallback,0x430220,0x4b,default,u32,ScreenEffect* SoundPlayer::InitializeDSound,0x430270,0x29d,__thiscall,void,SoundPlayer*,HWND__* SoundPlayer::Release,0x430510,0x1cd,__thiscall,ZunResult,SoundPlayer* -SoundPlayer::LoadSound,0x4306e0,0x310,__thiscall,void,SoundPlayer*,i32,u32 -FUN_004309f0,0x4309f0,0x57,__stdcall,char*,char*,char*,i32*,i32 +SoundPlayer::LoadSound,0x4306e0,0x310,__thiscall,void,SoundPlayer*,i32,char* +GetWavFormatData,0x4309f0,0x57,__stdcall,tWAVEFORMATEX*,char*,char*,i32*,i32 SoundPlayer::LoadWav,0x430a50,0x3b5,__thiscall,ZunResult,SoundPlayer*,char* SoundPlayer::LoadPos,0x430e10,0xad,__thiscall,ZunResult,SoundPlayer*,char* SoundPlayer::playBGM,0x430ec0,0xbe,__thiscall,u32,SoundPlayer*,u32 @@ -387,7 +387,7 @@ SoundPlayer::StopBGM,0x430f80,0xfc,__thiscall,void,SoundPlayer* SoundPlayer::InitSoundBuffers,0x431080,0x156,__thiscall,ZunResult,SoundPlayer* SoundPlayer::PlaySoundByIdx,0x4311e0,0x85,__thiscall,SoundPlayer*,SoundPlayer*,i32 SoundPlayer::PlaySounds,0x431270,0x100,__thiscall,void,SoundPlayer* -FUN_00431370,0x431370,0xb0,unknown,u8,u32 +playMusic,0x431370,0xb0,__stdcall,i32 SoundPlayer::SoundPlayer,0x431420,0x4c,__thiscall,u32*,SoundPlayer* AnmManager::AnmManager,0x431470,0x1ed,__thiscall,AnmManager*,AnmManager* AnmManager::SetupVertexBuffer,0x431660,0x2bc,__thiscall,void,AnmManager* @@ -400,19 +400,19 @@ AnmManager::ReleaseTexture,0x4321e0,0x7d,__thiscall,void,AnmManager*,i32 AnmManager::LoadSprite,0x432260,0x13b,__thiscall,void,AnmManager*,u32,AnmLoadedSprite* AnmManager::SetActiveSprite,0x4323a0,0x90,__thiscall,ZunResult,AnmManager*,AnmVm*,u32 AnmManager::SetAndExecuteScript,0x432430,0x97,__thiscall,void,AnmManager*,AnmVm*,AnmRawInstr* -SetRenderStateForVm,0x4324d0,0x256,__thiscall,void,AnmManager*,AnmVm* +AnmManager::SetRenderStateForVm,0x4324d0,0x256,__thiscall,void,AnmManager*,AnmVm* AnmManager::FUN_00432730,0x432730,0x393,__thiscall,i32,AnmManager*,AnmVm*,i32 AnmManager::FUN_00432ad0,0x432ad0,0x1af,__thiscall,u32,AnmManager*,AnmVm* AnmManager::FUN_00432c80,0x432c80,0x3c,__stdcall,void,void*,f32,f32,f32,f32,f32,f32 -AnmManager::FUN_00432cc0,0x432cc0,0x2d7,__thiscall,u32,AnmManager*,AnmVm* -AnmManager::FUN_00432fa0,0x432fa0,0x1af,__thiscall,i32,AnmManager*,AnmVm* +AnmManager::FUN_00432cc0,0x432cc0,0x2d7,__thiscall,i32,AnmManager*,AnmVm* +AnmManager::FUN_00432fa0,0x432fa0,0x1af,__thiscall,ZunResult,AnmManager*,AnmVm* AnmManager::FUN_00433150,0x433150,0x43e,__thiscall,i32,AnmManager*,AnmVm* AnmManager::FUN_00433590,0x433590,0x3cf,__thiscall,i32,AnmManager*,AnmVm* AnmManager::ExecuteScript,0x433960,0x1103,__thiscall,i32,AnmManager*,AnmVm* -AnmManager::FUN_00434af0,0x434af0,0x61,__thiscall,void,AnmManager*,u32,long,long,long,long,i32,i32,u32,u32,u32 -AnmManager::FUN_00434b60,0x434b60,0xdb,__stdcall,void,AnmManager*,AnmVm*,unsigned long,u32,i32,i32 -AnmManager::FUN_00434c40,0x434c40,0x1dc,unknown,u8,u32,u32,u32,u32,u32,u8 -AnmManager::FUN_00434e20,0x434e20,0x1e2,__stdcall,void,AnmManager*,AnmVm*,u32,u32,char*,i32 +AnmManager::FUN_00434af0,0x434af0,0x61,__thiscall,void,AnmManager*,u32,long,long,long,long,i32,i32,unsigned long,u32,char* +AnmManager::FUN_00434b60,0x434b60,0xdb,__stdcall,void,AnmManager*,AnmVm*,unsigned long,u32,char*,i32 +AnmManager::FUN_00434c40,0x434c40,0x1dc,__stdcall,void,AnmManager*,AnmVm*,unsigned long,unsigned long,char* +AnmManager::FUN_00434e20,0x434e20,0x1e2,__stdcall,void,AnmManager*,AnmVm*,unsigned long,unsigned long,char*,i32 AnmManager::LoadSurface,0x435010,0x25b,__thiscall,ZunResult,AnmManager*,u32,char* AnmManager::ReleaseSurface,0x435270,0x8f,__thiscall,void,AnmManager*,i32 AnmManager::CopySurfaceToBackBuffer,0x435300,0x1bd,__thiscall,void,AnmManager*,i32,long,long,long,long @@ -421,18 +421,18 @@ AnmManager::TakeScreenshot,0x435670,0xed,__thiscall,void,AnmManager*,i32,i32,i32 MainMenu::MainMenu,0x43575d,0x42,__thiscall,void,MainMenu* MainMenu::OnUpdate,0x43579f,0x1d31,__stdcall,u32,MainMenu* MainMenu::MoveCursor,0x43753c,0x136,__stdcall,i32,MainMenu*,i32 -MainMenu::FUN_00437672,0x437672,0x131,__stdcall,void,MainMenu*,i16,u16,i32 -FUN_004377a3,0x4377a3,0xff,__stdcall,void,MainMenu*,i32,i32,u32,u32,i32 +MainMenu::select_related,0x437672,0x131,__stdcall,void,MainMenu*,i16,u16,i32 +DrawMenuItem,0x4377a3,0xff,__stdcall,void,MainMenu*,i32,i32,u32,u32,i32 MainMenu::BeginStartup,0x4378a2,0x142,__thiscall,ZunResult,MainMenu* MainMenu::FUN_004379e4,0x4379e4,0x15d,__thiscall,i32,MainMenu* -MainMenu::FUN_00437b41,0x437b41,0x68b,__thiscall,u32,MainMenu* +MainMenu::DrawStartMenu,0x437b41,0x68b,__thiscall,u32,MainMenu* MainMenu::ReplayHandling,0x4381ec,0x9d5,__thiscall,void,MainMenu* MainMenu::DrawReplayMenu,0x438bc1,0x337,__thiscall,u32,MainMenu* MainMenu::setSavedCursorPosition,0x438ef8,0x23f,__thiscall,void,MainMenu*,AnmVm*,i32,i32,i32 MainMenu::FUN_00439137,0x439137,0x82e,__thiscall,u32,MainMenu* -MainMenu::FUN_00439965,0x439965,0x171,__thiscall,u32,MainMenu* +MainMenu::ChoosePracticeLevel,0x439965,0x171,__thiscall,u32,MainMenu* MainMenu::OnDraw,0x439ad6,0x2ca,unknown,u8,MainMenu* -LoadTitleAnm,0x439da0,0x1e8,__stdcall,ZunResult,MainMenu* +MainMenu::LoadTitleAnm,0x439da0,0x1e8,__stdcall,ZunResult,MainMenu* MainMenu::loadMenu,0x439f88,0x264,default,ZunResult,u32 LoadReplayMenu,0x43a1ec,0x14c,__stdcall,ZunResult,MainMenu* MainMenu::RegisterChain,0x43a338,0x12c,unknown,ZunResult,u32 @@ -461,7 +461,7 @@ CStreamingSound::~CStreamingSound,0x43b4b0,0x1c,__thiscall,void,CStreamingSound* CStreamingSound::UpdateFadeOut,0x43b4d0,0x8f,__thiscall,u32,CStreamingSound* CStreamingSound::HandleWaveStreamNotification,0x43b560,0x377,__thiscall,i32,CStreamingSound*,i32 CStreamingSound::Reset,0x43b8e0,0xc2,__thiscall,long,CStreamingSound* -CWaveFile::CWaveFile,0x43b9b0,0x52,__thiscall,u32*,CWaveFile* +CWaveFile::CWaveFile,0x43b9b0,0x52,__thiscall,CWaveFile*,CWaveFile* CWaveFile::operator_delete,0x43ba10,0x46,__thiscall,void,CWaveFile* CWaveFile::Open,0x43ba60,0x180,__thiscall,i32,CWaveFile*,char*,u32,unsigned long CWaveFile::ReadMMIO,0x43bc00,0x241,__thiscall,u32,CWaveFile* @@ -1010,7 +1010,7 @@ start,0x45bcfd,0x91,unknown,u8,u32 FID_conflict:__CIcos_default,0x45bd90,0x14,unknown,u8 cos,0x45bda4,0x9,__stdcall,double,double start,0x45bdad,0x91,unknown,u8,u32 -FUN_0045be40,0x45be40,0xa,__stdcall,void,u32,u32,u32,u32 +FUN_0045be40,0x45be40,0xa,__stdcall,f32,u32,u32,u32,u32 FUN_0045be4a,0x45be4a,0x1,unknown,u8 FUN_0045be60,0x45be60,0xa,unknown,u8 FUN_0045be6a,0x45be6a,0x1,unknown,u8 @@ -1036,7 +1036,7 @@ __abnormal_termination,0x45c342,0x23,__cdecl,i32 __NLG_Notify1,0x45c365,0x17,unknown,u8 __NLG_Notify,0x45c36e,0xa,__stdcall,void,unsigned long sprintf,0x45c386,0x58,__stdcall,i32,char*,char* -FUN_0045c3e0,0x45c3e0,0x1f,unknown,void +FUN_0045c3e0,0x45c3e0,0x1f,__stdcall,void _fabs,0x45c3ff,0xb1,__cdecl,double,double FID_conflict:__CItan_default,0x45c4b0,0x14,unknown,u8 tan,0x45c4c4,0x9,__stdcall,double,double diff --git a/config/stubbed.csv b/config/stubbed.csv index 8da3c3ee..bb5ab965 100644 --- a/config/stubbed.csv +++ b/config/stubbed.csv @@ -10,7 +10,7 @@ StageMenu::OnDrawRetryMenu AsciiManager::DrawPopupsWithHwVertexProcessing AsciiManager::DrawPopupsWithoutHwVertexProcessing GameWindow::Render -LoadTitleAnm +MainMenu::LoadTitleAnm MidiDevice::Close MidiTimer::StopTimer MidiOutput::ClearTracks diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index affe4254..116398ce 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -30,6 +30,7 @@ enum GameState struct MainMenu { ZunResult BeginStartup(); + static ZunResult LoadTitleAnm(MainMenu *menu); static ZunResult RegisterChain(u32 is_demo); AnmVm vm[122]; @@ -49,4 +50,3 @@ struct MainMenu i8 padding2[0x8D24]; }; -ZunResult LoadTitleAnm(MainMenu *menu); From 0d4fa3f3a5f132286e330831a23d2f6fe09c9b83 Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 13:47:03 +0100 Subject: [PATCH 08/13] `PlayAudio` shouldn't be static --- src/Supervisor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Supervisor.hpp b/src/Supervisor.hpp index 226b1728..856fa6b9 100644 --- a/src/Supervisor.hpp +++ b/src/Supervisor.hpp @@ -95,7 +95,7 @@ struct Supervisor static ZunResult DeletedCallback(Supervisor *s); static void DrawFpsCounter(); - static void PlayAudio(char *path); + void PlayAudio(char *path); static void CreateBackBuffer(); From 3b99cad0e399251df2c4c03b13af0dec4ddb65fe Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 13:50:04 +0100 Subject: [PATCH 09/13] mfw @roblabla suggested wrong flag enum --- src/MainMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index e6552296..dc973d68 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -31,7 +31,7 @@ ZunResult MainMenu::BeginStartup() for (i = 0; i < 122; i++) { this->vm[i].pendingInterrupt = 1; - this->vm[i].flags |= AnmVmFlags_8; + this->vm[i].flags |= AnmVmFlags_3; if ((g_Supervisor.cfg.opts & (1 << GCOS_USE_D3D_HW_TEXTURE_BLENDING)) == 0) { this->vm[i].color = 0xff000000; From e3c712e0583a8490cb0fed47bcd05558bfa1ad0e Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 14:02:06 +0100 Subject: [PATCH 10/13] mfw guessed varorder correctly now the only thing that's different are the addresses --- src/MainMenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainMenu.cpp b/src/MainMenu.cpp index dc973d68..8ea64a3c 100644 --- a/src/MainMenu.cpp +++ b/src/MainMenu.cpp @@ -5,6 +5,7 @@ #include "Supervisor.hpp" #pragma optimize("s", on) +#pragma var_order(time, i, vector3Ptr) ZunResult MainMenu::BeginStartup() { D3DXVECTOR3 vector3Ptr; // we have to add Ptr, From 7ffeb7dda81f1a3468bc947ffe1effd081b5aee7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:03:49 +0000 Subject: [PATCH 11/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/MainMenu.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index 116398ce..2634dfc3 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -49,4 +49,3 @@ struct MainMenu u32 unk_820c; i8 padding2[0x8D24]; }; - From 4a8f341aeddc18d41a03e945558b5b392f248db9 Mon Sep 17 00:00:00 2001 From: tymek Date: Sat, 23 Mar 2024 14:45:17 +0100 Subject: [PATCH 12/13] `MainMenu` size is now correct and the dllbuild works correctly --- src/MainMenu.hpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index 2634dfc3..b025831a 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -3,6 +3,7 @@ #include #include "AnmVm.hpp" +#include "Chain.hpp" #include "ZunResult.hpp" #include "inttypes.hpp" @@ -35,7 +36,7 @@ struct MainMenu AnmVm vm[122]; i32 cursor; - i8 padding[68]; + i8 padding[0x40]; u32 unk_81e4; i32 chosenReplay; i32 replayFilesNum; @@ -47,5 +48,22 @@ struct MainMenu D3DCOLOR color2; D3DCOLOR color1; u32 unk_820c; - i8 padding2[0x8D24]; + u32 isActive; + u32 wasActive; + i8 padding2[4]; + i16 controlMapping[9]; + i8 padding3[6]; + ChainElem* chainCalc; + ChainElem* chainDraw; + char replayFilePaths[60][512]; + char replayFileName[60][8]; + i8 replayFileData[60][0x50]; + i8* currentReplay; + i32* unk_10ee0; + f32* unk_10ee4; + i8 padding4[64]; + u32 unk_10f28; + u32 unk_10f2c; + u32 time_related; }; +C_ASSERT(sizeof(MainMenu) == 0x10f34); From 8e7b62bdc7ca65d5478a77fbea6a588ff870a4ea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:46:59 +0000 Subject: [PATCH 13/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/MainMenu.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MainMenu.hpp b/src/MainMenu.hpp index b025831a..673f2728 100644 --- a/src/MainMenu.hpp +++ b/src/MainMenu.hpp @@ -53,14 +53,14 @@ struct MainMenu i8 padding2[4]; i16 controlMapping[9]; i8 padding3[6]; - ChainElem* chainCalc; - ChainElem* chainDraw; + ChainElem *chainCalc; + ChainElem *chainDraw; char replayFilePaths[60][512]; char replayFileName[60][8]; i8 replayFileData[60][0x50]; - i8* currentReplay; - i32* unk_10ee0; - f32* unk_10ee4; + i8 *currentReplay; + i32 *unk_10ee0; + f32 *unk_10ee4; i8 padding4[64]; u32 unk_10f28; u32 unk_10f2c;