Batch #16532 by eAthena: 0 byte-identical, 5 confirmed by peer review. - fn_01846 CDCBitmap::Draw: logic confirmed by peer review - fn_17238 UIWindowMgr::DrawWindows: logic confirmed by peer review - fn_06493 CMapInfoMgr::DrawMapName: logic confirmed by peer review - fn_17148 DrawBitmapResource: logic confirmed by peer review - fn_01854 BitmapTextureCache::Update: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
53 lines
2.3 KiB
C++
53 lines
2.3 KiB
C++
#ifndef RAGNAROK_SOURCE_RENDER_DEVICECONTEXT_DEVICECONTEXT_H
|
|
#define RAGNAROK_SOURCE_RENDER_DEVICECONTEXT_DEVICECONTEXT_H
|
|
|
|
#include "Render/Textures/SpritePixels.h"
|
|
|
|
#include <windows.h>
|
|
|
|
class CSurface;
|
|
class CDCBitmap;
|
|
class CSprRes;
|
|
struct ActionFrame;
|
|
class CRenderSystemBase;
|
|
class SpriteAtlas;
|
|
|
|
class CDC {
|
|
public:
|
|
virtual ~CDC();
|
|
virtual void Grow(std::uint32_t width, std::uint32_t height) = 0;
|
|
virtual bool GetDC(HDC* output) = 0;
|
|
virtual void ReleaseDC(HDC dc) = 0;
|
|
virtual void Copy(int x, int y, int width, int height, const std::uint32_t* source, bool transparent) = 0;
|
|
virtual void ScaleCopy(int x, int y, int sourceWidth, int sourceHeight, int width, int height, const std::uint32_t* source, int option) = 0;
|
|
virtual void CopyRegion(
|
|
int x, int y, int sourceLeft, int sourceTop, int sourceRight, int sourceBottom, const std::uint32_t* source, int sourceWidth, int sourceHeight,
|
|
bool transparent, bool alpha
|
|
) = 0;
|
|
virtual void CopyFrom(int x, int y, int sourceX, int sourceY, int width, int height, const CDCBitmap& source) = 0;
|
|
virtual void BlendFrom(std::uint32_t x, std::uint32_t y, int width, int height, const CDCBitmap& source) = 0;
|
|
virtual void DrawRleSprite(
|
|
int x, int y, const CSprRes& sprite, const ActionFrame& frame, const std::uint32_t* palette
|
|
) = 0;
|
|
virtual void DrawSurface(
|
|
int x, int y, CSurface* source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool mirrored, int scaleX, int scaleY, int filter, int format
|
|
) = 0;
|
|
virtual void Fill(const RECT* rectangle, std::uint32_t color) = 0;
|
|
virtual void Draw(int x, int y, int width, int height, std::uint32_t color) = 0;
|
|
virtual void DrawScaledSprite(
|
|
int x, int y, int width, int height, const CSprRes* sprite, const ActionFrame* frame, int offsetX, int offsetY, float scale,
|
|
const std::uint32_t* palette
|
|
) = 0;
|
|
virtual void DrawScaledSurface(
|
|
int x, int y, int width, int height, CSurface* source, int sourceWidth, int sourceHeight, float scaleX, float scaleY, std::uint32_t color, bool mirrored,
|
|
int offsetX, int offsetY, int sourceX, int sourceY
|
|
) = 0;
|
|
virtual void Brighten(int x, int y, int width, int height, int amount) = 0;
|
|
virtual void Dim(int x, int y, int width, int height, int percent) = 0;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CDC) == 4);
|
|
#endif
|
|
|
|
#endif
|