wavelength 1.0.0
Loading...
Searching...
No Matches
RndRenderer Class Reference

Base of the platform renderer, the owner of the display and of the frame. More...

#include <rndrenderer.h>

Inheritance diagram for RndRenderer:
Collaboration diagram for RndRenderer:

Public Member Functions

 RndRenderer ()
 Set an opaque grey of 0.3, a display of 640 by 480 at 16 bits, and a timer ceiling of 50.
virtual void Init ()
 Read the rnd section of the configuration.
virtual void Terminate ()
 Shut down the display.
virtual void SetClearColor (const Color &color)
 Set the colour the frame is cleared to.
virtual void SetShowTimers (int bShow, int nMaxMs)
 Show or hide the timer overlay.
virtual void SetShowStats (int bShow)
 Show or hide the statistics overlay.
virtual void SetShowRate (int bShow)
 Show or hide the frame rate overlay.
virtual void DumpStats ()
 Write the drawing statistics.
virtual void ScreenDump (const char *pszName)
 Save the frame to an image file.
virtual void DrawRect (const Rect &rect, const Color &color)
 Fill a rectangle of the screen.
virtual float DrawString (const char *pszText, const Vector2 &pos, const Vector2 &charSize, const Color &color)
 Draw text with the line font.
virtual void BeginFrame ()
 Open a frame.
virtual void EndFrame ()
 Close the frame BeginFrame() opened and present it.
virtual void ClearAndFlip ()
 Clear the back buffer and present it outside a frame.
virtual void RestoreFrameBufferTarget ()
 Point drawing at the back buffer again.
virtual float AspectRatio ()
 Report the height of a pixel relative to its width.
virtual bool SupportsTextures ()
 Report whether the renderer reads texture files.
const Color & GetClearColor () const
int GetFrameCount () const
int GetScreenHeight () const
int GetScreenWidth () const
int GetTimerMaxMs () const

Protected Attributes

Color mClearColor
int mScreenWidth
int mScreenHeight
int mScreenBpp
int mTimerMaxMs
int mFrameCount
int mShowTimers
int mShowStats
int mShowRate

Detailed Description

Base of the platform renderer, the owner of the display and of the frame.

The RTTI includes the class name. Ps is the one subclass, and its single instance at 0x0043ba00 is the renderer TheRnd addresses. Most of the base bodies are empty.

Constructor & Destructor Documentation

◆ RndRenderer()

RndRenderer::RndRenderer ( )

Set an opaque grey of 0.3, a display of 640 by 480 at 16 bits, and a timer ceiling of 50.

Ghidra address:
NTSC-U/C: 0x00240cf8
Ghidra address:
PAL: 0x00249828

Member Function Documentation

◆ Init()

virtual void RndRenderer::Init ( )
virtual

Read the rnd section of the configuration.

The section sets the display size and depth, the overlays, and the clear colour.

Ghidra address:
NTSC-U/C: 0x00240d60
Ghidra address:
PAL: 0x00249890

Reimplemented in Ps.

◆ Terminate()

virtual void RndRenderer::Terminate ( )
virtual

Shut down the display.

The base body is empty.

Ghidra address:
NTSC-U/C: 0x00390f58
Ghidra address:
PAL: 0x003ff660

Reimplemented in Ps.

◆ SetClearColor()

virtual void RndRenderer::SetClearColor ( const Color & color)
virtual

Set the colour the frame is cleared to.

Parameters
colorThe colour.
Ghidra address:
NTSC-U/C: 0x00390f60
Ghidra address:
PAL: 0x003ff668

Reimplemented in Ps.

◆ SetShowTimers()

virtual void RndRenderer::SetShowTimers ( int bShow,
int nMaxMs )
virtual

Show or hide the timer overlay.

Parameters
bShowNon-zero to show the overlay.
nMaxMsThe time the overlay's scale spans, in milliseconds.
Ghidra address:
NTSC-U/C: 0x00390f70
Ghidra address:
PAL: 0x003ff678

◆ SetShowStats()

virtual void RndRenderer::SetShowStats ( int bShow)
virtual

Show or hide the statistics overlay.

Parameters
bShowNon-zero to show the overlay.
Ghidra address:
NTSC-U/C: 0x00390f80
Ghidra address:
PAL: 0x003ff688

◆ SetShowRate()

virtual void RndRenderer::SetShowRate ( int bShow)
virtual

Show or hide the frame rate overlay.

Parameters
bShowNon-zero to show the overlay.
Ghidra address:
NTSC-U/C: 0x00390f88
Ghidra address:
PAL: 0x003ff690

◆ DumpStats()

virtual void RndRenderer::DumpStats ( )
virtual

Write the drawing statistics.

The base body is empty.

Ghidra address:
NTSC-U/C: 0x00390f90
Ghidra address:
PAL: 0x003ff698

Reimplemented in Ps.

◆ ScreenDump()

virtual void RndRenderer::ScreenDump ( const char * pszName)
virtual

Save the frame to an image file.

The base body is empty.

Parameters
pszNameThe base name of the file.
Ghidra address:
NTSC-U/C: 0x00390f98
Ghidra address:
PAL: 0x003ff6a0

Reimplemented in Ps.

◆ DrawRect()

virtual void RndRenderer::DrawRect ( const Rect & rect,
const Color & color )
virtual

Fill a rectangle of the screen.

The base body is empty.

Parameters
rectThe rectangle in pixels.
colorThe colour.
Ghidra address:
NTSC-U/C: 0x00390fa0
Ghidra address:
PAL: 0x003ff6a8

Reimplemented in Ps.

◆ DrawString()

virtual float RndRenderer::DrawString ( const char * pszText,
const Vector2 & pos,
const Vector2 & charSize,
const Color & color )
virtual

Draw text with the line font.

The base body draws nothing and reports the top of the text.

Parameters
pszTextThe text. A newline starts a line.
posThe top left corner in pixels.
charSizeThe size of a character in pixels.
colorThe colour.
Returns
The top of the line after the text.
Ghidra address:
NTSC-U/C: 0x00390fa8
Ghidra address:
PAL: 0x003ff6b0

Reimplemented in Ps.

◆ BeginFrame()

virtual void RndRenderer::BeginFrame ( )
virtual

Open a frame.

The base body counts the frame in mFrameCount.

Ghidra address:
NTSC-U/C: 0x00390fb0
Ghidra address:
PAL: 0x003ff6b8

Reimplemented in Ps.

◆ EndFrame()

virtual void RndRenderer::EndFrame ( )
virtual

Close the frame BeginFrame() opened and present it.

The base body is empty.

Ghidra address:
NTSC-U/C: 0x00390fc0
Ghidra address:
PAL: 0x003ff6c8

Reimplemented in Ps.

◆ ClearAndFlip()

virtual void RndRenderer::ClearAndFlip ( )
virtual

Clear the back buffer and present it outside a frame.

The base body is empty. The name is inferred.

Ghidra address:
NTSC-U/C: 0x00390fc8
Ghidra address:
PAL: 0x003ff6d0

Reimplemented in Ps.

◆ RestoreFrameBufferTarget()

virtual void RndRenderer::RestoreFrameBufferTarget ( )
virtual

Point drawing at the back buffer again.

The base body is empty. The name is inferred.

Ghidra address:
NTSC-U/C: 0x00390fd0
Ghidra address:
PAL: 0x003ff6d8

Reimplemented in Ps.

◆ AspectRatio()

virtual float RndRenderer::AspectRatio ( )
virtual

Report the height of a pixel relative to its width.

The base reports the display height over the display width.

Returns
The ratio.
Ghidra address:
NTSC-U/C: 0x00390fd8
Ghidra address:
PAL: 0x003ff6e0

Reimplemented in Ps.

◆ SupportsTextures()

virtual bool RndRenderer::SupportsTextures ( )
virtual

Report whether the renderer reads texture files.

The base reports false. The name is inferred.

Returns
Whether textures are read.
Ghidra address:
NTSC-U/C: 0x00390ff8
Ghidra address:
PAL: 0x003ff700

Reimplemented in Ps.

◆ GetClearColor()

const Color & RndRenderer::GetClearColor ( ) const
inline
Returns
Colour the frame is cleared to.

◆ GetFrameCount()

int RndRenderer::GetFrameCount ( ) const
inline
Returns
Frames opened by BeginFrame().

◆ GetScreenHeight()

int RndRenderer::GetScreenHeight ( ) const
inline
Returns
Display height in pixels.

◆ GetScreenWidth()

int RndRenderer::GetScreenWidth ( ) const
inline
Returns
Display width in pixels.

◆ GetTimerMaxMs()

int RndRenderer::GetTimerMaxMs ( ) const
inline
Returns
Time the timer overlay's scale spans, in milliseconds.

Member Data Documentation

◆ mClearColor

Color RndRenderer::mClearColor
protected

Colour the frame is cleared to.

◆ mScreenWidth

int RndRenderer::mScreenWidth
protected

Display width in pixels.

◆ mScreenHeight

int RndRenderer::mScreenHeight
protected

Display height in pixels.

◆ mScreenBpp

int RndRenderer::mScreenBpp
protected

Display depth in bits per pixel.

◆ mTimerMaxMs

int RndRenderer::mTimerMaxMs
protected

Time the timer overlay's scale spans, in milliseconds.

◆ mFrameCount

int RndRenderer::mFrameCount
protected

Frames opened by BeginFrame().

◆ mShowTimers

int RndRenderer::mShowTimers
protected

Non-zero to show the timer overlay.

◆ mShowStats

int RndRenderer::mShowStats
protected

Non-zero to show the statistics overlay.

◆ mShowRate

int RndRenderer::mShowRate
protected

Non-zero to show the frame rate overlay.


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