Batch #16419 by Yommy: 4 byte-identical, 6 confirmed by peer review. - fn_01847 CDCBitmap::UploadTexture: logic confirmed by peer review - fn_01850 CDCBitmap::Grow: byte-identical - fn_01848 CDCBitmap::GetDC: byte-identical - fn_01849 CDCBitmap::ReleaseDC: byte-identical - fn_01841 CDCBitmap::Fill: byte-identical - fn_01852 CDCBitmap::Copy: logic confirmed by peer review - fn_01843 CDCBitmap::CopyFrom: logic confirmed by peer review - fn_01844 CDCBitmap::BlendFrom: logic confirmed by peer review - fn_01857 CDCBitmap::Brighten: logic confirmed by peer review - fn_01851 CDCBitmap::ScaleCopy: logic confirmed by peer review Peer-reviewed-by: youko, kyoshi, gordaoprogramas, cremane, codeplay, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
39 lines
981 B
C++
39 lines
981 B
C++
#ifndef RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPPIXELS_H
|
|
#define RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPPIXELS_H
|
|
|
|
#include "Render/Textures/SpritePixels.h"
|
|
|
|
#include <cstdint>
|
|
#include <windows.h>
|
|
|
|
class CSurface;
|
|
class SpriteAtlas;
|
|
class CRenderSystemBase;
|
|
class CTexture;
|
|
|
|
struct BitmapPixels {
|
|
/* 0000 */ std::uint32_t width;
|
|
/* 0004 */ std::uint32_t height;
|
|
/* 0008 */ HDC dc;
|
|
/* 000C */ HBITMAP bitmap;
|
|
/* 0010 */ HGDIOBJ previous;
|
|
/* 0014 */ std::uint32_t* pixels;
|
|
/* 0018 */ bool dirty;
|
|
|
|
BitmapPixels(int width, int height);
|
|
~BitmapPixels();
|
|
void Dim(int x, int y, int width, int height, int percent);
|
|
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
|
|
);
|
|
|
|
private:
|
|
void Create(int width, int height);
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(BitmapPixels) == 28);
|
|
#endif
|
|
|
|
#endif
|