KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
4bpp.c File Reference
#include <stdlib.h>
#include <math.h>
#include <dc/pvr.h>
#include <dc/maple.h>
#include <dc/fmath.h>
#include <dc/maple/controller.h>

Macros

#define TEXTURE_WIDTH   256
 
#define TEXTURE_HEIGHT   256
 
#define PALETTE_ENTRY_COUNT   16
 

Functions

static void draw_screen (void)
 
static float distance (float x0, float y0, float x1, float y1)
 
static pvr_ptr_t generate_texture (uint32_t width, uint32_t height)
 
static void animate_palette (uint32_t frame)
 
static int check_start (void)
 
int main (int argc, char **argv)
 

Variables

static pvr_poly_hdr_t hdr
 

Macro Definition Documentation

◆ PALETTE_ENTRY_COUNT

#define PALETTE_ENTRY_COUNT   16

Referenced by animate_palette().

◆ TEXTURE_HEIGHT

#define TEXTURE_HEIGHT   256

Referenced by main().

◆ TEXTURE_WIDTH

#define TEXTURE_WIDTH   256

Referenced by main().

Function Documentation

◆ animate_palette()

static void animate_palette ( uint32_t frame)
static

References PALETTE_ENTRY_COUNT, pvr_set_pal_entry(), and uint32_t().

Referenced by main().

◆ check_start()

static int check_start ( void )
static

◆ distance()

static float distance ( float x0,
float y0,
float x1,
float y1 )
static

References fsqrt().

Referenced by generate_texture().

◆ draw_screen()

◆ generate_texture()

static pvr_ptr_t generate_texture ( uint32_t width,
uint32_t height )
static

◆ main()

Variable Documentation

◆ hdr

pvr_poly_hdr_t hdr
static

Referenced by draw_screen(), and main().