161 lines
3.4 KiB
C++
161 lines
3.4 KiB
C++
#include "Render/DCSurface.h"
|
|
#include "Render/RenderSystemBase.h"
|
|
#include "Render/Surface.h"
|
|
|
|
#include <utility>
|
|
|
|
// OFFSET: 0x0056A500
|
|
// FUNCTION: fn_02290
|
|
std::shared_ptr<CSurface> AcquireBackBufferSurface(CRenderSystemBase* system) {
|
|
return system ? system->BackBufferSurface() : std::shared_ptr<CSurface>{};
|
|
}
|
|
|
|
// OFFSET: 0x00548FE0
|
|
// FUNCTION: fn_01864
|
|
CDCSurface::CDCSurface(std::shared_ptr<CSurface> surface) : m_surface(std::move(surface)) {
|
|
}
|
|
|
|
// OFFSET: 0x005490D0
|
|
// FUNCTION: fn_01865
|
|
// OFFSET: 0x00549180
|
|
// FUNCTION: fn_01868
|
|
CDCSurface::~CDCSurface() = default;
|
|
|
|
// OFFSET: 0x005492C0
|
|
// FUNCTION: fn_01879
|
|
void CDCSurface::Grow(std::uint32_t width, std::uint32_t height) {
|
|
if (width > this->m_surface->Width() || height > this->m_surface->Height()) {
|
|
this->m_surface->Resize(width, height);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x005492A0
|
|
// FUNCTION: fn_01877
|
|
bool CDCSurface::GetDC(HDC* output) {
|
|
return this->m_surface->GetDC(output);
|
|
}
|
|
|
|
// OFFSET: 0x005492B0
|
|
// FUNCTION: fn_01878
|
|
void CDCSurface::ReleaseDC(HDC dc) {
|
|
this->m_surface->ReleaseDC(dc);
|
|
}
|
|
|
|
// OFFSET: 0x00549320
|
|
// FUNCTION: fn_01881
|
|
void CDCSurface::Copy(int x, int y, int width, int height, const std::uint32_t* source, bool transparent) {
|
|
this->m_surface->Upload(x, y, width, height, source, transparent, 0);
|
|
}
|
|
|
|
// OFFSET: 0x005492F0
|
|
// FUNCTION: fn_01880
|
|
void CDCSurface::ScaleCopy(
|
|
int x,
|
|
int y,
|
|
int sourceWidth,
|
|
int sourceHeight,
|
|
int,
|
|
int,
|
|
const std::uint32_t* source,
|
|
int option
|
|
) {
|
|
this->m_surface->Upload(x, y, sourceWidth, sourceHeight, source, option, 0);
|
|
}
|
|
|
|
// OFFSET: 0x00549260
|
|
// FUNCTION: fn_01873
|
|
void CDCSurface::Fill(const RECT* rectangle, std::uint32_t color) {
|
|
this->m_surface->Fill(rectangle, color);
|
|
}
|
|
|
|
// OFFSET: 0x00549290
|
|
// FUNCTION: fn_01876
|
|
void CDCSurface::Draw(CRenderSystemBase&, int x, int y, int width, int height, std::uint32_t color) {
|
|
this->m_surface->Draw(x, y, width, height, color);
|
|
}
|
|
|
|
// The following slots are ret-only bodies in the reference CDCSurface vtable.
|
|
// OFFSET: 0x00549360
|
|
// FUNCTION: fn_01883
|
|
void CDCSurface::CopyRegion(int, int, int, int, int, int, const std::uint32_t*, int, int, bool, bool) {
|
|
}
|
|
|
|
// OFFSET: 0x00549270
|
|
// FUNCTION: fn_01874
|
|
void CDCSurface::CopyFrom(int, int, int, int, int, int, const CDCBitmap&) {
|
|
}
|
|
|
|
// OFFSET: 0x00549280
|
|
// FUNCTION: fn_01875
|
|
void CDCSurface::BlendFrom(std::uint32_t, std::uint32_t, int, int, const CDCBitmap&) {
|
|
}
|
|
|
|
// OFFSET: 0x00549230
|
|
// FUNCTION: fn_01870
|
|
void CDCSurface::DrawRleSprite(
|
|
int,
|
|
int,
|
|
std::span<const SpriteFrameCell>,
|
|
const SpriteRleImage* const* const*,
|
|
const std::uint32_t*,
|
|
int
|
|
) {
|
|
}
|
|
|
|
// OFFSET: 0x00549240
|
|
// FUNCTION: fn_01871
|
|
void CDCSurface::DrawSurface(int, int, CSurface*, int, int, int, int, bool, int, int, int, int) {
|
|
}
|
|
|
|
// OFFSET: 0x00549220
|
|
// FUNCTION: fn_01869
|
|
void CDCSurface::DrawScaledSprite(
|
|
int,
|
|
int,
|
|
int,
|
|
int,
|
|
std::span<const SpriteFrameCell>,
|
|
const SpriteRleImage* const* const*,
|
|
int,
|
|
int,
|
|
int,
|
|
float,
|
|
const std::uint32_t*,
|
|
SpriteAtlas&,
|
|
CRenderSystemBase&,
|
|
int,
|
|
std::uint32_t
|
|
) {
|
|
}
|
|
|
|
// OFFSET: 0x00549250
|
|
// FUNCTION: fn_01872
|
|
void CDCSurface::DrawScaledSurface(
|
|
int,
|
|
int,
|
|
int,
|
|
int,
|
|
CSurface*,
|
|
int,
|
|
int,
|
|
float,
|
|
float,
|
|
std::uint32_t,
|
|
bool,
|
|
int,
|
|
int,
|
|
int,
|
|
int,
|
|
int
|
|
) {
|
|
}
|
|
|
|
// OFFSET: 0x00549370
|
|
// FUNCTION: fn_01884
|
|
void CDCSurface::Brighten(int, int, int, int, int) {
|
|
}
|
|
|
|
// OFFSET: 0x00549350
|
|
// FUNCTION: fn_01882
|
|
void CDCSurface::Dim(int, int, int, int, int) {
|
|
}
|