diff --git a/Source/Contents/Achievement/AchievementMgr.cpp b/Source/Contents/Achievement/AchievementMgr.cpp index 251a475b0..e77197fdf 100644 --- a/Source/Contents/Achievement/AchievementMgr.cpp +++ b/Source/Contents/Achievement/AchievementMgr.cpp @@ -386,9 +386,9 @@ int CAchievementMgr::L_InsertAchieveInfo(lua_State* state) { const std::string title = lua_tostring(state, -4); const std::string summaryText = lua_tostring(state, -3); const std::string description = lua_tostring(state, -2); + const double value = lua_tonumber(state, -1); CAchievementMgr* const manager = g_achievementMgr; - const std::pair result = - manager->InsertAchieveInfo(id, title, summaryText, description, static_cast(lua_tonumber(state, -1))); + const std::pair result = manager->InsertAchieveInfo(id, title, summaryText, description, static_cast(value)); if (!result.first) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertAchieveInfo : %s", result.second.c_str())); diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index d33de6dd7..e3122129e 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -745,7 +745,7 @@ bool ServiceOptions::Set(int id, unsigned char value) { // FUNCTION: fn_06320 __declspec(noinline) void GameSettings::ApplyScriptOption(int id, const char* key) { for (const GameSettingsOption& option : this->options) { - if (option.id != id) { + if (id != option.id) { continue; } @@ -1062,7 +1062,7 @@ void ApplyServiceOptionCursorClip(int id, unsigned char value, bool notify, int // OFFSET: 0x006C5DF0 // FUNCTION: fn_06369 void ApplyServiceOptionAskOnDisable(int id, unsigned char value, bool notify, int enabledMessage, int disabledMessage) { - if (g_serviceOptions.Get(0x128) == value) { + if (value == g_serviceOptions.Get(0x128)) { return; } diff --git a/Source/Contents/Effects/Skills/CommonFloorEffect.cpp b/Source/Contents/Effects/Skills/CommonFloorEffect.cpp index ffedbfc99..0fb4847d7 100644 --- a/Source/Contents/Effects/Skills/CommonFloorEffect.cpp +++ b/Source/Contents/Effects/Skills/CommonFloorEffect.cpp @@ -46,9 +46,9 @@ void CCommonFloorEffect::Open() { if (particle) { particle->SetTexture("effect\\ra_unlimit.tga"); particle->effectId = this->id; - particle->groupIndex = 1; particle->columnIndex = i; particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 90; *reinterpret_cast(&particle->angleBits) = static_cast(angle); particle->phaseParameter = angle; @@ -90,7 +90,7 @@ bool CCommonFloorEffect::IsAlive() { void CCommonFloorEffect::OnProcess() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - vector3d& position = (*it)->position; + vector3d& position = particle->position; position.x = this->position[0]; position.y = this->position[1]; position.z = this->position[2]; @@ -118,7 +118,7 @@ void CCommonFloorEffect::OnProcess() { result.Compose(scale, rotation); particle->transform = result; } - ++(*it)->elapsedFrames; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/Skills/HitLineEffect.cpp b/Source/Contents/Effects/Skills/HitLineEffect.cpp index 8f4cdd4f1..282deb1ea 100644 --- a/Source/Contents/Effects/Skills/HitLineEffect.cpp +++ b/Source/Contents/Effects/Skills/HitLineEffect.cpp @@ -41,8 +41,9 @@ void CHitLineEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\white02.bmp"); + const int id = this->id; particle->rowIndex = line; - particle->effectId = this->id; + particle->effectId = id; particle->columnIndex = segment; particle->groupIndex = 4; particle->elapsedFrames = delay; diff --git a/Source/Contents/Effects/Skills/TalismanMarkEffect.cpp b/Source/Contents/Effects/Skills/TalismanMarkEffect.cpp index 41a416c7f..03188c252 100644 --- a/Source/Contents/Effects/Skills/TalismanMarkEffect.cpp +++ b/Source/Contents/Effects/Skills/TalismanMarkEffect.cpp @@ -127,7 +127,7 @@ void CTalismanMarkEffect::OnProcess() { continue; } - switch (particle->animationState) { + switch (static_cast(particle->animationState)) { case 0: if (IsParticleActive(particle)) { break; diff --git a/Source/Render/DX9/RendererBackBuffer.cpp b/Source/Render/DX9/RendererBackBuffer.cpp index 7e79b78d5..962e31d04 100644 --- a/Source/Render/DX9/RendererBackBuffer.cpp +++ b/Source/Render/DX9/RendererBackBuffer.cpp @@ -16,16 +16,16 @@ int CRendererDX9::LockBackBuffer() { int bitsPerPixel; switch (owner.backBufferDescription.Format) { - case D3DFMT_A8R8G8B8: - case D3DFMT_X8R8G8B8: - bitsPerPixel = 32; - break; case D3DFMT_R5G6B5: case D3DFMT_X1R5G5B5: case D3DFMT_A1R5G5B5: case D3DFMT_A4R4G4B4: bitsPerPixel = 16; break; + case D3DFMT_A8R8G8B8: + case D3DFMT_X8R8G8B8: + bitsPerPixel = 32; + break; default: bitsPerPixel = 0; break; diff --git a/Source/UI/Gauges/UIBarGraph.cpp b/Source/UI/Gauges/UIBarGraph.cpp index 51406cc0d..270336669 100644 --- a/Source/UI/Gauges/UIBarGraph.cpp +++ b/Source/UI/Gauges/UIBarGraph.cpp @@ -199,7 +199,8 @@ void UIBarGraphPlayer::Paint() { return; } - this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gze_bg1.bmp"))), false); + CBitmapRes* background = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gze_bg1.bmp"))); + this->DrawBitmap(0, 0, background, false); if (0 == maximum) { return; } @@ -238,7 +239,8 @@ void UIBarGraphPlayerAP::Paint() { return; } - this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gze_bg1.bmp"))), false); + CBitmapRes* background = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gze_bg1.bmp"))); + this->DrawBitmap(0, 0, background, false); if (maximum > 0) { const double ratio = static_cast(current) / static_cast(maximum); if (ratio > 0.0) {