KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fb_tex.c File Reference
#include <kos.h>
#include <stdio.h>
#include <stdbool.h>

Macros

#define SQUARE_SIZE   64
 

Functions

static void change_color (uint8_t, uint32_t btns)
 
static void do_exit (uint8_t, uint32_t)
 
static void render_coords (const struct square_fcoords *coords, float z, uint32_t argb, float uoffset)
 
static void render_bouncing_cube (uint16_t x, uint16_t y)
 
static void render_back_buffer_step1 (pvr_ptr_t fake_tex)
 
static void render_back_buffer_step2 (pvr_ptr_t frontbuf, bool hi_chip)
 
int main (int argc, char **argv)
 

Variables

static bool done
 
static uint32_t dr_state
 
static uint32_t fbuf_color = 0xffffffff
 
static const uint16_t fake_tex_data []
 
static const struct square_fcoords fb_render_coords_mask
 
static const struct square_fcoords fb_render_fcoords_left
 
static const struct square_fcoords fb_render_fcoords_right
 

Macro Definition Documentation

◆ SQUARE_SIZE

#define SQUARE_SIZE   64

Referenced by main(), and render_bouncing_cube().

Function Documentation

◆ change_color()

static void change_color ( uint8_t ,
uint32_t btns )
static

References CONT_A, and fbuf_color.

Referenced by main().

◆ do_exit()

static void do_exit ( uint8_t ,
uint32_t  )
static

References done.

Referenced by main().

◆ main()

◆ render_back_buffer_step1()

◆ render_back_buffer_step2()

◆ render_bouncing_cube()

static void render_bouncing_cube ( uint16_t x,
uint16_t y )
static

◆ render_coords()

static void render_coords ( const struct square_fcoords * coords,
float z,
uint32_t argb,
float uoffset )
static

Variable Documentation

◆ done

bool done
static

Referenced by die(), do_exit(), font_one_frame(), main(), and main().

◆ dr_state

◆ fake_tex_data

const uint16_t fake_tex_data[]
static
Initial value:
= {
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
0x8000, 0x8000, 0x0000, 0x0000, 0x8000, 0x8000, 0x0000, 0x0000,
}

Referenced by main().

◆ fb_render_coords_mask

const struct square_fcoords fb_render_coords_mask
static
Initial value:
= {
.x = { 0.0f, 640.0f, 0.0f, 640.0f },
.y = { 0.0f, 0.0f, 480.0f, 480.0f },
.u = { 0.0f, 640.0f / 8.0f, 0.0f, 640.0f / 8.0f },
.v = { 0.0f, 0.0f, 480.0f / 8.0f, 480.0f / 8.0f },
}

Referenced by render_back_buffer_step1().

◆ fb_render_fcoords_left

const struct square_fcoords fb_render_fcoords_left
static
Initial value:
= {
.x = { 0.0f, 320.0f, 0.0f, 320.0f },
.y = { 0.0f, 0.0f, 480.0f, 480.0f },
.u = { 0.0f, 640.0f / 1024.0f, 0.0f, 640.0f / 1024.0f },
.v = { 0.0f, 0.0f, 960.0f / 1024.0f, 960.0f / 1024.0f },
}

Referenced by render_back_buffer_step2().

◆ fb_render_fcoords_right

const struct square_fcoords fb_render_fcoords_right
static
Initial value:
= {
.x = { 320.0f, 640.0f, 320.0f, 640.0f },
.y = { 0.0f, 0.0f, 480.0f, 480.0f },
.u = { 0.0f, 640.0f / 1024.0f, 0.0f, 640.0f / 1024.0f },
.v = { 1.0f / 1024.0f, 1.0f / 1024.0f, 961.0f / 1024.0f, 961.0f / 1024.0f },
}

Referenced by render_back_buffer_step2().

◆ fbuf_color

uint32_t fbuf_color = 0xffffffff
static