Decompile fn_24379 (RegisterLowercaseName)
Batch #8510 by dori: 0 byte-identical, 1 confirmed by peer review. - fn_24379 RegisterLowercaseName: logic confirmed by peer review Peer-reviewed-by: eAthena, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
7b4740adbf
commit
7d67c36f46
1 changed files with 27 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "Resource/World/TerrainResource.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
|
|
@ -41,6 +42,11 @@ CWeatherEffect g_weatherEffect;
|
|||
// GLOBAL: gl_24633
|
||||
float g_depthAverageHalf = 0.5f;
|
||||
|
||||
// GLOBAL: gl_25254
|
||||
std::vector<std::string> g_registeredLowercaseNames;
|
||||
|
||||
static_assert(sizeof(std::vector<std::string>) == 12);
|
||||
|
||||
// OFFSET: 0x005B8D50
|
||||
// FUNCTION: fn_03431
|
||||
CMapSkyMgr::CMapSkyMgr() : m_script(nullptr) {
|
||||
|
|
@ -469,3 +475,24 @@ CMapSkyMgr* GetMapSkyMgr() {
|
|||
// FUNCTION: fn_24378
|
||||
void IgnoreNull() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E5D110
|
||||
// FUNCTION: fn_24379
|
||||
void RegisterLowercaseName(const char* name) {
|
||||
if (!name) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string lowered(name);
|
||||
for (char& character : lowered) {
|
||||
character = static_cast<char>(std::tolower(static_cast<unsigned char>(character)));
|
||||
}
|
||||
|
||||
for (const std::string& entry : g_registeredLowercaseNames) {
|
||||
if (entry == lowered) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
g_registeredLowercaseNames.push_back(lowered.c_str());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue