rodecomp/Source/Render/RendererDX7.h
ragnarok-clanker 63cdd77f7f Decompile 4 functions in Source/Render/DX7/RendererDX7Operations.cpp, Source/Render/DX7/RendererFogDX7.cpp, ...
Batch #10458 by secret: 0 byte-identical, 4 confirmed by peer review.

- fn_45495 CRendererDX7::FlushRenderList: logic confirmed by peer review
- fn_45496 CRendererDX7::DrawTopmostQueue: logic confirmed by peer review
- fn_45497 CRendererDX7::DrawBlendedQueue: logic confirmed by peer review
- fn_02080 CRendererDX7::ApplyFog: logic confirmed by peer review

Peer-reviewed-by: Yommy, KWDev, seumadruga
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-04 05:15:57 +00:00

73 lines
2.5 KiB
C++

#ifndef RAGNAROK_SOURCE_RENDER_RENDERERDX7_H
#define RAGNAROK_SOURCE_RENDER_RENDERERDX7_H
#include "Render/Renderer.h"
#include <list>
#include <string>
class CTextureDX7;
class ResourceMgr;
struct IDirect3DDevice7;
struct BitmapImage;
class CRendererDX7 : public CRenderer {
public:
CRendererDX7();
/* 025C */ unsigned samples;
/* 0260 */ unsigned time;
/* 0264 */ unsigned rate;
/* 0268 */ CTextureDX7* boundTexture;
/* 026C */ CTextureDX7* boundLightmap;
/* 0270 */ unsigned clearColor;
/* 0274 */ IDirect3DDevice7* device;
/* 0278 */ unsigned char unknown_0278[4];
/* 027C */ unsigned screenWidth;
/* 0280 */ unsigned screenHeight;
void SetCamera(const float* eye, const float* target, const float* up) override;
void SetClearColor(unsigned color) override;
bool Draw() override;
void SetTextureFormat(unsigned format);
void SetLighting(const float* direction, const float* diffuse, const float* ambient);
void ClearDepth(int clearColor);
void ClearWorld(unsigned color, int mode, unsigned char worldFlag, unsigned overlay);
void DrawPrimitive(RenderCommand* primitive);
void DrawLightmappedPrimitive(LightmappedPrimitive* primitive);
void SetTextureMode(int mode);
bool RenderToTexture(int width, int height, const std::list<RenderPrimitive*>& primitives, CTexture*& texture);
bool SaveBitmap(const char* filename, const BitmapImage& overlay, int width, int height, RendererBackBuffer& backBuffer);
bool SaveJpeg(const char* filename, const BitmapImage& overlay, int width, int height, RendererBackBuffer& backBuffer);
bool SaveLogo(std::string filename, ResourceMgr& resources);
void SetTexture(unsigned stage, CTextureDX7* texture);
void Present(bool wait);
float FrameRate() const;
void DrawFPS();
void DrawDepthSortedQueue();
void DrawAlphaQueues();
void DrawOpaqueQueues();
void DrawGroundBaseQueue();
void DrawAuxiliaryQueue();
void ApplyFog();
void DrawTopmostQueue();
void DrawBlendedQueue();
void FlushRenderList();
// INLINED
void BindTexture(CTextureDX7* texture);
// INLINED
void BindLightmap(CTextureDX7* lightmap);
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CRendererDX7) == 0x284);
static_assert(offsetof(CRendererDX7, clearColor) == 0x0270);
static_assert(offsetof(CRendererDX7, boundTexture) == 0x0268);
static_assert(offsetof(CRendererDX7, boundLightmap) == 0x026C);
static_assert(offsetof(CRendererDX7, device) == 0x0274);
static_assert(offsetof(CRendererDX7, screenWidth) == 0x027C);
static_assert(offsetof(CRendererDX7, screenHeight) == 0x0280);
#endif
#endif