Merge commit '6c40a36577'
This commit is contained in:
commit
f3ceb09e9d
62 changed files with 83 additions and 18 deletions
|
|
@ -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,
|
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) {
|
void Permute(std::uint8_t* block, const std::uint8_t* table, unsigned count) {
|
||||||
std::uint8_t result[8] = {};
|
std::uint8_t result[8] = {};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,12 @@ char g_moduleBaseName[260] = {};
|
||||||
char g_crashString[8096] = {};
|
char g_crashString[8096] = {};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
int ReadPlayerJob() {
|
int ReadPlayerJob() {
|
||||||
return g_session.m_job;
|
return g_session.m_job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
const char* ReadPlayerJobName(int jobId) {
|
const char* ReadPlayerJobName(int jobId) {
|
||||||
const char* const* namesBegin = g_session.m_jobNamesBegin;
|
const char* const* namesBegin = g_session.m_jobNamesBegin;
|
||||||
const char* const* namesEnd = g_session.m_jobNamesEnd;
|
const char* const* namesEnd = g_session.m_jobNamesEnd;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
BrowserWindowSizing Sizing(CWebBrowser& owner) {
|
BrowserWindowSizing Sizing(CWebBrowser& owner) {
|
||||||
return {owner.browser, owner.screenWidth, owner.screenHeight, owner.rebar, owner.auxiliaryVisible, owner.width, owner.height};
|
return {owner.browser, owner.screenWidth, owner.screenHeight, owner.rebar, owner.auxiliaryVisible, owner.width, owner.height};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const char* InputCharset::Prefix(bool alternate) const {
|
||||||
return prefix;
|
return prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
unsigned InputCharset::CodePage(unsigned fallback) const {
|
unsigned InputCharset::CodePage(unsigned fallback) const {
|
||||||
return this->enabled ? LanguageCodePage(this->language) : fallback;
|
return this->enabled ? LanguageCodePage(this->language) : fallback;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ public:
|
||||||
void
|
void
|
||||||
StopRecruiting(std::uint32_t accountId, std::string world, std::string url, std::string token, std::uint32_t masterAccountId, StopRecruitingContext& context);
|
StopRecruiting(std::uint32_t accountId, std::string world, std::string url, std::string token, std::uint32_t masterAccountId, StopRecruitingContext& context);
|
||||||
|
|
||||||
|
// INLINED
|
||||||
CAsyncWorkRecycleObjectPoolMgr& Pools() {
|
CAsyncWorkRecycleObjectPoolMgr& Pools() {
|
||||||
return *this->m_pools;
|
return *this->m_pools;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ inline void GraphicsConfiguration::Load(LuaScript& script, ScriptOptions& option
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline AdapterConfiguration GraphicsConfiguration::Adapter() const {
|
inline AdapterConfiguration GraphicsConfiguration::Adapter() const {
|
||||||
return {this->backend, this->drawGuid, this->renderGuid, this->deviceGuid, this->deviceName};
|
return {this->backend, this->drawGuid, this->renderGuid, this->deviceGuid, this->deviceName};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ EffectActorState::~EffectActorState() {
|
||||||
this->Attachments().DetachAll();
|
this->Attachments().DetachAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
EffectAttachments EffectActorState::Attachments() {
|
EffectAttachments EffectActorState::Attachments() {
|
||||||
return {this->effects, this->first, this->second};
|
return {this->effects, this->first, this->second};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ void GroundGeometry::Reset(int columns, int rows) {
|
||||||
this->unknown_0058 = 0;
|
this->unknown_0058 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
GroundSpatial GroundGeometry::Spatial() const {
|
GroundSpatial GroundGeometry::Spatial() const {
|
||||||
return {this->width, this->height, this->cellSize, this->cells};
|
return {this->width, this->height, this->cellSize, this->cells};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,22 @@ void SaveUserHotkeys();
|
||||||
void ChangeUserHotkey(int tab, int index, int key1, int key2, const std::string& description);
|
void ChangeUserHotkey(int tab, int index, int key1, int key2, const std::string& description);
|
||||||
void LoadUserHotkeyTab(Json::Value& values, int tab);
|
void LoadUserHotkeyTab(Json::Value& values, int tab);
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void ClearUserHotkeys(LuaScript&) {
|
inline void ClearUserHotkeys(LuaScript&) {
|
||||||
ClearUserHotkeys();
|
ClearUserHotkeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void SaveUserHotkeys(LuaScript&) {
|
inline void SaveUserHotkeys(LuaScript&) {
|
||||||
SaveUserHotkeys();
|
SaveUserHotkeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void ChangeUserHotkey(LuaScript&, int tab, int index, int key1, int key2, const std::string& description) {
|
inline void ChangeUserHotkey(LuaScript&, int tab, int index, int key1, int key2, const std::string& description) {
|
||||||
ChangeUserHotkey(tab, index, key1, key2, description);
|
ChangeUserHotkey(tab, index, key1, key2, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void LoadUserHotkeyTab(LuaScript&, Json::Value& values, int tab) {
|
inline void LoadUserHotkeyTab(LuaScript&, Json::Value& values, int tab) {
|
||||||
LoadUserHotkeyTab(values, tab);
|
LoadUserHotkeyTab(values, tab);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
const char* ItemNaming::Message(int id) const {
|
const char* ItemNaming::Message(int id) const {
|
||||||
return LookupMessage(id, this->languagePrefix, this->service, this->language);
|
return LookupMessage(id, this->languagePrefix, this->service, this->language);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
unsigned UnsignedFrame(double value) {
|
unsigned UnsignedFrame(double value) {
|
||||||
if (!(value < 0x1p32) || value <= -1.0) {
|
if (!(value < 0x1p32) || value <= -1.0) {
|
||||||
return 0xFFFFFFFFu;
|
return 0xFFFFFFFFu;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include "Utility/Math/ScalarConversion.h"
|
#include "Utility/Math/ScalarConversion.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// INLINED
|
||||||
ModelRenderContext::ModelRenderContext(
|
ModelRenderContext::ModelRenderContext(
|
||||||
const RenderProjection& projection, RenderCommandPool& commands, RenderVertexPool& vertices, RenderQueues& queues, const int& width, const int& height,
|
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,
|
const bool& depthAlpha, const float& depthStart, const float& depthEnd, const bool& overrideColor, const bool& integerColor, const float* overrideScale,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ extern "C" {
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
CPlayerSkillBundle& Bundle(lua_State* state) {
|
CPlayerSkillBundle& Bundle(lua_State* state) {
|
||||||
return *static_cast<CPlayerSkillBundle*>(lua_touserdata(state, lua_upvalueindex(1)));
|
return *static_cast<CPlayerSkillBundle*>(lua_touserdata(state, lua_upvalueindex(1)));
|
||||||
}
|
}
|
||||||
|
|
@ -59,6 +60,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void RegisterSkillTreeCallbacks(lua_State* state, CPlayerSkillBundle& bundle) {
|
void RegisterSkillTreeCallbacks(lua_State* state, CPlayerSkillBundle& bundle) {
|
||||||
lua_pushlightuserdata(state, &bundle);
|
lua_pushlightuserdata(state, &bundle);
|
||||||
lua_pushcclosure(state, AddSkill, 1);
|
lua_pushcclosure(state, AddSkill, 1);
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ void WorldModelLoading::Run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void WorldModelLoading::Publish(WorldSpatialTree& root) {
|
void WorldModelLoading::Publish(WorldSpatialTree& root) {
|
||||||
C3dActor* const* data = this->models.data();
|
C3dActor* const* data = this->models.data();
|
||||||
PublishWorldModels(root, data, this->published, this->pending);
|
PublishWorldModels(root, data, this->published, this->pending);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ public:
|
||||||
|
|
||||||
bool OpenWrite(const char* path, CRenderSystemBase* renderSystem);
|
bool OpenWrite(const char* path, CRenderSystemBase* renderSystem);
|
||||||
bool Open(const char* path, int mode, bool resourcePath, bool option);
|
bool Open(const char* path, int mode, bool resourcePath, bool option);
|
||||||
|
// INLINED
|
||||||
bool Open(const char* path) {
|
bool Open(const char* path) {
|
||||||
this->m_path = path;
|
this->m_path = path;
|
||||||
this->m_handle = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
this->m_handle = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,15 @@ public:
|
||||||
void ResetBuffers();
|
void ResetBuffers();
|
||||||
void SetDeferred(unsigned char value);
|
void SetDeferred(unsigned char value);
|
||||||
|
|
||||||
|
// INLINED
|
||||||
SOCKET NativeSocket() const {
|
SOCKET NativeSocket() const {
|
||||||
return this->m_socket;
|
return this->m_socket;
|
||||||
}
|
}
|
||||||
|
// INLINED
|
||||||
ConnectionBuffer& Input() {
|
ConnectionBuffer& Input() {
|
||||||
return this->m_input;
|
return this->m_input;
|
||||||
}
|
}
|
||||||
|
// INLINED
|
||||||
unsigned& SendDeadline() {
|
unsigned& SendDeadline() {
|
||||||
return this->m_sendDeadline;
|
return this->m_sendDeadline;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ struct DirectDrawEnumeration::AdapterContext {
|
||||||
DirectDrawDeviceRecord record{};
|
DirectDrawDeviceRecord record{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
DirectDrawEnumeration::DirectDrawEnumeration(const GUID& selectedDraw, RECT& monitor) : m_selectedDraw(selectedDraw), m_monitor(monitor) {
|
DirectDrawEnumeration::DirectDrawEnumeration(const GUID& selectedDraw, RECT& monitor) : m_selectedDraw(selectedDraw), m_monitor(monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ public:
|
||||||
HRESULT TestDevice() override;
|
HRESULT TestDevice() override;
|
||||||
HRESULT Present(bool option) override;
|
HRESULT Present(bool option) override;
|
||||||
|
|
||||||
|
// INLINED
|
||||||
DeviceOwnerDX7* Device() const {
|
DeviceOwnerDX7* Device() const {
|
||||||
return this->m_device;
|
return this->m_device;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ struct TextureBindingDX7 {
|
||||||
/* 0274 */ IDirect3DDevice7* device = nullptr;
|
/* 0274 */ IDirect3DDevice7* device = nullptr;
|
||||||
|
|
||||||
void Set(unsigned stage, CTextureDX7* texture);
|
void Set(unsigned stage, CTextureDX7* texture);
|
||||||
|
// INLINED
|
||||||
void Set(IDirect3DDevice7* dev, unsigned stage, CTextureDX7* texture) {
|
void Set(IDirect3DDevice7* dev, unsigned stage, CTextureDX7* texture) {
|
||||||
this->device = dev;
|
this->device = dev;
|
||||||
this->Set(stage, texture);
|
this->Set(stage, texture);
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ private:
|
||||||
HMODULE m_module;
|
HMODULE m_module;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline D3DX9Runtime::D3DX9Runtime() : m_module(LoadLibraryA("D3DX9_43.dll")) {
|
inline D3DX9Runtime::D3DX9Runtime() : m_module(LoadLibraryA("D3DX9_43.dll")) {
|
||||||
|
|
||||||
if (!this->m_module) {
|
if (!this->m_module) {
|
||||||
|
|
@ -43,6 +44,7 @@ inline D3DX9Runtime::D3DX9Runtime() : m_module(LoadLibraryA("D3DX9_43.dll")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline D3DX9Runtime::~D3DX9Runtime() {
|
inline D3DX9Runtime::~D3DX9Runtime() {
|
||||||
FreeLibrary(this->m_module);
|
FreeLibrary(this->m_module);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,10 +269,12 @@ HRESULT DeviceOwnerDX9::Present(int) {
|
||||||
return this->lastPresent;
|
return this->lastPresent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
SurfaceDX9Context DeviceOwnerDX9::SurfaceContext() const {
|
SurfaceDX9Context DeviceOwnerDX9::SurfaceContext() const {
|
||||||
return {this->device, this->backBufferDescription, this->backBuffer};
|
return {this->device, this->backBufferDescription, this->backBuffer};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
TextureDX9Context DeviceOwnerDX9::TextureContext(
|
TextureDX9Context DeviceOwnerDX9::TextureContext(
|
||||||
D3DX9Runtime& d3dx, RenderPrimitivePool& primitives, RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd
|
D3DX9Runtime& d3dx, RenderPrimitivePool& primitives, RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd
|
||||||
) const {
|
) const {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ CRenderSystemDX9::~CRenderSystemDX9() {
|
||||||
delete this->m_defaultTexture;
|
delete this->m_defaultTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void CRenderSystemDX9::RefreshContexts() {
|
void CRenderSystemDX9::RefreshContexts() {
|
||||||
this->m_surfaceContext = this->m_device->SurfaceContext();
|
this->m_surfaceContext = this->m_device->SurfaceContext();
|
||||||
auto& context = this->m_textureContext;
|
auto& context = this->m_textureContext;
|
||||||
|
|
@ -43,6 +44,7 @@ std::int32_t CRenderSystemDX9::Backend() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
HRESULT CRenderSystemDX9::Initialize(HWND window) {
|
HRESULT CRenderSystemDX9::Initialize(HWND window) {
|
||||||
const HRESULT result =
|
const HRESULT result =
|
||||||
InitializeConfiguredDeviceDX9(*this->m_device, window, this->m_context->deviceOptions, this->m_context->adapter, this->m_context->serviceUsesDX7);
|
InitializeConfiguredDeviceDX9(*this->m_device, window, this->m_context->deviceOptions, this->m_context->adapter, this->m_context->serviceUsesDX7);
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ public:
|
||||||
HRESULT TestDevice() override;
|
HRESULT TestDevice() override;
|
||||||
HRESULT Present(bool option) override;
|
HRESULT Present(bool option) override;
|
||||||
|
|
||||||
|
// INLINED
|
||||||
DeviceOwnerDX9& Device() {
|
DeviceOwnerDX9& Device() {
|
||||||
return *this->m_device;
|
return *this->m_device;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
class ScreenshotOverlay : public UIRPData {
|
class ScreenshotOverlay : public UIRPData {
|
||||||
public:
|
public:
|
||||||
|
// INLINED
|
||||||
const std::list<RenderPrimitive*>& Primitives() const {
|
const std::list<RenderPrimitive*>& Primitives() const {
|
||||||
return this->m_primitives;
|
return this->m_primitives;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ CDCBitmap* CreateBitmapDC(int width, int height, bool fill) {
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void CDCBitmap::UploadTexture(CRenderSystemBase& system, CTexture*& texture) {
|
void CDCBitmap::UploadTexture(CRenderSystemBase& system, CTexture*& texture) {
|
||||||
this->m_bitmap.UploadTexture(system, texture);
|
this->m_bitmap.UploadTexture(system, texture);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
void Append(std::vector<RenderVertex>& block, unsigned count) {
|
void Append(std::vector<RenderVertex>& block, unsigned count) {
|
||||||
const unsigned first = static_cast<unsigned>(block.size());
|
const unsigned first = static_cast<unsigned>(block.size());
|
||||||
block.resize(first + count);
|
block.resize(first + count);
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ void RendererViewport::SetSize(int columns, int rows, const float& projectionSca
|
||||||
cotangent = projectionScale / this->uiScaleY;
|
cotangent = projectionScale / this->uiScaleY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
RenderProjection RendererViewport::Projection() const {
|
RenderProjection RendererViewport::Projection() const {
|
||||||
return {this->scaleX, this->scaleY, this->centerX, this->centerY};
|
return {this->scaleX, this->scaleY, this->centerX, this->centerY};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#include "Render/Text/FontCache.h"
|
#include "Render/Text/FontCache.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
|
||||||
#include <objidl.h>
|
#include <objidl.h>
|
||||||
|
|
||||||
#include <gdiplus.h>
|
#include <gdiplus.h>
|
||||||
|
|
@ -11,7 +10,6 @@
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// STATIC: 0x01311F00
|
// STATIC: 0x01311F00
|
||||||
// STATIC: 0x01311ED0
|
|
||||||
const char* const primary[] = {
|
const char* const primary[] = {
|
||||||
"\xB1\xBC\xB8\xB2",
|
"\xB1\xBC\xB8\xB2",
|
||||||
"Arial",
|
"Arial",
|
||||||
|
|
@ -27,6 +25,7 @@ namespace {
|
||||||
"Arial",
|
"Arial",
|
||||||
"Tahoma"
|
"Tahoma"
|
||||||
};
|
};
|
||||||
|
// STATIC: 0x01311ED0
|
||||||
const char* const fallback[] = {"Gulim", "Arial", "MS Gothic", "SimSun", "MingLiU", "Tahoma", "Arial", "Verdana", "Verdana", "Arial", "Arial", "Tahoma"};
|
const char* const fallback[] = {"Gulim", "Arial", "MS Gothic", "SimSun", "MingLiU", "Tahoma", "Arial", "Verdana", "Verdana", "Arial", "Arial", "Tahoma"};
|
||||||
|
|
||||||
// OFFSET: 0x0054F2C0
|
// OFFSET: 0x0054F2C0
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
|
#ifndef RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
|
||||||
#define RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
|
#define RAGNAROK_SOURCE_RENDER_TEXT_TEXTCONTEXT_H
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
class CDC;
|
class CDC;
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ namespace {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
static inline std::span<const TextureStageWrite> TextureStageModeWrites(int mode) {
|
static inline std::span<const TextureStageWrite> TextureStageModeWrites(int mode) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
||||||
|
|
@ -26,16 +26,19 @@ private:
|
||||||
IDirectDraw7* const& m_directDraw;
|
IDirectDraw7* const& m_directDraw;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline ClientTextureSources::ClientTextureSources(
|
inline ClientTextureSources::ClientTextureSources(
|
||||||
TextureNames& names, const int& modeType, BinkMovies* const& movies, CRenderSystemBase*& system, IDirectDraw7* const& directDraw
|
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) {
|
: m_names(names), m_modeType(modeType), m_movies(movies), m_system(system), m_directDraw(directDraw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline const char* ClientTextureSources::Resolve(const char* name) {
|
inline const char* ClientTextureSources::Resolve(const char* name) {
|
||||||
return this->m_names.Resolve(name);
|
return this->m_names.Resolve(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline bool ClientTextureSources::MovieSize(const char* name, int& width, int& height) {
|
inline bool ClientTextureSources::MovieSize(const char* name, int& width, int& height) {
|
||||||
if (this->m_modeType != 1 || !this->m_movies) {
|
if (this->m_modeType != 1 || !this->m_movies) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -52,6 +55,7 @@ inline bool ClientTextureSources::MovieSize(const char* name, int& width, int& h
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void ClientTextureSources::CleanupTextures() {
|
inline void ClientTextureSources::CleanupTextures() {
|
||||||
if (this->m_system && this->m_system->Backend() == 1 && this->m_directDraw) {
|
if (this->m_system && this->m_system->Backend() == 1 && this->m_directDraw) {
|
||||||
this->m_directDraw->Compact();
|
this->m_directDraw->Compact();
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,13 @@ private:
|
||||||
HMODULE m_module;
|
HMODULE m_module;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline MilesRuntime& MilesRuntime::Get() {
|
inline MilesRuntime& MilesRuntime::Get() {
|
||||||
static MilesRuntime instance;
|
static MilesRuntime instance;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline MilesRuntime::MilesRuntime() : m_module(LoadLibraryA("Mss32.dll")) {
|
inline MilesRuntime::MilesRuntime() : m_module(LoadLibraryA("Mss32.dll")) {
|
||||||
if (!this->m_module) {
|
if (!this->m_module) {
|
||||||
throw std::system_error(GetLastError(), std::system_category(), "Mss32.dll");
|
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() {
|
inline MilesRuntime::~MilesRuntime() {
|
||||||
FreeLibrary(this->m_module);
|
FreeLibrary(this->m_module);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ private:
|
||||||
HMODULE m_module;
|
HMODULE m_module;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline BinkRuntime::BinkRuntime() : m_module(LoadLibraryA("binkw32.dll")) {
|
inline BinkRuntime::BinkRuntime() : m_module(LoadLibraryA("binkw32.dll")) {
|
||||||
if (!this->m_module) {
|
if (!this->m_module) {
|
||||||
throw std::system_error(GetLastError(), std::system_category(), "binkw32.dll");
|
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() {
|
inline BinkRuntime::~BinkRuntime() {
|
||||||
FreeLibrary(this->m_module);
|
FreeLibrary(this->m_module);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <limits>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#include "Client/Application/ErrorDialog.h"
|
#include "Client/Application/ErrorDialog.h"
|
||||||
#include "Resource/Bitmap/BitmapResource.h"
|
#include "Resource/Bitmap/BitmapResource.h"
|
||||||
#include "Resource/Bitmap/IJL15Runtime.h"
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ private:
|
||||||
IJL15Runtime& operator=(const IJL15Runtime&) = delete;
|
IJL15Runtime& operator=(const IJL15Runtime&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline IJL15Runtime::IJL15Runtime() : m_module(LoadLibraryA("ijl15.dll")) {
|
inline IJL15Runtime::IJL15Runtime() : m_module(LoadLibraryA("ijl15.dll")) {
|
||||||
if (!this->m_module) {
|
if (!this->m_module) {
|
||||||
throw std::system_error(GetLastError(), std::system_category(), "ijl15.dll");
|
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() {
|
inline IJL15Runtime::~IJL15Runtime() {
|
||||||
FreeLibrary(this->m_module);
|
FreeLibrary(this->m_module);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@
|
||||||
#include "Resource/Bitmap/BitmapResource.h"
|
#include "Resource/Bitmap/BitmapResource.h"
|
||||||
#include "Resource/ResourceByteReader.h"
|
#include "Resource/ResourceByteReader.h"
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
// INLINED
|
// INLINED
|
||||||
AnimatedModelNode::AnimatedModelNode(TextureCache& textures)
|
AnimatedModelNode::AnimatedModelNode(TextureCache& textures)
|
||||||
: model(nullptr), parent(nullptr), unknown_0040(0), vertexCount(0), textureVertexCount(0), faceCount(0), sharedTextureVertices(0), m_textures(textures) {
|
: model(nullptr), parent(nullptr), unknown_0040(0), vertexCount(0), textureVertexCount(0), faceCount(0), sharedTextureVertices(0), m_textures(textures) {
|
||||||
|
|
|
||||||
|
|
@ -205,8 +205,7 @@ bool C3dModelResV1::Load(const char* name) {
|
||||||
input.Read(magic, 4);
|
input.Read(magic, 4);
|
||||||
|
|
||||||
if (std::strcmp(magic, "GRSM") != 0) {
|
if (std::strcmp(magic, "GRSM") != 0) {
|
||||||
constexpr char message[] = "모델파일이 아닙니다. 형식을 "
|
constexpr char message[] = "모델파일이 아닙니다. 형식을 다시한번 확인해주세요.";
|
||||||
"다시한번 확인해주세요.";
|
|
||||||
ShowErrorDialog(this->m_context->renderSystem, message, 0);
|
ShowErrorDialog(this->m_context->renderSystem, message, 0);
|
||||||
file.Close();
|
file.Close();
|
||||||
|
|
||||||
|
|
@ -220,8 +219,7 @@ bool C3dModelResV1::Load(const char* name) {
|
||||||
input.Read(&minor, 1);
|
input.Read(&minor, 1);
|
||||||
|
|
||||||
if (major != 1 || minor > 5) {
|
if (major != 1 || minor > 5) {
|
||||||
constexpr char message[] = "지원되지 않는 버젼입니다. "
|
constexpr char message[] = "지원되지 않는 버젼입니다. 내용물이 깨져있을 수 있습니다";
|
||||||
"내용물이 깨져있을 수 있습니다";
|
|
||||||
ShowErrorDialog(this->m_context->renderSystem, message, 0);
|
ShowErrorDialog(this->m_context->renderSystem, message, 0);
|
||||||
file.Close();
|
file.Close();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ namespace {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void ReadKeys(ResourceByteReader& input, std::vector<ModelRotationKey>& keys, bool scale) {
|
void ReadKeys(ResourceByteReader& input, std::vector<ModelRotationKey>& keys, bool scale) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
input.Read(&count, 4);
|
input.Read(&count, 4);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ ResourceName::ResourceName(const char* name) {
|
||||||
this->Assign(name);
|
this->Assign(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void ResourceName::Assign(const char* name) {
|
void ResourceName::Assign(const char* name) {
|
||||||
myGPack::AssignNameKey(this->hash, this->text, name);
|
myGPack::AssignNameKey(this->hash, this->text, name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ struct ResourceByteReader {
|
||||||
unsigned size;
|
unsigned size;
|
||||||
unsigned position = 0;
|
unsigned position = 0;
|
||||||
|
|
||||||
|
// INLINED
|
||||||
bool Read(void* output, unsigned bytes) {
|
bool Read(void* output, unsigned bytes) {
|
||||||
if (position + bytes > size) {
|
if (position + bytes > size) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// INLINED
|
||||||
ResourceFailures::ResourceFailures(ResourceMessages& messages) : m_messages(&messages) {
|
ResourceFailures::ResourceFailures(ResourceMessages& messages) : m_messages(&messages) {
|
||||||
InitializeCriticalSection(&this->m_lock);
|
InitializeCriticalSection(&this->m_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
ResourceFailures::~ResourceFailures() {
|
ResourceFailures::~ResourceFailures() {
|
||||||
DeleteCriticalSection(&this->m_lock);
|
DeleteCriticalSection(&this->m_lock);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#include "Resource/Sprites/SpriteResource.h"
|
#include "Resource/Sprites/SpriteResource.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <new>
|
|
||||||
|
|
||||||
// OFFSET: 0x00761070
|
// OFFSET: 0x00761070
|
||||||
// FUNCTION: fn_08063
|
// FUNCTION: fn_08063
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <new>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// OFFSET: 0x0075FE90
|
// OFFSET: 0x0075FE90
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
#include "Resource/World/GroundResource.h"
|
#include "Resource/World/GroundResource.h"
|
||||||
#include "Resource/ResourceByteReader.h"
|
#include "Resource/ResourceByteReader.h"
|
||||||
|
|
||||||
#include <bit>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
const unsigned char* Slice(ResourceByteReader& input, std::uint32_t bytes) {
|
const unsigned char* Slice(ResourceByteReader& input, std::uint32_t bytes) {
|
||||||
const auto address = reinterpret_cast<std::uintptr_t>(input.data) + input.position;
|
const auto address = reinterpret_cast<std::uintptr_t>(input.data) + input.position;
|
||||||
input.position += bytes;
|
input.position += bytes;
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ void C3dAttr::Unload() {
|
||||||
this->height = 0;
|
this->height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
TerrainHeight C3dAttr::Grid() const {
|
TerrainHeight C3dAttr::Grid() const {
|
||||||
return {this->width, this->height, this->cellSize, this->m_cells.data()};
|
return {this->width, this->height, this->cellSize, this->m_cells.data()};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Cell : TerrainHeightCell {
|
struct Cell : TerrainHeightCell {
|
||||||
|
// INLINED
|
||||||
Cell() noexcept {
|
Cell() noexcept {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,13 @@ void CooldownOwner::ClearReverseCommands() {
|
||||||
this->m_drawing.reverse.clear();
|
this->m_drawing.reverse.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
CooldownState* CooldownOwner::Find(unsigned id) {
|
CooldownState* CooldownOwner::Find(unsigned id) {
|
||||||
const auto entry = this->m_values.find(id);
|
const auto entry = this->m_values.find(id);
|
||||||
return entry == this->m_values.end() ? nullptr : &entry->second;
|
return entry == this->m_values.end() ? nullptr : &entry->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void CooldownOwner::Erase(unsigned id) {
|
void CooldownOwner::Erase(unsigned id) {
|
||||||
this->m_values.erase(id);
|
this->m_values.erase(id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ public:
|
||||||
|
|
||||||
CooldownState* Find(unsigned id);
|
CooldownState* Find(unsigned id);
|
||||||
void Erase(unsigned id);
|
void Erase(unsigned id);
|
||||||
|
// INLINED
|
||||||
CooldownDrawing& Drawing() {
|
CooldownDrawing& Drawing() {
|
||||||
return this->m_drawing;
|
return this->m_drawing;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "UI/Edit/ItemTagRetirement.h"
|
#include "UI/Edit/ItemTagRetirement.h"
|
||||||
#include "UI/Window/UIWindow.h"
|
#include "UI/Window/UIWindow.h"
|
||||||
|
|
||||||
|
// INLINED
|
||||||
FocusedItemTagRemoval::FocusedItemTagRemoval(InputFocus& focus) : m_focus(focus) {
|
FocusedItemTagRemoval::FocusedItemTagRemoval(InputFocus& focus) : m_focus(focus) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,9 +187,11 @@ void EditPainting::Draw() {
|
||||||
}
|
}
|
||||||
class LinkLayout : public EditLinkLayout {
|
class LinkLayout : public EditLinkLayout {
|
||||||
public:
|
public:
|
||||||
|
// INLINED
|
||||||
explicit LinkLayout(UIEditCtrl& control) : m_control(control) {
|
explicit LinkLayout(UIEditCtrl& control) : m_control(control) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void Update() override {
|
void Update() override {
|
||||||
this->m_control.UpdateLinks();
|
this->m_control.UpdateLinks();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
unsigned Palette(ResourceMgr& resources, int column, int row) {
|
unsigned Palette(ResourceMgr& resources, int column, int row) {
|
||||||
constexpr char path[] = "유저인터페이스\\colorchip.bmp";
|
constexpr char path[] = "유저인터페이스\\colorchip.bmp";
|
||||||
auto* chip = static_cast<CBitmapRes*>(resources.Load(path));
|
auto* chip = static_cast<CBitmapRes*>(resources.Load(path));
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,7 @@ void UIRegisterPartyWnd::SetInfo(CAdvenPartyInfo value) {
|
||||||
this->Invalidate();
|
this->Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
const char* UIRegisterPartyWnd::Text(UIEditCtrl& control) const {
|
const char* UIRegisterPartyWnd::Text(UIEditCtrl& control) const {
|
||||||
const auto& edit = this->m_registration->edits;
|
const auto& edit = this->m_registration->edits;
|
||||||
return edit.focus.window == &control ? edit.input.text.c_str() : control.text.c_str();
|
return edit.focus.window == &control ? edit.input.text.c_str() : control.text.c_str();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "UI/Window/WindowRetirement.h"
|
#include "UI/Window/WindowRetirement.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
void ToScreen(const UIWindow& window, int& x, int& y) {
|
void ToScreen(const UIWindow& window, int& x, int& y) {
|
||||||
x = (x + window.geometry.x);
|
x = (x + window.geometry.x);
|
||||||
y = (y + window.geometry.y);
|
y = (y + window.geometry.y);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include <timeapi.h>
|
#include <timeapi.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
bool Grouped(std::uint32_t id) {
|
bool Grouped(std::uint32_t id) {
|
||||||
return id - 8000u <= 60 || id - 8200u <= 41 || id - 8400u <= 57;
|
return id - 8000u <= 60 || id - 8200u <= 41 || id - 8400u <= 57;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@
|
||||||
#include "UI/Buttons/UIButton.h"
|
#include "UI/Buttons/UIButton.h"
|
||||||
#include "UI/Window/UIWindow.h"
|
#include "UI/Window/UIWindow.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
void ToScreen(const UIWindow& window, int& x, int& y) {
|
void ToScreen(const UIWindow& window, int& x, int& y) {
|
||||||
x = (x + window.geometry.x);
|
x = (x + window.geometry.x);
|
||||||
y = (y + window.geometry.y);
|
y = (y + window.geometry.y);
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
bool Hex(unsigned char value) {
|
bool Hex(unsigned char value) {
|
||||||
return (value >= '0' && value <= '9') || (value >= 'a' && value <= 'f') || (value >= 'A' && value <= 'F');
|
return (value >= '0' && value <= '9') || (value >= 'a' && value <= 'f') || (value >= 'A' && value <= 'F');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
bool Color(const char* text, const char* end) {
|
bool Color(const char* text, const char* end) {
|
||||||
if (*text != '^' || end - text < 6) {
|
if (*text != '^' || end - text < 6) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
SIZE Measure(UIBalloonText& window, BalloonTextContext& owner, const std::string& text, int family, int height) {
|
SIZE Measure(UIBalloonText& window, BalloonTextContext& owner, const std::string& text, int family, int height) {
|
||||||
if (text.empty()) {
|
if (text.empty()) {
|
||||||
return {0, 0};
|
return {0, 0};
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// INLINED
|
||||||
unsigned Digit(unsigned char value) {
|
unsigned Digit(unsigned char value) {
|
||||||
if (value >= '0' && value <= '9') {
|
if (value >= '0' && value <= '9') {
|
||||||
return value - '0';
|
return value - '0';
|
||||||
|
|
@ -28,6 +29,7 @@ namespace {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
void ScanColors(const std::string& line, unsigned short codePage, std::uint32_t& color) {
|
void ScanColors(const std::string& line, unsigned short codePage, std::uint32_t& color) {
|
||||||
const char* current = line.c_str();
|
const char* current = line.c_str();
|
||||||
const char* end = current + line.size();
|
const char* end = current + line.size();
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// INLINED
|
||||||
std::string UITextViewer::ConvertChat(std::string text) {
|
std::string UITextViewer::ConvertChat(std::string text) {
|
||||||
std::string converted;
|
std::string converted;
|
||||||
DisplayNavigationLink(converted, text);
|
DisplayNavigationLink(converted, text);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
constexpr char prefix[] = "유저인터페이스\\";
|
constexpr char prefix[] = "유저인터페이스\\";
|
||||||
|
|
||||||
|
// INLINED
|
||||||
std::uint32_t Palette(ResourceMgr& resources, int x, int y) {
|
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* resource = static_cast<CBitmapRes*>(resources.Load((std::string(prefix) + "colorchip.bmp").c_str()));
|
||||||
const auto& image = resource->image;
|
const auto& image = resource->image;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
#ifndef RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
|
#ifndef RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
|
||||||
#define RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
|
#define RAGNAROK_SOURCE_UTILITY_CIPHER_RIJNDAEL_H
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
class CRijndael {
|
class CRijndael {
|
||||||
public:
|
public:
|
||||||
enum { ECB = 0, CBC = 1, CFB = 2 };
|
enum { ECB = 0, CBC = 1, CFB = 2 };
|
||||||
|
|
@ -23,18 +20,22 @@ public:
|
||||||
void DefDecryptBlock(const char* in, char* result);
|
void DefDecryptBlock(const char* in, char* result);
|
||||||
void Xor(unsigned char* destination, const unsigned char* source);
|
void Xor(unsigned char* destination, const unsigned char* source);
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline int GetKeyLength() const {
|
inline int GetKeyLength() const {
|
||||||
return this->m_keylength;
|
return this->m_keylength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline int GetBlockSize() const {
|
inline int GetBlockSize() const {
|
||||||
return this->m_blockSize;
|
return this->m_blockSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline int GetRounds() const {
|
inline int GetRounds() const {
|
||||||
return this->m_iROUNDS;
|
return this->m_iROUNDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INLINED
|
||||||
inline void ResetChain() {
|
inline void ResetChain() {
|
||||||
for (int i = 0; i < this->m_blockSize; ++i) {
|
for (int i = 0; i < this->m_blockSize; ++i) {
|
||||||
this->m_chain[i] = this->m_chain0[i];
|
this->m_chain[i] = this->m_chain0[i];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue