Decompile fn_10120 (UIRPData::Draw)
Batch #17576 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_10120 UIRPData::Draw: logic confirmed by peer review Peer-reviewed-by: Yommy, cremane, bibinir 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
ab454a77ea
commit
1e5c387f03
2 changed files with 11 additions and 5 deletions
7
Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h
Normal file
7
Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Render/Primitives/RenderPrimitive.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
extern template void std::list<RenderPrimitive*>::push_back(RenderPrimitive* const&);
|
||||
|
|
@ -28,9 +28,8 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi
|
|||
return;
|
||||
}
|
||||
|
||||
RenderPrimitive* primitive;
|
||||
if (stretched == true) {
|
||||
primitive = g_renderer->primitives.Acquire();
|
||||
RenderPrimitive* primitive = g_renderer->primitives.Acquire();
|
||||
primitive->texture = texture;
|
||||
const int right = x + width;
|
||||
const int bottom = y + height;
|
||||
|
|
@ -62,8 +61,9 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi
|
|||
primitive->quad[3].z = 0.000001f;
|
||||
primitive->quad[3].rhw = 0.999999f;
|
||||
primitive->quad[3].diffuse = color;
|
||||
this->m_primitives.push_back(primitive);
|
||||
} else {
|
||||
primitive = g_renderer->primitives.Acquire();
|
||||
RenderPrimitive* primitive = g_renderer->primitives.Acquire();
|
||||
primitive->texture = texture;
|
||||
const int imageWidth = texture->Width();
|
||||
const int imageHeight = texture->Height();
|
||||
|
|
@ -109,7 +109,6 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi
|
|||
primitive->quad[3].z = 0.000001f;
|
||||
primitive->quad[3].rhw = 0.999999f;
|
||||
primitive->quad[3].diffuse = color;
|
||||
this->m_primitives.push_back(primitive);
|
||||
}
|
||||
|
||||
this->m_primitives.push_back(primitive);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue