|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <dc/maple.h>#include <dc/maple/controller.h>#include <dc/pvr.h>#include <dcplib/fnt.h>Macros | |
| #define | SMALL_RTT_SIZE 128 |
| #define | SMALL_RTT_W SMALL_RTT_SIZE |
| #define | SMALL_RTT_H SMALL_RTT_SIZE |
| #define | SMALL_RTT_STRIDE_PX SMALL_RTT_W |
| #define | RGB565_BYTES 2 |
| #define | OLD_RTT_BYTES (1024 * 512 * RGB565_BYTES) |
| #define | RTT_MODE_COUNT ((int)(sizeof(rtt_modes) / sizeof(rtt_modes[0]))) |
Functions | |
| static float | clampf (float value, float min, float max) |
| static const rtt_mode_t * | current_rtt_mode (void) |
| static uint32_t | current_rtt_bytes (void) |
| static uint32_t | rtt_mode_bytes (const rtt_mode_t *mode) |
| static void | clamp_marker_to_rtt (void) |
| static int | alloc_rtt_texture (void) |
| static void | change_rtt_mode (int direction) |
| static void | submit_colored_rect (float x, float y, float w, float h, float z, uint32_t argb) |
| static void | submit_textured_rect (float x, float y, float w, float h, float z, float u1, float v1) |
| static void | update_motion (void) |
| static void | render_rtt_scene (void) |
| static void | draw_status_text (void) |
| static void | render_screen_scene (void) |
| static void | poll_controls (void) |
| int | main (int argc, char **argv) |
Variables | |
| static const rtt_mode_t | rtt_modes [] |
| static pvr_ptr_t | rtt_texture |
| static fntRenderer * | text |
| static fntTexFont * | font |
| static int | rtt_mode_index = 1 |
| static float | marker_x = 8.0f |
| static float | marker_y = 18.0f |
| static float | marker_dx = 1.0f |
| static float | marker_dy = 1.5f |
| static bool | exit_requested |
| static uint32_t | last_buttons |
| static pvr_init_params_t | pvr_params |
| #define OLD_RTT_BYTES (1024 * 512 * RGB565_BYTES) |
Referenced by main().
| #define RGB565_BYTES 2 |
Referenced by current_rtt_bytes(), and rtt_mode_bytes().
Referenced by change_rtt_mode(), and main().
| #define SMALL_RTT_H SMALL_RTT_SIZE |
| #define SMALL_RTT_SIZE 128 |
| #define SMALL_RTT_STRIDE_PX SMALL_RTT_W |
| #define SMALL_RTT_W SMALL_RTT_SIZE |
|
static |
References current_rtt_bytes(), current_rtt_mode(), printf, pvr_mem_free(), pvr_mem_malloc(), rtt_texture, and txr.
Referenced by change_rtt_mode(), and main().
|
static |
References alloc_rtt_texture(), clamp_marker_to_rtt(), exit_requested, pvr_wait_ready(), pvr_wait_render_done(), RTT_MODE_COUNT, and rtt_mode_index.
Referenced by poll_controls().
|
static |
References clampf(), current_rtt_mode(), marker_x, marker_y, and mode.
Referenced by change_rtt_mode(), and update_motion().
|
static |
Referenced by clamp_marker_to_rtt(), and render_rtt_scene().
|
static |
References current_rtt_mode(), mode, and RGB565_BYTES.
Referenced by alloc_rtt_texture(), and draw_status_text().
|
static |
References rtt_mode_index, and rtt_modes.
Referenced by alloc_rtt_texture(), clamp_marker_to_rtt(), current_rtt_bytes(), draw_status_text(), main(), render_rtt_scene(), render_screen_scene(), and update_motion().
|
static |
References current_rtt_bytes(), current_rtt_mode(), font, mode, PVR_FILTER_NEAREST, and y.
Referenced by render_screen_scene().
| int main | ( | int | argc, |
| char ** | argv ) |
References alloc_rtt_texture(), current_rtt_mode(), exit_requested, font, last_buttons, mode, OLD_RTT_BYTES, poll_controls(), printf, pvr_init(), pvr_mem_free(), pvr_params, pvr_set_bg_color(), pvr_shutdown(), pvr_wait_ready(), pvr_wait_render_done(), render_rtt_scene(), render_screen_scene(), rtt_mode_bytes(), RTT_MODE_COUNT, rtt_modes, rtt_texture, text, and update_motion().
|
static |
References cont_state_t::buttons, change_rtt_mode(), CONT_DPAD_LEFT, CONT_DPAD_RIGHT, CONT_START, exit_requested, last_buttons, maple_dev_status(), maple_enum_type(), and MAPLE_FUNC_CONTROLLER.
Referenced by main().
|
static |
References clampf(), current_rtt_mode(), cxt, exit_requested, hdr, marker_x, marker_y, mode, printf, pvr_list_begin(), pvr_list_finish(), PVR_LIST_OP_POLY, pvr_poly_compile(), pvr_poly_cxt_col(), pvr_prim(), pvr_scene_begin_rtt(), pvr_scene_finish(), rtt_texture, and submit_colored_rect().
Referenced by main().
|
static |
References current_rtt_mode(), draw_status_text(), mode, PVR_FILTER_NONE, pvr_list_begin(), pvr_list_finish(), PVR_LIST_OP_POLY, PVR_LIST_TR_POLY, pvr_poly_compile(), pvr_poly_cxt_col(), pvr_poly_cxt_txr(), pvr_prim(), pvr_scene_begin(), pvr_scene_finish(), PVR_TXRFMT_NONTWIDDLED, PVR_TXRFMT_RGB565, rtt_texture, submit_colored_rect(), and submit_textured_rect().
Referenced by main().
|
static |
References mode, and RGB565_BYTES.
Referenced by main().
|
static |
References pvr_vertex_t::argb, pvr_vertex_t::flags, pvr_vertex_t::oargb, PVR_CMD_VERTEX, PVR_CMD_VERTEX_EOL, pvr_prim(), pvr_vertex_t::u, pvr_vertex_t::v, vert, pvr_vertex_t::x, pvr_vertex_t::y, y, pvr_vertex_t::z, and z.
Referenced by render_rtt_scene(), and render_screen_scene().
|
static |
References pvr_vertex_t::argb, pvr_vertex_t::flags, pvr_vertex_t::oargb, PVR_CMD_VERTEX, PVR_CMD_VERTEX_EOL, pvr_prim(), pvr_vertex_t::u, pvr_vertex_t::v, vert, pvr_vertex_t::x, pvr_vertex_t::y, y, pvr_vertex_t::z, and z.
Referenced by render_screen_scene().
|
static |
References clamp_marker_to_rtt(), current_rtt_mode(), marker_dx, marker_dy, marker_x, marker_y, and mode.
Referenced by main().
|
static |
Referenced by change_rtt_mode(), main(), poll_controls(), and render_rtt_scene().
|
static |
Referenced by draw_status_text(), and main().
|
static |
Referenced by main(), and poll_controls().
|
static |
Referenced by update_motion().
|
static |
Referenced by update_motion().
|
static |
Referenced by clamp_marker_to_rtt(), render_rtt_scene(), and update_motion().
|
static |
Referenced by clamp_marker_to_rtt(), render_rtt_scene(), and update_motion().
|
static |
Referenced by main().
|
static |
Referenced by change_rtt_mode(), and current_rtt_mode().
|
static |
Referenced by current_rtt_mode(), and main().
|
static |
Referenced by alloc_rtt_texture(), main(), render_rtt_scene(), and render_screen_scene().
|
static |
Referenced by main().