Imported contents: kraptor_final_apr_03_2004.tar.gz
[kraptor.git] / include / partic.h
blob4bcda36cff07a4d10d11237b2db0a0590cdcd87f
1 /*-------------------------------------------------------
2 partic.h
3 --------------------------------------------------------
4 Copyright (c) 2002, Kronoman
5 En memoria de mi querido padre
6 Agosto - 2002
7 --------------------------------------------------------
8 Engine de particulas usando una lista enlazada
9 muy sencilla
10 --------------------------------------------------------*/
12 #ifndef PARTIC_H
13 #define PARTIC_H
15 #include "allegro.h"
17 /* NOTA:
18 el tipo de particula 't' puede ser:
19 1 = circulo
20 2 = cuadrado
21 3 = linea
22 o si spr != NULL, dibuja el bitmap rotando al azar (como que salto un pedazo
25 /* estructura de datos que contiene la particula */
26 typedef struct PARTICULA {
27 fixed x, y; /* posicion */
28 fixed dx, dy; /* direccion */
29 int vida; /* vida que le queda a la particula */
30 fixed r, rg; /* radio y valor de crecimiento del radio 'rg' */
31 int col, t; /* color y tipo de grafico que la representa */
32 int transp; /* la particula es transparente? -1 = si, 0 = no [solo en alto detalle ] */
33 BITMAP *spr; /* sprite que lo representa, o NULL si es una figura geometrica */
34 fixed rot; /* rotacion del bitmap */
36 /* puntero a la particula siguiente */
37 struct PARTICULA *next;
38 } PARTICULA;
41 /* prototipos */
43 PARTICULA *agrega_particula( fixed x, fixed y,
44 fixed dx, fixed dy,
45 int vida,
46 int col, int r, int t,
47 int transp, fixed rg,
48 BITMAP *spr );
50 void mover_particulas(int x, int y, int w, int h);
52 void dibujar_particulas(BITMAP *bmp, int x, int y);
54 void liberar_lista_particulas();
58 /* DEBUG - estas variables son especificas a Kraptor */
60 /* Cache de bmps representando particulas para 'reventar' naves */
61 extern BITMAP *particula_cache_bmp[3];
63 extern int cant_particulas_debug;
65 #endif