coastline 0.0.4
Loading...
Searching...
No Matches
screendraw.h File Reference
#include "common/types.h"
Include dependency graph for screendraw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ClearScreen (s32 red, s32 green, s32 blue)
 Add a fill of the whole frame with a colour to the display list.
void SetViewport (s32 x, s32 y, s32 width, s32 height, s32 setScissor)
 Set the view to a rectangle of the screen, and the scissor to it as well if asked.
void SetupViewportAndScissor (s32 x, s32 y, s32 width, s32 height, s32 setScissor)
 Set the scissor to a rectangle, and the viewport to the whole frame buffer (320 by 240 on N64).
void RestoreCurrentViewport (void)
 Load the viewport of the view being drawn again.
void SetScissorRect (s32 x, s32 y, s32 width, s32 height)
 Limit drawing to a rectangle, clipped to the frame.
void DrawFilledRect (s32 x, s32 y, s32 width, s32 height, s32 red, s32 green, s32 blue)
 Fill a rectangle of the screen with a colour.
void DrawRdpOutlineRect (s32 x, s32 y, s32 width, s32 height)
 Outline a rectangle of the screen with lines a pixel wide on N64.
void DrawRdpBorderRect (s32 x, s32 y, s32 width, s32 height)
 Frame a rectangle of the screen, such as the rear-view mirror, with a dark border and light rings.

Variables

s32 g_dwScreenScaleShift
 The shift from the size of the frame to the size of the frame buffer, 1 in high resolution.

Function Documentation

◆ ClearScreen()

void ClearScreen ( s32 red,
s32 green,
s32 blue )

Add a fill of the whole frame with a colour to the display list.

Parameters
redThe red component, from 0 to 255.
greenThe green component, from 0 to 255.
blueThe blue component, from 0 to 255.
Ghidra address:
USA: 0x80217fb8
Ghidra address:
Asia: 0x80217B08
Ghidra address:
EUR: 0x80218fd8
Ghidra address:
JPN: 0x80218928
Ghidra address:
BRD3D: 0x100314e8
Ghidra address:
BRGlide: 0x1002ab99

◆ SetViewport()

void SetViewport ( s32 x,
s32 y,
s32 width,
s32 height,
s32 setScissor )

Set the view to a rectangle of the screen, and the scissor to it as well if asked.

Parameters
xThe left edge, in pixels.
yThe top edge, in pixels.
widthThe width, in pixels.
heightThe height, in pixels.
setScissorNon-zero to set the scissor to the rectangle as well.
Ghidra address:
USA: 0x80219bf0
Ghidra address:
Asia: 0x80219740
Ghidra address:
EUR: 0x8021ac10
Ghidra address:
JPN: 0x8021a568
Ghidra address:
BRD3D: 0x10032a42
Ghidra address:
BRGlide: 0x1002c0f3

◆ SetupViewportAndScissor()

void SetupViewportAndScissor ( s32 x,
s32 y,
s32 width,
s32 height,
s32 setScissor )

Set the scissor to a rectangle, and the viewport to the whole frame buffer (320 by 240 on N64).

Parameters
xThe left edge of the scissor.
yThe upper edge of the scissor.
widthThe width of the scissor, of which only the size counts.
heightThe height of the scissor.
setScissorWhether the scissor is set.
Ghidra address:
USA: 0x80219df0
Ghidra address:
Asia: 0x80219940
Ghidra address:
EUR: 0x8021ae10
Ghidra address:
JPN: 0x8021a768
Ghidra address:
BRD3D: 0x10032c38
Ghidra address:
BRGlide: 0x1002c2e9

◆ RestoreCurrentViewport()

void RestoreCurrentViewport ( void )

Load the viewport of the view being drawn again.

Ghidra address:
USA: 0x80219f04
Ghidra address:
Asia: 0x80219A54
Ghidra address:
EUR: 0x8021af24
Ghidra address:
JPN: 0x8021a87c
Ghidra address:
BRD3D: 0x10032df2
Ghidra address:
BRGlide: 0x1002c4a3

◆ SetScissorRect()

void SetScissorRect ( s32 x,
s32 y,
s32 width,
s32 height )

Limit drawing to a rectangle, clipped to the frame.

Parameters
xThe left edge, in pixels.
yThe top edge, in pixels.
widthThe width, in pixels.
heightThe height, in pixels.
Ghidra address:
USA: 0x80219a78
Ghidra address:
Asia: 0x802195C8
Ghidra address:
EUR: 0x8021aa98
Ghidra address:
JPN: 0x8021a3f0
Ghidra address:
BRD3D: 0x1003289f
Ghidra address:
BRGlide: 0x1002bf50

◆ DrawFilledRect()

void DrawFilledRect ( s32 x,
s32 y,
s32 width,
s32 height,
s32 red,
s32 green,
s32 blue )

Fill a rectangle of the screen with a colour.

Parameters
xThe left edge, in the pixels of the low resolution, which high resolution doubles.
yThe upper edge.
widthThe width.
heightThe height.
redThe red of the colour, from 0 to 255, of which the upper 5 bits count.
greenThe green of the colour.
blueThe blue of the colour.
Ghidra address:
USA: 0x80218104
Ghidra address:
Asia: 0x80217C54
Ghidra address:
EUR: 0x80219124
Ghidra address:
JPN: 0x80218a74
Ghidra address:
BRD3D: 0x10031688
Ghidra address:
BRGlide: 0x1002ad39

◆ DrawRdpOutlineRect()

void DrawRdpOutlineRect ( s32 x,
s32 y,
s32 width,
s32 height )

Outline a rectangle of the screen with lines a pixel wide on N64.

Windows retains an empty hook.

Parameters
xThe left edge.
yThe upper edge.
widthThe width.
heightThe height.
Ghidra address:
USA: 0x80219f6c
Ghidra address:
Asia: 0x80219ABC
Ghidra address:
EUR: 0x8021af8c
Ghidra address:
JPN: 0x8021a8e4
Ghidra address:
BRD3D: 0x10032e58
Ghidra address:
BRGlide: 0x1002c509

◆ DrawRdpBorderRect()

void DrawRdpBorderRect ( s32 x,
s32 y,
s32 width,
s32 height )

Frame a rectangle of the screen, such as the rear-view mirror, with a dark border and light rings.

Parameters
xThe left edge.
yThe upper edge.
widthThe width.
heightThe height.
Ghidra address:
USA: 0x8021a0f8
Ghidra address:
Asia: 0x80219C48
Ghidra address:
EUR: 0x8021b118
Ghidra address:
JPN: 0x8021aa70
Ghidra address:
BRD3D: 0x10032e5d
Ghidra address:
BRGlide: 0x1002c50e

Variable Documentation

◆ g_dwScreenScaleShift

s32 g_dwScreenScaleShift
extern

The shift from the size of the frame to the size of the frame buffer, 1 in high resolution.

Ghidra address:
USA: 0x8028a850
Ghidra address:
Asia: 0x8028A3A0
Ghidra address:
EUR: 0x8028ca50
Ghidra address:
JPN: 0x8028c520
Ghidra address:
BRD3D: 0x106c65e4
Ghidra address:
BRGlide: 0x106ed674