rodecomp/Source/Client/Mode/ModeMgr.cpp
ragnarok-clanker 858265cc69 Maintenance: Second pass: name remaining numeric switch case labels (identifier-only; no code change). ~3,500 more labels across 150
Batch #14936 by ragnarok-clanker: no function's compiled code changes; checked with 158 compiled unit(s), including every includer of Source/Client/Mode/GameModeEnums.h, Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Contents/Actors/PetEnums.h, Source/Contents/Combat/CombatTypes.h, Source/Contents/Configuration/ServiceEnums.h, Source/Contents/Effects/EffectPrimId.h, Source/Contents/Hotkeys/InterfaceHotkey.h, Source/Contents/Items/ItemId.h, Source/Contents/Items/ItemType.h, Source/Network/Packets/ModeResultEnums.h, Source/Network/Packets/NoticeEnums.h, Source/Network/Packets/PacketId.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
2026-11-08 12:37:46 +00:00

81 lines
1.6 KiB
C++

#include "Client/Mode/ModeMgr.h"
#include "Client/Mode/ModeMessage.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/CLoginMode.h"
#include <cstring>
// STATIC: 0x013495b8
// GLOBAL: gl_24475
CModeMgr g_modeMgr = {1};
// OFFSET: 0x00AD6450
// FUNCTION: fn_17831
CMode* CModeMgr::GetGameMode() {
return this->state == 1 ? this->gameMode : nullptr;
}
// OFFSET: 0x00AD6460
// FUNCTION: fn_17832
CMode* CModeMgr::GetLoginMode() {
return this->state == 0 ? this->gameMode : nullptr;
}
// OFFSET: 0x00AD6820
// FUNCTION: fn_17846
void CModeMgr::Run(int mode, const char* name) {
this->state = mode;
this->nextState = mode;
std::strcpy(this->modeName, name);
std::strcpy(this->nextModeName, name);
while (this->running && !g_modalImmediate) {
this->state = this->nextState;
std::strcpy(this->modeName, this->nextModeName);
switch (this->state) {
case MT_LOGIN:
this->gameMode = new CLoginMode();
break;
case MT_GAME:
this->gameMode = new CGameMode();
break;
}
this->gameMode->Initialize(this->modeName);
this->gameMode->Run();
this->gameMode->End();
delete this->gameMode;
this->gameMode = nullptr;
}
}
// OFFSET: 0x00AD66D0
// FUNCTION: fn_17835
void CMode::OnChangeState(int) {
}
// OFFSET: 0x00AD66E0
// FUNCTION: fn_17836
void CMode::End() {
}
// OFFSET: 0x00AD66F0
// FUNCTION: fn_17837
void CMode::Initialize(const char*) {
}
// OFFSET: 0x00AD6700
// FUNCTION: fn_17838
void CMode::OnUpdateEx(int) {
}
// OFFSET: 0x00AD6720
// FUNCTION: fn_17840
void CMode::Update() {
}
// OFFSET: 0x00AD6710
// FUNCTION: fn_17839
int CMode::Run() {
return 0;
}