Nugget
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions
psyqo Namespace Reference

Namespaces

namespace  Bezier
 
namespace  Concepts
 
namespace  DMA
 
namespace  FixedPointInternals
 
namespace  Fragments
 The fragments helpers.
 
namespace  GTE
 
namespace  Hardware
 
namespace  Kernel
 The Kernel namespace for internal use.
 
namespace  paths
 
namespace  Prim
 
namespace  PrimPieces
 
namespace  SoftMath
 
namespace  timer_literals
 
namespace  trig_literals
 
namespace  TrigInternals
 

Classes

class  AdvancedPad
 An advanced class to access the pads. More...
 
class  Application
 The application class. More...
 
class  BumpAllocator
 A bump allocator for fragments. More...
 
class  CDRom
 The base CDRom class. More...
 
class  CDRomDevice
 A specialization of the CDRom interface. More...
 
union  Color
 The Color struct. More...
 
struct  Coroutine
 A suitable type to hold and return a C++20 coroutine. More...
 
class  Font
 
class  FontBase
 The Font drawing class. More...
 
class  GPU
 The singleton GPU class. More...
 
struct  has_explicit_copy_constructor
 
struct  has_explicit_copy_constructor< T, typename std::enable_if< std::is_copy_constructible_v< T > &&!std::is_convertible_v< const T &, T > >::type >
 
class  ISO9660Parser
 An ISO9660 parser. More...
 
struct  Matrix33
 
struct  MSF
 
class  OrderingTable
 The ordering table. Used to sort fragments before sending them to the GPU. More...
 
class  OrderingTableBase
 
struct  Rect
 The Rect struct. More...
 
class  Scene
 The Scene class. More...
 
class  SimplePad
 A simple class to access the pads. More...
 
class  SPU
 
class  TaskQueue
 A task queue for processing tasks sequentially. More...
 
class  Trig
 A trigonometry table. More...
 
struct  Vector
 
union  Vertex
 The Vertex struct. More...
 

Concepts

concept  Fragment
 The Fragment concept.
 
concept  Primitive
 The Primitive concept.
 
concept  Enum
 

Typedefs

typedef FixedPoint< 10 > Angle
 A fixed point angle.
 
typedef Vector< 2 > Vec2
 
typedef Vector< 3 > Vec3
 
typedef Vector< 4 > Vec4
 

Enumerations

enum class  Safe : unsigned { No , Yes }
 Shared type for safe and unsafe operations throughout the codebase. More...
 

Functions

uint32_t adler32 (uint8_t *buffer, unsigned length, uint32_t sum=1)
 Computes the adler32 checksum of a buffer.
 
uint32_t adler32_bytes (uint8_t *buffer, unsigned length, uint32_t sum=1)
 Computes the adler32 checksum of a buffer, only reading bytes.
 
uint32_t adler32_words (uint32_t *buffer, unsigned length, uint32_t sum=1)
 Computes the adler32 checksum of a buffer, optimized for words.
 
psyqo::AdvancedPad::Padoperator++ (psyqo::AdvancedPad::Pad &pad)
 
psyqo::AdvancedPad::Pad operator++ (psyqo::AdvancedPad::Pad &pad, int)
 
psyqo::AdvancedPad::Padoperator-- (psyqo::AdvancedPad::Pad &pad)
 
psyqo::AdvancedPad::Pad operator-- (psyqo::AdvancedPad::Pad &pad, int)
 
template<Enum E>
constexpr std::underlying_type_t< E > toUnderlying (E v)
 

Typedef Documentation

◆ Angle

typedef FixedPoint<10> psyqo::Angle

A fixed point angle.

This is a fixed point angle. Its value is in fractions of Pi. In other words, 1.0 is 180 degrees, 0.5 is 90 degrees, and so on.

◆ Vec2

typedef Vector<2> psyqo::Vec2

◆ Vec3

typedef Vector<3> psyqo::Vec3

◆ Vec4

typedef Vector<4> psyqo::Vec4

Enumeration Type Documentation

◆ Safe

enum class psyqo::Safe : unsigned
strong

Shared type for safe and unsafe operations throughout the codebase.

Enumerator
No 
Yes 

Function Documentation

◆ adler32()

uint32_t psyqo::adler32 ( uint8_t *  buffer,
unsigned  length,
uint32_t  sum = 1 
)

Computes the adler32 checksum of a buffer.

This is a very fast checksum algorithm, but it is not cryptographically secure. It can be used to detect data corruption. It is possible to chunk large buffers by chaining the checksum of the previous chunk with the checksum of the next using the sum parameter. As an example, here is how to compute the checksum of a 1MB buffer fragmented over 1024 chunks of 1024 bytes:

{.language-id=cpp}
uint32_t checksum = adler32(nullptr, 0);
for (unsigned i = 0; i < 1024; i++) {
checksum = adler32(buffer + i * 1024, 1024, checksum);
}
uint32_t adler32(uint8_t *buffer, unsigned length, uint32_t sum=1)
Computes the adler32 checksum of a buffer.
Definition adler32.cpp:33
static void * buffer
Definition syscalls.h:230
void uint32_t(classId, spec)
Parameters
[in]bufferThe buffer to checksum.
[in]sizeThe size of the buffer in bytes.
[in]sumThe previous sum to continue the checksum for.
Returns
The adler32 checksum of the buffer.

◆ adler32_bytes()

uint32_t psyqo::adler32_bytes ( uint8_t *  buffer,
unsigned  length,
uint32_t  sum = 1 
)

Computes the adler32 checksum of a buffer, only reading bytes.

This is a variant of the adler32 function, which works exclusively on bytes.

Parameters
[in]bufferThe buffer to checksum.
[in]sizeThe size of the buffer in bytes.
[in]sumThe previous sum to continue the checksum for.
Returns
The adler32 checksum of the buffer.

◆ adler32_words()

uint32_t psyqo::adler32_words ( uint32_t buffer,
unsigned  length,
uint32_t  sum = 1 
)

Computes the adler32 checksum of a buffer, optimized for words.

This is a variant of the adler32 function, which works exclusively on words. It is faster than the byte-oriented version, but the buffer needs to be aligned to a word boundary. It is possible to mix the two versions by using the sum parameter as explained in the documentation of the byte-oriented version.

Parameters
[in]bufferThe buffer to checksum.
[in]sizeThe size of the buffer in words.
[in]sumThe previous sum to continue the checksum for.
Returns
The adler32 checksum of the buffer.

◆ operator++() [1/2]

psyqo::AdvancedPad::Pad & psyqo::operator++ ( psyqo::AdvancedPad::Pad pad)
inline

◆ operator++() [2/2]

psyqo::AdvancedPad::Pad psyqo::operator++ ( psyqo::AdvancedPad::Pad pad,
int   
)
inline

◆ operator--() [1/2]

psyqo::AdvancedPad::Pad & psyqo::operator-- ( psyqo::AdvancedPad::Pad pad)
inline

◆ operator--() [2/2]

psyqo::AdvancedPad::Pad psyqo::operator-- ( psyqo::AdvancedPad::Pad pad,
int   
)
inline

◆ toUnderlying()

template<Enum E>
constexpr std::underlying_type_t< E > psyqo::toUnderlying ( v)
constexpr