Restore translation-unit ownership and publish verified source corrections

Owner-authorized source migration: 31 helper-only translation units were merged into their callers or existing inline headers; both build manifests updated. Includes the preserved source payload, Lua configuration matching wowdecomp, and exact malloca expansion without diagnostic pragmas.

449 native units compiled locally and 449 staged units compiled by the pinned server toolchain. No previously byte-matched function regressed. Compiler mapping diagnostics remain recorded as needs_cleanup, not accepted or peer-confirmed. Existing independent review records are preserved. README.md is intentionally unchanged.
This commit is contained in:
ragnarok-clanker 2026-10-25 15:42:21 +00:00
commit e168b4e4a6
326 changed files with 9538 additions and 3481 deletions

View file

@ -7,18 +7,84 @@
#include <zlib.h>
namespace {
std::uint32_t Read32(const std::uint8_t* bytes) {
std::uint32_t value;
std::memcpy(&value, bytes, sizeof(value));
return value;
}
#pragma pack(push, 1)
std::uint64_t Read64(const std::uint8_t* bytes) {
std::uint64_t value;
std::memcpy(&value, bytes, sizeof(value));
return value;
}
struct PakHeaderFile {
/* 0000 */ char signature[16];
/* 0010 */ std::uint8_t unknown_0010[14];
/* 001E */ std::uint32_t tableOffset;
/* 0022 */ std::uint32_t seed;
/* 0026 */ std::uint32_t entryCount;
/* 002A */ std::uint32_t version;
};
struct PakHeaderFile64 {
/* 0000 */ char signature[16];
/* 0010 */ std::uint8_t unknown_0010[14];
/* 001E */ std::uint64_t tableOffset;
/* 0026 */ std::uint32_t entryCount;
/* 002A */ std::uint32_t version;
};
struct PakTableFile {
/* 0000 */ std::uint32_t compressedSize;
/* 0004 */ std::uint32_t originalSize;
};
struct PakTableFileV3 {
/* 0000 */ std::uint32_t auxiliarySize;
/* 0004 */ std::uint32_t compressedSize;
/* 0008 */ std::uint32_t originalSize;
};
struct PakEntryFile {
/* 0000 */ std::uint32_t compressedSize;
/* 0004 */ std::uint32_t alignedSize;
/* 0008 */ std::uint32_t originalSize;
/* 000C */ std::uint8_t flags;
/* 000D */ std::uint32_t dataOffset;
};
struct PakEntryFileV3 {
/* 0000 */ std::uint32_t compressedSize;
/* 0004 */ std::uint32_t alignedSize;
/* 0008 */ std::uint32_t originalSize;
/* 000C */ std::uint8_t flags;
/* 000D */ std::uint64_t dataOffset;
};
struct PakAuxiliaryFile {
/* 0000 */ std::uint8_t version;
/* 0001 */ std::uint8_t unknown_0001[3];
/* 0004 */ std::uint64_t identifier;
};
#pragma pack(pop)
static_assert(sizeof(PakHeaderFile) == 46);
static_assert(offsetof(PakHeaderFile, tableOffset) == 30);
static_assert(offsetof(PakHeaderFile, seed) == 34);
static_assert(offsetof(PakHeaderFile, entryCount) == 38);
static_assert(offsetof(PakHeaderFile, version) == 42);
static_assert(sizeof(PakHeaderFile64) == 46);
static_assert(offsetof(PakHeaderFile64, tableOffset) == 30);
static_assert(offsetof(PakHeaderFile64, entryCount) == 38);
static_assert(offsetof(PakHeaderFile64, version) == 42);
static_assert(sizeof(PakTableFile) == 8);
static_assert(offsetof(PakTableFile, originalSize) == 4);
static_assert(sizeof(PakTableFileV3) == 12);
static_assert(offsetof(PakTableFileV3, compressedSize) == 4);
static_assert(offsetof(PakTableFileV3, originalSize) == 8);
static_assert(sizeof(PakEntryFile) == 17);
static_assert(offsetof(PakEntryFile, flags) == 12);
static_assert(offsetof(PakEntryFile, dataOffset) == 13);
static_assert(sizeof(PakEntryFileV3) == 21);
static_assert(offsetof(PakEntryFileV3, flags) == 12);
static_assert(offsetof(PakEntryFileV3, dataOffset) == 13);
static_assert(sizeof(PakAuxiliaryFile) == 12);
static_assert(offsetof(PakAuxiliaryFile, identifier) == 4);
// INLINED
std::uint8_t SwapNibbles(std::uint8_t byte) {
return static_cast<std::uint8_t>((byte << 4) | (byte >> 4));
}
@ -27,21 +93,23 @@ namespace {
// FUNCTION: fn_05116
std::uint64_t ReadAuxiliaryIdentifier(const void* data, std::size_t size) {
if (size != 0) {
const auto* header = static_cast<const std::uint8_t*>(data);
if (header[0] <= 1) {
return Read64(header + 4);
const auto* bytes = static_cast<const std::uint8_t*>(data);
if (bytes[0] <= 1) {
PakAuxiliaryFile header;
std::memcpy(&header, data, sizeof(header));
return header.identifier;
}
}
return UINT64_MAX;
}
// INLINED
void SortEntries(std::vector<myGPack::PakEntry>& entries) {
std::sort(entries.begin(), entries.end(), [](const auto& first, const auto& second) { return first.name < second.name; });
}
}
// OFFSET: 0x00E555A0
// INLINED
CGPak::CGPak() : m_file(nullptr), m_version(0), m_entryCount(0), m_tableOffset(0), m_tableSize(0) {
this->Reset();
@ -49,9 +117,8 @@ CGPak::CGPak() : m_file(nullptr), m_version(0), m_entryCount(0), m_tableOffset(0
}
// OFFSET: 0x00AE97D0
// FUNCTION: fn_18107
// INLINED
// OFFSET: 0x00AE98C0
// FUNCTION: fn_18107
CGPak::~CGPak() {
DeleteCriticalSection(&this->m_criticalSection);
}
@ -76,15 +143,19 @@ bool CGPak::Open(CPakFile* file) {
}
this->m_file = file;
const std::uint8_t* header = file->Read(0, 46);
if (std::memcmp(header, "Event Horizon", 14) == 0) {
this->m_version = Read32(header + 42);
this->m_entryCount = Read32(header + 38);
this->m_tableOffset = Read64(header + 30) + 46;
} else if (std::memcmp(header, "Master of Magic", 16) == 0) {
this->m_version = Read32(header + 42);
this->m_entryCount = Read32(header + 38) - Read32(header + 34) - 7;
this->m_tableOffset = static_cast<std::uint64_t>(Read32(header + 30)) + 46;
const std::uint8_t* bytes = file->Read(0, sizeof(PakHeaderFile));
if (std::memcmp(bytes, "Event Horizon", 14) == 0) {
PakHeaderFile64 header;
std::memcpy(&header, bytes, sizeof(header));
this->m_version = header.version;
this->m_entryCount = header.entryCount;
this->m_tableOffset = header.tableOffset + sizeof(header);
} else if (std::memcmp(bytes, "Master of Magic", 16) == 0) {
PakHeaderFile header;
std::memcpy(&header, bytes, sizeof(header));
this->m_version = header.version;
this->m_entryCount = header.entryCount - header.seed - 7;
this->m_tableOffset = static_cast<std::uint64_t>(header.tableOffset) + sizeof(header);
} else {
return false;
}
@ -126,8 +197,9 @@ bool CGPak::ReadTableV1() {
std::int32_t legacyKey = 95001;
for (std::uint32_t i = 0; i < this->m_entryCount; ++i) {
std::uint32_t nameSize = Read32(cursor);
cursor += 4;
std::uint32_t nameSize;
std::memcpy(&nameSize, cursor, sizeof(nameSize));
cursor += sizeof(nameSize);
char name[256];
if (this->m_version < 0x101) {
@ -173,13 +245,16 @@ bool CGPak::ReadTableV1() {
}
const std::uint8_t* metadata = cursor + nameSize;
cursor = metadata + 17;
PakEntryFile fileEntry;
std::memcpy(&fileEntry, metadata, sizeof(fileEntry));
cursor = metadata + sizeof(fileEntry);
myGPack::PakEntry& entry = this->m_entries[i];
entry.compressedSize = Read32(metadata) - Read32(metadata + 8) - 715;
entry.alignedSize = Read32(metadata + 4) - 37579;
entry.originalSize = Read32(metadata + 8);
entry.flags = metadata[12];
entry.dataOffset = Read32(metadata + 13);
entry.compressedSize = fileEntry.compressedSize - fileEntry.originalSize - 715;
entry.alignedSize = fileEntry.alignedSize - 37579;
entry.originalSize = fileEntry.originalSize;
entry.flags = fileEntry.flags;
entry.dataOffset = fileEntry.dataOffset;
entry.name.Assign(name);
const char* extension = std::strrchr(name, '.');
@ -199,15 +274,14 @@ bool CGPak::ReadTableV1() {
// OFFSET: 0x00AEC420
// FUNCTION: fn_18134
bool CGPak::ReadTableV2() {
const std::uint8_t* prefix = this->m_file->Read(this->m_tableOffset, 8);
std::uint32_t compressed = Read32(prefix);
std::uint32_t original = Read32(prefix + 4);
this->m_tableSize = compressed + 8;
const std::uint8_t* source = this->m_file->Read(this->m_tableOffset + 8, compressed);
uLongf length = original + 8;
PakTableFile table;
std::memcpy(&table, this->m_file->Read(this->m_tableOffset, sizeof(table)), sizeof(table));
this->m_tableSize = table.compressedSize + sizeof(table);
const std::uint8_t* source = this->m_file->Read(this->m_tableOffset + sizeof(table), table.compressedSize);
uLongf length = table.originalSize + 8;
std::vector<std::uint8_t> decoded(length);
if (uncompress(decoded.data(), &length, source, compressed) != Z_OK) {
if (uncompress(decoded.data(), &length, source, table.compressedSize) != Z_OK) {
return false;
}
@ -218,13 +292,16 @@ bool CGPak::ReadTableV2() {
for (std::uint32_t i = 0; i < this->m_entryCount; ++i) {
const char* name = reinterpret_cast<const char*>(cursor);
const std::uint8_t* metadata = cursor + std::strlen(name) + 1;
cursor = metadata + 17;
PakEntryFile fileEntry;
std::memcpy(&fileEntry, metadata, sizeof(fileEntry));
cursor = metadata + sizeof(fileEntry);
myGPack::PakEntry& entry = this->m_entries[i];
entry.compressedSize = Read32(metadata);
entry.alignedSize = Read32(metadata + 4);
entry.originalSize = Read32(metadata + 8);
entry.flags = metadata[12];
entry.dataOffset = Read32(metadata + 13);
entry.compressedSize = fileEntry.compressedSize;
entry.alignedSize = fileEntry.alignedSize;
entry.originalSize = fileEntry.originalSize;
entry.flags = fileEntry.flags;
entry.dataOffset = fileEntry.dataOffset;
entry.name.Assign(name);
maximum = std::max(maximum, entry.alignedSize);
}
@ -237,16 +314,14 @@ bool CGPak::ReadTableV2() {
// OFFSET: 0x00AEC620
// FUNCTION: fn_18135
bool CGPak::ReadTableV3() {
const std::uint8_t* prefix = this->m_file->Read(this->m_tableOffset, 12);
std::uint32_t extra = Read32(prefix);
std::uint32_t compressed = Read32(prefix + 4);
std::uint32_t original = Read32(prefix + 8);
this->m_tableSize = extra + compressed + 12;
const std::uint8_t* source = this->m_file->Read(this->m_tableOffset + 12, compressed);
uLongf length = original + 8;
PakTableFileV3 table;
std::memcpy(&table, this->m_file->Read(this->m_tableOffset, sizeof(table)), sizeof(table));
this->m_tableSize = table.auxiliarySize + table.compressedSize + sizeof(table);
const std::uint8_t* source = this->m_file->Read(this->m_tableOffset + sizeof(table), table.compressedSize);
uLongf length = table.originalSize + 8;
std::vector<std::uint8_t> decoded(length);
if (uncompress(decoded.data(), &length, source, compressed) != Z_OK) {
if (uncompress(decoded.data(), &length, source, table.compressedSize) != Z_OK) {
return false;
}
@ -257,13 +332,16 @@ bool CGPak::ReadTableV3() {
for (std::uint32_t i = 0; i < this->m_entryCount; ++i) {
const char* name = reinterpret_cast<const char*>(cursor);
const std::uint8_t* metadata = cursor + std::strlen(name) + 1;
cursor = metadata + 21;
PakEntryFileV3 fileEntry;
std::memcpy(&fileEntry, metadata, sizeof(fileEntry));
cursor = metadata + sizeof(fileEntry);
myGPack::PakEntry& entry = this->m_entries[i];
entry.compressedSize = Read32(metadata);
entry.alignedSize = Read32(metadata + 4);
entry.originalSize = Read32(metadata + 8);
entry.flags = metadata[12];
entry.dataOffset = Read64(metadata + 13);
entry.compressedSize = fileEntry.compressedSize;
entry.alignedSize = fileEntry.alignedSize;
entry.originalSize = fileEntry.originalSize;
entry.flags = fileEntry.flags;
entry.dataOffset = fileEntry.dataOffset;
entry.name.Assign(name);
maximum = std::max(maximum, entry.alignedSize);
}
@ -308,13 +386,14 @@ void CGPak::ReadAuxiliary(std::vector<std::uint8_t>& output, std::uint64_t* iden
return;
}
size = Read32(this->m_file->Read(this->m_tableOffset - 4, 4));
offset = this->m_tableOffset - size - 4;
std::memcpy(&size, this->m_file->Read(this->m_tableOffset - sizeof(size), sizeof(size)), sizeof(size));
offset = this->m_tableOffset - size - sizeof(size);
break;
case 0x300: {
const std::uint8_t* prefix = this->m_file->Read(this->m_tableOffset, 12);
size = Read32(prefix);
offset = this->m_tableOffset + Read32(prefix + 4) + 12;
PakTableFileV3 table;
std::memcpy(&table, this->m_file->Read(this->m_tableOffset, sizeof(table)), sizeof(table));
size = table.auxiliarySize;
offset = this->m_tableOffset + table.compressedSize + sizeof(table);
break;
}
default:

View file

@ -1,9 +1,6 @@
#include "Archive/MemMapPakFile.h"
// OFFSET: 0x00AE99D0
// FUNCTION: fn_18111
// OFFSET: 0x00AECAA0
// FUNCTION: fn_18140
// INLINED
CMemMapPakFile::CMemMapPakFile() : m_handle(nullptr), m_mapping(nullptr), m_viewSize(0), m_windowSize(0x20000000), m_size(0), m_viewOffset(0), m_view(nullptr) {
SYSTEM_INFO information;
GetSystemInfo(&information);
@ -11,14 +8,14 @@ CMemMapPakFile::CMemMapPakFile() : m_handle(nullptr), m_mapping(nullptr), m_view
}
// OFFSET: 0x00AE9850
// FUNCTION: fn_18108
// OFFSET: 0x00AE9950
// FUNCTION: fn_18110
// FUNCTION: fn_18108
CMemMapPakFile::~CMemMapPakFile() {
this->Close();
}
// OFFSET: 0x00AEA420
// FUNCTION: fn_18119
std::uint64_t CMemMapPakFile::GetSize() const {
return this->m_size;
}

View file

@ -64,6 +64,7 @@ namespace myGPack {
std::memcpy(block, result, sizeof(result));
}
// INLINED
std::uint8_t SubstituteLastByte(std::uint8_t value) {
switch (value) {
case 0x00:
@ -106,9 +107,8 @@ namespace myGPack {
}
// OFFSET: 0x00AE8460
// FUNCTION: fn_18096
// OFFSET: 0x00AE92F0
// FUNCTION: fn_18105
// FUNCTION: fn_18096
PakCipher::PakCipher(const std::uint8_t* key) {
(void)key;
std::memset(this->m_roundKeys, 0, sizeof(this->m_roundKeys));

View file

@ -1,7 +1,6 @@
#include "Archive/PakFile.h"
// OFFSET: 0x005EF660
// FUNCTION: fn_04009
CPakFile::~CPakFile() = default;
namespace myGPack {
@ -10,17 +9,16 @@ namespace myGPack {
CReadPakFile::CReadPakFile() : m_handle(INVALID_HANDLE_VALUE), m_size(0) {
}
// OFFSET: 0x005EF690
// FUNCTION: fn_04010
// INLINED
CReadPakFile::~CReadPakFile() {
this->Close();
}
// OFFSET: 0x005EF710
// FUNCTION: fn_04011
CWritePakFile::~CWritePakFile() = default;
// OFFSET: 0x005F7780
// FUNCTION: fn_04045
std::uint64_t CReadPakFile::GetSize() const {
return this->m_size;
}

View file

@ -17,6 +17,7 @@ namespace myGPack {
return *this;
}
// INLINED
void AssignNameKey(std::uint32_t& result, char* destination, const char* source) {
std::strcpy(destination, source);
_strlwr(destination);

View file

@ -5,8 +5,7 @@
// GLOBAL: gl_24380
PakRegistry g_pakRegistry;
// OFFSET: 0x01095B80
// FUNCTION: fn_41403
// INLINED
PakRegistry::~PakRegistry() {
for (auto& archive : this->m_archives) {
delete archive.first;

View file

@ -24,16 +24,14 @@ bool RestartFromCommandLine(char* commandLine) {
return true;
}
// OFFSET: 0x00E5D390
// FUNCTION: fn_24380
// INLINED
void ExitForProtectionCheck(const char* commandLine) {
if (std::strstr(commandLine, "/check_themida")) {
ExitProcess(0);
}
}
// OFFSET: 0x00E5D390
// FUNCTION: fn_24380
// INLINED
bool AcquireInstanceMutex(HANDLE* mutex) {
*mutex = CreateMutexA(nullptr, TRUE, "MutexInit");
return GetLastError() != ERROR_ALREADY_EXISTS;

View file

@ -6,8 +6,8 @@
#include <psapi.h>
#include <ctime>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
// STATIC: 0x01389c78
// GLOBAL: gl_24469
@ -82,6 +82,7 @@ namespace {
return namesBegin[jobId];
}
// INLINED
const char* ReadCurrentMapName() {
if (g_world.state == 1 && g_world.gameMode != nullptr) {
return reinterpret_cast<const char*>(g_world.gameMode) + 0x68;
@ -98,7 +99,6 @@ CUnhandledExceptionHandler::CUnhandledExceptionHandler() {
}
// OFFSET: 0x00635A80
// FUNCTION: fn_04702
CUnhandledExceptionHandler::~CUnhandledExceptionHandler() = default;
// OFFSET: 0x00635AB0
@ -272,7 +272,7 @@ LONG WINAPI TopLevelExceptionFilter(EXCEPTION_POINTERS* exceptionInfo) {
CHAR filename[256] = {};
GetModuleFileNameA(module, filename, sizeof(filename));
DWORD timestamp = pGetTimestamp ? pGetTimestamp(module) : 0;
unsigned int timestamp = pGetTimestamp ? pGetTimestamp(module) : 0;
sprintf(&g_crashString[strlen(g_crashString)], "Module Name: %s\r\n", filename);
__time32_t timestampTime;
@ -281,7 +281,7 @@ LONG WINAPI TopLevelExceptionFilter(EXCEPTION_POINTERS* exceptionInfo) {
sprintf(&g_crashString[strlen(g_crashString)], "Time Stamp: 0x%08x - %s\r\n", timestamp, timeString);
sprintf(&g_crashString[strlen(g_crashString)], "Version: 0x%08x\r\n", g_clientVersion);
sprintf(&g_crashString[strlen(g_crashString)], "\r\n");
sprintf(&g_crashString[strlen(g_crashString)], "Exception Type: 0x%08x\r\n", exceptionInfo->ExceptionRecord->ExceptionCode);
sprintf(&g_crashString[strlen(g_crashString)], "Exception Type: 0x%08x\r\n", static_cast<unsigned int>(exceptionInfo->ExceptionRecord->ExceptionCode));
sprintf(&g_crashString[strlen(g_crashString)], "\r\n");
HANDLE process = GetCurrentProcess();
@ -296,10 +296,18 @@ LONG WINAPI TopLevelExceptionFilter(EXCEPTION_POINTERS* exceptionInfo) {
frame.AddrFrame.Mode = AddrModeFlat;
sprintf(&g_crashString[strlen(g_crashString)], "\r\n");
sprintf(&g_crashString[strlen(g_crashString)], "eax: 0x%08x\tebx: 0x%08x\r\n", context->Eax, context->Ebx);
sprintf(&g_crashString[strlen(g_crashString)], "ecx: 0x%08x\tedx: 0x%08x\r\n", context->Ecx, context->Edx);
sprintf(&g_crashString[strlen(g_crashString)], "esi: 0x%08x\tedi: 0x%08x\r\n", context->Esi, context->Edi);
sprintf(&g_crashString[strlen(g_crashString)], "ebp: 0x%08x\tesp: 0x%08x\r\n", context->Ebp, context->Esp);
sprintf(
&g_crashString[strlen(g_crashString)], "eax: 0x%08x\tebx: 0x%08x\r\n", static_cast<unsigned int>(context->Eax), static_cast<unsigned int>(context->Ebx)
);
sprintf(
&g_crashString[strlen(g_crashString)], "ecx: 0x%08x\tedx: 0x%08x\r\n", static_cast<unsigned int>(context->Ecx), static_cast<unsigned int>(context->Edx)
);
sprintf(
&g_crashString[strlen(g_crashString)], "esi: 0x%08x\tedi: 0x%08x\r\n", static_cast<unsigned int>(context->Esi), static_cast<unsigned int>(context->Edi)
);
sprintf(
&g_crashString[strlen(g_crashString)], "ebp: 0x%08x\tesp: 0x%08x\r\n", static_cast<unsigned int>(context->Ebp), static_cast<unsigned int>(context->Esp)
);
sprintf(&g_crashString[strlen(g_crashString)], "\r\n");
for (int i = 0; i < 512; ++i) {
@ -311,7 +319,7 @@ LONG WINAPI TopLevelExceptionFilter(EXCEPTION_POINTERS* exceptionInfo) {
break;
}
sprintf(&g_crashString[strlen(g_crashString)], "0x%08x\t", frame.AddrPC.Offset);
sprintf(&g_crashString[strlen(g_crashString)], "0x%08x\t", static_cast<unsigned int>(frame.AddrPC.Offset));
pEnumerateLoadedModules(process, EnumerateLoadedModulesCallback, &frame.AddrPC.Offset);
sprintf(&g_crashString[strlen(g_crashString)], "\r\n");
}

View file

@ -9,11 +9,9 @@
class CUnhandledExceptionHandler {
public:
// OFFSET: 0x00635A70
// FUNCTION: fn_04701
CUnhandledExceptionHandler();
// OFFSET: 0x00635A80
// FUNCTION: fn_04702
virtual ~CUnhandledExceptionHandler();
};
@ -22,31 +20,24 @@ static_assert(sizeof(CUnhandledExceptionHandler) == 4);
#endif
// OFFSET: 0x00635AB0
// FUNCTION: fn_04703
bool InitUnhandledExceptionHandler(int (*callback)());
// OFFSET: 0x00635C10
// FUNCTION: fn_04704
int CleanupUnhandledExceptionHandler();
// OFFSET: 0x00635C30
// FUNCTION: fn_04705
INT_PTR CALLBACK DialogFunc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
// OFFSET: 0x00635DB0
// FUNCTION: fn_04706
BOOL CALLBACK EnumerateLoadedModulesCallback(PCSTR moduleName, ULONG moduleBase, ULONG moduleSize, PVOID userContext);
// OFFSET: 0x00635E00
// FUNCTION: fn_04707
void __cdecl InvalidParameterHandler(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line, uintptr_t pReserved);
// OFFSET: 0x00635E90
// FUNCTION: fn_04708
void __cdecl PurecallHandler();
// OFFSET: 0x00635F00
// FUNCTION: fn_04709
LONG WINAPI TopLevelExceptionFilter(EXCEPTION_POINTERS* exceptionInfo);
#endif

View file

@ -29,7 +29,7 @@ HRESULT STDMETHODCALLTYPE BrowserCommandTarget::QueryStatus(const GUID*, ULONG,
// OFFSET: 0x00AB16A0
// FUNCTION: fn_17353
HRESULT STDMETHODCALLTYPE BrowserCommandTarget::Exec(const GUID* group, DWORD command, DWORD, VARIANT*, VARIANT*) {
// STATIC: 0x011B0880 (CGID_DocHostCommandHandler)
// STATIC: 0x011B0880
if (!group || !IsEqualGUID(*group, CGID_DocHostCommandHandler)) {
return OLECMDERR_E_UNKNOWNGROUP;
}

View file

@ -7,6 +7,7 @@
class BrowserCommandTarget final : public IOleCommandTarget {
public:
// INLINED
explicit BrowserCommandTarget(IUnknown& site) : m_site(site) {
}

View file

@ -83,11 +83,13 @@ HRESULT STDMETHODCALLTYPE BrowserDocumentUI::TranslateAccelerator(MSG*, const GU
}
// OFFSET: 0x00AB17B0
// FUNCTION: fn_17362
HRESULT STDMETHODCALLTYPE BrowserDocumentUI::GetOptionKeyPath(LPOLESTR*, DWORD) {
return S_FALSE;
}
// OFFSET: 0x00AB1740
// FUNCTION: fn_17357
HRESULT STDMETHODCALLTYPE BrowserDocumentUI::GetDropTarget(IDropTarget*, IDropTarget**) {
return S_FALSE;
}

View file

@ -7,6 +7,7 @@
class BrowserDocumentUI final : public IDocHostUIHandler {
public:
// INLINED
explicit BrowserDocumentUI(IUnknown& site) : m_site(site) {
}

View file

@ -4,15 +4,17 @@
#include "Client/Browser/BrowserFactory.h"
#include "UI/Chat/ChatNotifications.h"
#include <new>
namespace {
constexpr unsigned maximumBrowserCount = 5;
}
// OFFSET: 0x00A8C840
// FUNCTION: fn_17136
CWebBrowser* BrowserFactory::Create(int width, int height) {
if (this->registry.browsers.size() >= 5) {
if (this->registry.browsers.size() >= maximumBrowserCount) {
this->notifications.Refresh();
const char* message = LookupMessage(1578, this->languagePrefix, this->serviceType, this->language);
this->notifications.Text(message, 255, nullptr, 0, false);
const char* message = LookupMessage(MessageId::MSI_FAILED_ADD_TAB, this->languagePrefix, this->serviceType, this->language);
this->notifications.Text(message, RGB(255, 0, 0), nullptr, 0, false);
return nullptr;
}

View file

@ -6,6 +6,7 @@
class BrowserInPlaceFrame final : public IOleInPlaceFrame {
public:
// INLINED
BrowserInPlaceFrame(IUnknown& site, HWND const& window) : m_site(site), m_window(window) {
}
@ -32,6 +33,7 @@ private:
class BrowserInPlaceSite final : public IOleInPlaceSite {
public:
// INLINED
BrowserInPlaceSite(IUnknown& site, HWND const& window, IUnknown* const& browser) : m_site(site), m_window(window), m_browser(browser), m_frame(site, window) {
}

View file

@ -4,15 +4,11 @@
#include <windows.h>
#include <ole2.h>
#include <exdisp.h>
#include <string>
bool CreateBrowserInterface(IWebBrowser2*& browser, HWND& window);
bool CreateExternalBrowserInterface(IWebBrowser2*& browser, HWND& window, HWND const& host);
bool NavigateBrowser(IWebBrowser2* const& browser, HWND const& host, HWND const& title, std::string address);
HRESULT AdviseBrowserEvents(IUnknown* source, IUnknown* sink, REFIID events, DWORD* cookie);
HRESULT UnadviseBrowserEvents(IUnknown* source, REFIID events, DWORD cookie);

View file

@ -8,6 +8,7 @@ struct BrowserFactory;
class BrowserPopupDispatch final : public IDispatch {
public:
// INLINED
BrowserPopupDispatch(IUnknown& site, BrowserFactory& factory, const int& width, const int& height)
: m_site(site), m_factory(factory), m_width(width), m_height(height) {
}

View file

@ -1,7 +1,6 @@
#include "Client/Browser/BrowserInterface.h"
#include "Client/Browser/BrowserSiteAttachment.h"
#include <cstdint>
#include <new>
// OFFSET: 0x00AB2AB0

View file

@ -2,6 +2,7 @@
#include "Client/Browser/BrowserCreation.h"
#include "Client/Browser/BrowserFrame.h"
#include "Client/Browser/BrowserInputHandoff.h"
#include "Client/Browser/BrowserInterface.h"
#include "Client/Browser/WebBrowser.h"
#include "Client/Browser/WebEventReceiver.h"
@ -36,7 +37,6 @@ CWebBrowser::~CWebBrowser() {
}
// OFFSET: 0x00AB22B0
// FUNCTION: fn_17413
bool CWebBrowser::Create(int requestedWidth, int requestedHeight) {
auto& dependencies = *this->context;
auto sizing = Sizing(*this);
@ -53,7 +53,6 @@ bool CWebBrowser::Create(int requestedWidth, int requestedHeight) {
}
// OFFSET: 0x00AB24D0
// FUNCTION: fn_45432
bool CWebBrowser::Close() {
auto& dependencies = *this->context;
auto sizing = Sizing(*this);
@ -77,14 +76,12 @@ bool CWebBrowser::AttachExternalEvents(BrowserRegistry& registry) {
}
// OFFSET: 0x00AB3060
// FUNCTION: fn_17421
void CWebBrowser::Resize(int requestedWidth, int requestedHeight) {
auto sizing = Sizing(*this);
sizing.Resize(requestedWidth, requestedHeight);
}
// OFFSET: 0x00AB2E70
// FUNCTION: fn_17419
void CWebBrowser::Poll() {
auto& dependencies = *this->context;
auto sizing = Sizing(*this);
@ -95,13 +92,11 @@ void CWebBrowser::Poll() {
}
// OFFSET: 0x00AB2D50
// FUNCTION: fn_17418
bool CWebBrowser::Navigate(std::string address) {
return NavigateBrowser(this->browser, this->host, this->combo, std::move(address));
}
// OFFSET: 0x00AB3120
// FUNCTION: fn_17422
void CWebBrowser::ShowAuxiliary(unsigned char value) {
auto sizing = Sizing(*this);

View file

@ -1,8 +1,10 @@
#ifndef RAGNAROK_SOURCE_CLIENT_BROWSER_WEBBROWSER_H
#define RAGNAROK_SOURCE_CLIENT_BROWSER_WEBBROWSER_H
#include "Client/Browser/BrowserInterface.h"
#include <windows.h>
#include <ole2.h>
#include <exdisp.h>
#include <string>
#include <cstddef>
class BrowserClientSite;

View file

@ -1,3 +1,4 @@
#include "Client/Browser/BrowserInterface.h"
#include "Client/Browser/BrowserRegistry.h"
#include "Client/Browser/WebEventReceiver.h"
@ -14,6 +15,7 @@ CWebEventReceiver::CWebEventReceiver(BrowserRegistry& registry)
}
// OFFSET: 0x00AB38A0
// FUNCTION: fn_17425
CWebEventReceiver::~CWebEventReceiver() {
OutputDebugStringA("~CWebEventReceiver() \n");
}
@ -75,6 +77,7 @@ HRESULT STDMETHODCALLTYPE CWebEventReceiver::GetIDsOfNames(REFIID, LPOLESTR*, UI
return S_OK;
}
// INLINED
void CWebEventReceiver::ReleaseDocument() {
if (this->m_document) {
UnadviseBrowserEvents(this->m_document, DIID_HTMLDocumentEvents2, this->m_documentCookie);

View file

@ -1,7 +1,9 @@
#ifndef RAGNAROK_SOURCE_CLIENT_BROWSER_WEBEVENTRECEIVER_H
#define RAGNAROK_SOURCE_CLIENT_BROWSER_WEBEVENTRECEIVER_H
#include "Client/Browser/BrowserInterface.h"
#include <windows.h>
#include <ole2.h>
#include <exdisp.h>
struct BrowserRegistry;

View file

@ -3,7 +3,6 @@
#include "Utility/Text/LanguageCharset.h"
#include <algorithm>
#include <cstring>
#include <intrin.h>
// OFFSET: 0x00ACEF00
@ -103,6 +102,7 @@ const char* ImeInput::Candidate(int index) const {
// STATIC: 0x016D3978
// GLOBAL: gl_24374
static char output[256];
if (index >= this->input.compositionState) {
return "";
}

View file

@ -5,9 +5,8 @@
#include <timeapi.h>
// OFFSET: 0x006370C0
// FUNCTION: fn_04724
// OFFSET: 0x006370D0
// FUNCTION: fn_04725
// FUNCTION: fn_04724
CMouse::~CMouse() = default;
// OFFSET: 0x00637100

View file

@ -1,14 +1,16 @@
#include "Contents/Actors/AttackMotion.h"
#include "Contents/Items/WeaponType.h"
#include "Contents/Jobs/JobId.h"
// OFFSET: 0x00DDFB50
// FUNCTION: fn_23444
float AttackMotionLength(int job, int appearance, int equipment, int attackMode) {
if (attackMode == 0) {
if (job == 5) {
if (job == JOB_MERCHANT) {
return 5.85f;
}
if (job == 6) {
if (job == JOB_THIEF) {
return 5.75f;
}
@ -20,20 +22,20 @@ float AttackMotionLength(int job, int appearance, int equipment, int attackMode)
}
switch (job) {
case 0:
case 23:
case 4045:
case 4190:
case 4191:
case JOB_NOVICE:
case JOB_SUPER_NOVICE:
case JOB_SUPER_BABY:
case JOB_SUPER_NOVICE_E:
case JOB_SUPER_BABY_E:
return appearance == 1 ? 5.85f : 6.0f;
case 12:
case 4013:
case 4035:
case 4059:
case 4065:
case 4101:
case 4254:
if (equipment == 16 || (equipment >= 25 && equipment <= 30)) {
case JOB_ASSASSIN:
case JOB_ASSASSIN_CROSS:
case JOB_BABY_ASSASSIN:
case JOB_GUILLOTINE_CROSS:
case JOB_GUILLOTINE_CROSS_T:
case JOB_BABY_GUILLOTINE_CROSS:
case JOB_SHADOW_CROSS:
if (equipment == W_KATAR || (equipment >= W_DOUBLE_DD && equipment <= W_DOUBLE_SA)) {
return 3.0f;
}

View file

@ -13,8 +13,8 @@ CGameObject::CGameObject() : identity(++nextIdentity) {
}
// OFFSET: 0x00CA8EC0
// FUNCTION: fn_20995
// OFFSET: 0x00CA9230
// FUNCTION: fn_20995
CGameObject::~CGameObject() = default;
// OFFSET: 0x00CAFD20

View file

@ -19,7 +19,6 @@ bool CRenderObject::Update() {
// OFFSET: 0x00CBF920
// FUNCTION: fn_21115
void CRenderObject::SendObjectMessage(CGameObject*, int, int, int, int, int, int, int, int, int, int, int, int, int, int) {
}

View file

@ -8,14 +8,12 @@
#include <windows.h>
#include <timeapi.h>
// OFFSET: 0x00CA8730
// FUNCTION: fn_20991
// INLINED
RenderObjectState::RenderObjectState(ResourceMgr& resources, JobNames& names) : sprite(nullptr), action(nullptr) {
this->Reset(resources, names);
}
// OFFSET: 0x00CA8F90
// FUNCTION: fn_20998
// INLINED
RenderObjectState::~RenderObjectState() {
if (this->sprite) {
this->sprite->Release();

View file

@ -14,7 +14,6 @@ struct SpriteDrawingPolicy {
bool& helmRobe;
bool DrawOnTop() const;
bool SetRobe(int robe);
};

View file

@ -20,8 +20,7 @@
// GLOBAL: gl_24349
CAsyncWorkMgr* g_asyncWorkMgr;
// OFFSET: 0x00573C50
// FUNCTION: fn_02497
// INLINED
CAsyncWorkMgr::CAsyncWorkMgr(std::uint32_t workers) : NAsyncWorkMgr(workers), m_ready(false), m_pools(nullptr) {
this->m_pools = new (std::nothrow) CAsyncWorkRecycleObjectPoolMgr;
@ -35,8 +34,7 @@ CAsyncWorkMgr::CAsyncWorkMgr(std::uint32_t workers) : NAsyncWorkMgr(workers), m_
}
}
// OFFSET: 0x00573B20
// FUNCTION: fn_02496
// INLINED
CAsyncWorkMgr::~CAsyncWorkMgr() {
this->DestroyQueues();
delete this->m_pools;

View file

@ -21,6 +21,7 @@ class CAsyncWorkMgr : public NAsyncWorkMgr {
public:
explicit CAsyncWorkMgr(std::uint32_t workers);
~CAsyncWorkMgr() override;
static bool Initialize(std::uint32_t workers);
static void Shutdown();

View file

@ -17,14 +17,14 @@
#include <new>
// OFFSET: 0x00576660
// FUNCTION: fn_02531
CAsyncWorkRecycleObjectPoolMgr::CAsyncWorkRecycleObjectPoolMgr() : m_registered(false) {
if (this->RegisterPools()) {
this->m_registered = true;
}
}
// OFFSET: 0x00578230
// FUNCTION: fn_02550
// INLINED
CAsyncWorkRecycleObjectPoolMgr::~CAsyncWorkRecycleObjectPoolMgr() {
for (const auto& entry : this->m_pools) {
delete entry.second;
@ -40,7 +40,7 @@ bool CAsyncWorkRecycleObjectPoolMgr::RegisterPools() {
return false;
}
pool.release();
(void) pool.release();
return true;
};

View file

@ -7,6 +7,7 @@ class CAsyncWorkRecycleObjectPoolMgr : public NRecycleObjectPoolMgr {
public:
CAsyncWorkRecycleObjectPoolMgr();
~CAsyncWorkRecycleObjectPoolMgr() override;
// INLINED
bool Ready() const {
return this->m_registered;
}

View file

@ -2,8 +2,6 @@
#include "Contents/Ground/TerrainHeight.h"
#include "Render/Renderer.h"
#include <bit>
// OFFSET: 0x00ADC150
// FUNCTION: fn_17928
void ResetCamera(CameraState& camera, CameraFrame& frame) {
@ -13,8 +11,7 @@ void ResetCamera(CameraState& camera, CameraFrame& frame) {
frame.up[2] = 0;
}
// OFFSET: 0x00ADBF60
// FUNCTION: fn_17927
// INLINED
void CameraFrame::Build(const CameraState& camera, const TerrainHeight& terrain) {
constexpr float pi = 3.141592f;
AffineMatrix orbit;

View file

@ -1,10 +1,10 @@
#include "Contents/Camera/CameraFrame.h"
#include "Contents/Ground/TerrainHeight.h"
#include <bit>
#include <cmath>
namespace {
// INLINED
float InverseLength(float squared) {
const float root = std::sqrt(squared);
return static_cast<float>(1.0 / static_cast<double>(root));

View file

@ -7,6 +7,7 @@
#include <timeapi.h>
namespace {
// INLINED
float Jitter(float divisor) {
const int remainder = std::rand() % 5;
const int selected = remainder >= 0 ? remainder : 0;

View file

@ -3,8 +3,7 @@
#include "Utility/Math/AffineMatrix.h"
#include "Utility/Math/ScalarConversion.h"
// OFFSET: 0x00ADC150
// FUNCTION: fn_17928
// INLINED
void CameraState::Reset() {
this->yaw = this->desiredYaw = 0;
this->distance = this->desiredDistance = 300;

View file

@ -15,7 +15,6 @@ ChatSuggestions* g_chatSuggestions = nullptr;
class UICashEmotionMiniWnd {
public:
// OFFSET: 0x007C9200
// FUNCTION: fn_09428
unsigned int Select(int actionId);
};

View file

@ -1,64 +0,0 @@
#include "Contents/Configuration/GraphicsConfiguration.h"
#include "Contents/Configuration/OptionWriter.h"
#include "Contents/Configuration/ScriptOptions.h"
#include "Render/RenderAdapter.h"
#include "Script/LuaScript.h"
#include <algorithm>
#include <cstring>
void GraphicsConfiguration::Load(LuaScript& script, ScriptOptions& options, int& screenWidth, int& screenHeight) {
const int resetPolicy = std::max(script.GlobalInteger("RenderSystemReset"), 0);
const int backendPolicy = std::max(script.GlobalInteger("RenderSystemDefault"), 0);
this->reset = options.Integer("RenderSystemReset", 1);
if (this->reset != resetPolicy) {
this->backend = backendPolicy;
this->reset = resetPolicy;
} else {
this->backend = options.Integer("RENDERSYSTEM", backendPolicy);
}
this->deviceGuid = options.Guid("DX9DEVICEID", GUID{});
const std::string name = options.String("DX9DEVICENAME", "");
strncpy_s(this->deviceName, sizeof(this->deviceName), name.c_str(), _TRUNCATE);
this->fullscreen = options.Integer("ISFULLSCREENMODE", 0);
this->width = options.Integer("WIDTH", 1024);
this->height = options.Integer("HEIGHT", 768);
this->oldWidth = options.Integer("OLD_WIDTH", 0);
this->oldHeight = options.Integer("OLD_HEIGHT", 0);
if (static_cast<unsigned>(this->height) < 664) {
this->width = 1024;
this->height = 768;
}
screenWidth = this->width;
screenHeight = this->height;
this->bitsPerPixel = options.Integer("BITPERPIXEL", 16);
OSVERSIONINFOA version{};
version.dwOSVersionInfoSize = sizeof(version);
GetVersionExA(&version);
if (version.dwMajorVersion >= 6 && version.dwMinorVersion >= 2) {
this->bitsPerPixel = 32;
}
}
AdapterConfiguration GraphicsConfiguration::Adapter() const {
return {this->backend, this->drawGuid, this->renderGuid, this->deviceGuid, this->deviceName};
}
void GraphicsConfiguration::Save(OptionWriter& output) const {
output.Integer("RenderSystemReset", this->reset);
output.Integer("RENDERSYSTEM", this->backend);
output.Guid("DX9DEVICEID", this->deviceGuid);
output.String("DX9DEVICENAME", this->deviceName);
output.Integer("ISFULLSCREENMODE", this->fullscreen);
output.Integer("WIDTH", this->width);
output.Integer("HEIGHT", this->height);
output.Integer("OLD_WIDTH", this->width);
output.Integer("OLD_HEIGHT", this->height);
output.Integer("BITPERPIXEL", this->bitsPerPixel);
}

View file

@ -1,12 +1,14 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_CONFIGURATION_GRAPHICSCONFIGURATION_H
#define RAGNAROK_SOURCE_CONTENTS_CONFIGURATION_GRAPHICSCONFIGURATION_H
#include <windows.h>
#include "Contents/Configuration/OptionWriter.h"
#include "Contents/Configuration/ScriptOptions.h"
#include "Render/RenderAdapter.h"
#include "Script/LuaScript.h"
class LuaScript;
struct ScriptOptions;
struct AdapterConfiguration;
struct OptionWriter;
#include <algorithm>
#include <windows.h>
struct GraphicsConfiguration {
GUID drawGuid;
@ -28,4 +30,62 @@ struct GraphicsConfiguration {
void Save(OptionWriter& output) const;
};
// INLINED
inline void GraphicsConfiguration::Load(LuaScript& script, ScriptOptions& options, int& screenWidth, int& screenHeight) {
const int resetPolicy = std::max(script.GlobalInteger("RenderSystemReset"), 0);
const int backendPolicy = std::max(script.GlobalInteger("RenderSystemDefault"), 0);
this->reset = options.Integer("RenderSystemReset", 1);
if (this->reset != resetPolicy) {
this->backend = backendPolicy;
this->reset = resetPolicy;
} else {
this->backend = options.Integer("RENDERSYSTEM", backendPolicy);
}
this->deviceGuid = options.Guid("DX9DEVICEID", GUID{});
const std::string name = options.String("DX9DEVICENAME", "");
strncpy_s(this->deviceName, sizeof(this->deviceName), name.c_str(), _TRUNCATE);
this->fullscreen = options.Integer("ISFULLSCREENMODE", 0);
this->width = options.Integer("WIDTH", 1024);
this->height = options.Integer("HEIGHT", 768);
this->oldWidth = options.Integer("OLD_WIDTH", 0);
this->oldHeight = options.Integer("OLD_HEIGHT", 0);
if (static_cast<unsigned>(this->height) < 664) {
this->width = 1024;
this->height = 768;
}
screenWidth = this->width;
screenHeight = this->height;
this->bitsPerPixel = options.Integer("BITPERPIXEL", 16);
OSVERSIONINFOA version{};
version.dwOSVersionInfoSize = sizeof(version);
GetVersionExA(&version);
if (version.dwMajorVersion >= 6 && version.dwMinorVersion >= 2) {
this->bitsPerPixel = 32;
}
}
inline AdapterConfiguration GraphicsConfiguration::Adapter() const {
return {this->backend, this->drawGuid, this->renderGuid, this->deviceGuid, this->deviceName};
}
// INLINED
inline void GraphicsConfiguration::Save(OptionWriter& output) const {
output.Integer("RenderSystemReset", this->reset);
output.Integer("RENDERSYSTEM", this->backend);
output.Guid("DX9DEVICEID", this->deviceGuid);
output.String("DX9DEVICENAME", this->deviceName);
output.Integer("ISFULLSCREENMODE", this->fullscreen);
output.Integer("WIDTH", this->width);
output.Integer("HEIGHT", this->height);
output.Integer("OLD_WIDTH", this->width);
output.Integer("OLD_HEIGHT", this->height);
output.Integer("BITPERPIXEL", this->bitsPerPixel);
}
#endif

View file

@ -1,4 +1,48 @@
#include "Contents/Effects/AttachedEffect.h"
#include "Contents/Effects/EffectActor.h"
#include "Contents/Effects/EffectPrimitiveState.h"
#include "Resource/Resource.h"
#include <cstring>
// INLINED
inline RagEffectState::RagEffectState()
: parent(nullptr), unknown_0160(0), unknown_0164(0), id(0), unknown_016C(1), unknown_0170(0), unknown_0174(0), unknown_0178(0), offset{}, unknown_018C{},
resource(nullptr), resourceData(nullptr), unknown_119F4(0), unknown_11C7C(0), unknown_11C80(0), unknown_11C84(nullptr), unknown_11C88{-1, -1, -1, -1},
forceRender(0), tag(0), unknown_11CA0(0) {
for (unsigned index = 0; index < 20; ++index) {
auto* record = this->unknown_01AC + index * 80;
const std::uint32_t zero = 0;
for (unsigned field = 0; field < 6; ++field) {
std::memcpy(record + field * 4, &zero, sizeof(zero));
}
}
std::memset(this->unknown_11A7C, 0, sizeof(this->unknown_11A7C));
std::memset(this->vertices, 0, sizeof(this->vertices));
}
// INLINED
inline RagEffectState::~RagEffectState() {
for (EffectPrimitiveState* particle : this->related) {
particle->parent = nullptr;
}
this->related.clear();
if (this->parent) {
this->parent->state.Attachments().Unlink(this);
}
if (this->resource) {
this->resource->Release();
}
}
// FUNCTION: fn_20007
AttachedEffect::AttachedEffect(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
}
AttachedEffect::~AttachedEffect() = default;

View file

@ -6,6 +6,7 @@
struct AttachedEffect : CRenderObject {
AttachedEffect(ResourceMgr& resources, JobNames& names);
~AttachedEffect() override;
RagEffectState state;
};

View file

@ -8,9 +8,8 @@ CEffect::CEffect(int value)
}
// OFFSET: 0x00B4DD10
// FUNCTION: fn_18981
// OFFSET: 0x00B4DDD0
// FUNCTION: fn_18983
// FUNCTION: fn_18981
CEffect::~CEffect() = default;
// OFFSET: 0x005A2150

View file

@ -1,10 +1,10 @@
#include "Contents/Effects/EffectActor.h"
// OFFSET: 0x00CA82E0
// INLINED
EffectActorState::EffectActorState() : unknown_0138(-1), unknown_013C(0), unknown_0140(0), first(nullptr), second(nullptr) {
}
// OFFSET: 0x00CA8C40
// INLINED
EffectActorState::~EffectActorState() {
this->Attachments().DetachAll();
}
@ -14,6 +14,7 @@ EffectAttachments EffectActorState::Attachments() {
}
// OFFSET: 0x00CA82E0
// FUNCTION: fn_20987
EffectActor::EffectActor(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
this->render.unknown_0130[0] = 0;
}

View file

@ -26,7 +26,7 @@ bool EffectAttachments::Contains(const RagEffectState* effect) const {
return false;
}
// ORIGINAL_SITE: 0x00CB4416 in fn_21111 (fragment)
// INLINED
void EffectAttachments::Unlink(RagEffectState* effect) {
if (!effect) {
return;
@ -47,7 +47,7 @@ void EffectAttachments::Unlink(RagEffectState* effect) {
}
}
// OFFSET: 0x00CA8C40
// INLINED
void EffectAttachments::DetachAll() {
for (RagEffectState* effect : this->effects) {
if (effect) {

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/EffectLists.h"
#include "Contents/Effects/EffectTypes.h"
// OFFSET: 0x00B25750
// FUNCTION: fn_18783
@ -32,6 +33,7 @@ CEffect* EffectLists::Find(int actor, int instance, int id) const {
return nullptr;
}
// INLINED
void EffectLists::RemoveActive(CEffect* effect) {
const auto found = this->active.find(static_cast<int>(effect->actor));
@ -104,11 +106,11 @@ void EffectLists::Add(int actor, CEffect* effect) {
this->active[actor].push_back(effect);
switch (effect->id) {
case 974:
case 1025:
case 1039:
case 1073:
case 1412:
case EF_EMITTER:
case EF_MAGIC_FLOOR:
case EF_EVILS_PAW:
case EF_ANIMATED_EMITTER:
case EF_NEW_RANGEDATTACK:
case 2343:
this->indexed[effect->id].push_back(effect);
break;

View file

@ -10,6 +10,7 @@
#include <cstring>
namespace {
// INLINED
EffectVector3 Forward(float distance, const float* matrix) {
const EffectVector3 point{0.0f, 0.0f, distance};
return {

View file

@ -14,7 +14,6 @@ struct EffectMotionContext {
};
bool MoveEffectPrimitive(EffectPrimitiveState& particle, RenderObjectState& render, EffectMotionContext& context);
bool UpdateEffectPrimitive15(EffectPrimitiveState& particle, RenderObjectState& render, EffectMotionContext& context, int updateTick);
#endif

View file

@ -19,7 +19,6 @@ struct EffectPrimitiveRenderContext {
};
void DrawEffectPrimitive15(EffectPrimitiveState& particle, const RenderObjectState& render, EffectPrimitiveRenderContext& context);
void RenderEffectPrimitive15(
EffectPrimitiveState& particle, const RenderObjectState& render, EffectPrimitiveRenderContext& context, const EffectVisibilityContext& visibility
);

View file

@ -1,13 +1,12 @@
#include "Contents/Effects/EffectPrimitiveState.h"
#include "Contents/Effects/RagEffectState.h"
#include "Contents/Actors/RenderObjectState.h"
#include "Utility/Math/AffineMatrix.h"
#include <bit>
#include <cstdlib>
#include <cstring>
// OFFSET: 0x00BAD940
// FUNCTION: fn_19761
// INLINED
EffectPrimitiveState::EffectPrimitiveState(RenderObjectState& render) {
this->textures = nullptr;
this->unknown_0208 = 0;
@ -132,16 +131,12 @@ EffectPrimitiveState::EffectPrimitiveState(RenderObjectState& render) {
}
}
// STATIC: 0x01312438
// GLOBAL: gl_21913
constexpr float identity[12] = {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0};
std::memcpy(this->matrix1, identity, sizeof(identity));
std::memcpy(this->matrix2, identity, sizeof(identity));
std::memcpy(this->matrix1, g_identityMatrix, sizeof(g_identityMatrix));
std::memcpy(this->matrix2, g_identityMatrix, sizeof(g_identityMatrix));
std::memset(this->unknown_03E8, 0, sizeof(this->unknown_03E8));
}
// OFFSET: 0x00BAE2C0
// FUNCTION: fn_19763
// INLINED
EffectPrimitiveState::~EffectPrimitiveState() {
if (this->parent) {
auto& related = this->parent->related;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -27,16 +27,13 @@ namespace {
}
}
// OFFSET: 0x00DD70B0
// FUNCTION: fn_23283
// INLINED
bool PartyMemberEffects::Enabled() const {
const auto* mode = this->activeMode;
return mode && (mode->playerOption48 != 0 || mode->playerOption54 != 0);
}
// OFFSET: 0x00DD70B0
// FUNCTION: fn_23283
// INLINED
void PartyMemberEffects::EnsurePartyEffect(std::uint32_t accountId) {
PartyEffectMode& mode = *this->activeMode;

View file

@ -1,12 +1,685 @@
#include "Contents/Effects/EffectTypes.h"
#include "Contents/Effects/RagEffectInitialization.h"
#include "Contents/Effects/RagEffectState.h"
#include "Contents/Configuration/ServiceOptions.h"
#include "Resource/EZeffectResource.h"
#include "Resource/ResourceMgr.h"
#include <bit>
#include <cstdio>
#include <cstdlib>
#include <cstring>
// INLINED
static void SelectRagEffectResource(RagEffectState& effect, ServiceOptions& options, char* name) {
name[0] = '\0';
switch (effect.id) {
case 10:
std::sprintf(name, options.Get(229) != 0 ? "memor_min.str" : "Maemor.str");
break;
case 13:
case 315:
std::sprintf(name, "SafetyWall.str");
break;
case 23:
case 195:
std::sprintf(name, "StoneCurse.str");
break;
case 25:
std::sprintf(name, "Firewall%d.str", std::rand() % 2 + 1);
break;
case 29:
std::sprintf(name, "Lightning.str");
break;
case 30:
std::sprintf(name, "ThunderStorm.str");
break;
case 40:
std::sprintf(name, "Cross.str");
break;
case 41:
case 717:
std::sprintf(name, options.Get(229) != 0 ? "jong_mini.str" : "Angelus.str");
break;
case 49:
case 603:
std::sprintf(name, "FireHit%d.str", std::rand() % 3 + 1);
break;
case 52:
std::sprintf(name, "WindHit%d.str", std::rand() % 3 + 1);
break;
case 64:
std::sprintf(name, "ArrowShot.str");
break;
case 65:
std::sprintf(name, "Invenom.str");
break;
case 66:
std::sprintf(name, options.Get(229) != 0 ? "cure_min.str" : "Cure.str");
break;
case 67:
std::sprintf(name, "Provoke.str");
break;
case 68:
std::sprintf(name, "Mvp.str");
break;
case 69:
std::sprintf(name, "SkidTrap.str");
break;
case 70:
std::sprintf(name, "Brandish.str");
break;
case 75:
std::sprintf(name, options.Get(229) != 0 ? "gloria_min.str" : "Gloria.str");
break;
case 76:
std::sprintf(name, options.Get(229) != 0 ? "magnificat_min.str" : "Magnificat.str");
break;
case 77:
std::sprintf(name, options.Get(229) != 0 ? "resurrection_min.str" : "Resurrection.str");
break;
case 78:
std::sprintf(name, "Recovery.str");
break;
case 83:
std::sprintf(name, "Sanctuary.str");
break;
case 84:
std::sprintf(name, "Impositio.str");
break;
case 85:
std::sprintf(name, options.Get(229) != 0 ? "lexaeterna_min.str" : "LexAeterna.str");
break;
case 86:
std::sprintf(name, "Aspersio.str");
break;
case 87:
std::sprintf(name, "LexDivina.str");
break;
case 88:
std::sprintf(name, options.Get(229) != 0 ? "suffragium_min.str" : "Suffragium.str");
break;
case 89:
std::sprintf(name, "StormGust.str");
break;
case 90:
std::sprintf(name, "Lord.str");
break;
case 91:
std::sprintf(name, "Benedictio.str");
break;
case 92:
std::sprintf(name, "Meteor%d.str", std::rand() % 3 + 1);
break;
case 95:
std::sprintf(name, "Quagmire.str");
break;
case 96:
std::sprintf(name, "FirePillar.str");
break;
case 97:
std::sprintf(name, "FirePillarBomb.str");
break;
case 101:
std::sprintf(name, "RepairWeapon.str");
break;
case 102:
std::sprintf(name, "CrashEarth.str");
break;
case 103:
std::sprintf(name, options.Get(229) != 0 ? "WeaponPerfection_min.str" : "WeaponPerfection.str");
break;
case 104:
std::sprintf(name, options.Get(229) != 0 ? "maximize_min.str" : "MaximizePower.str");
break;
case 106:
std::sprintf(name, "BlastMine.str");
break;
case 107:
std::sprintf(name, "Claymore.str");
break;
case 108:
std::sprintf(name, "Freezing.str");
break;
case 109:
std::sprintf(name, "Bubble%d.str", std::rand() % 4 + 1);
break;
case 110:
std::sprintf(name, "GasPush.str");
break;
case 111:
std::sprintf(name, "Spring.str");
break;
case 112:
std::sprintf(name, options.Get(229) != 0 ? "kyrie_min.str" : "Kyrie.str");
break;
case 113:
std::sprintf(name, "Magnus.str");
break;
case 124:
std::sprintf(name, "VenomDust.str");
break;
case 126:
std::sprintf(name, "PoisonReact_1st.str");
break;
case 127:
std::sprintf(name, "PoisonReact.str");
break;
case 129:
std::sprintf(name, "VenomSplasher.str");
break;
case 130:
case 250:
case 369:
std::sprintf(name, "TwoHand.str");
break;
case 131:
std::sprintf(name, "AutoCounter.str");
break;
case 133:
std::sprintf(name, "Freeze.str");
break;
case 134:
std::sprintf(name, "Freezed.str");
break;
case 135:
std::sprintf(name, "IceCrash.str");
break;
case 136:
std::sprintf(name, "slowp.str");
break;
case 139:
std::sprintf(name, "SandMan.str");
break;
case 141:
std::sprintf(name, "Pneuma%d.str", std::rand() % 3 + 1);
break;
case 143:
std::sprintf(name, "SonicBlow.str");
break;
case 144:
std::sprintf(name, "Brandish2.str");
break;
case 145:
std::sprintf(name, "ShockWave.str");
break;
case 146:
std::sprintf(name, "ShockWaveHit.str");
break;
case 147:
std::sprintf(name, "EarthHit.str");
break;
case 148:
std::sprintf(name, "Pierce.str");
break;
case 149:
std::sprintf(name, "Bowling.str");
break;
case 150:
std::sprintf(name, "SpearStab.str");
break;
case 151:
std::sprintf(name, "SpearBoomerang.str");
break;
case 152:
std::sprintf(name, "HolyHit.str");
break;
case 153:
case 750:
std::sprintf(name, "Concentration.str");
break;
case 154:
std::sprintf(name, "bs_RefineSuccess.str");
break;
case 155:
std::sprintf(name, "bs_RefineFailed.str");
break;
case 156:
std::sprintf(name, "JobChange.str");
break;
case 157:
std::sprintf(name, "LevelUP.str");
break;
case 158:
case 337:
std::sprintf(name, "JobLvUP.str");
break;
case 167:
std::sprintf(name, "TamingSuccess.str");
break;
case 168:
std::sprintf(name, "TamingFailed.str");
break;
case 169:
std::sprintf(name, "EnergyCoat.str");
break;
case 170:
std::sprintf(name, "CartRevolution.str");
break;
case 181:
std::sprintf(name, "MentalBreak.str");
break;
case 182:
std::sprintf(name, "magical.str");
break;
case 183:
std::sprintf(name, "sui_explosion.str");
break;
case 185:
std::sprintf(name, "suicide.str");
break;
case 186:
std::sprintf(name, "yunta_1.str");
break;
case 187:
std::sprintf(name, "yunta_2.str");
break;
case 188:
std::sprintf(name, "yunta_3.str");
break;
case 189:
std::sprintf(name, "yunta_4.str");
break;
case 190:
std::sprintf(name, "yunta_5.str");
break;
case 191:
std::sprintf(name, "homing.str");
break;
case 192:
std::sprintf(name, "poison.str");
break;
case 193:
std::sprintf(name, "silence.str");
break;
case 194:
std::sprintf(name, "stun.str");
break;
case 197:
std::sprintf(name, "sleep.str");
break;
case 199:
std::sprintf(name, "Pong%d.str", std::rand() % 3 + 1);
break;
case 204:
std::sprintf(name, "\273\241\260\243\306\367\274\307.str");
break;
case 205:
std::sprintf(name, "\301\326\310\253\306\367\274\307.str");
break;
case 206:
std::sprintf(name, "\263\353\266\365\306\367\274\307.str");
break;
case 207:
std::sprintf(name, "\307\317\276\341\306\367\274\307.str");
break;
case 208:
std::sprintf(name, "\306\304\266\365\306\367\274\307.str");
break;
case 209:
std::sprintf(name, "\303\312\267\317\306\367\274\307.str");
break;
case 210:
std::sprintf(name, "fruit.str");
break;
case 211:
std::sprintf(name, "fruit_.str");
break;
case 213:
std::sprintf(name, "Deffender.str");
break;
case 214:
std::sprintf(name, "Keeping.str");
break;
case 218:
std::sprintf(name, "\301\375\301\337.str");
break;
case 219:
std::sprintf(name, "\260\242\274\272.str");
break;
case 220:
case 756:
std::sprintf(name, "\271\366\274\255\305\251.str");
break;
case 234:
std::sprintf(name, "spell.str");
break;
case 235:
std::sprintf(name, "\265\360\275\272\306\347.str");
break;
case 244:
std::sprintf(name, "\270\305\301\367\267\316\265\345.str");
break;
case 245:
std::sprintf(name, "holy_cross.str");
break;
case 246:
std::sprintf(name, "shield_charge.str");
break;
case 248:
std::sprintf(name, "providence.str");
break;
case 251:
std::sprintf(name, "devotion.str");
break;
case 255:
std::sprintf(name, "enc_fire.str");
break;
case 256:
std::sprintf(name, "enc_ice.str");
break;
case 257:
std::sprintf(name, "enc_wind.str");
break;
case 258:
std::sprintf(name, "enc_earth.str");
break;
case 268:
std::sprintf(name, "steal_coin.str");
break;
case 269:
std::sprintf(name, "strip_weapon.str");
break;
case 270:
std::sprintf(name, "strip_shield.str");
break;
case 271:
std::sprintf(name, "strip_armor.str");
break;
case 272:
std::sprintf(name, "strip_helm.str");
break;
case 273:
std::sprintf(name, "\277\254\310\257.str");
break;
case 305:
std::sprintf(name, "p_success.str");
break;
case 306:
std::sprintf(name, "p_failed.str");
break;
case 311:
std::sprintf(name, "loud.str");
break;
case 371:
std::sprintf(name, "angel.str");
break;
case 372:
case 1033:
std::sprintf(name, "devil.str");
break;
case 390:
std::sprintf(name, "melt.str");
break;
case 391:
std::sprintf(name, "cart.str");
break;
case 392:
std::sprintf(name, "sword.str");
break;
case 406:
std::sprintf(name, "\274\322\277\357\271\370.str");
break;
case 407:
std::sprintf(name, "\273\347\266\367\310\277\260\372.str");
break;
case 440:
std::sprintf(name, "asum.str");
break;
case 491:
std::sprintf(name, "\302\375\275\322\266\261.str");
break;
case 492:
std::sprintf(name, "ramadan.str");
break;
case 507:
std::sprintf(name, "mapae.str");
break;
case 508:
case 612:
std::sprintf(name, "itempokjuk.str");
break;
case 565:
std::sprintf(name, "moonlight_1.str");
break;
case 566:
std::sprintf(name, "moonlight_2.str");
break;
case 567:
std::sprintf(name, "moonlight_3.str");
break;
case 568:
std::sprintf(name, "h_levelup.str");
break;
case 569:
std::sprintf(name, "defense.str");
break;
case 593:
std::sprintf(name, "food_str.str");
break;
case 594:
std::sprintf(name, "food_int.str");
break;
case 595:
std::sprintf(name, "food_vit.str");
break;
case 596:
std::sprintf(name, "food_agi.str");
break;
case 597:
std::sprintf(name, "food_dex.str");
break;
case 598:
std::sprintf(name, "food_luk.str");
break;
case 608:
std::sprintf(name, "cook_suc.str");
break;
case 609:
std::sprintf(name, "cook_fail.str");
break;
case 635:
std::sprintf(name, "fire dragon.str");
break;
case 636:
std::sprintf(name, "icy.str");
break;
case 646:
std::sprintf(name, "\306\256\267\242\305\267.str");
break;
case 649:
std::sprintf(name, "\272\322\275\272\276\306\300\314.str");
break;
case 668:
case 670:
std::sprintf(name, "dfear.str");
break;
case 669:
std::sprintf(name, "wideb.str");
break;
case 677:
std::sprintf(name, "cwound.str");
break;
case 699:
std::sprintf(name, "flower_leaf.str");
break;
case 704:
std::sprintf(name, "mobile_ef02.str");
break;
case 705:
std::sprintf(name, "mobile_ef01.str");
break;
case 706:
std::sprintf(name, "mobile_ef03.str");
break;
case 708:
std::sprintf(name, "storm_min.str");
break;
case 709:
std::sprintf(name, "pokjuk_jap.str");
break;
case 721:
std::sprintf(name, "ado.str");
break;
case 722:
std::sprintf(name, "\300\314\261\327\264\317\274\307\272\352\267\271\300\314\305\251.str");
break;
case 727:
std::sprintf(name, "crimson_r.str");
break;
case 728:
std::sprintf(name, "hell_in.str");
break;
case 731:
std::sprintf(name, "dragon_h.str");
break;
case 734:
std::sprintf(name, "chainlight.str");
break;
case 745:
std::sprintf(name, "aimed.str");
break;
case 746:
std::sprintf(name, "arrowstorm.str");
break;
case 747:
std::sprintf(name, "laulamus.str");
break;
case 748:
std::sprintf(name, "lauagnus.str");
break;
case 749:
std::sprintf(name, "mil_shield.str");
break;
case 795:
std::sprintf(name, "powerswing.str");
break;
case 813:
std::sprintf(name, "enervation.str");
break;
case 814:
std::sprintf(name, "groomy.str");
break;
case 815:
std::sprintf(name, "ignorance.str");
break;
case 816:
std::sprintf(name, "laziness.str");
break;
case 817:
std::sprintf(name, "unlucky.str");
break;
case 818:
std::sprintf(name, "weakness.str");
break;
case 920:
std::sprintf(name, "Firewall_per.str");
break;
case 926:
std::sprintf(name, "hunter_shockwave_blue.str");
break;
case 959:
std::sprintf(name, "poison_mist.str");
break;
case 960:
std::sprintf(name, "eraser_cutter.str");
break;
case 964:
std::sprintf(name, "lava_slide.str");
break;
case 965:
std::sprintf(name, "sonic_claw.str");
break;
case 966:
std::sprintf(name, "tinder.str");
break;
case 967:
std::sprintf(name, "mid_frenzy.str");
break;
case 975:
std::sprintf(name, "vash00.str");
break;
case 987:
std::sprintf(name, "rwc2011.str");
break;
case 988:
std::sprintf(name, "rwc2011_2.str");
break;
case 1006:
std::sprintf(name, "100.str");
break;
case 1015:
std::sprintf(name, "rune_success.str");
break;
case 1016:
std::sprintf(name, "rune_fail.str");
break;
case 1017:
std::sprintf(name, "changematerial_su.str");
break;
case 1018:
std::sprintf(name, "changematerial_fa.str");
break;
case 1019:
std::sprintf(name, "Guardian.str");
break;
case 1020:
std::sprintf(name, "bubble%d_1.str", std::rand() % 4 + 1);
break;
case 1021:
std::sprintf(name, "dust.str");
effect.unknown_11C80 = 10;
break;
case 1029:
std::sprintf(name, "dancingblade.str");
break;
case 1031:
std::sprintf(name, "INVINCIBLEOFF2.str");
break;
case 1040:
std::sprintf(name, "gc_darkcrow.str");
effect.unknown_11C80 = 9999;
break;
case 1042:
std::sprintf(name, "all_full_throttle.str");
break;
case 1043:
std::sprintf(name, "sr_flashcombo.str");
break;
case 1044:
std::sprintf(name, "rk_luxanima.str");
break;
case 1046:
std::sprintf(name, "so_elemental_shield.str");
break;
case 1047:
std::sprintf(name, "AB_OFFERTORIUM.str");
break;
case 1048:
std::sprintf(name, "WL_TELEKINESIS_INTENSE.str");
effect.unknown_11C80 = 9999;
break;
case 1049:
std::sprintf(name, "GN_ILLUSIONDOPING.str");
break;
case 1050:
std::sprintf(name, "NC_MAGMA_ERUPTION.str");
effect.unknown_11C80 = 9999;
break;
case 1055:
std::sprintf(name, "chill.str");
effect.unknown_11C80 = 9999;
break;
case 1057:
std::sprintf(name, "AB_OFFERTORIUM_ring.str");
effect.unknown_11C80 = 9999;
break;
default:
break;
}
}
// OFFSET: 0x00C1C2D0
// FUNCTION: fn_20074
void InitializeRagEffect(

View file

@ -12,6 +12,4 @@ void InitializeRagEffect(
ServiceOptions& options, ResourceMgr& resources
);
void SelectRagEffectResource(RagEffectState& effect, ServiceOptions& options, char* name);
#endif

View file

@ -1,676 +0,0 @@
#include "Contents/Effects/RagEffectInitialization.h"
#include "Contents/Effects/RagEffectState.h"
#include "Contents/Configuration/ServiceOptions.h"
#include <cstdio>
#include <cstdlib>
// ORIGINAL_SITE: 0x00C1C359 in fn_20074 (fragment)
void SelectRagEffectResource(RagEffectState& effect, ServiceOptions& options, char* name) {
name[0] = '\0';
switch (effect.id) {
case 10:
std::sprintf(name, options.Get(229) != 0 ? "memor_min.str" : "Maemor.str");
break;
case 13:
case 315:
std::sprintf(name, "SafetyWall.str");
break;
case 23:
case 195:
std::sprintf(name, "StoneCurse.str");
break;
case 25:
std::sprintf(name, "Firewall%d.str", std::rand() % 2 + 1);
break;
case 29:
std::sprintf(name, "Lightning.str");
break;
case 30:
std::sprintf(name, "ThunderStorm.str");
break;
case 40:
std::sprintf(name, "Cross.str");
break;
case 41:
case 717:
std::sprintf(name, options.Get(229) != 0 ? "jong_mini.str" : "Angelus.str");
break;
case 49:
case 603:
std::sprintf(name, "FireHit%d.str", std::rand() % 3 + 1);
break;
case 52:
std::sprintf(name, "WindHit%d.str", std::rand() % 3 + 1);
break;
case 64:
std::sprintf(name, "ArrowShot.str");
break;
case 65:
std::sprintf(name, "Invenom.str");
break;
case 66:
std::sprintf(name, options.Get(229) != 0 ? "cure_min.str" : "Cure.str");
break;
case 67:
std::sprintf(name, "Provoke.str");
break;
case 68:
std::sprintf(name, "Mvp.str");
break;
case 69:
std::sprintf(name, "SkidTrap.str");
break;
case 70:
std::sprintf(name, "Brandish.str");
break;
case 75:
std::sprintf(name, options.Get(229) != 0 ? "gloria_min.str" : "Gloria.str");
break;
case 76:
std::sprintf(name, options.Get(229) != 0 ? "magnificat_min.str" : "Magnificat.str");
break;
case 77:
std::sprintf(name, options.Get(229) != 0 ? "resurrection_min.str" : "Resurrection.str");
break;
case 78:
std::sprintf(name, "Recovery.str");
break;
case 83:
std::sprintf(name, "Sanctuary.str");
break;
case 84:
std::sprintf(name, "Impositio.str");
break;
case 85:
std::sprintf(name, options.Get(229) != 0 ? "lexaeterna_min.str" : "LexAeterna.str");
break;
case 86:
std::sprintf(name, "Aspersio.str");
break;
case 87:
std::sprintf(name, "LexDivina.str");
break;
case 88:
std::sprintf(name, options.Get(229) != 0 ? "suffragium_min.str" : "Suffragium.str");
break;
case 89:
std::sprintf(name, "StormGust.str");
break;
case 90:
std::sprintf(name, "Lord.str");
break;
case 91:
std::sprintf(name, "Benedictio.str");
break;
case 92:
std::sprintf(name, "Meteor%d.str", std::rand() % 3 + 1);
break;
case 95:
std::sprintf(name, "Quagmire.str");
break;
case 96:
std::sprintf(name, "FirePillar.str");
break;
case 97:
std::sprintf(name, "FirePillarBomb.str");
break;
case 101:
std::sprintf(name, "RepairWeapon.str");
break;
case 102:
std::sprintf(name, "CrashEarth.str");
break;
case 103:
std::sprintf(name, options.Get(229) != 0 ? "WeaponPerfection_min.str" : "WeaponPerfection.str");
break;
case 104:
std::sprintf(name, options.Get(229) != 0 ? "maximize_min.str" : "MaximizePower.str");
break;
case 106:
std::sprintf(name, "BlastMine.str");
break;
case 107:
std::sprintf(name, "Claymore.str");
break;
case 108:
std::sprintf(name, "Freezing.str");
break;
case 109:
std::sprintf(name, "Bubble%d.str", std::rand() % 4 + 1);
break;
case 110:
std::sprintf(name, "GasPush.str");
break;
case 111:
std::sprintf(name, "Spring.str");
break;
case 112:
std::sprintf(name, options.Get(229) != 0 ? "kyrie_min.str" : "Kyrie.str");
break;
case 113:
std::sprintf(name, "Magnus.str");
break;
case 124:
std::sprintf(name, "VenomDust.str");
break;
case 126:
std::sprintf(name, "PoisonReact_1st.str");
break;
case 127:
std::sprintf(name, "PoisonReact.str");
break;
case 129:
std::sprintf(name, "VenomSplasher.str");
break;
case 130:
case 250:
case 369:
std::sprintf(name, "TwoHand.str");
break;
case 131:
std::sprintf(name, "AutoCounter.str");
break;
case 133:
std::sprintf(name, "Freeze.str");
break;
case 134:
std::sprintf(name, "Freezed.str");
break;
case 135:
std::sprintf(name, "IceCrash.str");
break;
case 136:
std::sprintf(name, "slowp.str");
break;
case 139:
std::sprintf(name, "SandMan.str");
break;
case 141:
std::sprintf(name, "Pneuma%d.str", std::rand() % 3 + 1);
break;
case 143:
std::sprintf(name, "SonicBlow.str");
break;
case 144:
std::sprintf(name, "Brandish2.str");
break;
case 145:
std::sprintf(name, "ShockWave.str");
break;
case 146:
std::sprintf(name, "ShockWaveHit.str");
break;
case 147:
std::sprintf(name, "EarthHit.str");
break;
case 148:
std::sprintf(name, "Pierce.str");
break;
case 149:
std::sprintf(name, "Bowling.str");
break;
case 150:
std::sprintf(name, "SpearStab.str");
break;
case 151:
std::sprintf(name, "SpearBoomerang.str");
break;
case 152:
std::sprintf(name, "HolyHit.str");
break;
case 153:
case 750:
std::sprintf(name, "Concentration.str");
break;
case 154:
std::sprintf(name, "bs_RefineSuccess.str");
break;
case 155:
std::sprintf(name, "bs_RefineFailed.str");
break;
case 156:
std::sprintf(name, "JobChange.str");
break;
case 157:
std::sprintf(name, "LevelUP.str");
break;
case 158:
case 337:
std::sprintf(name, "JobLvUP.str");
break;
case 167:
std::sprintf(name, "TamingSuccess.str");
break;
case 168:
std::sprintf(name, "TamingFailed.str");
break;
case 169:
std::sprintf(name, "EnergyCoat.str");
break;
case 170:
std::sprintf(name, "CartRevolution.str");
break;
case 181:
std::sprintf(name, "MentalBreak.str");
break;
case 182:
std::sprintf(name, "magical.str");
break;
case 183:
std::sprintf(name, "sui_explosion.str");
break;
case 185:
std::sprintf(name, "suicide.str");
break;
case 186:
std::sprintf(name, "yunta_1.str");
break;
case 187:
std::sprintf(name, "yunta_2.str");
break;
case 188:
std::sprintf(name, "yunta_3.str");
break;
case 189:
std::sprintf(name, "yunta_4.str");
break;
case 190:
std::sprintf(name, "yunta_5.str");
break;
case 191:
std::sprintf(name, "homing.str");
break;
case 192:
std::sprintf(name, "poison.str");
break;
case 193:
std::sprintf(name, "silence.str");
break;
case 194:
std::sprintf(name, "stun.str");
break;
case 197:
std::sprintf(name, "sleep.str");
break;
case 199:
std::sprintf(name, "Pong%d.str", std::rand() % 3 + 1);
break;
case 204:
std::sprintf(name, "\273\241\260\243\306\367\274\307.str");
break;
case 205:
std::sprintf(name, "\301\326\310\253\306\367\274\307.str");
break;
case 206:
std::sprintf(name, "\263\353\266\365\306\367\274\307.str");
break;
case 207:
std::sprintf(name, "\307\317\276\341\306\367\274\307.str");
break;
case 208:
std::sprintf(name, "\306\304\266\365\306\367\274\307.str");
break;
case 209:
std::sprintf(name, "\303\312\267\317\306\367\274\307.str");
break;
case 210:
std::sprintf(name, "fruit.str");
break;
case 211:
std::sprintf(name, "fruit_.str");
break;
case 213:
std::sprintf(name, "Deffender.str");
break;
case 214:
std::sprintf(name, "Keeping.str");
break;
case 218:
std::sprintf(name, "\301\375\301\337.str");
break;
case 219:
std::sprintf(name, "\260\242\274\272.str");
break;
case 220:
case 756:
std::sprintf(name, "\271\366\274\255\305\251.str");
break;
case 234:
std::sprintf(name, "spell.str");
break;
case 235:
std::sprintf(name, "\265\360\275\272\306\347.str");
break;
case 244:
std::sprintf(name, "\270\305\301\367\267\316\265\345.str");
break;
case 245:
std::sprintf(name, "holy_cross.str");
break;
case 246:
std::sprintf(name, "shield_charge.str");
break;
case 248:
std::sprintf(name, "providence.str");
break;
case 251:
std::sprintf(name, "devotion.str");
break;
case 255:
std::sprintf(name, "enc_fire.str");
break;
case 256:
std::sprintf(name, "enc_ice.str");
break;
case 257:
std::sprintf(name, "enc_wind.str");
break;
case 258:
std::sprintf(name, "enc_earth.str");
break;
case 268:
std::sprintf(name, "steal_coin.str");
break;
case 269:
std::sprintf(name, "strip_weapon.str");
break;
case 270:
std::sprintf(name, "strip_shield.str");
break;
case 271:
std::sprintf(name, "strip_armor.str");
break;
case 272:
std::sprintf(name, "strip_helm.str");
break;
case 273:
std::sprintf(name, "\277\254\310\257.str");
break;
case 305:
std::sprintf(name, "p_success.str");
break;
case 306:
std::sprintf(name, "p_failed.str");
break;
case 311:
std::sprintf(name, "loud.str");
break;
case 371:
std::sprintf(name, "angel.str");
break;
case 372:
case 1033:
std::sprintf(name, "devil.str");
break;
case 390:
std::sprintf(name, "melt.str");
break;
case 391:
std::sprintf(name, "cart.str");
break;
case 392:
std::sprintf(name, "sword.str");
break;
case 406:
std::sprintf(name, "\274\322\277\357\271\370.str");
break;
case 407:
std::sprintf(name, "\273\347\266\367\310\277\260\372.str");
break;
case 440:
std::sprintf(name, "asum.str");
break;
case 491:
std::sprintf(name, "\302\375\275\322\266\261.str");
break;
case 492:
std::sprintf(name, "ramadan.str");
break;
case 507:
std::sprintf(name, "mapae.str");
break;
case 508:
case 612:
std::sprintf(name, "itempokjuk.str");
break;
case 565:
std::sprintf(name, "moonlight_1.str");
break;
case 566:
std::sprintf(name, "moonlight_2.str");
break;
case 567:
std::sprintf(name, "moonlight_3.str");
break;
case 568:
std::sprintf(name, "h_levelup.str");
break;
case 569:
std::sprintf(name, "defense.str");
break;
case 593:
std::sprintf(name, "food_str.str");
break;
case 594:
std::sprintf(name, "food_int.str");
break;
case 595:
std::sprintf(name, "food_vit.str");
break;
case 596:
std::sprintf(name, "food_agi.str");
break;
case 597:
std::sprintf(name, "food_dex.str");
break;
case 598:
std::sprintf(name, "food_luk.str");
break;
case 608:
std::sprintf(name, "cook_suc.str");
break;
case 609:
std::sprintf(name, "cook_fail.str");
break;
case 635:
std::sprintf(name, "fire dragon.str");
break;
case 636:
std::sprintf(name, "icy.str");
break;
case 646:
std::sprintf(name, "\306\256\267\242\305\267.str");
break;
case 649:
std::sprintf(name, "\272\322\275\272\276\306\300\314.str");
break;
case 668:
case 670:
std::sprintf(name, "dfear.str");
break;
case 669:
std::sprintf(name, "wideb.str");
break;
case 677:
std::sprintf(name, "cwound.str");
break;
case 699:
std::sprintf(name, "flower_leaf.str");
break;
case 704:
std::sprintf(name, "mobile_ef02.str");
break;
case 705:
std::sprintf(name, "mobile_ef01.str");
break;
case 706:
std::sprintf(name, "mobile_ef03.str");
break;
case 708:
std::sprintf(name, "storm_min.str");
break;
case 709:
std::sprintf(name, "pokjuk_jap.str");
break;
case 721:
std::sprintf(name, "ado.str");
break;
case 722:
std::sprintf(name, "\300\314\261\327\264\317\274\307\272\352\267\271\300\314\305\251.str");
break;
case 727:
std::sprintf(name, "crimson_r.str");
break;
case 728:
std::sprintf(name, "hell_in.str");
break;
case 731:
std::sprintf(name, "dragon_h.str");
break;
case 734:
std::sprintf(name, "chainlight.str");
break;
case 745:
std::sprintf(name, "aimed.str");
break;
case 746:
std::sprintf(name, "arrowstorm.str");
break;
case 747:
std::sprintf(name, "laulamus.str");
break;
case 748:
std::sprintf(name, "lauagnus.str");
break;
case 749:
std::sprintf(name, "mil_shield.str");
break;
case 795:
std::sprintf(name, "powerswing.str");
break;
case 813:
std::sprintf(name, "enervation.str");
break;
case 814:
std::sprintf(name, "groomy.str");
break;
case 815:
std::sprintf(name, "ignorance.str");
break;
case 816:
std::sprintf(name, "laziness.str");
break;
case 817:
std::sprintf(name, "unlucky.str");
break;
case 818:
std::sprintf(name, "weakness.str");
break;
case 920:
std::sprintf(name, "Firewall_per.str");
break;
case 926:
std::sprintf(name, "hunter_shockwave_blue.str");
break;
case 959:
std::sprintf(name, "poison_mist.str");
break;
case 960:
std::sprintf(name, "eraser_cutter.str");
break;
case 964:
std::sprintf(name, "lava_slide.str");
break;
case 965:
std::sprintf(name, "sonic_claw.str");
break;
case 966:
std::sprintf(name, "tinder.str");
break;
case 967:
std::sprintf(name, "mid_frenzy.str");
break;
case 975:
std::sprintf(name, "vash00.str");
break;
case 987:
std::sprintf(name, "rwc2011.str");
break;
case 988:
std::sprintf(name, "rwc2011_2.str");
break;
case 1006:
std::sprintf(name, "100.str");
break;
case 1015:
std::sprintf(name, "rune_success.str");
break;
case 1016:
std::sprintf(name, "rune_fail.str");
break;
case 1017:
std::sprintf(name, "changematerial_su.str");
break;
case 1018:
std::sprintf(name, "changematerial_fa.str");
break;
case 1019:
std::sprintf(name, "Guardian.str");
break;
case 1020:
std::sprintf(name, "bubble%d_1.str", std::rand() % 4 + 1);
break;
case 1021:
std::sprintf(name, "dust.str");
effect.unknown_11C80 = 10;
break;
case 1029:
std::sprintf(name, "dancingblade.str");
break;
case 1031:
std::sprintf(name, "INVINCIBLEOFF2.str");
break;
case 1040:
std::sprintf(name, "gc_darkcrow.str");
effect.unknown_11C80 = 9999;
break;
case 1042:
std::sprintf(name, "all_full_throttle.str");
break;
case 1043:
std::sprintf(name, "sr_flashcombo.str");
break;
case 1044:
std::sprintf(name, "rk_luxanima.str");
break;
case 1046:
std::sprintf(name, "so_elemental_shield.str");
break;
case 1047:
std::sprintf(name, "AB_OFFERTORIUM.str");
break;
case 1048:
std::sprintf(name, "WL_TELEKINESIS_INTENSE.str");
effect.unknown_11C80 = 9999;
break;
case 1049:
std::sprintf(name, "GN_ILLUSIONDOPING.str");
break;
case 1050:
std::sprintf(name, "NC_MAGMA_ERUPTION.str");
effect.unknown_11C80 = 9999;
break;
case 1055:
std::sprintf(name, "chill.str");
effect.unknown_11C80 = 9999;
break;
case 1057:
std::sprintf(name, "AB_OFFERTORIUM_ring.str");
effect.unknown_11C80 = 9999;
break;
default:
break;
}
}

View file

@ -1,45 +0,0 @@
#include "Contents/Effects/EffectActor.h"
#include "Contents/Effects/EffectPrimitiveState.h"
#include "Contents/Effects/RagEffectState.h"
#include "Resource/Resource.h"
#include <cstring>
// OFFSET: 0x00BF84B0
// FUNCTION: fn_20007
RagEffectState::RagEffectState()
: parent(nullptr), unknown_0160(0), unknown_0164(0), id(0), unknown_016C(1), unknown_0170(0), unknown_0174(0), unknown_0178(0), offset{}, unknown_018C{},
resource(nullptr), resourceData(nullptr), unknown_119F4(0), unknown_11C7C(0), unknown_11C80(0), unknown_11C84(nullptr), unknown_11C88{-1, -1, -1, -1},
forceRender(0), tag(0), unknown_11CA0(0) {
for (unsigned index = 0; index < 20; ++index) {
auto* record = this->unknown_01AC + index * 80;
const std::uint32_t zero = 0;
for (unsigned field = 0; field < 6; ++field) {
std::memcpy(record + field * 4, &zero, sizeof(zero));
}
}
std::memset(this->unknown_11A7C, 0, sizeof(this->unknown_11A7C));
std::memset(this->vertices, 0, sizeof(this->vertices));
}
// OFFSET: 0x00C0AED0
// FUNCTION: fn_20015
RagEffectState::~RagEffectState() {
for (EffectPrimitiveState* particle : this->related) {
particle->parent = nullptr;
}
this->related.clear();
if (this->parent) {
this->parent->state.Attachments().Unlink(this);
}
if (this->resource) {
this->resource->Release();
}
}

View file

@ -14,6 +14,7 @@
#include <zlib.h>
namespace {
// INLINED
std::string Basename(std::string path) {
const auto separator = path.rfind('\\');

View file

@ -10,6 +10,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\Emblem\\CEmblemDataDownloadAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -23,8 +24,7 @@ CEmblemDataDownloadAsyncWork::CEmblemDataDownloadAsyncWork()
m_connection(nullptr) {
}
// OFFSET: 0x005E9FE0
// FUNCTION: fn_03964
// INLINED
CEmblemDataDownloadAsyncWork::~CEmblemDataDownloadAsyncWork() = default;
// OFFSET: 0x005EA350

View file

@ -8,13 +8,11 @@
// GLOBAL: gl_24355
CEmblemDataMgr* g_emblemDataMgr;
// OFFSET: 0x005EB150
// FUNCTION: fn_03970
// INLINED
CEmblemDataMgr::CEmblemDataMgr() : m_enabled(true), m_uploading(false) {
}
// OFFSET: 0x005EB0D0
// FUNCTION: fn_03969
// INLINED
CEmblemDataMgr::~CEmblemDataMgr() = default;
// OFFSET: 0x005EB150

View file

@ -11,6 +11,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\Emblem\\CEmblemDataUploadAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -23,8 +24,7 @@ CEmblemDataUploadAsyncWork::CEmblemDataUploadAsyncWork()
: NAsyncWork("Emblem_Upload"), m_accountId(0), m_guildId(0), m_diagnostic(Diagnostic(false, "unknwon", 27)), m_owner(nullptr), m_context(nullptr) {
}
// OFFSET: 0x005EC350
// FUNCTION: fn_03979
// INLINED
CEmblemDataUploadAsyncWork::~CEmblemDataUploadAsyncWork() = default;
// OFFSET: 0x005EC6F0

View file

@ -6,10 +6,10 @@
#include <timeapi.h>
// OFFSET: 0x0065C5F0
// FUNCTION: fn_05150
CGuildEmblemReqBundle::CGuildEmblemReqBundle() = default;
// OFFSET: 0x0065C8C0
// FUNCTION: fn_05153
// INLINED
CGuildEmblemReqBundle::~CGuildEmblemReqBundle() = default;
// OFFSET: 0x0065CA90

View file

@ -1,5 +1,6 @@
#include "Contents/ForbiddenWords.h"
#include "File/CommonObject.h"
#include "Utility/StackAlloc.h"
#include <atlconv.h>
#include <atlexcept.h>
@ -48,7 +49,7 @@ bool ForbiddenWords::Load(const char* name, CCommonObject& storage, ResourceByte
// FUNCTION: fn_18063
bool ForbiddenWords::Allows(const char* text) const {
const std::size_t size = std::strlen(text) + 1;
char* storage = static_cast<char*>(_malloca(size));
char* storage = static_cast<char*>(STACK_ALLOC(size));
if (!storage) {
return false;

View file

@ -31,6 +31,7 @@ bool GroundGeometry::CellRectangle(const C3dAttr& terrain, int column, int row,
}
namespace {
// INLINED
void DrawDecal(
const GroundGeometry& ground, const C3dAttr& terrain, const float* matrix, int column, int row, std::uint32_t color, CTexture& texture, const float* uv,
float bias, GroundRenderContext& context

View file

@ -13,11 +13,13 @@ namespace {
float values[4][3]{};
};
// INLINED
float InverseLength(float squared) {
const float length = std::sqrt(squared);
return 1.0f / length;
}
// INLINED
void Normalize(float* vector, bool yFirst) {
const float first = yFirst ? vector[1] * vector[1] + vector[0] * vector[0] : vector[0] * vector[0] + vector[1] * vector[1];
const float inverse = InverseLength(first + vector[2] * vector[2]);
@ -26,12 +28,14 @@ namespace {
vector[2] = inverse * vector[2];
}
// INLINED
void Add(float* result, const float* value) {
result[0] = result[0] + value[0];
result[1] = result[1] + value[1];
result[2] = result[2] + value[2];
}
// INLINED
std::uint32_t
LitColor(const float* normal, bool normalize, bool side, const float* direction, const float* diffuse, const float* ambient, const GroundQuad* source) {
float vector[3] = {normal[0], normal[1], normal[2]};
@ -64,8 +68,7 @@ namespace {
GroundGeometry::GroundGeometry() : cellSize(10.0f), loaded(0) {
}
// OFFSET: 0x00ABDD80
// FUNCTION: fn_17554
// INLINED
GroundGeometry::~GroundGeometry() {
this->ClearLightmaps();
}

View file

@ -4,7 +4,7 @@
// OFFSET: 0x00ABFB10
// FUNCTION: fn_17558
void GroundGeometry::InitializeLighting(const C3dAttr& terrain) {
// STATIC: 0x01348128; center, north, south, east, west in that order.
// STATIC: 0x01348128
constexpr int offsets[5][2] = {{0, 0}, {0, -1}, {0, 1}, {1, 0}, {-1, 0}};
const int columns = 2 * this->width;
const int rows = 2 * this->height;

View file

@ -8,12 +8,14 @@
#include <cstring>
namespace {
// INLINED
float Minimum4(float a, float b, float c, float d) {
const float first = !(a > b) ? a : b;
const float second = !(c > d) ? c : d;
return first > second ? second : first;
}
// INLINED
float Maximum4(float a, float b, float c, float d) {
const float first = !(b > a) ? a : b;
const float second = !(d > c) ? c : d;
@ -21,6 +23,7 @@ namespace {
}
}
// INLINED
bool GroundQuadVisible(const RenderVertex* vertices, const GroundRenderContext& context) {
const float minimumX = Minimum4(vertices[0].x, vertices[1].x, vertices[2].x, vertices[3].x);
@ -56,6 +59,7 @@ bool GroundQuadVisible(const RenderVertex* vertices, const GroundRenderContext&
}
namespace {
// INLINED
void Submit(const float* matrix, const GroundQuad& quad, bool clip, GroundRenderContext& context) {
RenderVertex vertices[4]{};

View file

@ -6,8 +6,7 @@
#include <algorithm>
#include <cstdio>
// OFFSET: 0x00ABD640
// FUNCTION: fn_17546
// INLINED
GroundWaterState::GroundWaterState() : level(0.0f), animation(3), pitch(50), phase(2), type(0), height(1.0f), columns(1), rows(1), partitioned(false) {
}
@ -69,7 +68,7 @@ float GroundWaterState::Level(int width, int height, int column, int row) const
// OFFSET: 0x00AC1430
// FUNCTION: fn_17581
void GroundWaterState::Update(TextureCache& textures) {
// STATIC: 0x01159248; original client-code-page bytes, not a UTF-8 path.
// STATIC: 0x01159248
constexpr char format[] = "\xBF\xF6\xC5\xCD\\water%d%02d.jpg";
char name[32]{};

View file

@ -85,8 +85,7 @@ bool EmotionHotkeys::LoadDefaults(std::uint32_t accountId, bool languagePrefix,
return this->current.size() == 10;
}
// OFFSET: 0x005BCE50
// FUNCTION: fn_03469
// INLINED
void EmotionHotkeys::Export(Json::Value& data) const {
Json::Value values;

View file

@ -34,9 +34,7 @@ bool SkillUsesPercentSp(int id) {
}
// OFFSET: 0x008224C0
// FUNCTION: fn_10278
// OFFSET: 0x00822550
// FUNCTION: fn_10279
std::string SkillTooltip(const char* hotkey, const char* name, int level, int sp, int ap, bool percent) {
char text[4096];
const char* format;

View file

@ -4,6 +4,7 @@
#include <new>
namespace {
// INLINED
bool HiddenInterfaceIndex(int index) {
switch (index) {
case 30:
@ -64,11 +65,11 @@ namespace {
CUserHotkeyMgr* g_userHotkeyMgr;
// OFFSET: 0x005F7AA0
// FUNCTION: fn_04052
CUserHotkeyMgr::CUserHotkeyMgr() : m_enabled(true), m_loaded(false), m_changes(0), m_version2(false) {
}
// OFFSET: 0x005F7CE0
// FUNCTION: fn_04054
CUserHotkeyMgr::~CUserHotkeyMgr() = default;
// OFFSET: 0x005F7F70

View file

@ -1,9 +1,8 @@
#include "Contents/InstantVar.h"
// OFFSET: 0x00CA8EE0
// FUNCTION: fn_20997
// OFFSET: 0x00CA9260
// FUNCTION: fn_21003
// FUNCTION: fn_20997
CInstantVar::~CInstantVar() = default;
// OFFSET: 0x00D559B0
@ -13,16 +12,13 @@ void CInstantVar::Set(int key, std::int64_t value) {
}
// OFFSET: 0x00612020
// FUNCTION: fn_04340
// OFFSET: 0x0091BE20
// FUNCTION: fn_12610
std::int64_t CInstantVar::Get(int key) const {
const auto entry = this->m_values.find(key);
return entry == this->m_values.end() ? 0 : entry->second;
}
// ORIGINAL_SITE: 0x00CAFB5E in fn_21086 (fragment)
// ORIGINAL_SITE: 0x00DC4701 in fn_22763 (fragment)
// INLINED
void CInstantVar::Clear() {
this->m_values.clear();
}

View file

@ -13,9 +13,8 @@ ITEM_DESC::ITEM_DESC()
}
// OFFSET: 0x006D3610
// FUNCTION: fn_06541
// OFFSET: 0x006D3680
// FUNCTION: fn_06542
// FUNCTION: fn_06541
ITEM_DESC::~ITEM_DESC() = default;
// OFFSET: 0x006D5160
@ -40,9 +39,8 @@ ITEM_DESC& ITEM_DESC::operator=(const ITEM_DESC& other) {
}
// OFFSET: 0x006D3A00
// FUNCTION: fn_06545
// OFFSET: 0x006D5890
// FUNCTION: fn_06579
// FUNCTION: fn_06545
ITEM_DESC& ItemDescriptions::Find(int id) {
static ITEM_DESC missing;
const auto entry = this->values.find(id);

View file

@ -28,10 +28,12 @@ namespace {
}
}
// INLINED
void CardIds(const ItemInfo& item, int (&ids)[4]) {
std::memcpy(ids, item.unknown_001C, sizeof(ids));
}
// INLINED
int Copy(char* output, int capacity, const char* text) {
const int error = strncpy_s(output, capacity, text ? text : " ", _TRUNCATE);
return error == 0 || error == 80 ? (output ? static_cast<int>(strnlen(output, capacity)) : 0) : 0;

View file

@ -0,0 +1,41 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_ITEMS_WEAPONTYPE_H
#define RAGNAROK_SOURCE_CONTENTS_ITEMS_WEAPONTYPE_H
enum WeaponType : int {
W_FIST,
W_DAGGER,
W_1HSWORD,
W_2HSWORD,
W_1HSPEAR,
W_2HSPEAR,
W_1HAXE,
W_2HAXE,
W_MACE,
W_2HMACE,
W_STAFF,
W_BOW,
W_KNUCKLE,
W_MUSICAL,
W_WHIP,
W_BOOK,
W_KATAR,
W_REVOLVER,
W_RIFLE,
W_GATLING,
W_SHOTGUN,
W_GRENADE,
W_HUUMA,
W_2HSTAFF,
MAX_WEAPON_TYPE,
W_DOUBLE_DD,
W_DOUBLE_SS,
W_DOUBLE_AA,
W_DOUBLE_DS,
W_DOUBLE_DA,
W_DOUBLE_SA,
MAX_WEAPON_TYPE_ALL,
W_SHIELD = MAX_WEAPON_TYPE,
};
#endif

View file

@ -0,0 +1,231 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_JOBS_JOBID_H
#define RAGNAROK_SOURCE_CONTENTS_JOBS_JOBID_H
enum JobId : int {
JOB_NOVICE,
JOB_SWORDMAN,
JOB_MAGE,
JOB_ARCHER,
JOB_ACOLYTE,
JOB_MERCHANT,
JOB_THIEF,
JOB_KNIGHT,
JOB_PRIEST,
JOB_WIZARD,
JOB_BLACKSMITH,
JOB_HUNTER,
JOB_ASSASSIN,
JOB_KNIGHT2,
JOB_CRUSADER,
JOB_MONK,
JOB_SAGE,
JOB_ROGUE,
JOB_ALCHEMIST,
JOB_BARD,
JOB_DANCER,
JOB_CRUSADER2,
JOB_WEDDING,
JOB_SUPER_NOVICE,
JOB_GUNSLINGER,
JOB_NINJA,
JOB_XMAS,
JOB_SUMMER,
JOB_HANBOK,
JOB_OKTOBERFEST,
JOB_SUMMER2,
JOB_MAX_BASIC,
JOB_NOVICE_HIGH = 4001,
JOB_SWORDMAN_HIGH,
JOB_MAGE_HIGH,
JOB_ARCHER_HIGH,
JOB_ACOLYTE_HIGH,
JOB_MERCHANT_HIGH,
JOB_THIEF_HIGH,
JOB_LORD_KNIGHT,
JOB_HIGH_PRIEST,
JOB_HIGH_WIZARD,
JOB_WHITESMITH,
JOB_SNIPER,
JOB_ASSASSIN_CROSS,
JOB_LORD_KNIGHT2,
JOB_PALADIN,
JOB_CHAMPION,
JOB_PROFESSOR,
JOB_STALKER,
JOB_CREATOR,
JOB_CLOWN,
JOB_GYPSY,
JOB_PALADIN2,
JOB_BABY,
JOB_BABY_SWORDMAN,
JOB_BABY_MAGE,
JOB_BABY_ARCHER,
JOB_BABY_ACOLYTE,
JOB_BABY_MERCHANT,
JOB_BABY_THIEF,
JOB_BABY_KNIGHT,
JOB_BABY_PRIEST,
JOB_BABY_WIZARD,
JOB_BABY_BLACKSMITH,
JOB_BABY_HUNTER,
JOB_BABY_ASSASSIN,
JOB_BABY_KNIGHT2,
JOB_BABY_CRUSADER,
JOB_BABY_MONK,
JOB_BABY_SAGE,
JOB_BABY_ROGUE,
JOB_BABY_ALCHEMIST,
JOB_BABY_BARD,
JOB_BABY_DANCER,
JOB_BABY_CRUSADER2,
JOB_SUPER_BABY,
JOB_TAEKWON,
JOB_STAR_GLADIATOR,
JOB_STAR_GLADIATOR2,
JOB_SOUL_LINKER,
JOB_GANGSI,
JOB_DEATH_KNIGHT,
JOB_DARK_COLLECTOR,
JOB_RUNE_KNIGHT = 4054,
JOB_WARLOCK,
JOB_RANGER,
JOB_ARCH_BISHOP,
JOB_MECHANIC,
JOB_GUILLOTINE_CROSS,
JOB_RUNE_KNIGHT_T,
JOB_WARLOCK_T,
JOB_RANGER_T,
JOB_ARCH_BISHOP_T,
JOB_MECHANIC_T,
JOB_GUILLOTINE_CROSS_T,
JOB_ROYAL_GUARD,
JOB_SORCERER,
JOB_MINSTREL,
JOB_WANDERER,
JOB_SURA,
JOB_GENETIC,
JOB_SHADOW_CHASER,
JOB_ROYAL_GUARD_T,
JOB_SORCERER_T,
JOB_MINSTREL_T,
JOB_WANDERER_T,
JOB_SURA_T,
JOB_GENETIC_T,
JOB_SHADOW_CHASER_T,
JOB_RUNE_KNIGHT2,
JOB_RUNE_KNIGHT_T2,
JOB_ROYAL_GUARD2,
JOB_ROYAL_GUARD_T2,
JOB_RANGER2,
JOB_RANGER_T2,
JOB_MECHANIC2,
JOB_MECHANIC_T2,
JOB_BABY_RUNE_KNIGHT = 4096,
JOB_BABY_WARLOCK,
JOB_BABY_RANGER,
JOB_BABY_ARCH_BISHOP,
JOB_BABY_MECHANIC,
JOB_BABY_GUILLOTINE_CROSS,
JOB_BABY_ROYAL_GUARD,
JOB_BABY_SORCERER,
JOB_BABY_MINSTREL,
JOB_BABY_WANDERER,
JOB_BABY_SURA,
JOB_BABY_GENETIC,
JOB_BABY_SHADOW_CHASER,
JOB_BABY_RUNE_KNIGHT2,
JOB_BABY_ROYAL_GUARD2,
JOB_BABY_RANGER2,
JOB_BABY_MECHANIC2,
JOB_SUPER_NOVICE_E = 4190,
JOB_SUPER_BABY_E,
JOB_KAGEROU = 4211,
JOB_OBORO,
JOB_REBELLION = 4215,
JOB_SUMMONER = 4218,
JOB_BABY_SUMMONER = 4220,
JOB_BABY_NINJA = 4222,
JOB_BABY_KAGEROU,
JOB_BABY_OBORO,
JOB_BABY_TAEKWON,
JOB_BABY_STAR_GLADIATOR,
JOB_BABY_SOUL_LINKER,
JOB_BABY_GUNSLINGER,
JOB_BABY_REBELLION,
JOB_BABY_STAR_GLADIATOR2 = 4238,
JOB_STAR_EMPEROR,
JOB_SOUL_REAPER,
JOB_BABY_STAR_EMPEROR,
JOB_BABY_SOUL_REAPER,
JOB_STAR_EMPEROR2,
JOB_BABY_STAR_EMPEROR2,
JOB_DRAGON_KNIGHT = 4252,
JOB_MEISTER,
JOB_SHADOW_CROSS,
JOB_ARCH_MAGE,
JOB_CARDINAL,
JOB_WINDHAWK,
JOB_IMPERIAL_GUARD,
JOB_BIOLO,
JOB_ABYSS_CHASER,
JOB_ELEMENTAL_MASTER,
JOB_INQUISITOR,
JOB_TROUBADOUR,
JOB_TROUVERE,
JOB_WINDHAWK2 = 4278,
JOB_MEISTER2,
JOB_DRAGON_KNIGHT2,
JOB_IMPERIAL_GUARD2,
JOB_SKY_EMPEROR = 4302,
JOB_SOUL_ASCETIC,
JOB_SHINKIRO,
JOB_SHIRANUI,
JOB_NIGHT_WATCH,
JOB_HYPER_NOVICE,
JOB_SPIRIT_HANDLER,
JOB_SKY_EMPEROR2 = 4316,
JOB_SECOND_JOB_START = 4331,
JOB_RUNE_KNIGHT_2ND,
JOB_MECHANIC_2ND,
JOB_GUILLOTINE_CROSS_2ND,
JOB_WARLOCK_2ND,
JOB_ARCHBISHOP_2ND,
JOB_RANGER_2ND,
JOB_ROYAL_GUARD_2ND,
JOB_GENETIC_2ND,
JOB_SHADOW_CHASER_2ND,
JOB_SORCERER_2ND,
JOB_SURA_2ND,
JOB_MINSTREL_2ND,
JOB_WANDERER_2ND,
JOB_SECOND_JOB_END = 4350,
JOB_MAX,
};
#endif

View file

@ -1,4 +1,4 @@
// STATIC: 0x0115AA88 (4698 entries; final null sentinel omitted)
// STATIC: 0x0115AA88
// GLOBAL: gl_13433
"MSI_DO_YOU_AGREE",
"MSI_SERVER_CONNECTION_FAILED",

View file

@ -102,9 +102,7 @@ const char* LookupMessage(int id, bool languagePrefix, int serviceType, WORD lan
}
// OFFSET: 0x00B00E40
// FUNCTION: fn_18374
// OFFSET: 0x00B00910
// FUNCTION: fn_18372
bool ImportMessageCsv(std::string_view bytes) {
g_messageStrings.clear();
if (bytes.size() >= 2 && ((static_cast<unsigned char>(bytes[0]) == 0xFF && static_cast<unsigned char>(bytes[1]) == 0xFE) ||

View file

@ -6,6 +6,10 @@
#include <unordered_map>
#include <windows.h>
enum MessageId : int {
MSI_FAILED_ADD_TAB = 1578
};
// STATIC: 0x016D5780
// GLOBAL: gl_24382
extern std::unordered_map<int, std::string> g_messageStrings;

View file

@ -12,8 +12,7 @@ CWhisperBlockMgr* g_whisperBlockMgr;
CWhisperBlockMgr::CWhisperBlockMgr() : m_enabled(true), m_tracking(false), m_changes(0) {
}
// OFFSET: 0x00610F70
// FUNCTION: fn_04323
// INLINED
CWhisperBlockMgr::~CWhisperBlockMgr() = default;
// OFFSET: 0x00611040

View file

@ -4,18 +4,21 @@
#include <windows.h>
namespace {
// INLINED
float Radians(float degrees) {
return (degrees / 180.0f) * 3.141592f;
}
}
// OFFSET: 0x00AB59A0
// FUNCTION: fn_17461
C3dActor::C3dActor()
: position{}, rotation{}, scale{1, 1, 1}, offset{}, dirty(1), oriented{}, corners{}, minimum{}, maximum{}, enabled(1), renderFrame(0), occlusionEnabled(0),
occluded(0), alpha(255), commandMode(0), color(0xFFFFFFFFu), playback(2), speed(0), shade(0) {
}
// OFFSET: 0x00AB6420
// FUNCTION: fn_17470
C3dActor::~C3dActor() {
for (ModelVolume*& volume : this->volumes) {
delete volume;
@ -24,22 +27,22 @@ C3dActor::~C3dActor() {
}
// OFFSET: 0x00AB5BB0
// FUNCTION: fn_17462
C3dActorV1::C3dActorV1() : root(nullptr), frame(0), animationLength(0), lastTick(0) {
}
// OFFSET: 0x00AB69C0
// FUNCTION: fn_17473
// INLINED
C3dActorV1::~C3dActorV1() {
delete this->root;
this->root = nullptr;
}
// OFFSET: 0x00AB5C30
// FUNCTION: fn_17463
C3dActorV2::C3dActorV2() : framesPerSecond(0), duration(0), startTick(GetTickCount()) {
}
// OFFSET: 0x00AB6A50
// FUNCTION: fn_17474
// INLINED
C3dActorV2::~C3dActorV2() {
for (C3dNodeV2*& root : this->roots) {
delete root;
@ -212,6 +215,7 @@ void C3dActor::CopyVolumes(const std::list<ModelVolume*>& source) {
}
}
// INLINED
bool C3dActor::Reversed() const {
bool result = this->scale[0] >= 0.0f;
@ -222,6 +226,7 @@ bool C3dActor::Reversed() const {
return this->scale[2] < 0.0f ? !result : result;
}
// INLINED
void C3dActor::Fade() {
if (this->occluded == 1) {
if (this->alpha > 90) {

View file

@ -4,19 +4,23 @@
#include <cstring>
namespace {
// INLINED
float Absolute(float value) {
return std::fabs(value);
}
// INLINED
float Radians(float degrees) {
return (degrees / 180.0f) * 3.141592f;
}
// INLINED
float InverseLength(float squared) {
const float root = std::sqrt(squared);
return static_cast<float>(1.0 / static_cast<double>(root));
}
// INLINED
float Coordinate(const float* point, const float* matrix, unsigned axis) {
return ((point[0] * matrix[axis] + point[1] * matrix[axis + 3]) + point[2] * matrix[axis + 6]) + matrix[axis + 9];
}
@ -56,6 +60,7 @@ void C3dActorV2::UpdateBounds() {
this->FinishBounds(bounds, true);
}
// INLINED
void C3dActor::FinishBounds(const float* bounds, bool modern) {
for (unsigned axis = 0; axis < 3; ++axis) {
this->minimum[axis] = 100000;

View file

@ -5,7 +5,6 @@
namespace {
// OFFSET: 0x00554340
// FUNCTION: fn_02022
ModelRotationKey MatrixQuaternion(const AffineMatrix& matrix) {
ModelRotationKey result{0, {0, 0, 0, 1}};
const float trace = ((matrix.values[0] + 1.0f) + matrix.values[4]) + matrix.values[8];

View file

@ -7,15 +7,18 @@
#include <cstring>
namespace {
// INLINED
unsigned Byte(float value) {
return static_cast<unsigned>(TruncateToInt(value)) & 255u;
}
// INLINED
float InverseLength(float squared) {
const float root = std::sqrt(squared);
return static_cast<float>(1.0 / static_cast<double>(root));
}
// INLINED
void Light(const float* normal, const float* matrix, const ModelLightingContext& context, float* output) {
const float x = ((normal[0] * matrix[0] + normal[1] * matrix[3]) + normal[2] * matrix[6]) + 0.0f;
const float y = ((normal[0] * matrix[1] + normal[1] * matrix[4]) + normal[2] * matrix[7]) + 0.0f;
@ -30,6 +33,7 @@ namespace {
}
}
// INLINED
std::uint32_t LitColor(std::uint32_t color, float alpha, bool shaded, const float* light) {
std::uint32_t result = Byte(alpha * 255.0f) << 24;
const float factor = shaded ? 0.5f : 1.0f;

View file

@ -21,7 +21,6 @@ C3dNode::~C3dNode() {
C3dNodeV1::C3dNodeV1() = default;
// OFFSET: 0x00AB6BA0
// FUNCTION: fn_17476
C3dNodeV1::~C3dNodeV1() = default;
// OFFSET: 0x00AB5EA0
@ -29,7 +28,6 @@ C3dNodeV1::~C3dNodeV1() = default;
C3dNodeV2::C3dNodeV2() = default;
// OFFSET: 0x00AB6C50
// FUNCTION: fn_17477
C3dNodeV2::~C3dNodeV2() = default;
// FUNCTION: fn_17481

View file

@ -3,10 +3,12 @@
#include <cmath>
namespace {
// INLINED
float Absolute(float value) {
return std::fabs(value);
}
// FUNCTION: fn_02019
bool Intersects(const float* ray, const OrientedBounds& bounds) {
const float delta[3] = {bounds.center[0] - ray[0], bounds.center[1] - ray[1], bounds.center[2] - ray[2]};
float near = -999999.0f;

View file

@ -4,8 +4,8 @@
#include <cmath>
// OFFSET: 0x00554CD0
// FUNCTION: fn_02030
// OFFSET: 0x00554B90
// FUNCTION: fn_02030
// FUNCTION: fn_02029
void QuaternionMatrix(const ModelRotationKey& key, AffineMatrix& output) {
const float x = key.rotation[0];

View file

@ -27,6 +27,7 @@ ModelRenderContext::ModelRenderContext(
}
}
// INLINED
bool ModelTriangleVisible(const RenderVertex* a, const RenderVertex* b, const RenderVertex* c, const ModelRenderContext& context) {
const float firstMinimumX = a->x > b->x ? b->x : a->x;
const float minimumX = firstMinimumX > c->x ? c->x : firstMinimumX;
@ -56,10 +57,12 @@ bool ModelTriangleVisible(const RenderVertex* a, const RenderVertex* b, const Re
}
namespace {
// INLINED
unsigned Byte(float value) {
return static_cast<unsigned>(TruncateToInt(value)) & 255u;
}
// INLINED
std::uint32_t Color(std::uint32_t source, unsigned char alpha, const float* scale) {
const unsigned red = Byte(static_cast<float>((source >> 16) & 255u) * scale[0]);
const unsigned green = Byte(static_cast<float>((source >> 8) & 255u) * scale[1]);
@ -67,8 +70,32 @@ namespace {
return (static_cast<unsigned>(alpha) << 24) | (red << 16) | (green << 8) | blue;
}
// INLINED
float Rotated(float sine, float delta, float cosineProduct, bool subtract) {
const double product = static_cast<double>(sine) * delta;
return static_cast<float>(subtract ? cosineProduct - product : product + cosineProduct);
}
}
// INLINED
inline void TransformModelUV(float& u, float& v, const ModelTextureTransform& transform) {
const float cosineU = ClientCos(transform.values[4]);
const float productU = cosineU * (u - 0.5f);
const float sineU = ClientSin(transform.values[4]);
const float rotatedU = Rotated(sineU, v - 0.5f, productU, true);
const float resultU = (rotatedU * transform.values[2] + 0.5f) + transform.values[0];
const float cosineV = ClientCos(transform.values[4]);
const float productV = cosineV * (v - 0.5f);
const float sineV = ClientSin(transform.values[4]);
const float rotatedV = Rotated(sineV, u - 0.5f, productV, false);
const float resultV = (rotatedV * transform.values[3] + 0.5f) + transform.values[1];
u = resultU;
v = resultV;
}
// INLINED
void DrawModelNode(C3dNode& node, const float* matrix, unsigned char reversed, bool clip, unsigned char commandMode, ModelRenderContext& context, bool modern) {
AffineMatrix camera;
std::memcpy(camera.values, matrix, sizeof(camera.values));

View file

@ -3,6 +3,7 @@
#include <cmath>
namespace {
// INLINED
float Absolute(float value) {
return std::fabs(value);
}

View file

@ -1,25 +0,0 @@
#include "Contents/Models/ModelNode.h"
namespace {
float Rotated(float sine, float delta, float cosineProduct, bool subtract) {
const double product = static_cast<double>(sine) * delta;
return static_cast<float>(subtract ? cosineProduct - product : product + cosineProduct);
}
}
// ORIGINAL_SITE: 0x00AB8856 in fn_17500 (fragment)
void TransformModelUV(float& u, float& v, const ModelTextureTransform& transform) {
const float cosineU = ClientCos(transform.values[4]);
const float productU = cosineU * (u - 0.5f);
const float sineU = ClientSin(transform.values[4]);
const float rotatedU = Rotated(sineU, v - 0.5f, productU, true);
const float resultU = (rotatedU * transform.values[2] + 0.5f) + transform.values[0];
const float cosineV = ClientCos(transform.values[4]);
const float productV = cosineV * (v - 0.5f);
const float sineV = ClientSin(transform.values[4]);
const float rotatedV = Rotated(sineV, u - 0.5f, productV, false);
const float resultV = (rotatedV * transform.values[3] + 0.5f) + transform.values[1];
u = resultU;
v = resultV;
}

View file

@ -23,6 +23,7 @@ public:
void Close();
bool Update();
bool CopyTo(CTexture* texture);
// INLINED
BinkHandle* Handle() const {
return this->m_handle;
}

View file

@ -5,13 +5,11 @@
#include <algorithm>
#include <cmath>
// OFFSET: 0x007B00F0
// FUNCTION: fn_09165
// INLINED
NamedBinkMovie::NamedBinkMovie(BinkMovieContext& context) : decoder(std::make_unique<BinkMovie>(context)), radius(150.0f) {
}
// OFFSET: 0x007AFF80
// FUNCTION: fn_09163
// INLINED
NamedBinkMovie::~NamedBinkMovie() = default;
// OFFSET: 0x007AFB50

View file

@ -11,7 +11,6 @@ CAdvenPartyInfo::CAdvenPartyInfo()
CAdvenPartyInfo::CAdvenPartyInfo(const CAdvenPartyInfo& other) = default;
// OFFSET: 0x005739D0
// FUNCTION: fn_02494
// OFFSET: 0x00573AA0
// FUNCTION: fn_02495
// FUNCTION: fn_02494
CAdvenPartyInfo::~CAdvenPartyInfo() = default;

View file

@ -3,7 +3,6 @@
#include <cstdint>
#include <string>
#include <vector>
namespace Json {
class Value;

View file

@ -4,6 +4,7 @@
#include <json/value.h>
#include <new>
// INLINED
std::uint32_t CAdventurerAgencyMgr::Id(double value) {
if (!(value < 4294967296.0) || value <= -1.0) {
return 0xFFFFFFFFu;
@ -22,9 +23,8 @@ CAdventurerAgencyMgr::CAdventurerAgencyMgr() : enabled(true), registered(false),
}
// OFFSET: 0x005CA880
// FUNCTION: fn_03650
// OFFSET: 0x005CA8D0
// FUNCTION: fn_03651
// FUNCTION: fn_03650
CAdventurerAgencyMgr::~CAdventurerAgencyMgr() = default;
// OFFSET: 0x005CA940

View file

@ -3,6 +3,8 @@
#include "Contents/Party/AdvenPartyInfo.h"
#include <vector>
struct AsyncDiagnostic;
struct StopRecruitingContext;
struct RegisterPartyContext;

View file

@ -10,6 +10,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\AdventurerAgency\\CChangePartyMasterAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -22,8 +23,7 @@ CChangePartyMasterAsyncWork::CChangePartyMasterAsyncWork()
: NAsyncWork("Change_PartyMaster"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, "unknwon", 27)), m_windows(nullptr) {
}
// OFFSET: 0x005CDC30
// FUNCTION: fn_03678
// INLINED
CChangePartyMasterAsyncWork::~CChangePartyMasterAsyncWork() = default;
// OFFSET: 0x005CE080

View file

@ -10,6 +10,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\AdventurerAgency\\CLoadMyPartyAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -22,8 +23,7 @@ CLoadMyPartyAsyncWork::CLoadMyPartyAsyncWork()
: NAsyncWork("MyParty_Load"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, "unknwon", 28)), m_windows(nullptr) {
}
// OFFSET: 0x005CF580
// FUNCTION: fn_03686
// INLINED
CLoadMyPartyAsyncWork::~CLoadMyPartyAsyncWork() = default;
// OFFSET: 0x005CF8E0

View file

@ -10,6 +10,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\AdventurerAgency\\CLoadPartyInfoAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -22,8 +23,7 @@ CLoadPartyInfoAsyncWork::CLoadPartyInfoAsyncWork()
: NAsyncWork("PartyInfo_Load"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, "unknwon", 25)), m_context(nullptr) {
}
// OFFSET: 0x005D0840
// FUNCTION: fn_03693
// INLINED
CLoadPartyInfoAsyncWork::~CLoadPartyInfoAsyncWork() = default;
// OFFSET: 0x005D0BB0

View file

@ -10,6 +10,7 @@
namespace {
constexpr char sourceFile[] = "C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\AdventurerAgency\\CLoadPartyLIstAsyncWork.cpp";
// INLINED
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
std::string message = text;
return AsyncDiagnostic(&success, &message, sourceFile, &line);
@ -22,8 +23,7 @@ CLoadPartyListAsyncWork::CLoadPartyListAsyncWork()
: NAsyncWork("PartyList_Load"), m_accountId(0), m_characterId(0), m_page(0), m_diagnostic(Diagnostic(false, "unknwon", 25)), m_windows(nullptr) {
}
// OFFSET: 0x005D1AB0
// FUNCTION: fn_03699
// INLINED
CLoadPartyListAsyncWork::~CLoadPartyListAsyncWork() = default;
// OFFSET: 0x005D1F30

Some files were not shown because too many files have changed in this diff Show more