Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
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:
|
|
DeviceOwnerDX7* m_owner;
|
|
IDirectDrawSurface7* m_surface;
|
|
std::uint32_t m_width;
|
|
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
|