Batch #1060 by ragnarok-clanker: no function's compiled code changes; checked with 188 compiled unit(s), including every includer of Source/Render/DX7/DeviceOwnerDX7.h, Source/Render/DX7/DirectDrawEnumeration.h, Source/Render/DX7/RenderSystemDX7.h, Source/Render/DX7/RendererFogDX7.h, Source/Render/DX7/SurfaceDX7.h, Source/Render/DX9/DeviceOwnerDX9.h, Source/Render/DX9/DeviceStateDX9.h, Source/Render/DX9/RendererFogDX9.h, Source/Render/DeviceContext/DCSurface.h, Source/Render/DisplayMode.h, Source/Render/Primitives/LightmappedPrimitive.h, Source/Render/Primitives/RenderCommandPool.h, Source/Render/Primitives/RenderPrimitive.h, Source/Render/Primitives/RenderPrimitivePool.h, Source/Render/Primitives/RenderQueues.h, Source/Render/Primitives/RenderVertexPool.h, Source/Render/Projection/RendererViewport.h, Source/Render/RenderAdapter.h, Source/Render/Renderer.h, Source/Render/RendererBackBuffer.h, Source/Render/Text/TextContext.h, Source/Render/Textures/BitmapTextureCache.h, Source/Render/Textures/SpriteAtlas.h, Source/Render/Textures/Surface.h.
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#ifndef RAGNAROK_SOURCE_RENDER_DX7_SURFACEDX7_H
|
|
#define RAGNAROK_SOURCE_RENDER_DX7_SURFACEDX7_H
|
|
|
|
#include "Render/Textures/Surface.h"
|
|
|
|
#include <ddraw.h>
|
|
|
|
class DeviceOwnerDX7;
|
|
|
|
class CSurfaceDX7 : public CSurface {
|
|
friend class CSurfaceWallpaperDX7;
|
|
friend class DeviceOwnerDX7;
|
|
|
|
public:
|
|
CSurfaceDX7(DeviceOwnerDX7& owner, int width, int height);
|
|
CSurfaceDX7(DeviceOwnerDX7& owner, IDirectDrawSurface7* surface);
|
|
~CSurfaceDX7() 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 */ DeviceOwnerDX7* m_owner;
|
|
/* 0008 */ IDirectDrawSurface7* m_surface;
|
|
/* 000C */ std::uint32_t m_width;
|
|
/* 0010 */ std::uint32_t m_height;
|
|
};
|
|
|
|
class CSurfaceWallpaperDX7 : public CSurfaceDX7 {
|
|
public:
|
|
CSurfaceWallpaperDX7(DeviceOwnerDX7& owner, int width, int height);
|
|
void Upload(int x, int y, int width, int height, const std::uint32_t* pixels, int option, int sourceWidth) override;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CSurfaceDX7) == 20);
|
|
#endif
|
|
|
|
#endif
|