Maintenance: Forced maintainer submission (resubmission of 14678 after td sync to 8deac7a3; replaces 14460 and 14473). Native-run fix
Batch #14681 by ragnarok-clanker: forced by an admin (6 lower score(s), 70 changed function(s)); checked with 555 compiled unit(s), including every includer of Source/Client/Mode/CLoginMode.h, Source/Client/Session.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObject.h, Source/Contents/EffectResourceSwitcher.h, Source/Contents/Effects/CartCannon.h, Source/Contents/Effects/EZ2STREffectEx.h, Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/MonsterSkillEffects.h, Source/Contents/Effects/RagEffect.h, Source/Contents/Effects/RectUpEffect.h, Source/Contents/Ground/GroundGeometry.h, Source/Network/Connection/Connection.h, Source/Resource/Audio/WaveResource.h, Source/Resource/Bitmap/BitmapResource.h, Source/Resource/EZeffectResource.h, Source/Resource/EmblemResource.h, Source/Resource/GifResource.h, Source/Resource/ImfResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelResource.h, Source/Resource/PaletteResource.h, Source/Resource/RmaResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/Sprites/SpriteResource.h, Source/Resource/World/GroundResource.h, Source/Resource/World/TerrainResource.h, Source/Resource/World/WorldResource.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UITextButton.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIMakeTargetProcessWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIItemReformWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UINewSelectCharWnd.h.
This commit is contained in:
parent
8deac7a3e0
commit
ffbeee0f2a
142 changed files with 709 additions and 435 deletions
|
|
@ -27,6 +27,7 @@ struct NotifyZoneServer2Packet;
|
|||
struct PasswordModePacket;
|
||||
struct AcceptEnterPositionPacket;
|
||||
struct AcceptLoginPacket;
|
||||
struct ConnectionEndpoint;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct CharacterInfo {
|
||||
|
|
@ -193,9 +194,7 @@ extern int g_modalImmediate;
|
|||
extern bool g_pingLogEnabled;
|
||||
extern std::uint32_t g_pingLogFirstTick;
|
||||
extern std::list<std::uint32_t> g_pingLogTicks;
|
||||
extern char g_zoneServerIp[16];
|
||||
extern int g_zoneServerPort;
|
||||
extern char g_zoneServerHost[129];
|
||||
extern ConnectionEndpoint g_zoneServerEndpoint;
|
||||
extern CharacterInfo g_charInfo;
|
||||
extern bool g_replayMode;
|
||||
extern int g_restoreSurfaces;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "Contents/Effects/EffectLists.h"
|
||||
#include "Contents/Effects/SkillEffects.h"
|
||||
#include "Contents/Effects/RagEffect.h"
|
||||
#include "Contents/Ground/GroundGeometry.h"
|
||||
#include "Contents/Jobs/JobInheritance.h"
|
||||
#include "Contents/GuildInfo.h"
|
||||
#include "Contents/GuildMgr.h"
|
||||
|
|
@ -6509,9 +6510,9 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int
|
|||
|
||||
in_addr address;
|
||||
address.s_addr = static_cast<ULONG>(ip);
|
||||
StringFormat(g_zoneServerIp, sizeof(g_zoneServerIp), static_cast<std::size_t>(-1), inet_ntoa(address));
|
||||
g_zoneServerPort = port;
|
||||
StringFormat(g_zoneServerHost, sizeof(g_zoneServerHost), static_cast<std::size_t>(-1), "%s", host.c_str());
|
||||
StringFormat(g_zoneServerEndpoint.address, sizeof(g_zoneServerEndpoint.address), static_cast<std::size_t>(-1), inet_ntoa(address));
|
||||
g_zoneServerEndpoint.port = port;
|
||||
StringFormat(g_zoneServerEndpoint.overrideAddress, sizeof(g_zoneServerEndpoint.overrideAddress), static_cast<std::size_t>(-1), "%s", host.c_str());
|
||||
GetRagConnection().Close();
|
||||
g_activeSkillEffects.clear();
|
||||
|
||||
|
|
@ -6523,7 +6524,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int
|
|||
}
|
||||
|
||||
if (g_replayAnimationScaling == 0) {
|
||||
this->unknown_0018 = GetRagConnection().Connect(*reinterpret_cast<const ConnectionEndpoint*>(g_zoneServerIp));
|
||||
this->unknown_0018 = GetRagConnection().Connect(g_zoneServerEndpoint);
|
||||
if (!this->unknown_0018) {
|
||||
GetRagConnection().Close();
|
||||
if (g_windowMgr.Confirm(LookupMessage(1), 1, true, true, 0, "Message", 280, 120, 0) != 269) {
|
||||
|
|
@ -6541,7 +6542,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int
|
|||
packet.clientTime = timeGetTime();
|
||||
packet.aid = g_session.m_aid;
|
||||
packet.gid = g_session.m_gid;
|
||||
packet.authCode = reinterpret_cast<const int*>(g_session.unknown_0E9C)[2];
|
||||
packet.authCode = *reinterpret_cast<const int*>(&g_session.unknown_0EA0[0x04]);
|
||||
packet.sex = static_cast<unsigned char>(g_session.SyncUnknown0E98());
|
||||
GetRagConnection().Send(reinterpret_cast<const PacketLengths&>(GetRagConnection()).FixedLength(packet.packetType), &packet);
|
||||
g_session.SetOption(17, 1, 0);
|
||||
|
|
@ -7283,10 +7284,10 @@ void CGameMode::InitializeState() {
|
|||
this->cursorOffsetX = 0.0f;
|
||||
this->cursorOffsetY = 0.0f;
|
||||
*reinterpret_cast<int*>(this->unknown_00D8) = 0;
|
||||
*reinterpret_cast<int*>(&this->unknown_00D8[4]) = g_screenWidth;
|
||||
*reinterpret_cast<int*>(&this->unknown_00D8[8]) = g_screenHeight;
|
||||
this->unknown_00E4 = g_screenWidth;
|
||||
this->unknown_00E8 = g_screenHeight;
|
||||
*reinterpret_cast<int*>(&this->unknown_00D8[4]) = g_mouse.x;
|
||||
*reinterpret_cast<int*>(&this->unknown_00D8[8]) = g_mouse.y;
|
||||
this->unknown_00E4 = g_mouse.x;
|
||||
this->unknown_00E8 = g_mouse.y;
|
||||
this->unknown_0244 = 0;
|
||||
this->unknown_024C = 0;
|
||||
this->unknown_0250 = 0;
|
||||
|
|
@ -7371,7 +7372,7 @@ void CGameMode::InitializeState() {
|
|||
g_guildInfo.Init();
|
||||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(22)), 0xFFE6E6, 0, 0, 0);
|
||||
inet_ntoa(*reinterpret_cast<const in_addr*>(&g_session.unknown_0E9C[0x10]));
|
||||
inet_ntoa(*reinterpret_cast<const in_addr*>(&g_session.unknown_0EA0[0x0C]));
|
||||
if (!g_accountLinkedUserDataMgr->m_loaded) {
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(3457)), 255, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -7459,7 +7460,7 @@ void CGameMode::InitializeState() {
|
|||
}
|
||||
|
||||
this->unknown_05FC = nullptr;
|
||||
*reinterpret_cast<int*>(this->unknown_0600) = 0;
|
||||
this->unknown_0600 = 0;
|
||||
s_signBoardMgr->Initialize();
|
||||
g_statusRefreshSuppressed = 0;
|
||||
int& localMapMove = g_session.m_localMapMove;
|
||||
|
|
@ -7821,7 +7822,7 @@ void CGameMode::Initialize(const char* name) {
|
|||
miniMap.append(".bmp", 4);
|
||||
std::strcpy(reinterpret_cast<char*>(this->unknown_0090), miniMap.c_str());
|
||||
|
||||
g_renderer->SetFog(1);
|
||||
g_renderer->ClearDepth(1);
|
||||
g_session.m_weight = 0;
|
||||
g_session.RefreshHpSpWindows();
|
||||
g_session.InvalidateWindowFrames();
|
||||
|
|
@ -7838,7 +7839,7 @@ void CGameMode::Initialize(const char* name) {
|
|||
g_windowMgr.SendNotice(4, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.CenterSurface0478();
|
||||
g_windowMgr.DrawWindows();
|
||||
if (g_renderer->CaptureBackBuffer()) {
|
||||
if (g_renderer->Draw()) {
|
||||
g_renderer->Present(1);
|
||||
}
|
||||
|
||||
|
|
@ -7859,12 +7860,12 @@ void CGameMode::Initialize(const char* name) {
|
|||
g_depthEnd = static_cast<float>(std::atof((*fog)[1].c_str()));
|
||||
g_worldOverlayColor = ParseHexString((*fog)[2].c_str());
|
||||
g_fogDensity = static_cast<float>(std::atof((*fog)[3].c_str()));
|
||||
g_renderer->SetClearColor(1);
|
||||
g_renderer->SetFog(1);
|
||||
} else {
|
||||
g_renderer->SetClearColor(0);
|
||||
g_renderer->SetFog(0);
|
||||
}
|
||||
} else {
|
||||
g_renderer->SetClearColor(0);
|
||||
g_renderer->SetFog(0);
|
||||
}
|
||||
|
||||
Replay::Instance().ResetPlayback();
|
||||
|
|
@ -8332,7 +8333,7 @@ __forceinline void CGameMode::ShowHoverActorName(CGameActor* actor) {
|
|||
// OFFSET: 0x00CDFE10
|
||||
// FUNCTION: fn_21328
|
||||
int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) {
|
||||
if (g_sub_1319eb4 == 1 && pick) {
|
||||
if (g_mouse.buttons[0] == 1 && pick) {
|
||||
UIMacroReporterWnd* reporter = static_cast<UIMacroReporterWnd*>(g_windowMgr.LookupWindow(286));
|
||||
if (reporter && reporter->unknown_010C == true && reporter->m_mode == 0) {
|
||||
reporter->AddPickedActor(reinterpret_cast<MacroReporterEntry*>(pick));
|
||||
|
|
@ -8350,10 +8351,10 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) {
|
|||
|
||||
if (this->unknown_0028 == 0) {
|
||||
if (!pick) {
|
||||
if (lockedPick != 0 || g_sub_1319eb4 == 1) {
|
||||
if (lockedPick != 0 || g_mouse.buttons[0] == 1) {
|
||||
return result;
|
||||
}
|
||||
if (this->unknown_00DC == g_screenWidth && this->unknown_00E0 == g_screenHeight) {
|
||||
if (this->unknown_00DC == g_mouse.x && this->unknown_00E0 == g_mouse.y) {
|
||||
return result;
|
||||
}
|
||||
pickTarget = 0;
|
||||
|
|
@ -8363,7 +8364,7 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) {
|
|||
} else {
|
||||
this->SetCursorAction(5);
|
||||
if (lockedPick != 0) {
|
||||
if (g_sub_1319eb4 == 1) {
|
||||
if (g_mouse.buttons[0] == 1) {
|
||||
this->SendMsg(26, 0, 0, 0, 0);
|
||||
} else {
|
||||
this->SetCursorAction(0);
|
||||
|
|
@ -8373,7 +8374,7 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) {
|
|||
result = 0;
|
||||
}
|
||||
} else {
|
||||
if (g_sub_1319eb4 == 2) {
|
||||
if (g_mouse.buttons[0] == 2) {
|
||||
return 1;
|
||||
}
|
||||
if (!pick && clickTarget == 0 && pickTarget == 0) {
|
||||
|
|
@ -8434,9 +8435,8 @@ void __stdcall SendMacroUserInfoPacket(std::uint16_t first, std::uint16_t second
|
|||
// OFFSET: 0x00CE0210
|
||||
// FUNCTION: fn_21329
|
||||
int CGameMode::ProcessGroundClick(int result) {
|
||||
const auto drawCell = [](GroundGeometry* ground, const float* matrix, int column, int row, std::uint32_t color) {
|
||||
void** groundVtable = *reinterpret_cast<void***>(ground);
|
||||
reinterpret_cast<void(__thiscall*)(GroundGeometry*, const float*, int, int, std::uint32_t)>(groundVtable[14])(ground, matrix, column, row, color);
|
||||
const auto drawCell = [this](GroundGeometry* ground, const float* matrix, int column, int row, std::uint32_t color) {
|
||||
ground->DrawGrid(*this->scene->terrain, matrix, column, row, color);
|
||||
};
|
||||
|
||||
UIWindow* macroArea = g_windowMgr.LookupWindow(0x11E);
|
||||
|
|
@ -10307,7 +10307,7 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor*
|
|||
}
|
||||
|
||||
int& balloonAid = *reinterpret_cast<int*>(&this->unknown_00EC[0x00]);
|
||||
if (this->unknown_00DC == g_screenWidth && this->unknown_00E0 == g_screenHeight) {
|
||||
if (this->unknown_00DC == g_mouse.x && this->unknown_00E0 == g_mouse.y) {
|
||||
this->ShowActorNameBalloon(balloonAid);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -572,8 +572,6 @@ int g_minimapCoordinateValue;
|
|||
int g_minimapCoordinateDigits;
|
||||
// GLOBAL: gl_25046
|
||||
int g_minimapCoordinateDigitValues[4];
|
||||
// GLOBAL: gl_24672
|
||||
int g_screenWidth;
|
||||
|
||||
|
||||
// OFFSET: 0x00CD2A10
|
||||
|
|
|
|||
|
|
@ -4367,7 +4367,7 @@ void CGameMode::ReceiveAcceptEnter(const unsigned char* data) {
|
|||
_time32(&now);
|
||||
fprintf(file, "\n");
|
||||
fprintf(file, "server:%s\n", g_session.m_accountName.c_str());
|
||||
fprintf(file, "ip:%s\n", g_zoneServerIp);
|
||||
fprintf(file, "ip:%s\n", g_zoneServerEndpoint.address);
|
||||
fprintf(file, "map:%s.gat\n", g_session.m_navigationPlayerMap);
|
||||
fprintf(file, "time:%s\n\n", _ctime32(&now));
|
||||
fclose(file);
|
||||
|
|
|
|||
|
|
@ -21544,7 +21544,7 @@ void CGameMode::ProcessIncomingPackets() {
|
|||
_time32(&now);
|
||||
fprintf(file, "\n");
|
||||
fprintf(file, "server:%s\n", g_session.m_accountName.c_str());
|
||||
fprintf(file, "ip:%s\n", g_zoneServerIp);
|
||||
fprintf(file, "ip:%s\n", g_zoneServerEndpoint.address);
|
||||
fprintf(file, "map:%s.gat\n", g_session.m_navigationPlayerMap);
|
||||
fprintf(file, "time:%s\n\n", _ctime32(&now));
|
||||
fclose(file);
|
||||
|
|
|
|||
|
|
@ -648,11 +648,11 @@ const char* GetUserCountText(unsigned short userCount) {
|
|||
// OFFSET: 0x00D8E990
|
||||
// FUNCTION: fn_22274
|
||||
void CLoginMode::ReceiveCharacterSlots(const CharacterSlotsPacket* packet) {
|
||||
g_session.unknown_59C0 = packet->normalSlots;
|
||||
g_session.unknown_59C4 = packet->premiumSlots;
|
||||
g_session.unknown_59C8 = packet->billingSlots;
|
||||
g_session.unknown_59CC = packet->validSlots;
|
||||
g_session.unknown_59D4 = packet->producibleSlots;
|
||||
g_session.m_normalSlotCount = packet->normalSlots;
|
||||
g_session.m_premiumSlotCount = packet->premiumSlots;
|
||||
g_session.m_billingSlotCount = packet->billingSlots;
|
||||
g_session.m_producibleSlotCount = packet->validSlots;
|
||||
g_session.m_validSlotCount = packet->producibleSlots;
|
||||
|
||||
SecureZeroMemory(this->characters, sizeof(this->characters));
|
||||
g_session.unknown_59BC = 0;
|
||||
|
|
@ -776,7 +776,7 @@ void CLoginMode::ReceiveCharacterPage(const CharacterPagePacket* packet) {
|
|||
_time32(&now);
|
||||
for (int i = 0; i < static_cast<int>(count); ++i) {
|
||||
if (this->characters[this->unknown_01D8 + i].sex == 99) {
|
||||
this->characters[this->unknown_01D8 + i].sex = g_session.unknown_0E9C[0];
|
||||
this->characters[this->unknown_01D8 + i].sex = static_cast<unsigned char>(g_session.m_sex);
|
||||
}
|
||||
if (this->characters[this->unknown_01D8 + i].deleteDate != 0) {
|
||||
this->characters[this->unknown_01D8 + i].deleteDate += now;
|
||||
|
|
@ -1570,13 +1570,7 @@ struct NotifyZoneServer2Packet {
|
|||
#pragma pack(pop)
|
||||
|
||||
// GLOBAL: gl_25028
|
||||
char g_zoneServerIp[16];
|
||||
|
||||
// GLOBAL: gl_25079
|
||||
int g_zoneServerPort;
|
||||
|
||||
// GLOBAL: gl_25080
|
||||
char g_zoneServerHost[129];
|
||||
ConnectionEndpoint g_zoneServerEndpoint;
|
||||
|
||||
// OFFSET: 0x00D929A0
|
||||
// FUNCTION: fn_22290
|
||||
|
|
@ -1593,9 +1587,9 @@ void CLoginMode::ConnectZoneServer(std::uint32_t gid, std::string mapName, std::
|
|||
|
||||
in_addr address;
|
||||
address.s_addr = ip;
|
||||
strcpy(g_zoneServerIp, inet_ntoa(address));
|
||||
g_zoneServerPort = port;
|
||||
memcpy_s(g_zoneServerHost, sizeof(g_zoneServerHost), host.c_str(), std::min<std::size_t>(sizeof(g_zoneServerHost), host.size() + 1));
|
||||
strcpy(g_zoneServerEndpoint.address, inet_ntoa(address));
|
||||
g_zoneServerEndpoint.port = port;
|
||||
memcpy_s(g_zoneServerEndpoint.overrideAddress, sizeof(g_zoneServerEndpoint.overrideAddress), host.c_str(), std::min<std::size_t>(sizeof(g_zoneServerEndpoint.overrideAddress), host.size() + 1));
|
||||
|
||||
GetRagConnection().Close();
|
||||
this->pendingCursorType = 12;
|
||||
|
|
@ -1882,7 +1876,7 @@ void CLoginMode::Zc_Accept_Enter3(const AcceptEnterPositionPacket* packet) {
|
|||
_time32(&now);
|
||||
fprintf(file, "\n");
|
||||
fprintf(file, "server:%s\n", g_session.m_accountName.c_str());
|
||||
fprintf(file, "ip:%s\n", g_zoneServerIp);
|
||||
fprintf(file, "ip:%s\n", g_zoneServerEndpoint.address);
|
||||
fprintf(file, "map:%s.gat\n", g_session.m_navigationPlayerMap);
|
||||
fprintf(file, "time:%s\n\n", _ctime32(&now));
|
||||
fclose(file);
|
||||
|
|
@ -1923,7 +1917,7 @@ void CLoginMode::Zc_Accept_Enter2(const AcceptEnterPositionPacket* packet) {
|
|||
_time32(&now);
|
||||
fprintf(file, "\n");
|
||||
fprintf(file, "server:%s\n", g_session.m_accountName.c_str());
|
||||
fprintf(file, "ip:%s\n", g_zoneServerIp);
|
||||
fprintf(file, "ip:%s\n", g_zoneServerEndpoint.address);
|
||||
fprintf(file, "map:%s.gat\n", g_session.m_navigationPlayerMap);
|
||||
fprintf(file, "time:%s\n\n", _ctime32(&now));
|
||||
fclose(file);
|
||||
|
|
@ -2312,7 +2306,7 @@ void CLoginMode::ReceiveAcceptLogin(const AcceptLoginPacket* packet, int version
|
|||
g_loginAcceptTime = timeGetTime();
|
||||
*reinterpret_cast<std::string*>(&g_session.unknown_56B8[4]) = LookupMessage(940);
|
||||
|
||||
SessionAccount& account = *reinterpret_cast<SessionAccount*>(g_session.unknown_0E9C);
|
||||
SessionAccount& account = *reinterpret_cast<SessionAccount*>(&g_session.m_sex);
|
||||
account.authCode = packet->authCode;
|
||||
account.userLevel = packet->userLevel;
|
||||
g_session.m_aid = packet->aid;
|
||||
|
|
@ -2324,13 +2318,13 @@ void CLoginMode::ReceiveAcceptLogin(const AcceptLoginPacket* packet, int version
|
|||
|
||||
if (packet->sex >= 10) {
|
||||
g_session.SetFlag(packet->sex - 10);
|
||||
g_doramSex = packet->sex - 10;
|
||||
g_session.m_sex = packet->sex - 10;
|
||||
} else {
|
||||
if (g_loginExitFlag == 1) {
|
||||
exit(0);
|
||||
}
|
||||
g_session.SetFlag(packet->sex);
|
||||
g_doramSex = packet->sex;
|
||||
g_session.m_sex = packet->sex;
|
||||
}
|
||||
|
||||
if (g_serviceType == 6 || g_serviceType == 10 || g_serviceType == 12) {
|
||||
|
|
@ -3128,7 +3122,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
|
|||
g_windowMgr.LoadShortcutItems();
|
||||
for (int i = 0; i < this->characterCount; ++i) {
|
||||
if (this->characters[i].slot == static_cast<unsigned char>(g_selectedSlotIndex)) {
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0E9C[0x04]) = this->characters[i].slot;
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0EA0[0x00]) = this->characters[i].slot;
|
||||
g_session.SetJob(this->characters[i].job);
|
||||
g_session.m_gid = this->characters[i].gid;
|
||||
*reinterpret_cast<int*>(g_session.unknown_16F4) = this->characters[i].speed;
|
||||
|
|
@ -3184,7 +3178,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
|
|||
g_session.InvalidateWindowFrames();
|
||||
g_session.m_jobLevel = *reinterpret_cast<const int*>(&this->characters[i].unknown_000C[0x0C]);
|
||||
g_session.InvalidateWindowFrames();
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0E9C[0x34]) = this->characters[i].unknown_008B[0];
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0EA0[0x30]) = this->characters[i].unknown_008B[0];
|
||||
g_session.m_head = this->characters[i].head;
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0EDC[0x04]) = 0;
|
||||
*reinterpret_cast<int*>(&g_session.unknown_0EDC[0x08]) = 0;
|
||||
|
|
@ -3643,7 +3637,7 @@ void CLoginMode::Slot7(int value) {
|
|||
this->unknown_0018 = 1;
|
||||
|
||||
ServerAddress2* servers = reinterpret_cast<ServerAddress2*>(this->serverList);
|
||||
SessionAccount& account = *reinterpret_cast<SessionAccount*>(g_session.unknown_0E9C);
|
||||
SessionAccount& account = *reinterpret_cast<SessionAccount*>(&g_session.m_sex);
|
||||
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
|
@ -4044,7 +4038,7 @@ void CLoginMode::Slot7(int value) {
|
|||
g_session.unknown_593C = 0;
|
||||
this->wallpaperName = g_loginWallpaperName;
|
||||
g_windowMgr.SetSurface0478(reinterpret_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str()))));
|
||||
this->unknown_0018 = GetRagConnection().Connect(*reinterpret_cast<const ConnectionEndpoint*>(g_zoneServerIp));
|
||||
this->unknown_0018 = GetRagConnection().Connect(g_zoneServerEndpoint);
|
||||
if (!this->unknown_0018) {
|
||||
GetRagConnection().Close();
|
||||
if (g_windowMgr.Confirm(LookupMessage(1), 1, true, true, 0, "Message", 280, 120, 0) != 0x10D) {
|
||||
|
|
|
|||
|
|
@ -1245,7 +1245,7 @@ std::vector<unsigned char> CSession::BuildCharacterReplayRecords() {
|
|||
AppendRecord(records, MakeReplayRecord(1056, this->unknown_1704, 4));
|
||||
AppendRecord(records, MakeReplayRecord(1057, &this->unknown_1708, sizeof(this->unknown_1708)));
|
||||
AppendRecord(records, MakeReplayRecord(1058, this->unknown_170C, 4));
|
||||
AppendRecord(records, MakeReplayRecord(1059, &this->unknown_0E9C[0x34], 4));
|
||||
AppendRecord(records, MakeReplayRecord(1059, &this->unknown_0EA0[0x30], 4));
|
||||
AppendRecord(records, MakeReplayRecord(1060, &this->m_head, sizeof(this->m_head)));
|
||||
AppendRecord(records, MakeReplayRecord(1061, &this->unknown_0EDC[0x4], 8));
|
||||
AppendRecord(records, MakeReplayRecord(1062, &this->unknown_0EDC[0xC], 4));
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ bool CSession::IsWithinUnknown59C0(int value) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
return this->unknown_59C0 - this->unknown_8130 <= value;
|
||||
return this->m_normalSlotCount - this->unknown_8130 <= value;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E3D390
|
||||
|
|
@ -247,11 +247,11 @@ __declspec(noinline) int CSession::HasItem61B8(std::uint32_t id) const {
|
|||
// OFFSET: 0x00E3DB20
|
||||
// FUNCTION: fn_24194
|
||||
bool CSession::ResetUnknownState() {
|
||||
this->unknown_59C0 = 1;
|
||||
this->unknown_59C4 = 1;
|
||||
this->unknown_59C8 = 1;
|
||||
this->unknown_59CC = 1;
|
||||
this->unknown_59D4 = 1;
|
||||
this->m_normalSlotCount = 1;
|
||||
this->m_premiumSlotCount = 1;
|
||||
this->m_billingSlotCount = 1;
|
||||
this->m_producibleSlotCount = 1;
|
||||
this->m_validSlotCount = 1;
|
||||
this->unknown_59BC = 1;
|
||||
this->unknown_0E94 = 1;
|
||||
this->unknown_103C = -1;
|
||||
|
|
@ -3006,12 +3006,12 @@ void CSession::Init() {
|
|||
this->m_simplifiedSkillList = 0;
|
||||
this->m_showSkillDescription = 1;
|
||||
this->unknown_59BC = 0;
|
||||
this->unknown_59C0 = 0;
|
||||
this->unknown_59C4 = 0;
|
||||
this->unknown_59C8 = 0;
|
||||
this->unknown_59CC = 0;
|
||||
this->m_normalSlotCount = 0;
|
||||
this->m_premiumSlotCount = 0;
|
||||
this->m_billingSlotCount = 0;
|
||||
this->m_producibleSlotCount = 0;
|
||||
this->unknown_59D0 = 0;
|
||||
this->unknown_59D4 = 0;
|
||||
this->m_validSlotCount = 0;
|
||||
this->m_noSubChatWnds.clear();
|
||||
this->m_subChatWnds.clear();
|
||||
this->m_hotkeyScript = nullptr;
|
||||
|
|
@ -7069,6 +7069,7 @@ void CSession::LoadSessionTables() {
|
|||
session->LoadLuaDataFiles();
|
||||
session->InitWeaponHitWaveNames();
|
||||
session->InitResourceNameTables();
|
||||
session->InitJobSpriteNames();
|
||||
session->InitJobNameTable();
|
||||
session->InitNpcLocationRadius();
|
||||
session->InitCommandTables();
|
||||
|
|
|
|||
|
|
@ -234,7 +234,8 @@ public:
|
|||
/* 07F4 */ unsigned char unknown_07F4[0x6A0];
|
||||
/* 0E94 */ int unknown_0E94;
|
||||
/* 0E98 */ int unknown_0E98;
|
||||
/* 0E9C */ unsigned char unknown_0E9C[0x3C];
|
||||
/* 0E9C */ int m_sex;
|
||||
/* 0EA0 */ unsigned char unknown_0EA0[0x38];
|
||||
/* 0ED8 */ int m_head;
|
||||
/* 0EDC */ unsigned char unknown_0EDC[0x10];
|
||||
/* 0EEC */ int m_bodyStyle;
|
||||
|
|
@ -500,12 +501,12 @@ public:
|
|||
/* 5970 */ int unknown_5970;
|
||||
/* 5974 */ unsigned char unknown_5974[0x48];
|
||||
/* 59BC */ int unknown_59BC;
|
||||
/* 59C0 */ int unknown_59C0;
|
||||
/* 59C4 */ int unknown_59C4;
|
||||
/* 59C8 */ int unknown_59C8;
|
||||
/* 59CC */ int unknown_59CC;
|
||||
/* 59C0 */ int m_normalSlotCount;
|
||||
/* 59C4 */ int m_premiumSlotCount;
|
||||
/* 59C8 */ int m_billingSlotCount;
|
||||
/* 59CC */ int m_producibleSlotCount;
|
||||
/* 59D0 */ int unknown_59D0;
|
||||
/* 59D4 */ int unknown_59D4;
|
||||
/* 59D4 */ int m_validSlotCount;
|
||||
/* 59D8 */ LuaScript* m_hotkeyScript;
|
||||
union {
|
||||
/* 59DC */ unsigned char unknown_59DC[0x19C];
|
||||
|
|
@ -1338,6 +1339,7 @@ static_assert(offsetof(CSession, m_humanFemaleHeadNames) == 0xF78);
|
|||
static_assert(offsetof(CSession, m_doramMaleHeadNames) == 0x618C);
|
||||
static_assert(offsetof(CSession, m_doramFemaleHeadNames) == 0x6198);
|
||||
static_assert(offsetof(CSession, unknown_0E98) == 0xE98);
|
||||
static_assert(offsetof(CSession, m_sex) == 0xE9C);
|
||||
static_assert(offsetof(CSession, m_petActionTable) == 0x1058);
|
||||
static_assert(offsetof(CSession, m_job) == 0x1628);
|
||||
static_assert(offsetof(CSession, m_inventoryItems) == 0x1710);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ public:
|
|||
void SetRenderInfo(const float* bounds, float x, float y) override;
|
||||
void SetAction(unsigned animation, int motion, int repeat) override;
|
||||
|
||||
virtual std::uint32_t Slot13();
|
||||
std::uint32_t Slot13() override;
|
||||
virtual bool Slot14();
|
||||
virtual void Slot15(int first, int second);
|
||||
virtual void Slot16();
|
||||
|
|
|
|||
|
|
@ -314,6 +314,7 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) {
|
|||
}
|
||||
|
||||
drawn = true;
|
||||
quad.image = image;
|
||||
if (this->render.unknown_00A4Bytes[1] != 0) {
|
||||
const float minX = quad.left < quad.right ? quad.left : quad.right;
|
||||
const float maxX = quad.left > quad.right ? quad.left : quad.right;
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ public:
|
|||
int Slot37() override;
|
||||
void Unused6860(int value);
|
||||
void Unused7950(int value);
|
||||
void SetModel(int job, int value, int unused);
|
||||
void Slot18(int job, int value, int unused) override;
|
||||
void Render(int argument) override;
|
||||
void RenderLit(int argument, const GrannyActorLight& light);
|
||||
void RenderShadowed(int argument);
|
||||
void SpawnCorpseActor();
|
||||
void Slot38() override;
|
||||
bool OnProcess() override;
|
||||
|
||||
/* 0410 */ CTexture* emblemTexture;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ public:
|
|||
void Render(int argument) override;
|
||||
|
||||
bool Slot14() override;
|
||||
void Slot15(int first, int second) override;
|
||||
void Slot15(int state, int resetPosition) override;
|
||||
void Slot43(int first, int second) override;
|
||||
void Slot19(
|
||||
int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh
|
||||
) override;
|
||||
|
|
@ -103,7 +104,6 @@ public:
|
|||
void RenderOverlaySprite(const float* matrix, int);
|
||||
void UpdateGaugeWindow();
|
||||
void DrawLayers(const float* matrix, int unknown0030, char unknown0034);
|
||||
void ChangeState(int state, int resetPosition);
|
||||
|
||||
float* GetExtent(float* extent) const override;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ public:
|
|||
float AdjustFollowDistance(CGameActor* target, float distance);
|
||||
void UpdatePendingAction();
|
||||
void Initialize();
|
||||
void ChangeState(int state, int resetPosition);
|
||||
void Slot15(int state, int resetPosition) override;
|
||||
|
||||
/* 0510 */ int unknown_0510;
|
||||
/* 0514 */ int unknown_0514;
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ void CPc::LoadEquipSprites(const std::vector<std::string>& names) {
|
|||
|
||||
// OFFSET: 0x00DB23A0
|
||||
// FUNCTION: fn_22643
|
||||
void CPc::Slot15(int first, int second) {
|
||||
void CPc::Slot43(int first, int second) {
|
||||
if (this->unknown_049C == first) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2375,7 +2375,7 @@ void CPc::UpdateGaugeWindow() {
|
|||
|
||||
// OFFSET: 0x00DB1760
|
||||
// FUNCTION: fn_22635
|
||||
void CPc::Slot20(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) {
|
||||
void CPc::Slot19(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) {
|
||||
this->unknown_04D4 = first;
|
||||
this->SetUnknown0260(second);
|
||||
this->unknown_0440 = third;
|
||||
|
|
@ -2421,7 +2421,7 @@ void CPc::Slot20(int first, int second, int third, int fourth, int fifth, int si
|
|||
|
||||
// OFFSET: 0x00DB0CE0
|
||||
// FUNCTION: fn_22633
|
||||
void CPc::Slot19(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) {
|
||||
void CPc::Slot20(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) {
|
||||
this->unknown_04D4 = first;
|
||||
this->SetUnknown0260(second);
|
||||
this->unknown_0440 = third;
|
||||
|
|
@ -4348,7 +4348,7 @@ void CPlayer::Initialize() {
|
|||
|
||||
// OFFSET: 0x00DB4290
|
||||
// FUNCTION: fn_22651
|
||||
void CPc::ChangeState(int state, int resetPosition) {
|
||||
void CPc::Slot15(int state, int resetPosition) {
|
||||
int current = this->render.unknown_0070;
|
||||
if (current == 3 || this->unknown_017C != 0) {
|
||||
return;
|
||||
|
|
@ -5574,7 +5574,7 @@ bool CPc::Slot14() {
|
|||
|
||||
// OFFSET: 0x00DBA5D0
|
||||
// FUNCTION: fn_22673
|
||||
void CPlayer::ChangeState(int state, int resetPosition) {
|
||||
void CPlayer::Slot15(int state, int resetPosition) {
|
||||
if (this->render.unknown_0070 == 3) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -5600,5 +5600,5 @@ void CPlayer::ChangeState(int state, int resetPosition) {
|
|||
g_screenShakeDuration = 0;
|
||||
}
|
||||
|
||||
CPc::ChangeState(state, resetPosition);
|
||||
CPc::Slot15(state, resetPosition);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3448,7 +3448,7 @@ C3dGrannyGameActor::C3dGrannyGameActor(const char* name) {
|
|||
|
||||
// OFFSET: 0x00CC7ED0
|
||||
// FUNCTION: fn_21189
|
||||
void C3dGrannyGameActor::SetModel(int job, int value, int) {
|
||||
void C3dGrannyGameActor::Slot18(int job, int value, int) {
|
||||
this->SetActorJob(job);
|
||||
this->SetUnknown0260(value);
|
||||
this->model = static_cast<C3dGrannyModelRes*>(ResourceMgr::Instance().Load(this->name));
|
||||
|
|
@ -4606,7 +4606,7 @@ void CGameActor::NotifyCellMove(const float* x, const float* z) {
|
|||
|
||||
// OFFSET: 0x00CC5750
|
||||
// FUNCTION: fn_21177
|
||||
void C3dGrannyGameActor::SpawnCorpseActor() {
|
||||
void C3dGrannyGameActor::Slot38() {
|
||||
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->SpawnGrannyCorpse(
|
||||
this->render.position.x, this->render.position.y, this->render.position.z, this->angle, this->name
|
||||
);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ public:
|
|||
const std::uint32_t* palette, const SpriteRleImage* image, int blend, short hover
|
||||
);
|
||||
virtual void Slot12(SpriteQuad* quad, const int* box, float shiftX, int first, int second);
|
||||
// INLINED
|
||||
virtual std::uint32_t Slot13() {
|
||||
return 0;
|
||||
}
|
||||
static float __stdcall Heading(float x, float z, float targetX, float targetZ);
|
||||
void Face(float x, float z);
|
||||
float CalcDist(float x, float z) const;
|
||||
|
|
|
|||
|
|
@ -1337,7 +1337,7 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector<unsigned char>& da
|
|||
offset += header.bytes;
|
||||
break;
|
||||
case 1059:
|
||||
std::memcpy(&this->unknown_0E9C[0x34], data.data() + offset, header.bytes);
|
||||
std::memcpy(&this->unknown_0EA0[0x30], data.data() + offset, header.bytes);
|
||||
offset += header.bytes;
|
||||
break;
|
||||
case 1060:
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ void EffectResourceSwitcher::SetNames(const std::string& source, const std::stri
|
|||
}
|
||||
|
||||
EffectLists* effects = g_effectMgr;
|
||||
this->effect = static_cast<CEZ2STREffect*>(
|
||||
this->effect = static_cast<CEZ2STREffectEx*>(
|
||||
effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(this->sourceName), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0));
|
||||
this->spawnPosition = actor->render.position;
|
||||
}
|
||||
|
|
@ -152,10 +152,10 @@ void EffectResourceSwitcher::Slot03() {
|
|||
return;
|
||||
}
|
||||
|
||||
CEZ2STREffect* previous = this->effect;
|
||||
CEZ2STREffectEx* previous = this->effect;
|
||||
this->sourceName = this->targetName;
|
||||
this->targetName = "";
|
||||
this->effect = static_cast<CEZ2STREffect*>(g_effectMgr->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(this->sourceName), this->spawnPosition.x,
|
||||
this->effect = static_cast<CEZ2STREffectEx*>(g_effectMgr->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(this->sourceName), this->spawnPosition.x,
|
||||
this->spawnPosition.y, this->spawnPosition.z, 0, -1, 0, 0));
|
||||
this->active = 0;
|
||||
if (previous) {
|
||||
|
|
@ -264,7 +264,7 @@ CEZ2STREffectMgr* Singleton<CEZ2STREffectMgr>::GetInstance() {
|
|||
|
||||
// OFFSET: 0x006FFA00
|
||||
// FUNCTION: fn_06967
|
||||
__declspec(noinline) bool CEZ2STREffect::IsFinished() {
|
||||
__declspec(noinline) bool CEZ2STREffectEx::IsFinished() {
|
||||
if (!this->emitter) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -274,7 +274,7 @@ __declspec(noinline) bool CEZ2STREffect::IsFinished() {
|
|||
|
||||
// OFFSET: 0x006FFA20
|
||||
// FUNCTION: fn_06968
|
||||
void CEZ2STREffect::Slot01() {
|
||||
void CEZ2STREffectEx::Slot01() {
|
||||
EZ2STREffectInfo* info = CEZ2STREffectMgr::GetInstance()->FindById(this->id);
|
||||
if (!info) {
|
||||
return;
|
||||
|
|
@ -323,7 +323,7 @@ void CEZ2STREffect::Slot01() {
|
|||
|
||||
// OFFSET: 0x006FFBF0
|
||||
// FUNCTION: fn_06969
|
||||
bool CEZ2STREffect::Slot06() {
|
||||
bool CEZ2STREffectEx::Slot06() {
|
||||
EZ2STREmitter* emitter = this->emitter;
|
||||
if (!emitter) {
|
||||
return false;
|
||||
|
|
@ -346,7 +346,7 @@ bool CEZ2STREffect::Slot06() {
|
|||
|
||||
// OFFSET: 0x006FFC60
|
||||
// FUNCTION: fn_06970
|
||||
void CEZ2STREffect::Slot03() {
|
||||
void CEZ2STREffectEx::Slot03() {
|
||||
if (!this->emitter) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -386,7 +386,7 @@ void CEZ2STREffect::Slot03() {
|
|||
|
||||
// OFFSET: 0x006FFEA0
|
||||
// FUNCTION: fn_06971
|
||||
void CEZ2STREffect::Slot04() {
|
||||
void CEZ2STREffectEx::Slot04() {
|
||||
if (!this->emitter) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -400,7 +400,7 @@ void CEZ2STREffect::Slot04() {
|
|||
|
||||
// OFFSET: 0x006FFEF0
|
||||
// FUNCTION: fn_06972
|
||||
void CEZ2STREffect::Slot23(float argument) {
|
||||
void CEZ2STREffectEx::Slot23(float argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->remainingTime = argument;
|
||||
}
|
||||
|
|
@ -408,7 +408,7 @@ void CEZ2STREffect::Slot23(float argument) {
|
|||
|
||||
// OFFSET: 0x006FFF10
|
||||
// FUNCTION: fn_06973
|
||||
void CEZ2STREffect::Slot26(int argument) {
|
||||
void CEZ2STREffectEx::Slot26(int argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FE8 = static_cast<unsigned char>(argument);
|
||||
}
|
||||
|
|
@ -416,7 +416,7 @@ void CEZ2STREffect::Slot26(int argument) {
|
|||
|
||||
// OFFSET: 0x006FFF30
|
||||
// FUNCTION: fn_06974
|
||||
void CEZ2STREffect::Slot27(int argument) {
|
||||
void CEZ2STREffectEx::Slot27(int argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FE9 = static_cast<unsigned char>(argument);
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ void CEZ2STREffect::Slot27(int argument) {
|
|||
|
||||
// OFFSET: 0x006FFF50
|
||||
// FUNCTION: fn_06975
|
||||
__declspec(noinline) void CEZ2STREffect::EndLoop(unsigned char fadeOut) {
|
||||
__declspec(noinline) void CEZ2STREffectEx::EndLoop(unsigned char fadeOut) {
|
||||
if (this->emitter) {
|
||||
this->emitter->looping = 0;
|
||||
this->emitter->fadeOut = fadeOut;
|
||||
|
|
@ -433,13 +433,13 @@ __declspec(noinline) void CEZ2STREffect::EndLoop(unsigned char fadeOut) {
|
|||
|
||||
// OFFSET: 0x006FFF80
|
||||
// FUNCTION: fn_06976
|
||||
void CEZ2STREffect::Slot32() {
|
||||
void CEZ2STREffectEx::Slot32() {
|
||||
this->alternateRender = 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x006FFF90
|
||||
// FUNCTION: fn_06977
|
||||
void CEZ2STREffect::Slot14(int argument) {
|
||||
void CEZ2STREffectEx::Slot14(int argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3F98 = argument;
|
||||
}
|
||||
|
|
@ -447,7 +447,7 @@ void CEZ2STREffect::Slot14(int argument) {
|
|||
|
||||
// OFFSET: 0x006FFFB0
|
||||
// FUNCTION: fn_06978
|
||||
void CEZ2STREffect::Slot17(float argument) {
|
||||
void CEZ2STREffectEx::Slot17(float argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FA4 = argument;
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ void CEZ2STREffect::Slot17(float argument) {
|
|||
|
||||
// OFFSET: 0x006FFFD0
|
||||
// FUNCTION: fn_06979
|
||||
void CEZ2STREffect::Slot18(float argument) {
|
||||
void CEZ2STREffectEx::Slot18(float argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FA8 = argument;
|
||||
}
|
||||
|
|
@ -463,7 +463,7 @@ void CEZ2STREffect::Slot18(float argument) {
|
|||
|
||||
// OFFSET: 0x006FFFF0
|
||||
// FUNCTION: fn_06980
|
||||
void CEZ2STREffect::Slot19(float argument) {
|
||||
void CEZ2STREffectEx::Slot19(float argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FAC = argument;
|
||||
}
|
||||
|
|
@ -471,7 +471,7 @@ void CEZ2STREffect::Slot19(float argument) {
|
|||
|
||||
// OFFSET: 0x00700010
|
||||
// FUNCTION: fn_06981
|
||||
void CEZ2STREffect::Slot22(float argument) {
|
||||
void CEZ2STREffectEx::Slot22(float argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->unknown_3FB0 = argument;
|
||||
}
|
||||
|
|
@ -479,7 +479,7 @@ void CEZ2STREffect::Slot22(float argument) {
|
|||
|
||||
// OFFSET: 0x00700030
|
||||
// FUNCTION: fn_06982
|
||||
void CEZ2STREffect::Slot16(int argument) {
|
||||
void CEZ2STREffectEx::Slot16(int argument) {
|
||||
if (this->emitter) {
|
||||
this->emitter->duration = argument;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTRESOURCESWITCHER_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_EFFECTRESOURCESWITCHER_H
|
||||
|
||||
#include "Contents/Effects/EZ2STREffectEx.h"
|
||||
#include "Contents/Effects/Effect.h"
|
||||
#include "Contents/Effects/EffectEmitter.h"
|
||||
#include "Utility/Math/Vector3d.h"
|
||||
|
|
@ -51,38 +52,11 @@ public:
|
|||
bool Load();
|
||||
};
|
||||
|
||||
class CEZ2STREffect : public CEffect {
|
||||
public:
|
||||
/* 00CC */ EZ2STREmitter* emitter;
|
||||
/* 00D0 */ unsigned char timed;
|
||||
/* 00D1 */ unsigned char unknown_00D1[3];
|
||||
/* 00D4 */ int frameStep;
|
||||
/* 00D8 */ unsigned char alternateRender;
|
||||
|
||||
void Slot01() override;
|
||||
void Slot03() override;
|
||||
void Slot04() override;
|
||||
bool Slot06() override;
|
||||
void Slot14(int argument) override;
|
||||
void Slot16(int argument) override;
|
||||
void Slot17(float argument) override;
|
||||
void Slot18(float argument) override;
|
||||
void Slot19(float argument) override;
|
||||
void Slot22(float argument) override;
|
||||
void Slot23(float argument) override;
|
||||
void Slot26(int argument) override;
|
||||
void Slot27(int argument) override;
|
||||
void Slot32() override;
|
||||
|
||||
bool IsFinished();
|
||||
void EndLoop(unsigned char fadeOut);
|
||||
};
|
||||
|
||||
class EffectResourceSwitcher : public CEffect {
|
||||
public:
|
||||
/* 00CC */ unsigned char active;
|
||||
/* 00CD */ unsigned char unknown_00CD[3];
|
||||
/* 00D0 */ CEZ2STREffect* effect;
|
||||
/* 00D0 */ CEZ2STREffectEx* effect;
|
||||
/* 00D4 */ vector3d spawnPosition;
|
||||
/* 00E0 */ std::string sourceName;
|
||||
/* 00F8 */ std::string targetName;
|
||||
|
|
@ -114,7 +88,6 @@ static_assert(offsetof(EZ2STREmitter, looping) == 0x3F5C);
|
|||
static_assert(offsetof(EZ2STREmitter, unknown_3F98) == 0x3F98);
|
||||
static_assert(offsetof(EZ2STREmitter, remainingTime) == 0x3FB4);
|
||||
static_assert(offsetof(EZ2STREmitter, unknown_3FE9) == 0x3FE9);
|
||||
static_assert(offsetof(CEZ2STREffect, alternateRender) == 0xD8);
|
||||
static_assert(offsetof(EffectResourceSwitcher, effect) == 0xD0);
|
||||
static_assert(offsetof(EffectResourceSwitcher, targetName) == 0xF8);
|
||||
static_assert(sizeof(EffectResourceSwitcher) == 0x110);
|
||||
|
|
|
|||
|
|
@ -150,6 +150,6 @@ void CCartCannon::Slot04() {
|
|||
|
||||
// OFFSET: 0x006FB0E0
|
||||
// FUNCTION: fn_06901
|
||||
void CCartCannon::SetDelay(int delay) {
|
||||
void CCartCannon::Slot16(int delay) {
|
||||
this->delay = delay;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public:
|
|||
void Close() override;
|
||||
bool Slot06() override;
|
||||
|
||||
void SetDelay(int delay);
|
||||
void Slot16(int delay) override;
|
||||
|
||||
/* 00CC */ CEZ2STRParticle* particle;
|
||||
/* 00D0 */ int currentStep;
|
||||
|
|
|
|||
|
|
@ -8,22 +8,22 @@
|
|||
|
||||
// OFFSET: 0x006FF480
|
||||
// FUNCTION: fn_06962
|
||||
CEZ2STREffectEx::CEZ2STREffectEx() : CEffect(-1), particle(nullptr), finished(0), unknown_00D4(0), unknown_00D8(0) {
|
||||
CEZ2STREffectEx::CEZ2STREffectEx() : CEffect(-1), emitter(nullptr), timed(0), frameStep(0), alternateRender(0) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x006FF740
|
||||
// FUNCTION: fn_06964
|
||||
void CEZ2STREffectEx::Close() {
|
||||
if (this->particle) {
|
||||
FreeParticle(this->particle);
|
||||
this->particle = nullptr;
|
||||
if (this->emitter) {
|
||||
FreeParticle(reinterpret_cast<CParticle*>(this->emitter));
|
||||
this->emitter = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x006FF770
|
||||
// FUNCTION: fn_06965
|
||||
void CEZ2STREffectEx::Slot31() {
|
||||
this->finished = 1;
|
||||
this->timed = 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x006FF780
|
||||
|
|
|
|||
|
|
@ -5,25 +5,43 @@
|
|||
|
||||
#include <cstddef>
|
||||
|
||||
class CParticle;
|
||||
struct EZ2STREmitter;
|
||||
|
||||
class CEZ2STREffectEx : public CEffect {
|
||||
public:
|
||||
CEZ2STREffectEx();
|
||||
void Slot01() override;
|
||||
void Slot03() override;
|
||||
void Slot04() override;
|
||||
void Close() override;
|
||||
bool Slot06() override;
|
||||
void Slot14(int argument) override;
|
||||
void Slot16(int argument) override;
|
||||
void Slot17(float argument) override;
|
||||
void Slot18(float argument) override;
|
||||
void Slot19(float argument) override;
|
||||
void Slot22(float argument) override;
|
||||
void Slot23(float argument) override;
|
||||
void Slot26(int argument) override;
|
||||
void Slot27(int argument) override;
|
||||
void Slot31() override;
|
||||
void Slot32() override;
|
||||
|
||||
/* 00CC */ CParticle* particle;
|
||||
/* 00D0 */ unsigned char finished;
|
||||
/* 00D4 */ int unknown_00D4;
|
||||
/* 00D8 */ unsigned char unknown_00D8;
|
||||
bool IsFinished();
|
||||
void EndLoop(unsigned char fadeOut);
|
||||
|
||||
/* 00CC */ EZ2STREmitter* emitter;
|
||||
/* 00D0 */ unsigned char timed;
|
||||
/* 00D1 */ unsigned char unknown_00D1[3];
|
||||
/* 00D4 */ int frameStep;
|
||||
/* 00D8 */ unsigned char alternateRender;
|
||||
};
|
||||
|
||||
float ScreenAngle(const float* from, const float* to, const float* matrix);
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(offsetof(CEZ2STREffectEx, particle) == 0xCC);
|
||||
static_assert(offsetof(CEZ2STREffectEx, unknown_00D8) == 0xD8);
|
||||
static_assert(offsetof(CEZ2STREffectEx, emitter) == 0xCC);
|
||||
static_assert(offsetof(CEZ2STREffectEx, alternateRender) == 0xD8);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,13 +15,9 @@ EffectActor::EffectActor() {
|
|||
this->render.unknown_0130[0] = 0;
|
||||
}
|
||||
|
||||
struct CAbleToMakeEffect : EffectActor {
|
||||
~CAbleToMakeEffect() override;
|
||||
};
|
||||
|
||||
// OFFSET: 0x00CA8C40
|
||||
// FUNCTION: fn_20993
|
||||
CAbleToMakeEffect::~CAbleToMakeEffect() {
|
||||
EffectActor::~EffectActor() {
|
||||
if (!this->state.effects.empty()) {
|
||||
for (std::list<CRagEffect*>::iterator it = this->state.effects.begin(); it != this->state.effects.end(); ++it) {
|
||||
if (*it) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ struct EffectActorState {
|
|||
|
||||
struct EffectActor : CRenderObject {
|
||||
EffectActor();
|
||||
~EffectActor() override;
|
||||
void SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m) override;
|
||||
bool EffectVisible() const;
|
||||
bool HasId(int id) const;
|
||||
|
|
|
|||
|
|
@ -328,6 +328,10 @@ public:
|
|||
void Slot03() override;
|
||||
void Slot04() override;
|
||||
void Close() override;
|
||||
// INLINED
|
||||
bool Slot06() override {
|
||||
return this->active;
|
||||
}
|
||||
|
||||
/* 00CC */ bool active;
|
||||
/* 00CD */ unsigned char unknown_00CD[3];
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int CRollingCutterRagEffect::GetDuration() {
|
|||
|
||||
// OFFSET: 0x00612010
|
||||
// FUNCTION: fn_04339
|
||||
int CRagEffect::Slot13() {
|
||||
std::uint32_t CRagEffect::Slot13() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ struct CRagEffect : CRenderObject {
|
|||
void TorchDust(char kind);
|
||||
|
||||
void Render(int argument) override;
|
||||
virtual int Slot13();
|
||||
std::uint32_t Slot13() override;
|
||||
virtual bool Slot14();
|
||||
virtual bool Slot15();
|
||||
virtual void SendMsg(CGameObject* sender, int message, int first, std::int64_t second, int third, int fourth, int fifth, int sixth);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void CRectUpEffect::Close() {
|
|||
|
||||
// OFFSET: 0x0070A260
|
||||
// FUNCTION: fn_07099
|
||||
void CRectUpEffect::Slot02() {
|
||||
void CRectUpEffect::Slot01() {
|
||||
if (this->id != 1088) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class CRectUpEffect : public CEffect {
|
|||
public:
|
||||
CRectUpEffect();
|
||||
|
||||
void Slot02() override;
|
||||
void Slot01() override;
|
||||
void Slot03() override;
|
||||
void Slot04() override;
|
||||
void Close() override;
|
||||
|
|
|
|||
|
|
@ -368,6 +368,11 @@ bool GroundGeometry::Ground15Slot10() {
|
|||
return true;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AC3080
|
||||
// FUNCTION: fn_17598
|
||||
void GroundGeometry::Ground15Slot15(float, int, int) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AC1530
|
||||
// FUNCTION: fn_17584
|
||||
bool GroundGeometry::Slot10() {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public:
|
|||
void Slot09(int first, int second, int third, int fourth);
|
||||
bool Slot10();
|
||||
bool Ground15Slot10();
|
||||
void Ground15Slot15(float alpha, int x, int y);
|
||||
void Slot11();
|
||||
int Slot12(int first, int second, int third, int fourth, int fifth) const;
|
||||
void Slot14(int first, int second, int third, int fourth);
|
||||
|
|
|
|||
|
|
@ -2195,7 +2195,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEnumVar() {
|
|||
if (state == nullptr) {
|
||||
return;
|
||||
}
|
||||
const char* name = "EnumVar";
|
||||
const char* name = "EnumVAR";
|
||||
lua_getfield(state, LUA_GLOBALSINDEX, name);
|
||||
if (lua_type(state, -1) == LUA_TTABLE) {
|
||||
lua_pushnil(state);
|
||||
|
|
|
|||
|
|
@ -1103,7 +1103,7 @@ void UIMessengerGroupWnd::Slot26(int, int) {
|
|||
|
||||
// OFFSET: 0x0073D460
|
||||
// FUNCTION: fn_07713
|
||||
void UIMessengerGroupWnd::Slot25(int x, int y) {
|
||||
void UIMessengerGroupWnd::Slot33(int x, int y) {
|
||||
if (g_session.m_lockMouse) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1121,7 +1121,7 @@ void UIMessengerGroupWnd::Slot25(int x, int y) {
|
|||
|
||||
// OFFSET: 0x0073CD60
|
||||
// FUNCTION: fn_07709
|
||||
void UIMessengerGroupWnd::Slot33(int x, int y) {
|
||||
void UIMessengerGroupWnd::Slot25(int x, int y) {
|
||||
if (y < 17) {
|
||||
UIFrameWnd::Slot33(x, y);
|
||||
if (UIWindow* window = this->CompanionWindow()) {
|
||||
|
|
|
|||
|
|
@ -270,15 +270,15 @@ void CSignBoardWnd::Slot15(int width, int height) {
|
|||
// OFFSET: 0x00821C50
|
||||
// FUNCTION: fn_10265
|
||||
void CBmpObjWnd::Paint() {
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(this->path.c_str()))), false);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->path.c_str()))), false);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00821C90
|
||||
// FUNCTION: fn_10266
|
||||
void CSignBoardWnd::Paint() {
|
||||
this->ClearSurface(0xFFFF00FF);
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\signboard\\bg_signboard.bmp"))), false);
|
||||
this->DrawBitmap(5, 5, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(this->iconPath.c_str()))), true);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\signboard\\bg_signboard.bmp"))), false);
|
||||
this->DrawBitmap(5, 5, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->iconPath.c_str()))), true);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00821D10
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "Contents/Actors/Npc.h"
|
||||
#include "Contents/Actors/Pc.h"
|
||||
#include "Contents/Effects/MsgEffect.h"
|
||||
#include "Contents/Ground/GroundGeometry.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Contents/MapSkyMgr.h"
|
||||
#include "Contents/Sound/SoundMgr.h"
|
||||
|
|
@ -509,9 +510,7 @@ bool CGndRiser::OnProcess() {
|
|||
alpha = -(frame * frame) / 25.0f;
|
||||
}
|
||||
|
||||
using GroundSlot15 = void(__thiscall*)(GroundGeometry*, float, int, int);
|
||||
GroundGeometry* ground = mode->scene->ground;
|
||||
reinterpret_cast<GroundSlot15>((*reinterpret_cast<void***>(ground))[15])(ground, alpha, this->screenX, this->screenY);
|
||||
mode->scene->ground->Ground15Slot15(alpha, this->screenX, this->screenY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -205,13 +205,9 @@ void CWorld::InitWorld() {
|
|||
}
|
||||
|
||||
this->ground = new GroundGeometry();
|
||||
void** groundVtbl = *reinterpret_cast<void***>(this->ground);
|
||||
reinterpret_cast<void (__thiscall *)(GroundGeometry*, CGndRes*, const float*, const float*, const float*)>(groundVtbl[2])(
|
||||
this->ground, groundRes, g_worldLightDirection, g_worldDiffuse, g_worldAmbient
|
||||
);
|
||||
*reinterpret_cast<C3dAttr**>(reinterpret_cast<char*>(this->ground) + 4) = this->terrain;
|
||||
this->ground->Build(*groundRes, g_worldLightDirection, g_worldDiffuse, g_worldAmbient);
|
||||
|
||||
reinterpret_cast<GroundWaterState*>(this->ground)->Set(
|
||||
this->ground->water.Set(
|
||||
worldRes->waterLevel,
|
||||
worldRes->waterType,
|
||||
worldRes->waterAnimation,
|
||||
|
|
@ -220,7 +216,7 @@ void CWorld::InitWorld() {
|
|||
worldRes->waveHeight
|
||||
);
|
||||
|
||||
reinterpret_cast<void (__thiscall *)(GroundGeometry*, CGndRes*)>(groundVtbl[13])(this->ground, groundRes);
|
||||
this->ground->water.Import(*groundRes);
|
||||
|
||||
ResourceMgr::Instance().Remove(groundRes);
|
||||
|
||||
|
|
@ -274,7 +270,7 @@ void CWorld::InitWorld() {
|
|||
this->InitializeSpatial();
|
||||
this->LoadMapEffects();
|
||||
|
||||
reinterpret_cast<void (__thiscall *)(GroundGeometry*)>(groundVtbl[11])(this->ground);
|
||||
this->ground->InitializeLighting(*this->terrain);
|
||||
|
||||
this->published = static_cast<int>(this->models.size());
|
||||
|
||||
|
|
|
|||
|
|
@ -194,9 +194,7 @@ void CView::Render() {
|
|||
model->renderFrame = g_renderer->frame;
|
||||
}
|
||||
|
||||
void** groundVtable = *reinterpret_cast<void***>((*node)->ground);
|
||||
reinterpret_cast<void(__thiscall*)(void*, const float*, const int*, bool)>(groundVtable[6])(
|
||||
(*node)->ground, matrix, (*node)->groundCells, true);
|
||||
(*node)->ground->DrawLit(matrix, (*node)->groundCells, true);
|
||||
|
||||
if (g_visibleMinX > (*node)->groundCells[0]) {
|
||||
g_visibleMinX = (*node)->groundCells[0];
|
||||
|
|
@ -229,9 +227,7 @@ void CView::Render() {
|
|||
}
|
||||
}
|
||||
|
||||
void** groundVtable = *reinterpret_cast<void***>((*node)->ground);
|
||||
reinterpret_cast<void(__thiscall*)(void*, const float*, const int*, bool)>(groundVtable[6])(
|
||||
(*node)->ground, matrix, (*node)->groundCells, false);
|
||||
(*node)->ground->DrawLit(matrix, (*node)->groundCells, false);
|
||||
|
||||
if (g_visibleMinY > (*node)->groundCells[1]) {
|
||||
g_visibleMinY = (*node)->groundCells[1];
|
||||
|
|
@ -252,15 +248,12 @@ void CView::Render() {
|
|||
|
||||
g_navigationManager.DrawRoute(matrix);
|
||||
|
||||
void** sceneGroundVtable = *reinterpret_cast<void***>(this->scene->ground);
|
||||
if (g_groundOverlaySkip == 0) {
|
||||
reinterpret_cast<void(__thiscall*)(void*, const float*, int, int, int)>(sceneGroundVtable[14])(
|
||||
this->scene->ground, matrix, g_groundOverlayA, g_groundOverlayB, g_groundOverlayC);
|
||||
this->scene->ground->DrawGrid(*this->scene->terrain, matrix, g_groundOverlayA, g_groundOverlayB, g_groundOverlayC);
|
||||
}
|
||||
|
||||
if (g_session.unknown_5614 != 0 && g_session.unknown_5600 != 0 && g_session.unknown_5604 != 0) {
|
||||
reinterpret_cast<void(__thiscall*)(void*, const float*, int, int, int)>(sceneGroundVtable[14])(
|
||||
this->scene->ground, matrix, g_session.unknown_5600, g_session.unknown_5604, 0xfeff0000);
|
||||
this->scene->ground->DrawGrid(*this->scene->terrain, matrix, g_session.unknown_5600, g_session.unknown_5604, 0xfeff0000);
|
||||
}
|
||||
|
||||
for (auto it = this->scene->objects.begin(); it != this->scene->objects.end(); ++it) {
|
||||
|
|
@ -283,5 +276,5 @@ void CView::Render() {
|
|||
this->spatial.inside.clear();
|
||||
this->spatial.clipped.clear();
|
||||
|
||||
reinterpret_cast<void(__thiscall*)(void*, const float*)>(sceneGroundVtable[4])(this->scene->ground, matrix);
|
||||
this->scene->ground->Ground15Slot04(reinterpret_cast<int>(matrix));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -579,10 +579,12 @@ CMsgEffect* CGameMode::SpawnCashEmotion(int aid, int packId, int emotionId, std:
|
|||
CMsgEffect* effect = nullptr;
|
||||
|
||||
if (data) {
|
||||
std::string sprite;
|
||||
std::string pack;
|
||||
sprite = g_cashEmotionMgr->GetSprFileName(data->actId);
|
||||
pack = g_cashEmotionMgr->GetPackName(data->sprId);
|
||||
struct {
|
||||
std::string sprite;
|
||||
std::string action;
|
||||
} names;
|
||||
names.sprite = g_cashEmotionMgr->GetSprFileName(data->actId);
|
||||
names.action = g_cashEmotionMgr->GetPackName(data->sprId);
|
||||
|
||||
effect = new (std::nothrow) CMsgEffect;
|
||||
if (effect) {
|
||||
|
|
@ -591,7 +593,7 @@ CMsgEffect* CGameMode::SpawnCashEmotion(int aid, int packId, int emotionId, std:
|
|||
}
|
||||
|
||||
effect->SendMsg(nullptr, 22, 0, duration, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
effect->SendMsg(nullptr, 14, 0, aid, aid >> 31, reinterpret_cast<int>(&sprite), reinterpret_cast<int>(&sprite) >> 31, data->unknown_0020,
|
||||
effect->SendMsg(nullptr, 14, 0, aid, aid >> 31, reinterpret_cast<int>(&names), reinterpret_cast<int>(&names) >> 31, data->unknown_0020,
|
||||
data->unknown_0020 >> 31, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "Client/Input/Mouse.h"
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Contents/Camera/Camera.h"
|
||||
#include "Contents/World/World.h"
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
bool CGameMode::PickScreenTerrain(int& column, int& row) {
|
||||
WorldRayQuery query;
|
||||
float ray[6]{};
|
||||
g_renderer->viewport.Ray(g_screenWidth, g_screenHeight, this->camera->frame.eye, this->camera->frame.inverse.values, ray);
|
||||
g_renderer->viewport.Ray(g_mouse.x, g_mouse.y, this->camera->frame.eye, this->camera->frame.inverse.values, ray);
|
||||
query.Collect(ray, &this->scene->spatial);
|
||||
float nearest = 999999.0f;
|
||||
float result = nearest;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "Network/Connection/PacketQueue.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <winsock2.h>
|
||||
|
||||
class PacketLengths;
|
||||
|
|
@ -69,6 +70,8 @@ private:
|
|||
CRagConnection& GetRagConnection();
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(offsetof(ConnectionEndpoint, port) == 0x10);
|
||||
static_assert(offsetof(ConnectionEndpoint, overrideAddress) == 0x14);
|
||||
static_assert(sizeof(CConnection) == 0x6C);
|
||||
static_assert(sizeof(CRagConnection) == 0x70);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void CRendererDX9::DrawBaseQueue() {
|
|||
// FUNCTION: fn_02226
|
||||
void CRendererDX9::DrawGroundQueues(RenderQueues& queues) {
|
||||
ScopedDeviceStateDX9 restore(this->device->state);
|
||||
this->device->state.SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFFu);
|
||||
this->device->state.SetRenderState(D3DRS_AMBIENT, 0xFFFFFFFFu);
|
||||
this->device->state.SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
|
||||
|
||||
if (g_serviceOptions.Get(119) != 0) {
|
||||
|
|
@ -81,6 +81,6 @@ void CRendererDX9::DrawGroundQueues(RenderQueues& queues) {
|
|||
this->DrawBaseQueue();
|
||||
}
|
||||
|
||||
this->device->state.SetRenderState(D3DRS_COLORWRITEENABLE, 0);
|
||||
this->device->state.SetRenderState(D3DRS_AMBIENT, 0);
|
||||
this->device->state.SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,3 +86,11 @@ void CWave::Unload() {
|
|||
void RegisterWaveResource(ResourceMgr& resourceMgr, CWave& prototype) {
|
||||
resourceMgr.Register("wav", "wav\\", &prototype);
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CWave::CWave(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_24585
|
||||
CWave g_wavePrototype("wav", "wav\\");
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ class ResourceMgr;
|
|||
class CWave : public CRes {
|
||||
public:
|
||||
CWave();
|
||||
CWave(const char* extension, const char* prefix);
|
||||
~CWave() override;
|
||||
CWave* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "File/File.h"
|
||||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <windows.h>
|
||||
|
|
@ -66,3 +67,20 @@ bool CBitmapRes::Decode(const char* name, const void* data, int bytes, bool icon
|
|||
ShowErrorDialog("Unsupport fileformat!", 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CBitmapRes::CBitmapRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25549
|
||||
CBitmapRes g_tgaPrototype("tga", "texture\\");
|
||||
|
||||
// GLOBAL: gl_25550
|
||||
CBitmapRes g_jpgPrototype("jpg", "texture\\");
|
||||
|
||||
// GLOBAL: gl_25551
|
||||
CBitmapRes g_pngPrototype("png", "texture\\");
|
||||
|
||||
// GLOBAL: gl_25552
|
||||
CBitmapRes g_bmpPrototype("bmp", "texture\\");
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ protected:
|
|||
class CBitmapRes : public CRes {
|
||||
public:
|
||||
CBitmapRes();
|
||||
CBitmapRes(const char* extension, const char* prefix);
|
||||
~CBitmapRes() override;
|
||||
CBitmapRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/EZeffectResource.h"
|
||||
#include "Render/Textures/TextureCache.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <format>
|
||||
|
|
@ -141,3 +142,11 @@ CTexture* EZeffectClip::Texture(int index, const char* prefix) {
|
|||
|
||||
return this->textures[index];
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CEZeffectRes::CEZeffectRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25555
|
||||
CEZeffectRes g_strPrototype("str", "texture\\effect\\");
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct EZeffectClip {
|
|||
class CEZeffectRes : public CRes {
|
||||
public:
|
||||
CEZeffectRes();
|
||||
CEZeffectRes(const char* extension, const char* prefix);
|
||||
~CEZeffectRes() override;
|
||||
CEZeffectRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "Contents/GuildMgr.h"
|
||||
#include "File/File.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
@ -70,3 +71,11 @@ void CEmblemRes::MissingFile(CRenderSystemBase*, const char*) {
|
|||
// FUNCTION: fn_07887
|
||||
CEmblemRes::CEmblemRes() : CRes(), gif() {
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CEmblemRes::CEmblemRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25554
|
||||
CEmblemRes g_ebmPrototype("ebm", "..\\_tmpEmblem\\");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
class CEmblemRes : public CRes {
|
||||
public:
|
||||
CEmblemRes();
|
||||
CEmblemRes(const char* extension, const char* prefix);
|
||||
~CEmblemRes() override;
|
||||
void Slot02() override;
|
||||
bool IsTransient() override;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "File/File.h"
|
||||
#include "Resource/GifLzw.h"
|
||||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
|
@ -390,3 +391,11 @@ bool CGifRes::DecodeGif(const void* data, int bytes, bool iconOnly) {
|
|||
delete[] globalPalette;
|
||||
return false;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CGifRes::CGifRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25553
|
||||
CGifRes g_gifPrototype("gif", "texture\\");
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ public:
|
|||
using Frame = std::pair<std::uint16_t, std::uint32_t*>;
|
||||
|
||||
CGifRes();
|
||||
CGifRes(const char* extension, const char* prefix);
|
||||
~CGifRes() override;
|
||||
void Slot02() override;
|
||||
bool IsTransient() override;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "Resource/ImfResource.h"
|
||||
#include "File/File.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
// INLINED
|
||||
CImfRes::CImfRes() {
|
||||
|
|
@ -71,3 +72,11 @@ bool CImfRes::Load(const char* name) {
|
|||
file.Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CImfRes::CImfRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25557
|
||||
CImfRes g_imfPrototype("imf", "imf\\");
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ struct ImfData {
|
|||
class CImfRes : public CRes {
|
||||
public:
|
||||
CImfRes();
|
||||
CImfRes(const char* extension, const char* prefix);
|
||||
CImfRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "Resource/Models/GrannyModelResource.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
#include "Resource/ResourceByteReader.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
|
@ -266,6 +267,12 @@ C3dGrannyModelRes* C3dGrannyModelRes::Create() {
|
|||
return new C3dGrannyModelRes;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00753610
|
||||
// FUNCTION: fn_07962
|
||||
void C3dGrannyModelRes::Unload() {
|
||||
this->Release();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00753620
|
||||
// FUNCTION: fn_07963
|
||||
bool C3dGrannyModelRes::Load(const char* name) {
|
||||
|
|
@ -375,3 +382,19 @@ bool C3dGrannyModelRes::Load(const char* name) {
|
|||
file.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
C3dAnimModelRes::C3dAnimModelRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25558
|
||||
C3dAnimModelRes g_rsxPrototype("rsx", "model\\");
|
||||
|
||||
// INLINED
|
||||
C3dGrannyModelRes::C3dGrannyModelRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25559
|
||||
C3dGrannyModelRes g_gr2Prototype("gr2", "model\\3dmob\\");
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ private:
|
|||
class C3dAnimModelRes : public CRes {
|
||||
public:
|
||||
C3dAnimModelRes();
|
||||
C3dAnimModelRes(const char* extension, const char* prefix);
|
||||
~C3dAnimModelRes() override;
|
||||
C3dAnimModelRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,9 @@ struct GrannyHairPivot {
|
|||
class C3dGrannyModelRes : public CRes {
|
||||
public:
|
||||
C3dGrannyModelRes();
|
||||
C3dGrannyModelRes(const char* extension, const char* prefix);
|
||||
C3dGrannyModelRes* Create() override;
|
||||
void Unload() override;
|
||||
bool Load(const char* name) override;
|
||||
void RebindMeshes(const C3dGrannyModelRes& target);
|
||||
void InstantiateModel(GrannyModelInstance* target, const granny_model* model);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "Resource/Models/GrannyModelResource.h"
|
||||
#include "Resource/Models/ModelResource.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
|
@ -1048,3 +1049,11 @@ void C3dGrannyModelRes::Release() {
|
|||
delete this->instance;
|
||||
this->instance = nullptr;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
C3dModelResV1::C3dModelResV1(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25560
|
||||
C3dModelResV1 g_rsmPrototype("rsm", "model\\");
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ public:
|
|||
class C3dModelResV1 : public C3dModelRes {
|
||||
public:
|
||||
C3dModelResV1();
|
||||
C3dModelResV1(const char* extension, const char* prefix);
|
||||
~C3dModelResV1() override;
|
||||
C3dModelResV1* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
@ -132,6 +133,7 @@ private:
|
|||
class C3dModelResV2 : public C3dModelRes {
|
||||
public:
|
||||
C3dModelResV2();
|
||||
C3dModelResV2(const char* extension, const char* prefix);
|
||||
~C3dModelResV2() override;
|
||||
C3dModelResV2* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "Render/Textures/TextureCache.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
#include "Resource/Models/ModelResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
|
@ -469,3 +470,11 @@ void C3dModelResV2::ReadVersion3(CFile& input) {
|
|||
this->volumes.push_back(volume);
|
||||
}
|
||||
}
|
||||
|
||||
// INLINED
|
||||
C3dModelResV2::C3dModelResV2(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25561
|
||||
C3dModelResV2 g_rsm2Prototype("rsm2", "model\\");
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "File/File.h"
|
||||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/Sprites/SpriteResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
@ -40,3 +41,11 @@ bool CPaletteRes::Load(const char* name) {
|
|||
// FUNCTION: fn_08041
|
||||
void CPaletteRes::Unload() {
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CPaletteRes::CPaletteRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25562
|
||||
CPaletteRes g_palPrototype("pal", "palette\\");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
class CPaletteRes : public CRes {
|
||||
public:
|
||||
CPaletteRes();
|
||||
CPaletteRes(const char* extension, const char* prefix);
|
||||
~CPaletteRes() override;
|
||||
CPaletteRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "File/File.h"
|
||||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Utility/Tokenizer.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <strstream>
|
||||
|
|
@ -100,3 +101,11 @@ void CRmaRes::Unload() {
|
|||
this->models.clear();
|
||||
this->actionModels.clear();
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CRmaRes::CRmaRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25547
|
||||
CRmaRes g_rmaPrototype("rma", "model\\");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ struct RmaAction {
|
|||
class CRmaRes : public CRes {
|
||||
public:
|
||||
CRmaRes();
|
||||
CRmaRes(const char* extension, const char* prefix);
|
||||
~CRmaRes() override;
|
||||
CRmaRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -275,3 +275,11 @@ unsigned CActRes::FrameCount(unsigned animation) const {
|
|||
const auto& frames = this->Animation(animation);
|
||||
return (std::max)(static_cast<unsigned>(frames.size()), 1u);
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CActRes::CActRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25546
|
||||
CActRes g_actPrototype("act", "sprite\\");
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ struct ActionFrame {
|
|||
class CActRes : public CRes {
|
||||
public:
|
||||
CActRes();
|
||||
CActRes(const char* extension, const char* prefix);
|
||||
~CActRes() override;
|
||||
CActRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Render/Textures/TextureCache.h"
|
||||
#include "Resource/ResourcePreload.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
|
@ -208,3 +209,11 @@ void CSprRes::Unload() {
|
|||
this->images[type].erase(this->images[type].begin(), this->images[type].end());
|
||||
}
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CSprRes::CSprRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25563
|
||||
CSprRes g_sprPrototype("spr", "sprite\\");
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class ResourceBytes;
|
|||
class CSprRes : public CRes {
|
||||
public:
|
||||
CSprRes();
|
||||
CSprRes(const char* extension, const char* prefix);
|
||||
~CSprRes() override;
|
||||
CSprRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "Resource/World/GroundResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
|
@ -173,3 +174,11 @@ void CGndRes::Lightmap(int index, unsigned char* output) const {
|
|||
output[66 + 3 * transposed] = blue[pixel];
|
||||
}
|
||||
}
|
||||
|
||||
// INLINED
|
||||
CGndRes::CGndRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25556
|
||||
CGndRes g_gndPrototype("gnd", "");
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ struct GroundLegacyLightmap {
|
|||
class CGndRes : public CRes {
|
||||
public:
|
||||
CGndRes();
|
||||
CGndRes(const char* extension, const char* prefix);
|
||||
~CGndRes() override;
|
||||
CGndRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "File/File.h"
|
||||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/World/TerrainResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
|
@ -76,3 +77,11 @@ void C3dAttr::Unload() {
|
|||
this->width = 0;
|
||||
this->height = 0;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
C3dAttr::C3dAttr(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25548
|
||||
C3dAttr g_gatPrototype("gat", "");
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
class C3dAttr : public CRes {
|
||||
public:
|
||||
C3dAttr();
|
||||
C3dAttr(const char* extension, const char* prefix);
|
||||
~C3dAttr() override;
|
||||
C3dAttr* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "Render/DeviceContext/DCSurface.h"
|
||||
#include "Resource/World/WorldResource.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <compare>
|
||||
#include <cstdio>
|
||||
|
|
@ -374,3 +375,11 @@ bool C3dWorldRes::Load(const char* name) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
C3dWorldRes::C3dWorldRes(const char* extension, const char* prefix) {
|
||||
ResourceMgr::Instance().Register(extension, prefix, this);
|
||||
}
|
||||
|
||||
// GLOBAL: gl_25564
|
||||
C3dWorldRes g_rswPrototype("rsw", "");
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ extern WorldLighting g_worldLighting;
|
|||
class C3dWorldRes : public CRes {
|
||||
public:
|
||||
C3dWorldRes();
|
||||
C3dWorldRes(const char* extension, const char* prefix);
|
||||
~C3dWorldRes() override;
|
||||
C3dWorldRes* Create() override;
|
||||
bool Load(const char* name) override;
|
||||
|
|
|
|||
|
|
@ -4736,8 +4736,8 @@ int UIWhisperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
|
|||
}
|
||||
menu->SendMsg(nullptr, 0x1E, 0, 0, 0, 0);
|
||||
menu->Move(
|
||||
std::min(std::max(g_screenWidth + 1, 1), g_renderer->viewport.width - menu->geometry.width),
|
||||
std::min(std::max(g_screenHeight + 1, 1), g_renderer->viewport.height - menu->geometry.height)
|
||||
std::min(std::max(g_mouse.x + 1, 1), g_renderer->viewport.width - menu->geometry.width),
|
||||
std::min(std::max(g_mouse.y + 1, 1), g_renderer->viewport.height - menu->geometry.height)
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -8994,7 +8994,7 @@ void UIBookWnd::Paint() {
|
|||
void UICardItemIllustWnd::Paint() {
|
||||
this->DrawTitleBar(false, "", 0);
|
||||
if (this->m_bitmapPath.size() != 0) {
|
||||
this->DrawBitmap(0, 17, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(this->m_bitmapPath.c_str()))), false);
|
||||
this->DrawBitmap(0, 17, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->m_bitmapPath.c_str()))), false);
|
||||
}
|
||||
|
||||
ITEM_INFO item;
|
||||
|
|
@ -9461,8 +9461,8 @@ void UISecondPasswordInputWnd::Paint() {
|
|||
// OFFSET: 0x008F2BC0
|
||||
// FUNCTION: fn_12260
|
||||
void UInCashWnd::Paint() {
|
||||
if (const auto* background =
|
||||
reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\NC_BackGround3.bmp")))) {
|
||||
if (auto* background =
|
||||
static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\NC_BackGround3.bmp")))) {
|
||||
this->DrawBitmap(0, 0, background, false);
|
||||
}
|
||||
|
||||
|
|
@ -9553,7 +9553,7 @@ void UIItemCollectionWnd::Paint() {
|
|||
this->DrawSkinBox(FormatOwnedString("유저인터페이스\\sysbox_g%d_", this->m_item.unknown_0088).c_str(), 0, 0, width, bottom, false);
|
||||
this->DrawBitmap(
|
||||
0, 0,
|
||||
reinterpret_cast<const BitmapImage*>(
|
||||
static_cast<CBitmapRes*>(
|
||||
ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\basic_interface\\collection_bg_g%d.bmp", this->m_item.unknown_0088).c_str()))
|
||||
),
|
||||
true
|
||||
|
|
@ -9564,11 +9564,11 @@ void UIItemCollectionWnd::Paint() {
|
|||
background = "유저인터페이스\\basic_interface\\collection_bg.bmp";
|
||||
}
|
||||
if (background != nullptr) {
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(background))), true);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(background))), true);
|
||||
}
|
||||
|
||||
if (this->unknown_01C4.size() != 0) {
|
||||
this->DrawBitmap(10, 11, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(this->unknown_01C4.c_str()))), true);
|
||||
this->DrawBitmap(10, 11, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->unknown_01C4.c_str()))), true);
|
||||
}
|
||||
this->DrawFittedItemName(90, 10, &this->m_item, this->m_item.identified ? 0 : 0x808080, 0, 12, 0);
|
||||
|
||||
|
|
@ -9604,13 +9604,13 @@ void UIItemCollectionWnd::Paint() {
|
|||
for (int x = 4; x < 104; x += 25, ++slot) {
|
||||
const int card = reinterpret_cast<const int*>(this->m_item.unknown_001C)[slot];
|
||||
if (card < 1) {
|
||||
const BitmapImage* bitmap = reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\empty_card_slot.bmp")));
|
||||
CBitmapRes* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\empty_card_slot.bmp")));
|
||||
if (this->m_kind == 234) {
|
||||
const char* name = slot < ItemSlotsCount(this->m_item) ? "유저인터페이스\\basic_interface\\comparison_empty_card_slot.bmp"
|
||||
: "유저인터페이스\\basic_interface\\comparison_disable_card_slot.bmp";
|
||||
bitmap = reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(name)));
|
||||
bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(name)));
|
||||
} else if (ItemSlotsCount(this->m_item) <= slot) {
|
||||
bitmap = reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\disable_card_slot.bmp")));
|
||||
bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\disable_card_slot.bmp")));
|
||||
}
|
||||
this->DrawBitmap(x, y, bitmap, true);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "Utility/Text/FormatString.h"
|
||||
#include "Utility/Text/StringUtil.h"
|
||||
#include "Contents/Items/ItemDescription.h"
|
||||
#include "UI/Window/UIRegisterMgr.h"
|
||||
#include <cstring>
|
||||
#include <format>
|
||||
#include <list>
|
||||
|
|
@ -2195,6 +2196,14 @@ CUIAdventureGuide* CreateAdventureGuide() {
|
|||
return new CUIAdventureGuide();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00487B10
|
||||
// FUNCTION: fn_45546
|
||||
static bool s_registered = [] {
|
||||
std::function<CUIFrameWnd*()> factory = CreateAdventureGuide;
|
||||
Singleton<CUIRegisterMgr>::GetInstance()->Register(10002, factory);
|
||||
return true;
|
||||
}();
|
||||
|
||||
// OFFSET: 0x009DB280
|
||||
// FUNCTION: fn_14306
|
||||
template <>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@ public:
|
|||
void Slot25(int x, int y) override;
|
||||
void Slot28(int x, int y) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
// INLINED
|
||||
void Slot47() override {
|
||||
this->m_hovered = true;
|
||||
this->Invalidate();
|
||||
}
|
||||
// INLINED
|
||||
void Slot48() override {
|
||||
this->m_hovered = false;
|
||||
this->Invalidate();
|
||||
}
|
||||
|
||||
bool SetBitmap(const char* name, int state);
|
||||
void AddText(int id, int height, std::uint32_t color, bool bold, bool unknown, int x, int y);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
// GLOBAL: gl_24606
|
||||
int g_screenHeight;
|
||||
|
||||
// OFFSET: 0x0086EEB0
|
||||
// FUNCTION: fn_11085
|
||||
|
|
@ -2155,26 +2153,26 @@ void UIZeroQuestScrollBar::Paint() {
|
|||
return;
|
||||
}
|
||||
|
||||
const auto* up = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_up.bmp"));
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(up), true);
|
||||
auto* up = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_up.bmp"));
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(up), true);
|
||||
|
||||
const auto* down = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_down.bmp"));
|
||||
this->DrawBitmap(0, this->geometry.height - this->arrowLength, reinterpret_cast<const BitmapImage*>(down), true);
|
||||
auto* down = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_down.bmp"));
|
||||
this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast<CBitmapRes*>(down), true);
|
||||
|
||||
const int extent = this->vertical == 0 ? this->geometry.width : this->geometry.height;
|
||||
int y = this->arrowLength + (this->position * (extent - this->arrowLength * 2 - this->ThumbLength())) / this->maximum;
|
||||
|
||||
const auto* thumbUp = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_up.bmp"));
|
||||
this->DrawBitmap(0, y, reinterpret_cast<const BitmapImage*>(thumbUp), true);
|
||||
auto* thumbUp = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_up.bmp"));
|
||||
this->DrawBitmap(0, y, static_cast<CBitmapRes*>(thumbUp), true);
|
||||
|
||||
const int bottom = y + this->ThumbLength() - 4;
|
||||
for (y += 4; y < bottom; y += 4) {
|
||||
const auto* thumbMiddle = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_mid.bmp"));
|
||||
this->DrawBitmap(0, y, reinterpret_cast<const BitmapImage*>(thumbMiddle), true);
|
||||
auto* thumbMiddle = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_mid.bmp"));
|
||||
this->DrawBitmap(0, y, static_cast<CBitmapRes*>(thumbMiddle), true);
|
||||
}
|
||||
|
||||
const auto* thumbDown = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_down.bmp"));
|
||||
this->DrawBitmap(0, bottom, reinterpret_cast<const BitmapImage*>(thumbDown), true);
|
||||
auto* thumbDown = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_down.bmp"));
|
||||
this->DrawBitmap(0, bottom, static_cast<CBitmapRes*>(thumbDown), true);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00884DD0
|
||||
|
|
@ -3531,7 +3529,7 @@ void UIString::Paint() {
|
|||
if (!res) {
|
||||
return;
|
||||
}
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(res), true);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(res), true);
|
||||
while (cur < end) {
|
||||
cur = ParseColorCode(SegmentEnd(cur, end), color);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
extern int g_screenHeight;
|
||||
extern int g_screenWidth;
|
||||
|
||||
class UITextButton : public UIButton {
|
||||
friend class UITextViewer;
|
||||
|
|
|
|||
|
|
@ -429,10 +429,10 @@ void UICashShopWnd_Item::Slot15(int, int) {
|
|||
// FUNCTION: fn_09539
|
||||
void UICashShopWnd::Paint() {
|
||||
const char* background = this->m_selectedTab == 9 ? "유저인터페이스\\cashshop\\img_shop_bg2.bmp" : "유저인터페이스\\cashshop\\img_shop_bg.bmp";
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve(background))), false);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(background))), false);
|
||||
if (g_session.unknown_5912) {
|
||||
this->DrawBitmap(
|
||||
0x218, 0x11, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_bg3_cover.bmp"))), false
|
||||
0x218, 0x11, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_bg3_cover.bmp"))), false
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +478,7 @@ void UICashShopWnd_Banner::Paint() {
|
|||
|
||||
ResourceMgr& resources = ResourceMgr::Instance();
|
||||
this->DrawBitmap(
|
||||
0, 0, reinterpret_cast<const BitmapImage*>(resources.Load(Resolve(("유저인터페이스\\cashshop\\" + this->m_entries[this->m_index].image).c_str()))),
|
||||
0, 0, static_cast<CBitmapRes*>(resources.Load(Resolve(("유저인터페이스\\cashshop\\" + this->m_entries[this->m_index].image).c_str()))),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
|
@ -487,7 +487,7 @@ void UICashShopWnd_Banner::Paint() {
|
|||
// FUNCTION: fn_09541
|
||||
void UICashShopWnd_Cart::Paint() {
|
||||
ResourceMgr& resources = ResourceMgr::Instance();
|
||||
this->DrawBitmap(0, 0, reinterpret_cast<const BitmapImage*>(resources.Load(Resolve("유저인터페이스\\cashshop\\img_shop_cart_bg.bmp"))), false);
|
||||
this->DrawBitmap(0, 0, static_cast<CBitmapRes*>(resources.Load(Resolve("유저인터페이스\\cashshop\\img_shop_cart_bg.bmp"))), false);
|
||||
|
||||
unsigned int index = this->m_scrollIndex;
|
||||
for (int slot = 0; slot < this->m_visibleCount; ++slot, ++index) {
|
||||
|
|
@ -504,7 +504,7 @@ void UICashShopWnd_Cart::Paint() {
|
|||
// FUNCTION: fn_09542
|
||||
void UICashShopWnd_CartItem::Paint() {
|
||||
this->DrawBitmap(
|
||||
0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg2.bmp"))), false
|
||||
0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg2.bmp"))), false
|
||||
);
|
||||
|
||||
std::string name = this->FitDisplayText(0x70, this->m_item.unknown_0044.c_str(), 0, 0xB, 0);
|
||||
|
|
@ -526,7 +526,7 @@ void UICashShopWnd_CartItem::Paint() {
|
|||
void UICashShopWnd_Item::Paint() {
|
||||
if (this->m_largeLayout == true) {
|
||||
this->DrawBitmap(
|
||||
0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_item_bg2.bmp"))), false
|
||||
0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_item_bg2.bmp"))), false
|
||||
);
|
||||
|
||||
std::string stock;
|
||||
|
|
@ -542,7 +542,7 @@ void UICashShopWnd_Item::Paint() {
|
|||
this->DrawCenteredText(0, 6, name.c_str(), this->geometry.width, 0, 0xC, 0xA44F3B, 1);
|
||||
this->DrawBitmap(
|
||||
5, 0x34,
|
||||
reinterpret_cast<const BitmapImage*>(
|
||||
static_cast<CBitmapRes*>(
|
||||
ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\collection\\%s.bmp", ItemResourcePath(this->m_item)).c_str()))
|
||||
),
|
||||
true
|
||||
|
|
@ -584,7 +584,7 @@ void UICashShopWnd_Item::Paint() {
|
|||
this->DrawTextAt(0x9E - endWidth, 0xAD, endText.c_str(), 0, 0, 0xB, 0, 0, 0);
|
||||
} else {
|
||||
this->DrawBitmap(
|
||||
0, 0, reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg.bmp"))), false
|
||||
0, 0, static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg.bmp"))), false
|
||||
);
|
||||
if (this->m_item.unknown_0000[1] == 0) {
|
||||
return;
|
||||
|
|
@ -594,7 +594,7 @@ void UICashShopWnd_Item::Paint() {
|
|||
this->DrawCenteredText(0, 6, name.c_str(), this->geometry.width, 0, 0xC, 0xA44F3B, 1);
|
||||
this->DrawBitmap(
|
||||
5, 0x17,
|
||||
reinterpret_cast<const BitmapImage*>(
|
||||
static_cast<CBitmapRes*>(
|
||||
ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\collection\\%s.bmp", ItemResourcePath(this->m_item)).c_str()))
|
||||
),
|
||||
true
|
||||
|
|
|
|||
|
|
@ -5140,7 +5140,7 @@ static void AppendReplayRecord(std::vector<unsigned char>& records, const std::v
|
|||
|
||||
// OFFSET: 0x00972E60
|
||||
// FUNCTION: fn_13281
|
||||
std::vector<unsigned char> UIItemPurchaseWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIItemPurchaseWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x50DC, nullptr, 0));
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x50DD, nullptr, 0));
|
||||
|
|
@ -5149,7 +5149,7 @@ std::vector<unsigned char> UIItemPurchaseWnd::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x00972F50
|
||||
// FUNCTION: fn_13282
|
||||
std::vector<unsigned char> UIItemSellWnd2::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIItemSellWnd2::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(20800, nullptr, 0));
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(20802, &this->unknown_00FC, 4));
|
||||
|
|
@ -5159,7 +5159,7 @@ std::vector<unsigned char> UIItemSellWnd2::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x00973080
|
||||
// FUNCTION: fn_13283
|
||||
std::vector<unsigned char> UIItemSellWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIItemSellWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x510E, nullptr, 0));
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x510F, nullptr, 0));
|
||||
|
|
@ -5168,7 +5168,7 @@ std::vector<unsigned char> UIItemSellWnd::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x00973170
|
||||
// FUNCTION: fn_13284
|
||||
std::vector<unsigned char> UIItemStoreWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIItemStoreWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x51A4, nullptr, 0));
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x51A5, nullptr, 0));
|
||||
|
|
@ -5205,7 +5205,7 @@ std::vector<unsigned char> UIParaItemShopWnd::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x009734E0
|
||||
// FUNCTION: fn_13287
|
||||
std::vector<unsigned char> UIMerchantItemShopWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIMerchantItemShopWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
if (this->unknown_010C != 0) {
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(21250, nullptr, 0));
|
||||
|
|
@ -5220,7 +5220,7 @@ std::vector<unsigned char> UIMerchantItemShopWnd::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x00973670
|
||||
// FUNCTION: fn_13288
|
||||
std::vector<unsigned char> UIMerchantMirrorItemWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIMerchantMirrorItemWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x5398, nullptr, 0));
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(0x5399, nullptr, 0));
|
||||
|
|
@ -5229,7 +5229,7 @@ std::vector<unsigned char> UIMerchantMirrorItemWnd::BuildReplayRecords() {
|
|||
|
||||
// OFFSET: 0x00973760
|
||||
// FUNCTION: fn_13289
|
||||
std::vector<unsigned char> UIMerchantShopMakeWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIMerchantShopMakeWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
if (this->mode != 0) {
|
||||
AppendReplayRecord(records, BuildReplayTaggedRecord(21350, nullptr, 0));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "UI/Text/UITextViewerControl.h"
|
||||
#include "UI/Text/UIStaticTextControl.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "UI/Window/UIRegisterMgr.h"
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
|
@ -557,6 +558,14 @@ CUIEnchantUI* CreateEnchantUI() {
|
|||
return new CUIEnchantUI();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00492010
|
||||
// FUNCTION: fn_45547
|
||||
static bool s_registered = [] {
|
||||
std::function<CUIFrameWnd*()> factory = CreateEnchantUI;
|
||||
Singleton<CUIRegisterMgr>::GetInstance()->Register(10006, factory);
|
||||
return true;
|
||||
}();
|
||||
|
||||
namespace EnchantUI {
|
||||
// OFFSET: 0x009FD340
|
||||
// FUNCTION: fn_14823
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
#include "Utility/Text/GroupedInteger.h"
|
||||
#include "UI/Window/UIRegisterMgr.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
|
@ -1300,6 +1301,14 @@ CUIExchangeUI* CreateExchangeUI() {
|
|||
return new CUIExchangeUI();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00493AD0
|
||||
// FUNCTION: fn_45549
|
||||
static bool s_registered = [] {
|
||||
std::function<CUIFrameWnd*()> factory = CreateExchangeUI;
|
||||
Singleton<CUIRegisterMgr>::GetInstance()->Register(10011, factory);
|
||||
return true;
|
||||
}();
|
||||
|
||||
// OFFSET: 0x00A151F0
|
||||
// FUNCTION: fn_15195
|
||||
template <>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "UI/Window/WindowBorder.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Text/StringUtil.h"
|
||||
#include "UI/Window/UIRegisterMgr.h"
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
|
@ -2157,10 +2158,18 @@ void UIWindowMgr::RefreshGameSettingHotkeys() {
|
|||
|
||||
// OFFSET: 0x00A1BF50
|
||||
// FUNCTION: fn_15373
|
||||
UIFrameWnd* CreateGameSettingsUI() {
|
||||
CUIFrameWnd* CreateGameSettingsUI() {
|
||||
return new CUIGameSettingsUI();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00494730
|
||||
// FUNCTION: fn_45545
|
||||
static bool s_registered = [] {
|
||||
std::function<CUIFrameWnd*()> factory = CreateGameSettingsUI;
|
||||
Singleton<CUIRegisterMgr>::GetInstance()->Register(10014, factory);
|
||||
return true;
|
||||
}();
|
||||
|
||||
// OFFSET: 0x00A1BFD0
|
||||
// FUNCTION: fn_15374
|
||||
template <>
|
||||
|
|
|
|||
|
|
@ -1491,11 +1491,11 @@ void UIGuildInfoManageWnd::Paint() {
|
|||
CBitmapRes* online = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(text)));
|
||||
int x;
|
||||
if (g_serviceType == 0) {
|
||||
this->DrawBitmap(128, 95, &online->image, true);
|
||||
this->DrawBitmap(128, 95, online, true);
|
||||
std::sprintf(text, " %d", guild.unknown_0068);
|
||||
x = 138;
|
||||
} else {
|
||||
this->DrawBitmap(width + 16, 95, &online->image, true);
|
||||
this->DrawBitmap(width + 16, 95, online, true);
|
||||
std::sprintf(text, " %d", guild.unknown_0068);
|
||||
this->TextWidth(LookupMessage(330), 0, 0, 12, 0, 0);
|
||||
x = online->image.width + 16 + width;
|
||||
|
|
@ -1520,9 +1520,9 @@ void UIGuildInfoManageWnd::Paint() {
|
|||
this->FillRegion(299, 64, 26, 26, RGB(red, green, blue));
|
||||
{
|
||||
const std::string emblemName = g_guildMgr->GetEmblemFilename(this->m_guildId);
|
||||
CBitmapRes* emblem = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(emblemName));
|
||||
CEmblemRes* emblem = static_cast<CEmblemRes*>(ResourceMgr::Instance().Load(emblemName));
|
||||
if (emblem) {
|
||||
this->DrawBitmap(300, 65, &emblem->image, true);
|
||||
this->DrawBitmap(300, 65, &emblem->gif, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "UI/Guild/UIGuild_Storage_Log.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
#include "Resource/TextureNames.h"
|
||||
#include "UI/Lists/UITabControl.h"
|
||||
|
|
@ -192,8 +193,8 @@ void UIGuild_Storage_Log::Paint() {
|
|||
this->DrawTitleBar(true, LookupMessage(0x9F3), 0);
|
||||
this->DrawPanelBackground(17, 0, "");
|
||||
this->DrawButtonBar(2, 0, 1);
|
||||
const BitmapImage* out = reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\out.bmp")));
|
||||
const BitmapImage* in = reinterpret_cast<const BitmapImage*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\in.bmp")));
|
||||
CBitmapRes* out = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\out.bmp")));
|
||||
CBitmapRes* in = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\in.bmp")));
|
||||
|
||||
for (int tab = 0; tab < static_cast<int>(this->unknown_0158->labels.size()); ++tab) {
|
||||
this->unknown_0158->colors[tab] = 0xFFFFFFFF;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "Resource/SkinPalette.h"
|
||||
#include "Resource/TextureNames.h"
|
||||
#include "UI/Text/UIStaticTextControl.h"
|
||||
#include "UI/Window/UIRegisterMgr.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Text/StringUtil.h"
|
||||
|
|
@ -1089,3 +1090,11 @@ __declspec(noinline) CUIEquipmentPropertiesWnd::CUIEquipmentPropertiesWnd()
|
|||
CUIEquipmentPropertiesWnd* CreateEquipmentPropertiesWnd() {
|
||||
return new CUIEquipmentPropertiesWnd();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00492C70
|
||||
// FUNCTION: fn_45548
|
||||
static bool s_registered = [] {
|
||||
std::function<CUIFrameWnd*()> factory = CreateEquipmentPropertiesWnd;
|
||||
Singleton<CUIRegisterMgr>::GetInstance()->Register(10001, factory);
|
||||
return true;
|
||||
}();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class UIStaticText;
|
|||
|
||||
class UIItemPurchaseWnd : public UIItemBaseWnd {
|
||||
public:
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
UIItemPurchaseWnd();
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot11() override;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class UIStaticText;
|
|||
|
||||
class UIItemSellWnd : public UIItemBaseWnd {
|
||||
public:
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
UIItemSellWnd();
|
||||
void Slot11() override;
|
||||
void Slot25(int x, int y) override;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class UIStaticText;
|
|||
class UIItemSellWnd2 : public UIItemBaseWnd {
|
||||
public:
|
||||
UIItemSellWnd2();
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot11() override;
|
||||
void Paint() override;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class UITab;
|
|||
|
||||
class UIItemStoreWnd : public UIItemBaseWnd {
|
||||
public:
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
UIItemStoreWnd();
|
||||
__declspec(noinline) ~UIItemStoreWnd() override;
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ class UIItemWnd : public UIItemBaseWnd {
|
|||
public:
|
||||
UIItemWnd();
|
||||
__declspec(noinline) ~UIItemWnd() override;
|
||||
// INLINED
|
||||
bool Slot03() override {
|
||||
return true;
|
||||
}
|
||||
void Slot11() override;
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot18() override;
|
||||
|
|
|
|||
|
|
@ -155,14 +155,14 @@ void UIParaResultWnd::Slot10(int x, int y, std::intptr_t value) {
|
|||
|
||||
// OFFSET: 0x009A96C0
|
||||
// FUNCTION: fn_13754
|
||||
void UIParaItemPurchaseWnd::Slot25(int x, int y) {
|
||||
void UIParaResultWnd::Slot25(int x, int y) {
|
||||
if (y < 17) {
|
||||
UIFrameWnd::Slot25(x, y);
|
||||
}
|
||||
|
||||
int previousHovered = this->hovered;
|
||||
this->hovered = this->GetItemIndexAt(x, y);
|
||||
if (previousHovered != this->hovered) {
|
||||
int previousHovered = this->unknown_00F8;
|
||||
this->unknown_00F8 = this->GetItemIndexAt(x, y);
|
||||
if (previousHovered != this->unknown_00F8) {
|
||||
this->Invalidate();
|
||||
}
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ void UIParaResultWnd::Slot28(int x, int y) {
|
|||
|
||||
// OFFSET: 0x009A99C0
|
||||
// FUNCTION: fn_13756
|
||||
void UIParaItemShopWnd::Slot32(int x, int y) {
|
||||
void UIParaResultWnd::Slot32(int x, int y) {
|
||||
const int previousHovered = this->unknown_00F8;
|
||||
this->unknown_00F8 = this->GetItemIndexAt(x, y);
|
||||
if (previousHovered != this->unknown_00F8) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ extern int g_pendingGid;
|
|||
class UIParaItemPurchaseWnd : public UIItemPurchaseWnd {
|
||||
public:
|
||||
UIParaItemPurchaseWnd();
|
||||
void Slot25(int x, int y) override;
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
};
|
||||
|
|
@ -27,7 +26,6 @@ public:
|
|||
UIParaItemShopWnd();
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot32(int x, int y) override;
|
||||
void Paint() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
};
|
||||
|
|
@ -38,7 +36,9 @@ public:
|
|||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
void Slot25(int x, int y) override;
|
||||
void Slot28(int x, int y) override;
|
||||
void Slot32(int x, int y) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
|
||||
void AddItem(const RawItemBasic& item, int quantity);
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ UIItemRepairWnd::~UIItemRepairWnd() = default;
|
|||
|
||||
// OFFSET: 0x009A0280
|
||||
// FUNCTION: fn_13599
|
||||
std::vector<unsigned char> UIItemRepairWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIItemRepairWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(22150, nullptr, 0);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
// OFFSET: 0x009A0490
|
||||
// FUNCTION: fn_13600
|
||||
std::vector<unsigned char> UIMakeTargetListWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIMakeTargetListWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(22050, nullptr, 0);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class UIListBox;
|
|||
class UIMakeTargetListWnd : public UIFrameWnd {
|
||||
public:
|
||||
UIMakeTargetListWnd();
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void UIMakeTargetProcessWnd::Slot10(int x, int y, std::intptr_t value) {
|
|||
|
||||
// OFFSET: 0x009A0690
|
||||
// FUNCTION: fn_13601
|
||||
std::vector<unsigned char> UIMakeTargetProcessWnd::BuildReplayRecords() {
|
||||
std::vector<unsigned char> UIMakeTargetProcessWnd::Slot44() {
|
||||
std::vector<unsigned char> records;
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(22000, nullptr, 0);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public:
|
|||
void Slot15(int width, int height) override;
|
||||
void Slot25(int x, int y) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> BuildReplayRecords();
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
ITEM_INFO GetItemAt(int x, int y);
|
||||
|
||||
/* 00B4 */ int makeType;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue