PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
draw_primitives.h File Reference
#include <tamtypes.h>
+ Include dependency graph for draw_primitives.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  prim_t
 

Macros

#define PRIM_POINT   0x00
 
#define PRIM_LINE   0x01
 
#define PRIM_LINE_STRIP   0x02
 
#define PRIM_TRIANGLE   0x03
 
#define PRIM_TRIANGLE_STRIP   0x04
 
#define PRIM_TRIANGLE_FAN   0x05
 
#define PRIM_SPRITE   0x06
 
#define PRIM_SHADE_FLAT   0
 
#define PRIM_SHADE_GOURAUD   1
 
#define PRIM_MAP_ST   0
 
#define PRIM_MAP_UV   1
 
#define PRIM_UNFIXED   0
 
#define PRIM_FIXED   1
 
#define PRIM_OVERRIDE_ENABLE   0
 
#define PRIM_OVERRIDE_DISABLE   1
 

Functions

qword_t * draw_primitive_xyoffset (qword_t *q, int context, float x, float y)
 
qword_t * draw_primitive_override (qword_t *q, int mode)
 
qword_t * draw_primitive_override_setting (qword_t *q, int context, prim_t *prim)
 

Detailed Description

Draw library primitive functions

Definition in file draw_primitives.h.


Data Structure Documentation

◆ prim_t

struct prim_t

Definition at line 36 of file draw_primitives.h.

Data Fields
unsigned char type
unsigned char shading
unsigned char mapping
unsigned char fogging
unsigned char blending
unsigned char antialiasing
unsigned char mapping_type
unsigned char colorfix

Macro Definition Documentation

◆ PRIM_POINT

#define PRIM_POINT   0x00

Types

Definition at line 12 of file draw_primitives.h.

◆ PRIM_LINE

#define PRIM_LINE   0x01

Definition at line 13 of file draw_primitives.h.

◆ PRIM_LINE_STRIP

#define PRIM_LINE_STRIP   0x02

Definition at line 14 of file draw_primitives.h.

◆ PRIM_TRIANGLE

#define PRIM_TRIANGLE   0x03

Definition at line 15 of file draw_primitives.h.

◆ PRIM_TRIANGLE_STRIP

#define PRIM_TRIANGLE_STRIP   0x04

Definition at line 16 of file draw_primitives.h.

◆ PRIM_TRIANGLE_FAN

#define PRIM_TRIANGLE_FAN   0x05

Definition at line 17 of file draw_primitives.h.

◆ PRIM_SPRITE

#define PRIM_SPRITE   0x06

Definition at line 18 of file draw_primitives.h.

◆ PRIM_SHADE_FLAT

#define PRIM_SHADE_FLAT   0

Shading

Definition at line 21 of file draw_primitives.h.

◆ PRIM_SHADE_GOURAUD

#define PRIM_SHADE_GOURAUD   1

Definition at line 22 of file draw_primitives.h.

◆ PRIM_MAP_ST

#define PRIM_MAP_ST   0

Texture Mapping Coordinates

Definition at line 25 of file draw_primitives.h.

◆ PRIM_MAP_UV

#define PRIM_MAP_UV   1

Definition at line 26 of file draw_primitives.h.

◆ PRIM_UNFIXED

#define PRIM_UNFIXED   0

Fixed Color Value

Definition at line 29 of file draw_primitives.h.

◆ PRIM_FIXED

#define PRIM_FIXED   1

Definition at line 30 of file draw_primitives.h.

◆ PRIM_OVERRIDE_ENABLE

#define PRIM_OVERRIDE_ENABLE   0

Primitive Override Control

Definition at line 33 of file draw_primitives.h.

◆ PRIM_OVERRIDE_DISABLE

#define PRIM_OVERRIDE_DISABLE   1

Definition at line 34 of file draw_primitives.h.

Function Documentation

◆ draw_primitive_xyoffset()

qword_t * draw_primitive_xyoffset ( qword_t *  q,
int  context,
float  x,
float  y 
)

Primitive Coordinate System offset

Definition at line 189 of file draw_environment.c.

References draw_primitive_xyoffset(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_XYOFFSET.

Referenced by draw_primitive_xyoffset().

◆ draw_primitive_override()

qword_t * draw_primitive_override ( qword_t *  q,
int  mode 
)

Primitive Control

Definition at line 202 of file draw_environment.c.

References draw_primitive_override(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_PRMODECONT.

Referenced by draw_primitive_override().

◆ draw_primitive_override_setting()

qword_t * draw_primitive_override_setting ( qword_t *  q,
int  context,
prim_t prim 
)

Overridden Primitive Attributes

Definition at line 215 of file draw_environment.c.

References draw_primitive_override_setting(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_PRMODE.

Referenced by draw_primitive_override_setting().