ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Data Structures | |
struct | point_t |
struct | line_t |
struct | triangle_t |
struct | rect_t |
struct | texrect_t |
Draw library 2D functions
Definition in file draw2d.h.
qword_t* draw_arc_filled | ( | qword_t * | q, |
int | context, | ||
point_t * | center, | ||
float | radius, | ||
float | angle_start, | ||
float | angle_end | ||
) |
Draws multiple triangle fans
Definition at line 425 of file draw2d.c.
References blending, point_t::color, context, DRAW_XYZ_REGLIST, ftoi4, GIF_FLG_PACKED, GIF_FLG_REGLIST, GIF_REG_AD, GIF_REG_PRIM, GIF_REG_RGBAQ, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, OFFSET, PACK_GIFTAG, PRIM_TRIANGLE_FAN, color_t::rgbaq, point_t::v0, vertex_t::x, vertex_t::y, and vertex_t::z.
Referenced by draw_round_rect_filled().
qword_t* draw_arc_outline | ( | qword_t * | q, |
int | context, | ||
point_t * | center, | ||
float | radius, | ||
float | angle_start, | ||
float | angle_end | ||
) |
Draws an arc using line primitives
Definition at line 370 of file draw2d.c.
References blending, point_t::color, context, DRAW_XYZ_REGLIST, ftoi4, GIF_FLG_PACKED, GIF_FLG_REGLIST, GIF_REG_AD, GIF_REG_PRIM, GIF_REG_RGBAQ, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, OFFSET, PACK_GIFTAG, PRIM_LINE_STRIP, color_t::rgbaq, point_t::v0, vertex_t::x, vertex_t::y, and vertex_t::z.
Referenced by draw_round_rect_outline().
void draw_disable_blending | ( | ) |
void draw_enable_blending | ( | ) |
Draws a single line
Definition at line 64 of file draw2d.c.
References blending, line_t::color, context, DRAW_LINE_NREG, DRAW_LINE_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, PACK_GIFTAG, PRIM_LINE, color_t::rgbaq, START_OFFSET, line_t::v0, line_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Referenced by draw_round_rect_outline().
Draws a single point
Definition at line 39 of file draw2d.c.
References blending, point_t::color, context, DRAW_POINT_NREG, DRAW_POINT_REGLIST, qword_t::dw, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, OFFSET, PACK_GIFTAG, PRIM_POINT, color_t::rgbaq, point_t::v0, vertex_t::x, vertex_t::y, and vertex_t::z.
Draws a single sprite
Definition at line 197 of file draw2d.c.
References blending, rect_t::color, context, DRAW_SPRITE_NREG, DRAW_SPRITE_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, PACK_GIFTAG, PRIM_SPRITE, color_t::rgbaq, START_OFFSET, rect_t::v0, rect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Referenced by draw_round_rect_filled().
Draws multiple sprite primitives
Definition at line 248 of file draw2d.c.
References blending, rect_t::color, context, DRAW_XYZ_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_PACKED, GIF_FLG_REGLIST, GIF_REG_AD, GIF_REG_PRIM, GIF_REG_RGBAQ, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, PACK_GIFTAG, PRIM_SPRITE, color_t::rgbaq, START_OFFSET, rect_t::v0, rect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Referenced by draw_clear(), and draw_round_rect_filled().
Draws a rectangle using line primitives
Definition at line 159 of file draw2d.c.
References blending, rect_t::color, context, DRAW_RECT_OUT_NREG, DRAW_RECT_OUT_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, PACK_GIFTAG, PRIM_LINE_STRIP, color_t::rgbaq, START_OFFSET, rect_t::v0, rect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Draws a single texture mapped sprite
Definition at line 224 of file draw2d.c.
References blending, texrect_t::color, context, DRAW_ENABLE, DRAW_SPRITE_TEX_NREG, DRAW_SPRITE_TEX_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_UV, GIF_SET_XYZ, PACK_GIFTAG, PRIM_MAP_UV, PRIM_SPRITE, color_t::rgbaq, START_OFFSET, texrect_t::t0, texrect_t::t1, texel_t::u, texel_t::v, texrect_t::v0, texrect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Draws multiple strips to render a large texture width must be multiple of 32 - 0.9375
Definition at line 303 of file draw2d.c.
References blending, texrect_t::color, context, DRAW_ENABLE, DRAW_UV_REGLIST, qword_t::dw, END_OFFSET, ftoi4, GIF_FLG_PACKED, GIF_FLG_REGLIST, GIF_REG_AD, GIF_REG_PRIM, GIF_REG_RGBAQ, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_UV, GIF_SET_XYZ, PACK_GIFTAG, PRIM_MAP_UV, PRIM_SPRITE, color_t::rgbaq, START_OFFSET, texrect_t::t0, texrect_t::t1, texel_t::u, texel_t::v, texrect_t::v0, texrect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Draws filled round rectangle, buggy with partial coordinates
Definition at line 482 of file draw2d.c.
References point_t::color, rect_t::color, context, draw_arc_filled(), draw_rect_filled(), draw_rect_filled_strips(), point_t::v0, rect_t::v0, rect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
Draws a hollow round rectangle, buggy with partial coordinates
Definition at line 579 of file draw2d.c.
References point_t::color, line_t::color, rect_t::color, context, draw_arc_outline(), draw_line(), point_t::v0, line_t::v0, rect_t::v0, line_t::v1, rect_t::v1, vertex_t::x, vertex_t::y, and vertex_t::z.
qword_t* draw_triangle_filled | ( | qword_t * | q, |
int | context, | ||
triangle_t * | triangle | ||
) |
Draws a single triangle
Definition at line 126 of file draw2d.c.
References blending, triangle_t::color, context, DRAW_TRIANGLE_NREG, DRAW_TRIANGLE_REGLIST, qword_t::dw, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, OFFSET, PACK_GIFTAG, PRIM_TRIANGLE, color_t::rgbaq, triangle_t::v0, triangle_t::v1, triangle_t::v2, vertex_t::x, vertex_t::y, and vertex_t::z.
qword_t* draw_triangle_outline | ( | qword_t * | q, |
int | context, | ||
triangle_t * | triangle | ||
) |
Draws a triangle using a line strip
Definition at line 91 of file draw2d.c.
References blending, triangle_t::color, context, DRAW_TRIANGLE_OUT_NREG, DRAW_TRIANGLE_OUT_REGLIST, qword_t::dw, ftoi4, GIF_FLG_REGLIST, GIF_SET_PRIM, GIF_SET_TAG, GIF_SET_XYZ, OFFSET, PACK_GIFTAG, PRIM_LINE_STRIP, color_t::rgbaq, triangle_t::v0, triangle_t::v1, triangle_t::v2, vertex_t::x, vertex_t::y, and vertex_t::z.