Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/312'
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Nov 14, 2024
2 parents 04dc223 + 42eea1e commit 11d3cfb
Show file tree
Hide file tree
Showing 13 changed files with 2,060 additions and 625 deletions.
5 changes: 5 additions & 0 deletions config/globals.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_g_BulletTypeInfos, 0x0046a6e8
_g_DifficultyWeightsList, 0x0046bca4
_g_DefaultMagic, 0x0046bdf4
_g_TextureFormatD3D8Mapping, 0x0046c220
_g_StageFiles, 0x004760e0
Expand Down Expand Up @@ -63,7 +64,11 @@ _g_CharacterPowerBulletDataMarisaBRank7,0x004781f8
_g_CharacterPowerBulletDataMarisaBRank8,0x004782b0
_g_CharacterPowerBulletDataMarisaBRank9,0x00478368
_g_CharacterPowerDataMarisaB, 0x00478468
_g_AlphabetList, 0x004784d4
_g_CharacterList, 0x004784d8
_g_SpellcardsWeightsList, 0x004784f0
_g_RightAlignedDifficultyList, 0x00478504
_g_ShortCharacterList2, 0x00478518
_g_SoundBufferIdxVol, 0x00478528
_g_SFXList, 0x00478628
_g_LastJoystickInput, 0x00478690
Expand Down
12 changes: 12 additions & 0 deletions config/implemented.csv
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,28 @@ th06::MidiTimer::~MidiTimer
th06::MidiTimer::StopTimer
th06::MidiTimer::DefaultTimerCallback
th06::ResultScreen::OnUpdate
th06::ResultScreen::OnDraw
th06::ResultScreen::LinkScore
th06::ResultScreen::FreeScore
th06::ResultScreen::FreeAllScores
th06::ResultScreen::ReleaseScoreDat
th06::ResultScreen::LinkScoreEx
th06::ResultScreen::RegisterChain
th06::ResultScreen::ResultScreen
th06::ResultScreen::DrawFinalStats
th06::ResultScreen::MoveCursor
th06::ResultScreen::OpenScore
th06::ResultScreen::HandleResultKeyboard
th06::ResultScreen::HandleReplaySaveKeyboard
th06::ResultScreen::MoveCursorHorizontally
th06::ResultScreen::CheckConfirmButton
th06::ResultScreen::WriteScore
th06::ResultScreen::ParseCatk
th06::ResultScreen::ParseClrd
th06::ResultScreen::ParsePscr
th06::ResultScreen::AddedCallback
th06::ResultScreen::DeletedCallback
th06::ResultScreen::GetHighScore
th06::Stage::RegisterChain
th06::Stage::CutChain
th06::Stage::AddedCallback
Expand Down
14 changes: 7 additions & 7 deletions config/mapping.csv
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,16 @@ th06::ReplayManager::SaveReplay,0x42ab30,0x5a9,default,,void,char*,char*
th06::ResultScreen::OpenScore,0x42b0d9,0x1a7,default,,ScoreDat*,char*
th06::ResultScreen::GetHighScore,0x42b280,0x126,default,,u32,ScoreDat*,ScoreListNode*,u32,u32
th06::ResultScreen::LinkScore,0x42b3a6,0x91,default,,i32,ScoreListNode*,Hscr*
th06::ZunFreeArray,0x42b437,0x2f,__stdcall,,void,void*
th06::ResultScreen::FreeAllScores,0x42b437,0x2f,default,,void,ScoreListNode*
th06::ResultScreen::ParseCatk,0x42b466,0x9c,default,,ZunResult,ScoreDat*,Catk*
th06::ResultScreen::ParseClrd,0x42b502,0x15c,default,,ZunResult,ScoreDat*,Clrd*
th06::ResultScreen::ParsePscr,0x42b65e,0x17e,default,,ZunResult,ScoreDat*,Pscr*
th06::ResultScreen::ReleaseScoreDat,0x42b7dc,0x2d,default,,void,ScoreDat*
th06::WriteScore,0x42b809,0x424,__stdcall,,void,ResultScreen*
th06::ResultScreen::LinkScoreEx,0x42bc2d,0x2e,__thiscall,,void,ResultScreen*,Hscr*,i32,i32
th06::ResultScreen::WriteScore,0x42b809,0x424,default,,void,ResultScreen*
th06::ResultScreen::LinkScoreEx,0x42bc2d,0x2e,__thiscall,,i32,ResultScreen*,Hscr*,i32,i32
th06::ResultScreen::FreeScore,0x42bc5b,0x2a,__thiscall,,void,ResultScreen*,i32,i32
th06::ResultScreen::HandleResultKeyboard,0x42bc85,0x64f,__thiscall,,void,ResultScreen*
th06::ResultScreen::HandleReplaySaveKeyboard,0x42c2d4,0xdd0,__thiscall,,void,ResultScreen*
th06::ResultScreen::HandleResultKeyboard,0x42bc85,0x64f,__thiscall,,i32,ResultScreen*
th06::ResultScreen::HandleReplaySaveKeyboard,0x42c2d4,0xdd0,__thiscall,,i32,ResultScreen*
th06::ResultScreen::MoveCursor,0x42d0a4,0xeb,default,,void,ResultScreen*,i32
th06::ResultScreen::MoveCursorHorizontally,0x42d18f,0x103,default,,i32,ResultScreen*,i32
th06::ResultScreen::CheckConfirmButton,0x42d292,0xc8,__thiscall,,ZunResult,ResultScreen*
Expand Down Expand Up @@ -1067,8 +1067,8 @@ _memcpy,0x45cc90,0x2a0,__cdecl,,void*,void*,void*,u32
_memmove,0x45cfd0,0x2a0,__cdecl,,void*,void*,void*,u32
_fprintf,0x45d30d,0x54,__cdecl,varargs,i32,_iobuf*,char*
FUN_0045d361,0x45d361,0xa,unknown,,u8
__aulldiv,0x45d370,0x68,unknown,,u8,u32,u32,u32,u32
__allmul,0x45d3e0,0x34,unknown,,u8,u32,u32,u32,u32
__aulldiv,0x45d370,0x68,unknown,,ulonglong,ulonglong,ulonglong
__allmul,0x45d3e0,0x34,unknown,,longlong,longlong,longlong
strdate,0x45d414,0x70,__stdcall,,char*,char*
_strcpy,0x45d490,0x8a,__cdecl,,char*,char*,char*
_strcat,0x45d4a0,0x65,__cdecl,,char*,char*,char*
Expand Down
7 changes: 0 additions & 7 deletions config/stubbed.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
th06::AnmManager::DrawEndingRect
th06::MidiOutput::OnTimerElapsed
th06::MidiOutput::ParseFile
th06::ResultScreen::OnDraw
th06::ResultScreen::LinkScoreEx
th06::ResultScreen::DeletedCallback
th06::ResultScreen::HandleResultKeyboard
th06::ResultScreen::HandleReplaySaveKeyboard
th06::ResultScreen::GetHighScore
th06::MusicRoom::RegisterChain
th06::ResultScreen::ReleaseScoreDat
th06::MainMenu::SelectRelated
th06::Pbg3Archive::Pbg3Archive
10 changes: 5 additions & 5 deletions src/EclManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,14 @@ ZunResult EclManager::RunEcl(Enemy *enemy)
}
if (local_70->nameCsum != (u8)csum)
{
local_70->unk_3e = 0;
local_70->numSuccess = 0;
local_70->numAttempts = 0;
local_70->nameCsum = csum;
}
local_70->captureScore = g_EnemyManager.spellcardInfo.captureScore;
if (local_70->numSuccess < 9999)
if (local_70->numAttempts < 9999)
{
local_70->numSuccess++;
local_70->numAttempts++;
}
}
break;
Expand All @@ -745,7 +745,7 @@ ZunResult EclManager::RunEcl(Enemy *enemy)
g_GameManager.score += scoreIncrease;
if (!g_GameManager.isInReplay)
{
local_80->unk_3e++;
local_80->numSuccess++;
// What. the. fuck?
// memmove(&local_80->nameCsum, &local_80->characterShotType, 4);
for (local_84 = 4; 0 < local_84; local_84 = local_84 + -1)
Expand All @@ -754,7 +754,7 @@ ZunResult EclManager::RunEcl(Enemy *enemy)
}
local_80->characterShotType = g_GameManager.CharacterShotType();
}
g_GameManager.unk_28++;
g_GameManager.spellcardsCaptured++;
}
}
g_EnemyManager.spellcardInfo.isActive = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/GameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ ZunResult GameManager::AddedCallback(GameManager *mgr)
catk->base.magic = (u32) "CATK";
catk->base.unkLen = sizeof(Catk);
catk->base.th6kLen = sizeof(Catk);
catk->base.version = 0x10;
catk->base.version = TH6K_VERSION;
catk->idx = i;
catk->numAttempts = 0;
catk->numSuccess = 0;
catk->unk_3e = 0;
}
scoredat = ResultScreen::OpenScore("score.dat");
g_GameManager.highScore =
Expand All @@ -215,7 +215,7 @@ ZunResult GameManager::AddedCallback(GameManager *mgr)
mgr->maxRank = g_DifficultyInfo[g_GameManager.difficulty].maxRank;
mgr->deaths = 0;
mgr->bombsUsed = 0;
mgr->unk_28 = 0;
mgr->spellcardsCaptured = 0;
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions src/GameManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ struct GameManager
i32 grazeInStage;
i32 grazeInTotal;
u32 isInReplay;
u32 deaths;
u32 bombsUsed;
u32 unk_28;
i32 deaths;
i32 bombsUsed;
i32 spellcardsCaptured;
i8 isTimeStopped;
Catk catk[CATK_NUM_CAPTURES];
Clrd clrd[CLRD_NUM_CHARACTERS];
Expand All @@ -98,7 +98,7 @@ struct GameManager
i8 unk_1812;
i8 unk_1813;
u16 pointItemsCollectedInStage;
i16 pointItemsCollected;
u16 pointItemsCollected;
u8 numRetries;
i8 powerItemCountForScore;
i8 livesRemaining;
Expand All @@ -109,7 +109,7 @@ struct GameManager
u8 isInGameMenu;
u8 isInRetryMenu;
u8 isInMenu;
i8 isGameCompleted;
u8 isGameCompleted;
u8 isInPracticeMode;
u8 demoMode;
i8 unk_1825;
Expand All @@ -128,7 +128,7 @@ struct GameManager
D3DXVECTOR2 playerMovementAreaSize;
f32 cameraDistance;
D3DXVECTOR3 stageCameraFacingDir;
u32 counat;
i32 counat;
i32 rank;
i32 maxRank;
i32 minRank;
Expand Down
2 changes: 1 addition & 1 deletion src/ReplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ZunResult ReplayManager::ValidateReplayData(ReplayData *data, i32 fileSize)
return ZUN_ERROR;
}

if (decryptedData->version != 0x102)
if (decryptedData->version != GAME_VERSION)
{
return ZUN_ERROR;
}
Expand Down
Loading

0 comments on commit 11d3cfb

Please sign in to comment.