diff --git a/Source/Contents/CashEmotion/CashEmotionMgr.cpp b/Source/Contents/CashEmotion/CashEmotionMgr.cpp index b68321046..22eec2373 100644 --- a/Source/Contents/CashEmotion/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotion/CashEmotionMgr.cpp @@ -3839,7 +3839,7 @@ void UICashEmotionSprBtn::Paint() { const int sourceY = static_cast(record.v0 * 256.0f + clipY); surface->DrawSurface( x < 0 ? 0 : x, y < 0 ? 0 : y, texture, sourceX < 0 ? 0 : sourceX, sourceY < 0 ? 0 : sourceY, drawWidth < 0 ? 0 : drawWidth, - drawHeight < 0 ? 0 : drawHeight, cell->mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 1, 0 + drawHeight < 0 ? 0 : drawHeight, cell->mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 1 ); } @@ -3955,7 +3955,7 @@ void UIHeadsprButton::Paint() { const int sourceX = static_cast(record.u0 * 256.0f); this->geometry.surface->DrawSurface( 0, 0, texture, sourceX < 0 ? 0 : sourceX, sourceY < 0 ? 0 : sourceY, image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, - image->doubleHeight + 1, 0, 0 + image->doubleHeight + 1, 0 ); } @@ -4034,7 +4034,7 @@ void UISpriteButton::Paint() { const int top = static_cast(sourceY); this->geometry.surface->DrawSurface( left, y < 0 ? 0 : y, texture, sourceX < 0 ? 0 : sourceX, top < 0 ? 0 : top, drawWidth < 0 ? 0 : drawWidth, drawHeight < 0 ? 0 : drawHeight, - cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/Render/DX9/AlphaQueuesDX9.cpp b/Source/Render/DX9/AlphaQueuesDX9.cpp index 176a47467..bf04b883c 100644 --- a/Source/Render/DX9/AlphaQueuesDX9.cpp +++ b/Source/Render/DX9/AlphaQueuesDX9.cpp @@ -72,7 +72,7 @@ void CRendererDX9::DrawAlphaQueues(RenderQueues& queues, unsigned char twoPass) this->device->state.SetRenderState(D3DRS_ALPHAREF, 1); this->device->state.SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); - this->DrawDepthQueue(queues.queue_01A4, true); + this->DrawDepthQueue(true, queues.queue_01A4); } else { const auto drawDepthWriting = [this](const DepthPrimitive& entry) { RenderCommand* command = entry.primitive; diff --git a/Source/Render/DX9/QueuedDrawingDX9.cpp b/Source/Render/DX9/QueuedDrawingDX9.cpp index f207d03b3..4f51b7e5a 100644 --- a/Source/Render/DX9/QueuedDrawingDX9.cpp +++ b/Source/Render/DX9/QueuedDrawingDX9.cpp @@ -95,7 +95,7 @@ void CRendererDX9::DrawQueues( { ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); - this->DrawDepthQueue(queues.queue_021C, true); + this->DrawDepthQueue(true, queues.queue_021C); } { @@ -115,18 +115,18 @@ void CRendererDX9::DrawQueues( this->device->state.SetRenderState(D3DRS_ZWRITEENABLE, 1); this->device->state.SetRenderState(D3DRS_ALPHAREF, 159); this->device->state.SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); - this->DrawDepthQueue(queues.queue_0180, false); + this->DrawDepthQueue(false, queues.queue_0180); this->device->state.SetRenderState(D3DRS_ZWRITEENABLE, 0); this->device->state.SetRenderState(D3DRS_ALPHAREF, 159); this->device->state.SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_LESS); - this->DrawDepthQueue(queues.queue_0180, false); + this->DrawDepthQueue(false, queues.queue_0180); } { ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); this->device->state.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); - this->DrawDepthQueue(queues.queue_01C8, true); + this->DrawDepthQueue(true, queues.queue_01C8); } this->device->state.SetRenderState(D3DRS_ZWRITEENABLE, 0); @@ -135,7 +135,7 @@ void CRendererDX9::DrawQueues( { ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_ALPHAREF, 207); - this->DrawDepthQueue(queues.queue_0228, true); + this->DrawDepthQueue(true, queues.queue_0228); } this->device->state.SetRenderState(D3DRS_FOGENABLE, 0); @@ -144,7 +144,7 @@ void CRendererDX9::DrawQueues( ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); this->device->state.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); - this->DrawDepthQueue(queues.queue_01D4, true); + this->DrawDepthQueue(true, queues.queue_01D4); } { @@ -165,14 +165,14 @@ void CRendererDX9::DrawQueues( ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); this->device->state.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); - this->DrawDepthQueue(queues.queue_01E0, true); + this->DrawDepthQueue(true, queues.queue_01E0); } { ScopedDeviceStateDX9 restore(this->device->state); this->device->state.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); this->device->state.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); - this->DrawDepthQueue(queues.queue_0198, false); + this->DrawDepthQueue(false, queues.queue_0198); } { diff --git a/Source/Render/DX9/RendererDX9.h b/Source/Render/DX9/RendererDX9.h index eb2646d84..710e4a862 100644 --- a/Source/Render/DX9/RendererDX9.h +++ b/Source/Render/DX9/RendererDX9.h @@ -35,7 +35,7 @@ public: HRESULT UnlockBackBuffer() override; void SetTextureMode(int mode); - void DrawDepthQueue(std::vector& queue, bool sort); + void DrawDepthQueue(bool sort, std::vector& queue); void DrawOpaqueQueues(RenderQueues& queues); void DrawGroundQueues(); void DrawAlphaQueues(RenderQueues& queues, unsigned char twoPass); diff --git a/Source/Render/DX9/RendererDX9Operations.cpp b/Source/Render/DX9/RendererDX9Operations.cpp index 8ca47fe69..2f85a1603 100644 --- a/Source/Render/DX9/RendererDX9Operations.cpp +++ b/Source/Render/DX9/RendererDX9Operations.cpp @@ -119,7 +119,7 @@ static bool operator<(const DepthPrimitive& left, const DepthPrimitive& right) { // OFFSET: 0x005658F0 // FUNCTION: fn_02221 -void CRendererDX9::DrawDepthQueue(std::vector& queue, bool sort) { +void CRendererDX9::DrawDepthQueue(bool sort, std::vector& queue) { if (sort) { std::sort(queue.begin(), queue.end()); } diff --git a/Source/Render/DeviceContext/DCBitmap.h b/Source/Render/DeviceContext/DCBitmap.h index dc8170cf7..edf3a56e0 100644 --- a/Source/Render/DeviceContext/DCBitmap.h +++ b/Source/Render/DeviceContext/DCBitmap.h @@ -24,7 +24,7 @@ public: int x, int y, const CSprRes& sprite, const ActionFrame& frame, const std::uint32_t* palette ) override; void DrawSurface( - int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter, int format + int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter ) override; void Fill(const RECT* rectangle, std::uint32_t color) override; void Draw(int x, int y, int width, int height, std::uint32_t color) override; diff --git a/Source/Render/DeviceContext/DCSurface.cpp b/Source/Render/DeviceContext/DCSurface.cpp index baf71008d..0b40eecef 100644 --- a/Source/Render/DeviceContext/DCSurface.cpp +++ b/Source/Render/DeviceContext/DCSurface.cpp @@ -261,7 +261,7 @@ void CDCSurface::DrawRleSprite(int, int, const CSprRes&, const ActionFrame&, con // OFFSET: 0x00549240 // FUNCTION: fn_01871 -void CDCSurface::DrawSurface(int, int, CSurface*, int, int, int, int, bool, int, int, int, int) { +void CDCSurface::DrawSurface(int, int, CSurface*, int, int, int, int, bool, int, int, int) { } // OFFSET: 0x00549220 diff --git a/Source/Render/DeviceContext/DCSurface.h b/Source/Render/DeviceContext/DCSurface.h index 2e709e920..2cc62ae56 100644 --- a/Source/Render/DeviceContext/DCSurface.h +++ b/Source/Render/DeviceContext/DCSurface.h @@ -71,7 +71,7 @@ public: int x, int y, const CSprRes& sprite, const ActionFrame& frame, const std::uint32_t* palette ) override; void DrawSurface( - int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter, int format + int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter ) override; void Fill(const RECT* rectangle, std::uint32_t color) override; void Draw(int x, int y, int width, int height, std::uint32_t color) override; diff --git a/Source/Render/DeviceContext/DeviceContext.h b/Source/Render/DeviceContext/DeviceContext.h index b91035d5b..c71af1a42 100644 --- a/Source/Render/DeviceContext/DeviceContext.h +++ b/Source/Render/DeviceContext/DeviceContext.h @@ -30,7 +30,7 @@ public: int x, int y, const CSprRes& sprite, const ActionFrame& frame, const std::uint32_t* palette ) = 0; virtual void DrawSurface( - int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter, int format + int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter ) = 0; virtual void Fill(const RECT* rectangle, std::uint32_t color) = 0; virtual void Draw(int x, int y, int width, int height, std::uint32_t color) = 0; diff --git a/Source/Render/Textures/BitmapPixels.cpp b/Source/Render/Textures/BitmapPixels.cpp index 26c1fa2ed..359dc646d 100644 --- a/Source/Render/Textures/BitmapPixels.cpp +++ b/Source/Render/Textures/BitmapPixels.cpp @@ -358,7 +358,7 @@ static float SurfacePixelAlpha(int value) { // OFFSET: 0x005460B0 // FUNCTION: fn_01839 void CDCBitmap::DrawSurface( - int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter, int + int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter ) { if (!source || !this->m_bitmap.pixels) { return; diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 6cc79a5d5..010c10163 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -962,7 +962,7 @@ void UIMonsterDisplayWnd::Paint() { const int height = y + image->height > 125 ? 125 - y : image->height; this->geometry.surface->DrawSurface( x, y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), width, height, cell.mirrored != 0, image->doubleWidth + 1, - image->doubleHeight + 1, 0, 0 + image->doubleHeight + 1, 0 ); } } @@ -1803,7 +1803,7 @@ void UIPetTamingDeceiveWnd::Paint() { } this->geometry.surface->DrawSurface( this->geometry.width / 2 + cell.x, this->geometry.height / 2 + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } diff --git a/Source/UI/Dialogs/UIMessageBox.cpp b/Source/UI/Dialogs/UIMessageBox.cpp index d47430ddf..484c25068 100644 --- a/Source/UI/Dialogs/UIMessageBox.cpp +++ b/Source/UI/Dialogs/UIMessageBox.cpp @@ -338,7 +338,7 @@ void UIMakeCharWnd::Paint() { this->geometry.surface->DrawSurface( this->m_view.x + cell.x + offset.x, this->m_view.y + cell.y + offset.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Guild/UIGuildWnd.cpp b/Source/UI/Guild/UIGuildWnd.cpp index b84217ee8..a0d52976f 100644 --- a/Source/UI/Guild/UIGuildWnd.cpp +++ b/Source/UI/Guild/UIGuildWnd.cpp @@ -1924,7 +1924,7 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i this->geometry.surface->DrawSurface( (this->m_rowSpacing - image->width + 36) / 2 + 6, (this->m_rowSpacing + 36) * row + 70, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } diff --git a/Source/UI/Items/UICollectionSystemWnd.cpp b/Source/UI/Items/UICollectionSystemWnd.cpp index 77ffd7d7e..bf9e2caeb 100644 --- a/Source/UI/Items/UICollectionSystemWnd.cpp +++ b/Source/UI/Items/UICollectionSystemWnd.cpp @@ -52,7 +52,7 @@ void CUICollectionSystemWnd::Paint() { } this->geometry.surface->DrawSurface( this->geometry.width / 2 + cell.x, this->geometry.height / 2 + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } diff --git a/Source/UI/Lists/UIComboBoxDefWnd.cpp b/Source/UI/Lists/UIComboBoxDefWnd.cpp index cc5cf2ef7..646f1c471 100644 --- a/Source/UI/Lists/UIComboBoxDefWnd.cpp +++ b/Source/UI/Lists/UIComboBoxDefWnd.cpp @@ -596,7 +596,7 @@ void UIDescriptRace::DrawRaceDescription() { this->geometry.surface->DrawSurface( cell.x + point.x + 60, cell.y + point.y + 140, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, - image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Login/FuncDrawWNDChar.cpp b/Source/UI/Login/FuncDrawWNDChar.cpp index 10b524bd9..d1d276d4a 100644 --- a/Source/UI/Login/FuncDrawWNDChar.cpp +++ b/Source/UI/Login/FuncDrawWNDChar.cpp @@ -179,7 +179,7 @@ void FuncDrawWNDChar::Draw(bool option) { if (clip <= top) { this->m_window->geometry.surface->DrawSurface( x, top, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f - static_cast(clip)), image->width, - image->height + clip, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + image->height + clip, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Login/UINewMakeCharWnd.cpp b/Source/UI/Login/UINewMakeCharWnd.cpp index 1dfaf7402..a8d4fca05 100644 --- a/Source/UI/Login/UINewMakeCharWnd.cpp +++ b/Source/UI/Login/UINewMakeCharWnd.cpp @@ -240,7 +240,7 @@ void UINewMakeCharWnd::Paint() { this->geometry.surface->DrawSurface( this->m_viewX + offset.x + cell.x, this->m_viewY + offset.y + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Quest/UIRenewQuestWnd.cpp b/Source/UI/Quest/UIRenewQuestWnd.cpp index 415886cde..f25b45bdd 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.cpp +++ b/Source/UI/Quest/UIRenewQuestWnd.cpp @@ -125,7 +125,7 @@ void UINpcSprWnd::Paint() { } this->geometry.surface->DrawSurface( - 0, 0, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, 1, 1, 0, 0 + 0, 0, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, 1, 1, 0 ); } } diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 35e56a17c..7dafb60a0 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -815,7 +815,7 @@ void UISelCharForUServerWnd::Paint() { this->geometry.surface->DrawSurface( cell.x + offsetX + slot.x, cell.y + offsetY + slot.y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), - image->width, image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + image->width, image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Skill/UINewSkillListWnd.cpp b/Source/UI/Skill/UINewSkillListWnd.cpp index 9c7020b3b..5c5336028 100644 --- a/Source/UI/Skill/UINewSkillListWnd.cpp +++ b/Source/UI/Skill/UINewSkillListWnd.cpp @@ -252,7 +252,7 @@ void UINewSkillListWnd::DrawCharacter() { const int clipY = y >= 0 ? 0 : y; this->geometry.surface->DrawSurface( cell.x + offsetX + 48, y >= 0 ? y : 0, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f - clipY), image->width, - image->height + clipY, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 + image->height + clipY, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0 ); } } diff --git a/Source/UI/Window/WindowBackground.cpp b/Source/UI/Window/WindowBackground.cpp index 46b39d2c2..c2869c299 100644 --- a/Source/UI/Window/WindowBackground.cpp +++ b/Source/UI/Window/WindowBackground.cpp @@ -125,6 +125,6 @@ void UIWindow::DrawRobeSprite(int job, int sex, int robe, int x, int y, bool ove this->geometry.surface->DrawSurface( x + cell.x, y + cell.y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, image->height, - cell.mirrored != 0, static_cast(image->doubleWidth) + 1, static_cast(image->doubleHeight) + 1, 0, 0 + cell.mirrored != 0, static_cast(image->doubleWidth) + 1, static_cast(image->doubleHeight) + 1, 0 ); }