sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
psfixed.h File Reference

Go to the source code of this file.

Macros

#define CF2_Fixed   CF2_F16Dot16
#define CF2_FIXED_MAX   ( (CF2_Fixed)0x7FFFFFFFL )
#define CF2_FIXED_MIN   ( (CF2_Fixed)0x80000000L )
#define CF2_FIXED_ONE   ( (CF2_Fixed)0x10000L )
#define CF2_FIXED_EPSILON   ( (CF2_Fixed)0x0001 )
#define cf2_intToFixed(i)
#define cf2_fixedToInt(x)
#define cf2_fixedRound(x)
#define cf2_doubleToFixed(f)
#define cf2_fixedAbs(x)
#define cf2_fixedFloor(x)
#define cf2_fixedFraction(x)
#define cf2_fracToFixed(x)

Typedefs

typedef FT_Int32 CF2_Frac
typedef enum CF2_NumberType_ CF2_NumberType

Enumerations

enum  CF2_NumberType_ { CF2_NumberFixed , CF2_NumberFrac , CF2_NumberInt }

Macro Definition Documentation

◆ cf2_doubleToFixed

#define cf2_doubleToFixed ( f)
Value:
( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )

Definition at line 70 of file psfixed.h.

◆ CF2_Fixed

#define CF2_Fixed   CF2_F16Dot16

Definition at line 52 of file psfixed.h.

◆ CF2_FIXED_EPSILON

#define CF2_FIXED_EPSILON   ( (CF2_Fixed)0x0001 )

Definition at line 59 of file psfixed.h.

◆ CF2_FIXED_MAX

#define CF2_FIXED_MAX   ( (CF2_Fixed)0x7FFFFFFFL )

Definition at line 56 of file psfixed.h.

◆ CF2_FIXED_MIN

#define CF2_FIXED_MIN   ( (CF2_Fixed)0x80000000L )

Definition at line 57 of file psfixed.h.

◆ CF2_FIXED_ONE

#define CF2_FIXED_ONE   ( (CF2_Fixed)0x10000L )

Definition at line 58 of file psfixed.h.

◆ cf2_fixedAbs

#define cf2_fixedAbs ( x)
Value:
( (x) < 0 ? NEG_INT32( x ) : (x) )

Definition at line 72 of file psfixed.h.

◆ cf2_fixedFloor

#define cf2_fixedFloor ( x)
Value:
( (CF2_Fixed)( (FT_UInt32)(x) & 0xFFFF0000UL ) )

Definition at line 74 of file psfixed.h.

◆ cf2_fixedFraction

#define cf2_fixedFraction ( x)
Value:
( (x) - cf2_fixedFloor( x ) )

Definition at line 76 of file psfixed.h.

◆ cf2_fixedRound

#define cf2_fixedRound ( x)
Value:
( (CF2_Fixed)( ( (FT_UInt32)(x) + 0x8000U ) & 0xFFFF0000UL ) )

Definition at line 68 of file psfixed.h.

◆ cf2_fixedToInt

#define cf2_fixedToInt ( x)
Value:
( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )

Definition at line 66 of file psfixed.h.

◆ cf2_fracToFixed

#define cf2_fracToFixed ( x)
Value:
( ( (x) + 0x2000 - ( (x) < 0 ) ) >> 14 )

Definition at line 78 of file psfixed.h.

◆ cf2_intToFixed

#define cf2_intToFixed ( i)
Value:
( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )

Definition at line 64 of file psfixed.h.

Typedef Documentation

◆ CF2_Frac

typedef FT_Int32 CF2_Frac

Definition at line 53 of file psfixed.h.

Enumeration Type Documentation

◆ CF2_NumberType_

enum CF2_NumberType_

Definition at line 83 of file psfixed.h.