resonance 1.0.1
Loading...
Searching...
No Matches
AFix Class Reference

Fixed-point number in 24.8 format. More...

#include <afix.h>

Static Public Attributes

static int onehalf
 One half, 0x80.
static int e
 Euler's number, 695.
static int pi
 Pi, 804.
static int epsilon
 The smallest positive value, 1.
static int max
 The largest value whose whole part fits a signed halfword, 0x7fffff.

Detailed Description

Fixed-point number in 24.8 format.

Its name comes from the debugging symbols of the North American demo release. The routines of ACanvas pass 24.8 values as plain words. Only the five constants are modelled. The static initialiser at 0x006209b0 computes onehalf as 0x100 divided by 2 and stores the other four as immediates.

Member Data Documentation

◆ onehalf

int AFix::onehalf
static

One half, 0x80.

The polygon fill routines of ACanvas add it to an edge position before truncating. The addition rounds the edge to the nearest column.

Ghidra address:
NTSC-U/C: 0x007a82c0
Ghidra address:
PAL: 0x007ebfc0

◆ e

int AFix::e
static

Euler's number, 695.

No reader was located.

Ghidra address:
NTSC-U/C: 0x007a82c8
Ghidra address:
PAL: 0x007ebfc8

◆ pi

int AFix::pi
static

Pi, 804.

No reader was located.

Ghidra address:
NTSC-U/C: 0x007a82d0
Ghidra address:
PAL: 0x007ebfd0

◆ epsilon

int AFix::epsilon
static

The smallest positive value, 1.

ACanvas::ClipLine() subtracts it from the exclusive right and bottom clip edges. The subtraction places a clipped endpoint on the last column or row that remains inside.

Ghidra address:
NTSC-U/C: 0x007a82d8
Ghidra address:
PAL: 0x007ebfd8

◆ max

int AFix::max
static

The largest value whose whole part fits a signed halfword, 0x7fffff.

No reader was located.

Ghidra address:
NTSC-U/C: 0x007a82e0
Ghidra address:
PAL: 0x007ebfe0

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