This commit is contained in:
ragnarok-clanker 2026-10-27 10:06:35 +00:00
commit f3ceb09e9d
62 changed files with 83 additions and 18 deletions

View file

@ -51,6 +51,7 @@ namespace myGPack {
2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11,
};
// INLINED
void Permute(std::uint8_t* block, const std::uint8_t* table, unsigned count) {
std::uint8_t result[8] = {};

View file

@ -33,10 +33,12 @@ char g_moduleBaseName[260] = {};
char g_crashString[8096] = {};
namespace {
// INLINED
int ReadPlayerJob() {
return g_session.m_job;
}
// INLINED
const char* ReadPlayerJobName(int jobId) {
const char* const* namesBegin = g_session.m_jobNamesBegin;
const char* const* namesEnd = g_session.m_jobNamesEnd;

View file

@ -10,6 +10,7 @@
#include <utility>
namespace {
// INLINED
BrowserWindowSizing Sizing(CWebBrowser& owner) {
return {owner.browser, owner.screenWidth, owner.screenHeight, owner.rebar, owner.auxiliaryVisible, owner.width, owner.height};
}

View file

@ -19,6 +19,7 @@ const char* InputCharset::Prefix(bool alternate) const {
return prefix;
}
// INLINED
unsigned InputCharset::CodePage(unsigned fallback) const {
return this->enabled ? LanguageCodePage(this->language) : fallback;
}

View file

@ -64,6 +64,7 @@ public:
void
StopRecruiting(std::uint32_t accountId, std::string world, std::string url, std::string token, std::uint32_t masterAccountId, StopRecruitingContext& context);
// INLINED
CAsyncWorkRecycleObjectPoolMgr& Pools() {
return *this->m_pools;
}

View file

@ -69,6 +69,7 @@ inline void GraphicsConfiguration::Load(LuaScript& script, ScriptOptions& option
}
}
// INLINED
inline AdapterConfiguration GraphicsConfiguration::Adapter() const {
return {this->backend, this->drawGuid, this->renderGuid, this->deviceGuid, this->deviceName};
}

View file

@ -9,6 +9,7 @@ EffectActorState::~EffectActorState() {
this->Attachments().DetachAll();
}
// INLINED
EffectAttachments EffectActorState::Attachments() {
return {this->effects, this->first, this->second};
}

View file

@ -93,6 +93,7 @@ void GroundGeometry::Reset(int columns, int rows) {
this->unknown_0058 = 0;
}
// INLINED
GroundSpatial GroundGeometry::Spatial() const {
return {this->width, this->height, this->cellSize, this->cells};
}

View file

@ -11,18 +11,22 @@ void SaveUserHotkeys();
void ChangeUserHotkey(int tab, int index, int key1, int key2, const std::string& description);
void LoadUserHotkeyTab(Json::Value& values, int tab);
// INLINED
inline void ClearUserHotkeys(LuaScript&) {
ClearUserHotkeys();
}
// INLINED
inline void SaveUserHotkeys(LuaScript&) {
SaveUserHotkeys();
}
// INLINED
inline void ChangeUserHotkey(LuaScript&, int tab, int index, int key1, int key2, const std::string& description) {
ChangeUserHotkey(tab, index, key1, key2, description);
}
// INLINED
inline void LoadUserHotkeyTab(LuaScript&, Json::Value& values, int tab) {
LoadUserHotkeyTab(values, tab);
}

View file

@ -40,6 +40,7 @@ namespace {
}
}
// INLINED
const char* ItemNaming::Message(int id) const {
return LookupMessage(id, this->languagePrefix, this->service, this->language);
}

View file

@ -4,6 +4,7 @@
#include <windows.h>
namespace {
// INLINED
unsigned UnsignedFrame(double value) {
if (!(value < 0x1p32) || value <= -1.0) {
return 0xFFFFFFFFu;

View file

@ -10,6 +10,7 @@
#include "Utility/Math/ScalarConversion.h"
#include <cstring>
// INLINED
ModelRenderContext::ModelRenderContext(
const RenderProjection& projection, RenderCommandPool& commands, RenderVertexPool& vertices, RenderQueues& queues, const int& width, const int& height,
const bool& depthAlpha, const float& depthStart, const float& depthEnd, const bool& overrideColor, const bool& integerColor, const float* overrideScale,

View file

@ -8,6 +8,7 @@ extern "C" {
#include <cstdint>
namespace {
// INLINED
CPlayerSkillBundle& Bundle(lua_State* state) {
return *static_cast<CPlayerSkillBundle*>(lua_touserdata(state, lua_upvalueindex(1)));
}
@ -59,6 +60,7 @@ namespace {
}
}
// INLINED
void RegisterSkillTreeCallbacks(lua_State* state, CPlayerSkillBundle& bundle) {
lua_pushlightuserdata(state, &bundle);
lua_pushcclosure(state, AddSkill, 1);

View file

@ -129,6 +129,7 @@ void WorldModelLoading::Run() {
}
}
// INLINED
void WorldModelLoading::Publish(WorldSpatialTree& root) {
C3dActor* const* data = this->models.data();
PublishWorldModels(root, data, this->published, this->pending);

View file

@ -14,6 +14,7 @@ public:
bool OpenWrite(const char* path, CRenderSystemBase* renderSystem);
bool Open(const char* path, int mode, bool resourcePath, bool option);
// INLINED
bool Open(const char* path) {
this->m_path = path;
this->m_handle = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);

View file

@ -46,12 +46,15 @@ public:
void ResetBuffers();
void SetDeferred(unsigned char value);
// INLINED
SOCKET NativeSocket() const {
return this->m_socket;
}
// INLINED
ConnectionBuffer& Input() {
return this->m_input;
}
// INLINED
unsigned& SendDeadline() {
return this->m_sendDeadline;
}

View file

@ -9,6 +9,7 @@ struct DirectDrawEnumeration::AdapterContext {
DirectDrawDeviceRecord record{};
};
// INLINED
DirectDrawEnumeration::DirectDrawEnumeration(const GUID& selectedDraw, RECT& monitor) : m_selectedDraw(selectedDraw), m_monitor(monitor) {
}

View file

@ -32,6 +32,7 @@ public:
HRESULT TestDevice() override;
HRESULT Present(bool option) override;
// INLINED
DeviceOwnerDX7* Device() const {
return this->m_device;
}

View file

@ -15,6 +15,7 @@ struct TextureBindingDX7 {
/* 0274 */ IDirect3DDevice7* device = nullptr;
void Set(unsigned stage, CTextureDX7* texture);
// INLINED
void Set(IDirect3DDevice7* dev, unsigned stage, CTextureDX7* texture) {
this->device = dev;
this->Set(stage, texture);

View file

@ -25,6 +25,7 @@ private:
HMODULE m_module;
};
// INLINED
inline D3DX9Runtime::D3DX9Runtime() : m_module(LoadLibraryA("D3DX9_43.dll")) {
if (!this->m_module) {
@ -43,6 +44,7 @@ inline D3DX9Runtime::D3DX9Runtime() : m_module(LoadLibraryA("D3DX9_43.dll")) {
}
}
// INLINED
inline D3DX9Runtime::~D3DX9Runtime() {
FreeLibrary(this->m_module);
}

View file

@ -269,10 +269,12 @@ HRESULT DeviceOwnerDX9::Present(int) {
return this->lastPresent;
}
// INLINED
SurfaceDX9Context DeviceOwnerDX9::SurfaceContext() const {
return {this->device, this->backBufferDescription, this->backBuffer};
}
// INLINED
TextureDX9Context DeviceOwnerDX9::TextureContext(
D3DX9Runtime& d3dx, RenderPrimitivePool& primitives, RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd
) const {

View file

@ -23,6 +23,7 @@ CRenderSystemDX9::~CRenderSystemDX9() {
delete this->m_defaultTexture;
}
// INLINED
void CRenderSystemDX9::RefreshContexts() {
this->m_surfaceContext = this->m_device->SurfaceContext();
auto& context = this->m_textureContext;
@ -43,6 +44,7 @@ std::int32_t CRenderSystemDX9::Backend() {
return 2;
}
// INLINED
HRESULT CRenderSystemDX9::Initialize(HWND window) {
const HRESULT result =
InitializeConfiguredDeviceDX9(*this->m_device, window, this->m_context->deviceOptions, this->m_context->adapter, this->m_context->serviceUsesDX7);

View file

@ -49,6 +49,7 @@ public:
HRESULT TestDevice() override;
HRESULT Present(bool option) override;
// INLINED
DeviceOwnerDX9& Device() {
return *this->m_device;
}

View file

@ -9,6 +9,7 @@
namespace {
class ScreenshotOverlay : public UIRPData {
public:
// INLINED
const std::list<RenderPrimitive*>& Primitives() const {
return this->m_primitives;
}

View file

@ -19,6 +19,7 @@ CDCBitmap* CreateBitmapDC(int width, int height, bool fill) {
return bitmap;
}
// INLINED
void CDCBitmap::UploadTexture(CRenderSystemBase& system, CTexture*& texture) {
this->m_bitmap.UploadTexture(system, texture);
}

View file

@ -3,6 +3,7 @@
#include <algorithm>
namespace {
// INLINED
void Append(std::vector<RenderVertex>& block, unsigned count) {
const unsigned first = static_cast<unsigned>(block.size());
block.resize(first + count);

View file

@ -30,6 +30,7 @@ void RendererViewport::SetSize(int columns, int rows, const float& projectionSca
cotangent = projectionScale / this->uiScaleY;
}
// INLINED
RenderProjection RendererViewport::Projection() const {
return {this->scaleX, this->scaleY, this->centerX, this->centerY};
}

View file

@ -1,7 +1,6 @@
#include "Render/Text/FontCache.h"
#include <algorithm>
#include <cstring>
#include <objidl.h>
#include <gdiplus.h>
@ -11,7 +10,6 @@
namespace {
// STATIC: 0x01311F00
// STATIC: 0x01311ED0
const char* const primary[] = {
"\xB1\xBC\xB8\xB2",
"Arial",
@ -27,6 +25,7 @@ namespace {
"Arial",
"Tahoma"
};
// STATIC: 0x01311ED0
const char* const fallback[] = {"Gulim", "Arial", "MS Gothic", "SimSun", "MingLiU", "Tahoma", "Arial", "Verdana", "Verdana", "Arial", "Arial", "Tahoma"};
// OFFSET: 0x0054F2C0

View file

@ -1,7 +1,6 @@
#ifndef RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
#define RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
#include <cstdint>
#include <windows.h>
class CDC;

View file

@ -122,6 +122,7 @@ namespace {
};
}
// INLINED
static inline std::span<const TextureStageWrite> TextureStageModeWrites(int mode) {
switch (mode) {
case 0:

View file

@ -26,16 +26,19 @@ private:
IDirectDraw7* const& m_directDraw;
};
// INLINED
inline ClientTextureSources::ClientTextureSources(
TextureNames& names, const int& modeType, BinkMovies* const& movies, CRenderSystemBase*& system, IDirectDraw7* const& directDraw
)
: m_names(names), m_modeType(modeType), m_movies(movies), m_system(system), m_directDraw(directDraw) {
}
// INLINED
inline const char* ClientTextureSources::Resolve(const char* name) {
return this->m_names.Resolve(name);
}
// INLINED
inline bool ClientTextureSources::MovieSize(const char* name, int& width, int& height) {
if (this->m_modeType != 1 || !this->m_movies) {
return false;
@ -52,6 +55,7 @@ inline bool ClientTextureSources::MovieSize(const char* name, int& width, int& h
return true;
}
// INLINED
inline void ClientTextureSources::CleanupTextures() {
if (this->m_system && this->m_system->Backend() == 1 && this->m_directDraw) {
this->m_directDraw->Compact();

View file

@ -83,11 +83,13 @@ private:
HMODULE m_module;
};
// INLINED
inline MilesRuntime& MilesRuntime::Get() {
static MilesRuntime instance;
return instance;
}
// INLINED
inline MilesRuntime::MilesRuntime() : m_module(LoadLibraryA("Mss32.dll")) {
if (!this->m_module) {
throw std::system_error(GetLastError(), std::system_category(), "Mss32.dll");
@ -158,6 +160,7 @@ inline MilesRuntime::MilesRuntime() : m_module(LoadLibraryA("Mss32.dll")) {
}
}
// INLINED
inline MilesRuntime::~MilesRuntime() {
FreeLibrary(this->m_module);
}

View file

@ -33,6 +33,7 @@ private:
HMODULE m_module;
};
// INLINED
inline BinkRuntime::BinkRuntime() : m_module(LoadLibraryA("binkw32.dll")) {
if (!this->m_module) {
throw std::system_error(GetLastError(), std::system_category(), "binkw32.dll");
@ -55,6 +56,7 @@ inline BinkRuntime::BinkRuntime() : m_module(LoadLibraryA("binkw32.dll")) {
}
}
// INLINED
inline BinkRuntime::~BinkRuntime() {
FreeLibrary(this->m_module);
}

View file

@ -3,7 +3,6 @@
#include <bit>
#include <cstdlib>
#include <cstring>
#include <limits>
#include <windows.h>
namespace {

View file

@ -1,6 +1,5 @@
#include "Client/Application/ErrorDialog.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/Bitmap/IJL15Runtime.h"
#include <cstring>
#include <windows.h>

View file

@ -45,6 +45,7 @@ private:
IJL15Runtime& operator=(const IJL15Runtime&) = delete;
};
// INLINED
inline IJL15Runtime::IJL15Runtime() : m_module(LoadLibraryA("ijl15.dll")) {
if (!this->m_module) {
throw std::system_error(GetLastError(), std::system_category(), "ijl15.dll");
@ -61,6 +62,7 @@ inline IJL15Runtime::IJL15Runtime() : m_module(LoadLibraryA("ijl15.dll")) {
}
}
// INLINED
inline IJL15Runtime::~IJL15Runtime() {
FreeLibrary(this->m_module);
}

View file

@ -5,8 +5,6 @@
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceByteReader.h"
#include <cstring>
// INLINED
AnimatedModelNode::AnimatedModelNode(TextureCache& textures)
: model(nullptr), parent(nullptr), unknown_0040(0), vertexCount(0), textureVertexCount(0), faceCount(0), sharedTextureVertices(0), m_textures(textures) {

View file

@ -205,8 +205,7 @@ bool C3dModelResV1::Load(const char* name) {
input.Read(magic, 4);
if (std::strcmp(magic, "GRSM") != 0) {
constexpr char message[] = "모델파일이 아닙니다. 형식을 "
"다시한번 확인해주세요.";
constexpr char message[] = "모델파일이 아닙니다. 형식을 다시한번 확인해주세요.";
ShowErrorDialog(this->m_context->renderSystem, message, 0);
file.Close();
@ -220,8 +219,7 @@ bool C3dModelResV1::Load(const char* name) {
input.Read(&minor, 1);
if (major != 1 || minor > 5) {
constexpr char message[] = "지원되지 않는 버젼입니다. "
"내용물이 깨져있을 수 있습니다";
constexpr char message[] = "지원되지 않는 버젼입니다. 내용물이 깨져있을 수 있습니다";
ShowErrorDialog(this->m_context->renderSystem, message, 0);
file.Close();

View file

@ -19,6 +19,7 @@ namespace {
return name;
}
// INLINED
void ReadKeys(ResourceByteReader& input, std::vector<ModelRotationKey>& keys, bool scale) {
int count = 0;
input.Read(&count, 4);

View file

@ -11,6 +11,7 @@ ResourceName::ResourceName(const char* name) {
this->Assign(name);
}
// INLINED
void ResourceName::Assign(const char* name) {
myGPack::AssignNameKey(this->hash, this->text, name);
}

View file

@ -8,6 +8,7 @@ struct ResourceByteReader {
unsigned size;
unsigned position = 0;
// INLINED
bool Read(void* output, unsigned bytes) {
if (position + bytes > size) {
return false;

View file

@ -3,10 +3,12 @@
#include <cstring>
// INLINED
ResourceFailures::ResourceFailures(ResourceMessages& messages) : m_messages(&messages) {
InitializeCriticalSection(&this->m_lock);
}
// INLINED
ResourceFailures::~ResourceFailures() {
DeleteCriticalSection(&this->m_lock);
}

View file

@ -1,7 +1,6 @@
#include "Resource/Sprites/SpriteResource.h"
#include <cstddef>
#include <new>
// OFFSET: 0x00761070
// FUNCTION: fn_08063

View file

@ -7,7 +7,6 @@
#include <cstdlib>
#include <cstring>
#include <new>
#include <string>
// OFFSET: 0x0075FE90

View file

@ -2,10 +2,10 @@
#include "Resource/World/GroundResource.h"
#include "Resource/ResourceByteReader.h"
#include <bit>
#include <cstring>
namespace {
// INLINED
const unsigned char* Slice(ResourceByteReader& input, std::uint32_t bytes) {
const auto address = reinterpret_cast<std::uintptr_t>(input.data) + input.position;
input.position += bytes;

View file

@ -75,6 +75,7 @@ void C3dAttr::Unload() {
this->height = 0;
}
// INLINED
TerrainHeight C3dAttr::Grid() const {
return {this->width, this->height, this->cellSize, this->m_cells.data()};
}

View file

@ -28,6 +28,7 @@ public:
private:
struct Cell : TerrainHeightCell {
// INLINED
Cell() noexcept {
}
};

View file

@ -28,11 +28,13 @@ void CooldownOwner::ClearReverseCommands() {
this->m_drawing.reverse.clear();
}
// INLINED
CooldownState* CooldownOwner::Find(unsigned id) {
const auto entry = this->m_values.find(id);
return entry == this->m_values.end() ? nullptr : &entry->second;
}
// INLINED
void CooldownOwner::Erase(unsigned id) {
this->m_values.erase(id);
}

View file

@ -14,6 +14,7 @@ public:
CooldownState* Find(unsigned id);
void Erase(unsigned id);
// INLINED
CooldownDrawing& Drawing() {
return this->m_drawing;
}

View file

@ -2,6 +2,7 @@
#include "UI/Edit/ItemTagRetirement.h"
#include "UI/Window/UIWindow.h"
// INLINED
FocusedItemTagRemoval::FocusedItemTagRemoval(InputFocus& focus) : m_focus(focus) {
}

View file

@ -187,9 +187,11 @@ void EditPainting::Draw() {
}
class LinkLayout : public EditLinkLayout {
public:
// INLINED
explicit LinkLayout(UIEditCtrl& control) : m_control(control) {
}
// INLINED
void Update() override {
this->m_control.UpdateLinks();
}

View file

@ -10,6 +10,7 @@
#include <algorithm>
namespace {
// INLINED
unsigned Palette(ResourceMgr& resources, int column, int row) {
constexpr char path[] = "유저인터페이스\\colorchip.bmp";
auto* chip = static_cast<CBitmapRes*>(resources.Load(path));

View file

@ -216,6 +216,7 @@ void UIRegisterPartyWnd::SetInfo(CAdvenPartyInfo value) {
this->Invalidate();
}
// INLINED
const char* UIRegisterPartyWnd::Text(UIEditCtrl& control) const {
const auto& edit = this->m_registration->edits;
return edit.focus.window == &control ? edit.input.text.c_str() : control.text.c_str();

View file

@ -6,6 +6,7 @@
#include "UI/Window/WindowRetirement.h"
namespace {
// INLINED
void ToScreen(const UIWindow& window, int& x, int& y) {
x = (x + window.geometry.x);
y = (y + window.geometry.y);

View file

@ -9,6 +9,7 @@
#include <timeapi.h>
namespace {
// INLINED
bool Grouped(std::uint32_t id) {
return id - 8000u <= 60 || id - 8200u <= 41 || id - 8400u <= 57;
}

View file

@ -3,9 +3,10 @@
#include "UI/Buttons/UIButton.h"
#include "UI/Window/UIWindow.h"
#include <cstdio>
#include <stdio.h>
namespace {
// INLINED
void ToScreen(const UIWindow& window, int& x, int& y) {
x = (x + window.geometry.x);
y = (y + window.geometry.y);

View file

@ -3,10 +3,12 @@
#include <windows.h>
namespace {
// INLINED
bool Hex(unsigned char value) {
return (value >= '0' && value <= '9') || (value >= 'a' && value <= 'f') || (value >= 'A' && value <= 'F');
}
// INLINED
bool Color(const char* text, const char* end) {
if (*text != '^' || end - text < 6) {
return false;

View file

@ -32,6 +32,7 @@ namespace {
}
}
// INLINED
SIZE Measure(UIBalloonText& window, BalloonTextContext& owner, const std::string& text, int family, int height) {
if (text.empty()) {
return {0, 0};

View file

@ -12,6 +12,7 @@
#include <algorithm>
namespace {
// INLINED
unsigned Digit(unsigned char value) {
if (value >= '0' && value <= '9') {
return value - '0';
@ -28,6 +29,7 @@ namespace {
return 0;
}
// INLINED
void ScanColors(const std::string& line, unsigned short codePage, std::uint32_t& color) {
const char* current = line.c_str();
const char* end = current + line.size();

View file

@ -11,6 +11,7 @@
#include <cstring>
// INLINED
std::string UITextViewer::ConvertChat(std::string text) {
std::string converted;
DisplayNavigationLink(converted, text);

View file

@ -17,6 +17,7 @@
namespace {
constexpr char prefix[] = "유저인터페이스\\";
// INLINED
std::uint32_t Palette(ResourceMgr& resources, int x, int y) {
const auto* resource = static_cast<CBitmapRes*>(resources.Load((std::string(prefix) + "colorchip.bmp").c_str()));
const auto& image = resource->image;

View file

@ -1,9 +1,6 @@
#ifndef RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
#define RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
#include <cstddef>
#include <cstdint>
class CRijndael {
public:
enum { ECB = 0, CBC = 1, CFB = 2 };
@ -23,18 +20,22 @@ public:
void DefDecryptBlock(const char* in, char* result);
void Xor(unsigned char* destination, const unsigned char* source);
// INLINED
inline int GetKeyLength() const {
return this->m_keylength;
}
// INLINED
inline int GetBlockSize() const {
return this->m_blockSize;
}
// INLINED
inline int GetRounds() const {
return this->m_iROUNDS;
}
// INLINED
inline void ResetChain() {
for (int i = 0; i < this->m_blockSize; ++i) {
this->m_chain[i] = this->m_chain0[i];