Batch #3703 by eAthena: 0 byte-identical, 19 confirmed by peer review. - fn_17938 FreeEmbedFont: logic confirmed by peer review - fn_17939 InitEmbedFont: logic confirmed by peer review - fn_17940 LoadEmbedFont: logic confirmed by peer review - fn_17941 SetEmbedFontRootUrl: logic confirmed by peer review - fn_17942 CEmbedFont::Load: logic confirmed by peer review - fn_17943 ReadEmbedFontStream: logic confirmed by peer review - fn_17945 ToWideString: logic confirmed by peer review - fn_17951 CChampionMonsterMgr::AddItem: logic confirmed by peer review - fn_17952 CChampionMonsterMgr::Create: logic confirmed by peer review - fn_17953 CChampionMonsterMgr::Destroy: logic confirmed by peer review - fn_17956 FormatChampionMessage: logic confirmed by peer review - fn_17958 CChampionMonsterMgr::GetValue: logic confirmed by peer review - fn_17959 CChampionMonsterMgr::IsChampion: logic confirmed by peer review - fn_17960 CChampionMonsterMgr::LuaAddItem: logic confirmed by peer review - fn_17961 CChampionMonsterMgr::LuaAddEffect: logic confirmed by peer review - fn_18003 TownInfo::TownInfo: logic confirmed by peer review - fn_18004 TownInfo::TownInfo: logic confirmed by peer review - fn_18008 CTownInfoMgr::Create: logic confirmed by peer review - fn_18009 CTownInfoMgr::Destroy: logic confirmed by peer review Peer-reviewed-by: alisonrag, Lumen, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/Render/Text/EmbedFont.cpp, Source/Contents/ChampionMonsterMgr.cpp, Source/Contents/TownInfoMgr.cpp
45 lines
986 B
C++
45 lines
986 B
C++
#ifndef RAGNAROK_SOURCE_RENDER_TEXT_EMBEDFONT_H
|
|
#define RAGNAROK_SOURCE_RENDER_TEXT_EMBEDFONT_H
|
|
|
|
#include <windows.h>
|
|
|
|
// VTABLE: vt_01611
|
|
class CEmbedFont {
|
|
public:
|
|
CEmbedFont();
|
|
virtual ~CEmbedFont();
|
|
|
|
// INLINED
|
|
void LoadModule() {
|
|
if (this->m_module == nullptr) {
|
|
HMODULE module = LoadLibraryA("t2embed.dll");
|
|
if (reinterpret_cast<UINT_PTR>(module) > 32) {
|
|
this->m_module = module;
|
|
}
|
|
}
|
|
}
|
|
|
|
// INLINED
|
|
void UnloadModule() {
|
|
if (this->m_module != nullptr) {
|
|
FreeLibrary(this->m_module);
|
|
this->m_module = nullptr;
|
|
}
|
|
}
|
|
|
|
int Load(HANDLE* fontReference, const char* familyName, const char* path);
|
|
|
|
/* 0004 */ HMODULE m_module;
|
|
/* 0008 */ int m_unknown8;
|
|
/* 000C */ int m_unknownC;
|
|
/* 0010 */ char m_rootUrl[256];
|
|
};
|
|
|
|
extern CEmbedFont* g_embedFont;
|
|
|
|
void FreeEmbedFont();
|
|
void InitEmbedFont();
|
|
int LoadEmbedFont(HANDLE* fontReference, const char* fileName);
|
|
void SetEmbedFontRootUrl(const char* url);
|
|
|
|
#endif
|