coastline 0.0.4
Loading...
Searching...
No Matches
RenderHost Class Reference

What the game draws through: the renderer of the main window. More...

#include <renderer.h>

Public Member Functions

DirectDrawRenderer * GetRenderer () const
 RenderHost ()
 Start without a renderer.
int OnDestroyDevice ()
 Prepare for the device of the renderer to go.
int ReloadTextureSurfacesAfterRestore ()
 Load the textures again after the surfaces of the renderer were restored.
HRESULT SetRenderer (DirectDrawRenderer *pNewRenderer)
 Draw through a renderer.
HRESULT RenderLoadingScreen (DirectDrawRenderer *pWindowRenderer, const char *pszImage, unsigned nImageKey)
 Show an image of the game while the game loads.
HRESULT ValidateRenderDeviceState ()
 Whether the renderer is ready and has its Direct3D objects.

Detailed Description

What the game draws through: the renderer of the main window.

Constructor & Destructor Documentation

◆ RenderHost()

RenderHost::RenderHost ( )

Start without a renderer.

Ghidra address:
BRD3D: 0x10001130

Member Function Documentation

◆ GetRenderer()

DirectDrawRenderer * RenderHost::GetRenderer ( ) const
inline
Returns
The renderer of the main window.

◆ OnDestroyDevice()

int RenderHost::OnDestroyDevice ( )

Prepare for the device of the renderer to go.

Returns
0.
Ghidra address:
BRD3D: 0x10001180

◆ ReloadTextureSurfacesAfterRestore()

int RenderHost::ReloadTextureSurfacesAfterRestore ( )

Load the textures again after the surfaces of the renderer were restored.

Returns
0.
Ghidra address:
BRD3D: 0x10001190

◆ SetRenderer()

HRESULT RenderHost::SetRenderer ( DirectDrawRenderer * pNewRenderer)

Draw through a renderer.

Parameters
pNewRendererThe renderer.
Returns
S_OK, or RENDERER_E_NOT_CREATED without a renderer.
Ghidra address:
BRD3D: 0x10001140

◆ RenderLoadingScreen()

HRESULT RenderHost::RenderLoadingScreen ( DirectDrawRenderer * pWindowRenderer,
const char * pszImage,
unsigned nImageKey )

Show an image of the game while the game loads.

The image is drawn as a 256 by 256 texture in the centre of the screen, and the frame is drawn and flipped twice.

Parameters
pWindowRendererThe renderer of the window.
pszImageThe name of the image.
nImageKeyThe Adler-32 checksum the image must have, 0x2ac7e58b for the splash.
Returns
The result of the last flip, the error of a scene, or E_FAIL for a renderer that is not ready.
Ghidra address:
BRD3D: 0x10008e30

◆ ValidateRenderDeviceState()

HRESULT RenderHost::ValidateRenderDeviceState ( )

Whether the renderer is ready and has its Direct3D objects.

Returns
S_OK, RENDERER_E_NOT_READY for a renderer not ready, or E_FAIL.
Ghidra address:
BRD3D: 0x10001160

The documentation for this class was generated from the following file: