Maintenance: Signature fixes from the original: (C12) CRendererDX9::DrawDepthQueue takes (bool sort, vector& queue): original tests t
Batch #18147 by ragnarok-clanker: forced by an admin (7 lower score(s), 20 changed function(s)); checked with 122 compiled unit(s), including every includer of Source/Render/DX9/RendererDX9.h, Source/Render/DeviceContext/DCBitmap.h, Source/Render/DeviceContext/DCSurface.h, Source/Render/DeviceContext/DeviceContext.h.
This commit is contained in:
parent
133f7fac19
commit
445f31a212
21 changed files with 31 additions and 31 deletions
|
|
@ -3839,7 +3839,7 @@ void UICashEmotionSprBtn::Paint() {
|
|||
const int sourceY = static_cast<int>(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<int>(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<int>(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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public:
|
|||
HRESULT UnlockBackBuffer() override;
|
||||
|
||||
void SetTextureMode(int mode);
|
||||
void DrawDepthQueue(std::vector<DepthPrimitive>& queue, bool sort);
|
||||
void DrawDepthQueue(bool sort, std::vector<DepthPrimitive>& queue);
|
||||
void DrawOpaqueQueues(RenderQueues& queues);
|
||||
void DrawGroundQueues();
|
||||
void DrawAlphaQueues(RenderQueues& queues, unsigned char twoPass);
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static bool operator<(const DepthPrimitive& left, const DepthPrimitive& right) {
|
|||
|
||||
// OFFSET: 0x005658F0
|
||||
// FUNCTION: fn_02221
|
||||
void CRendererDX9::DrawDepthQueue(std::vector<DepthPrimitive>& queue, bool sort) {
|
||||
void CRendererDX9::DrawDepthQueue(bool sort, std::vector<DepthPrimitive>& queue) {
|
||||
if (sort) {
|
||||
std::sort(queue.begin(), queue.end());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f), static_cast<int>(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<int>(record.u0 * 256.0f),
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f),
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f),
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f),
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ void UIDescriptRace::DrawRaceDescription() {
|
|||
|
||||
this->geometry.surface->DrawSurface(
|
||||
cell.x + point.x + 60, cell.y + point.y + 140, texture, static_cast<int>(record.u0 * 256.0f), static_cast<int>(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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ void FuncDrawWNDChar::Draw(bool option) {
|
|||
if (clip <= top) {
|
||||
this->m_window->geometry.surface->DrawSurface(
|
||||
x, top, texture, static_cast<int>(record.u0 * 256.0f), static_cast<int>(record.v0 * 256.0f - static_cast<float>(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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f),
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0
|
||||
static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void UINpcSprWnd::Paint() {
|
|||
}
|
||||
|
||||
this->geometry.surface->DrawSurface(
|
||||
0, 0, texture, static_cast<int>(record.u0 * 256.0f), static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, 1, 1, 0, 0
|
||||
0, 0, texture, static_cast<int>(record.u0 * 256.0f), static_cast<int>(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, 1, 1, 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ void UISelCharForUServerWnd::Paint() {
|
|||
|
||||
this->geometry.surface->DrawSurface(
|
||||
cell.x + offsetX + slot.x, cell.y + offsetY + slot.y, texture, static_cast<int>(record.u0 * 256.0f), static_cast<int>(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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f), static_cast<int>(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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<int>(record.u0 * 256.0f), static_cast<int>(record.v0 * 256.0f), image->width, image->height,
|
||||
cell.mirrored != 0, static_cast<short>(image->doubleWidth) + 1, static_cast<short>(image->doubleHeight) + 1, 0, 0
|
||||
cell.mirrored != 0, static_cast<short>(image->doubleWidth) + 1, static_cast<short>(image->doubleHeight) + 1, 0
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue