ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include <kernel.h>
#include <stdlib.h>
#include <tamtypes.h>
#include <math3d.h>
#include <packet.h>
#include <dma_tags.h>
#include <gif_tags.h>
#include <gs_psm.h>
#include <dma.h>
#include <graph.h>
#include <draw.h>
#include <draw3d.h>
#include "mesh_data.c"
Go to the source code of this file.
Functions | |
void | init_gs (framebuffer_t *frame, zbuffer_t *z) |
void | init_drawing_environment (framebuffer_t *frame, zbuffer_t *z) |
int | render (framebuffer_t *frame, zbuffer_t *z) |
int | main (int argc, char **argv) |
Variables | |
VECTOR | object_position = { 0.00f, 0.00f, 0.00f, 1.00f } |
VECTOR | object_rotation = { 0.00f, 0.00f, 0.00f, 1.00f } |
VECTOR | camera_position = { 0.00f, 0.00f, 100.00f, 1.00f } |
VECTOR | camera_rotation = { 0.00f, 0.00f, 0.00f, 1.00f } |
void init_drawing_environment | ( | framebuffer_t * | frame, |
zbuffer_t * | z | ||
) |
Definition at line 60 of file cube.c.
References packet_t::data, DMA_CHANNEL_GIF, dma_channel_send_normal(), dma_wait_fast(), draw_finish(), draw_primitive_xyoffset(), draw_setup_environment(), packet, packet_free(), packet_init(), and PACKET_NORMAL.
Referenced by main().
void init_gs | ( | framebuffer_t * | frame, |
zbuffer_t * | z | ||
) |
Definition at line 38 of file cube.c.
References framebuffer_t::address, zbuffer_t::address, DRAW_ENABLE, zbuffer_t::enable, GRAPH_ALIGN_PAGE, graph_initialize(), graph_vram_allocate(), GS_PSM_32, GS_ZBUF_32, framebuffer_t::height, framebuffer_t::mask, zbuffer_t::mask, zbuffer_t::method, framebuffer_t::psm, framebuffer_t::width, zbuffer_t::zsm, and ZTEST_METHOD_GREATER_EQUAL.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 222 of file cube.c.
References dma_channel_fast_waits(), DMA_CHANNEL_GIF, dma_channel_initialize(), init_drawing_environment(), init_gs(), NULL, render(), and SleepThread().
int render | ( | framebuffer_t * | frame, |
zbuffer_t * | z | ||
) |
Definition at line 85 of file cube.c.
References color_t::a, prim_t::antialiasing, color_t::b, prim_t::blending, calculate_vertices(), camera_position, camera_rotation, prim_t::colorfix, colours, context, create_local_screen(), create_local_world(), create_view_screen(), create_world_view(), packet_t::data, DMA_CHANNEL_GIF, dma_channel_send_chain(), dma_wait_fast(), DMATAG_END, draw_clear(), draw_convert_rgbq(), draw_convert_xyz(), DRAW_DISABLE, draw_disable_tests(), DRAW_ENABLE, draw_enable_tests(), draw_finish(), draw_prim_end(), draw_prim_start(), DRAW_RGBAQ_REGLIST, draw_wait_finish(), qword_t::dw, prim_t::fogging, color_t::g, graph_aspect_ratio(), graph_wait_vsync(), framebuffer_t::height, local_screen, local_world, prim_t::mapping, prim_t::mapping_type, object_position, object_rotation, packet_free(), packet_init(), PACKET_NORMAL, packets, points, points_count, prim, PRIM_MAP_ST, PRIM_SHADE_GOURAUD, PRIM_TRIANGLE, PRIM_UNFIXED, color_t::q, color_t::r, color_t::rgbaq, prim_t::shading, temp_vertices, prim_t::type, vertex_count, vertices, view_screen, framebuffer_t::width, world_view, and xyz_t::xyz.
Referenced by main().
VECTOR camera_position = { 0.00f, 0.00f, 100.00f, 1.00f } |
VECTOR camera_rotation = { 0.00f, 0.00f, 0.00f, 1.00f } |
VECTOR object_position = { 0.00f, 0.00f, 0.00f, 1.00f } |
Definition at line 32 of file cube.c.
Referenced by render(), and render_teapot().
VECTOR object_rotation = { 0.00f, 0.00f, 0.00f, 1.00f } |
Definition at line 33 of file cube.c.
Referenced by render(), and render_teapot().