libcaca  0.99.beta19
About: libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals (something like an advanced AAlib library).
  Fossies Dox: libcaca-0.99.beta19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

aafire.c File Reference
#include <stdio.h>
#include "aalib.h"
Include dependency graph for aafire.c:

Go to the source code of this file.

Macros

#define XSIZ   aa_imgwidth(context)
 
#define YSIZ   (aa_imgheight(context)-4)
 
#define MAXTABLE   (256*5)
 
#define MA   5
 
#define END   (bitmap + XSIZ * YSIZ)
 
#define min(x, y)   ((x)<(y)?(x):(y))
 

Functions

static void initialize (void)
 
static void uninitialize (void)
 
static void gentable (void)
 
static void firemain (void)
 
static void drawfire (void)
 
static void game (void)
 
int main (int argc, char **argv)
 

Variables

static aa_context * context
 
static aa_renderparams * params
 
static aa_palette palette
 
static unsigned int table [(256 *5)]
 
static __AA_CONST int pal []
 

Macro Definition Documentation

◆ END

#define END   (bitmap + XSIZ * YSIZ)

◆ MA

#define MA   5

Definition at line 181 of file aafire.c.

◆ MAXTABLE

#define MAXTABLE   (256*5)

Definition at line 38 of file aafire.c.

◆ min

#define min (   x,
  y 
)    ((x)<(y)?(x):(y))

Definition at line 201 of file aafire.c.

◆ XSIZ

#define XSIZ   aa_imgwidth(context)

Definition at line 35 of file aafire.c.

◆ YSIZ

#define YSIZ   (aa_imgheight(context)-4)

Definition at line 36 of file aafire.c.

Function Documentation

◆ drawfire()

◆ firemain()

static void firemain ( void  )
static

Definition at line 183 of file aafire.c.

References context, END, table, and XSIZ.

Referenced by drawfire().

◆ game()

◆ gentable()

static void gentable ( void  )
static

Definition at line 163 of file aafire.c.

References MAXTABLE, table, and YSIZ.

Referenced by game().

◆ initialize()

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 287 of file aafire.c.

References context, game(), initialize(), printf, and uninitialize().

◆ uninitialize()

static void uninitialize ( void  )
static

Definition at line 152 of file aafire.c.

References caca_free_canvas(), caca_free_display(), context, cv, and dp.

Referenced by main().

Variable Documentation

◆ context

aa_context* context
static

Definition at line 47 of file aafire.c.

Referenced by drawfire(), firemain(), game(), initialize(), main(), and uninitialize().

◆ pal

__AA_CONST int pal[]
static

Definition at line 55 of file aafire.c.

Referenced by initialize().

◆ palette

aa_palette palette
static

Definition at line 49 of file aafire.c.

Referenced by drawfire(), initialize(), set_dither_palette(), and set_dither_palette2().

◆ params

aa_renderparams* params
static

Definition at line 48 of file aafire.c.

Referenced by drawfire(), and initialize().

◆ table

unsigned int table[(256 *5)]
static

Definition at line 51 of file aafire.c.

Referenced by firemain(), and gentable().