Batch #10258 by ragnarok-clanker: forced by an admin (9 lower score(s), 44 changed function(s)); checked with 318 compiled unit(s), including every includer of Source/Render/DX9/DeviceOwnerDX9.h, Source/Render/DX9/RenderSystemDX9.h, Source/Render/DX9/RendererDX9.h, Source/Render/DX9/RendererFogDX9.h, Source/Render/DX9/SurfaceDX9.h, Source/Render/DX9/TextureDX9.h, Source/Render/Renderer.h, Source/Render/RendererDX7.h, Source/Render/Textures/SpriteAtlas.h, Source/Render/DX9/RendererDX9Operations.h. Deletes: Source/Render/DX9/RendererDX9Operations.h
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#ifndef RAGNAROK_SOURCE_RENDER_DX9_SURFACEDX9_H
|
|
#define RAGNAROK_SOURCE_RENDER_DX9_SURFACEDX9_H
|
|
|
|
#include "Render/Textures/Surface.h"
|
|
|
|
#include <d3d9.h>
|
|
|
|
class DeviceOwnerDX9;
|
|
|
|
class CSurfaceDX9 : public CSurface {
|
|
public:
|
|
CSurfaceDX9(DeviceOwnerDX9& owner, int width, int height);
|
|
CSurfaceDX9(DeviceOwnerDX9& owner, IDirect3DSurface9* surface);
|
|
~CSurfaceDX9() override;
|
|
std::uint32_t Width() override;
|
|
std::uint32_t Height() override;
|
|
bool Resize(int width, int height) override;
|
|
SurfaceLock Lock() override;
|
|
void Unlock() override;
|
|
bool GetDC(HDC* output) override;
|
|
void ReleaseDC(HDC dc) override;
|
|
void Upload(int x, int y, int width, int height, const std::uint32_t* pixels, int option, int sourceWidth) 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;
|
|
void Stretch(int x, int y, int width, int height) override;
|
|
|
|
protected:
|
|
/* 0004 */ DeviceOwnerDX9* m_owner;
|
|
/* 0008 */ std::uint32_t m_width;
|
|
/* 000C */ std::uint32_t m_height;
|
|
/* 0010 */ IDirect3DSurface9* m_surface;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CSurfaceDX9) == 20);
|
|
#endif
|
|
|
|
#endif
|