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

Macros

#define TWIDTAB(x)
 
#define TWIDOUT(x, y)
 

Functions

void hsv_spectrum (float w, float *r, float *g, float *b)
 
void plasma_init (void)
 
void plasma_drawtex (void)
 
int check_start (void)
 
void pvr_setup (void)
 
void do_frame (void)
 
int main (int argc, char **argv)
 

Variables

static float scols [8][3]
 
short pcos [512]
 
short psin [512]
 
short xang
 
short yang
 
short xamp
 
short yamp
 
float hsv
 
pvr_poly_hdr_t hdr [2]
 
pvr_ptr_t txr [2]
 
uint16_t * txr_buf [2]
 
int txr_cur
 

Macro Definition Documentation

◆ TWIDOUT

#define TWIDOUT ( x,
y )
Value:
( TWIDTAB((y)) | (TWIDTAB((x)) << 1) )
#define TWIDTAB(x)
Definition plasma.c:48
static GLint y
Definition scissor.c:38
static GLint x
Definition scissor.c:38

Referenced by plasma_drawtex().

◆ TWIDTAB

#define TWIDTAB ( x)
Value:
( (x&1)|((x&2)<<1)|((x&4)<<2)|((x&8)<<3)|((x&16)<<4)| \
((x&32)<<5)|((x&64)<<6)|((x&128)<<7)|((x&256)<<8)|((x&512)<<9) )

Function Documentation

◆ check_start()

int check_start ( void )

◆ do_frame()

◆ hsv_spectrum()

void hsv_spectrum ( float w,
float * r,
float * g,
float * b )

References r, and scols.

Referenced by do_frame().

◆ main()

int main ( int argc,
char ** argv )

◆ plasma_drawtex()

void plasma_drawtex ( void )

References pcos, psin, pvr_txr_load(), r, TWIDOUT, txr, txr_buf, txr_cur, x, xamp, xang, y, yamp, and yang.

Referenced by do_frame().

◆ plasma_init()

void plasma_init ( void )

References F_PI, fcos(), fsin(), hsv, pcos, psin, xamp, xang, yamp, and yang.

Referenced by main().

◆ pvr_setup()

Variable Documentation

◆ hdr

Referenced by do_frame(), and pvr_setup().

◆ hsv

float hsv

Referenced by do_frame(), and plasma_init().

◆ pcos

short pcos[512]

Referenced by plasma_drawtex(), and plasma_init().

◆ psin

short psin[512]

Referenced by plasma_drawtex(), and plasma_init().

◆ scols

float scols[8][3]
static
Initial value:
= {
{ 1.0f, 0.0f, 0.0f },
{ 1.0f, 0.0f, 1.0f },
{ 0.0f, 0.0f, 1.0f },
{ 0.0f, 1.0f, 1.0f },
{ 0.0f, 1.0f, 0.0f },
{ 1.0f, 1.0f, 0.0f },
{ 1.0f, 0.0f, 0.0f },
{ 1.0f, 0.0f, 1.0f }
}

Referenced by hsv_spectrum().

◆ txr

pvr_ptr_t txr[2]

Referenced by plasma_drawtex(), and pvr_setup().

◆ txr_buf

uint16_t* txr_buf[2]

Referenced by plasma_drawtex(), and pvr_setup().

◆ txr_cur

int txr_cur

Referenced by do_frame(), plasma_drawtex(), and pvr_setup().

◆ xamp

short xamp

Referenced by plasma_drawtex(), and plasma_init().

◆ xang

short xang

Referenced by plasma_drawtex(), plasma_init(), and rotate().

◆ yamp

short yamp

Referenced by plasma_drawtex(), and plasma_init().

◆ yang

short yang

Referenced by plasma_drawtex(), plasma_init(), and rotate().