DYNA/DYNA_TBL.H
2021-09-08 21:02:03 +02:00

108 lines
3.4 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**************************************************************************\
|* *|
|* DYNA_TBL *|
|* *|
|* Descripci¢n: (fichero de apoyo) *|
|* M¢dulo encargado de cargar los elementos del tablero y *|
|* enemigos del juegos. Tambin se encarga de generar el *|
|* tablero seg£n preferencias de usuario... *|
|* *|
\**************************************************************************/
#define ERROR 0
#define OK 1
// Defino las posiciones dentro de Sprite que ocupan los distintos elementos
// y el tipo de Sprite del que se trata
#define POS_NUMEROS 0
#define POS_ELEM_MAPA 1
#define POS_POWERUP 2
#define POS_BOMBA 3
#define POS_TELEPORT 4
#define POS_GLOBO 5
#define POS_GOSTH 6
#define POS_ESTRELLA 7
#define POS_BAQUERO 8
#define POS_PLATANO 9
#define POS_JUGADORa 10
#define POS_JUGADORb 11
#define POS_JUGADORc 12
#define POS_JUGADORd 13
#define POS_FUEGOv 14
#define POS_FUEGOh 15
#define POS_BOSQUE 18
#define SPR_NUMEROS 3
#define SPR_ELEM_MAPA 2
#define SPR_POWERUP 0
#define SPR_BOMBA 4
#define SPR_TELEPORT 4
#define SPR_GLOBO 5
#define SPR_GOSTH 5
#define SPR_ESTRELLA 6
#define SPR_BAQUERO 5
#define SPR_PLATANO 5
#define SPR_JUGADOR 7
#define SPR_FUEGO 8
void Error(int code);
void ComienzaJuego(void);
void InicializaJuego(void);
int CargaPaleta(char *file);
void LiberaMemoriaObjetos(void);
int CargaObjetosBasicos( void );
int MuestraMensajeCargando(void);
int InsertaObjetosBase( int Objetos );
int InicializaElementosBasicos( void );
int MemoriaBitmap( int Pos, int TipoSprite );
void ProcesaPuntoBasico( int x, int y, char color );
void ProcesaPuntoJugador( int x, int y, char color );
int MuestraImagen( char *file, int page, int col_Inv );
// Estructura donde se guardaran las preferencias del usuario
typedef struct
{
char Entorno; // Bosque / Hielo / ....
char Jugadores; // M x. 4
char Teclas[5][6]; // Teclas de los Jugadores
} PREFERENCIAS;
// Informe sobre los bitmap's
typedef struct
{
char NDirecciones; // # de direcciones
// Inicio del Despl a...
char Inicios[5]; // Izq, Der, Arr, Abj, Muerte
char Movimientos[5]; // Movimientos por cada direcci¢n
unsigned char Ancho, Alto; // Dimensiones del objeto
char CorrX, CorrY;
char PixelCambio;
} DatosTipo;
// Estructura para guardar los Bitmap
typedef struct EnemigO
{
char Tipo; // Cada tipo de enemigo tiene un codigo
// de ajuste...
char far *Sprite[5]; // 5 puteros por direccion + muerte
} SPRITE;
extern SPRITE *Sprite;
extern PREFERENCIAS Pref;
extern const DatosTipo InfoSprites[];
extern char prt_tbl[13+1][21+1];
extern "C" void SET_VECTORES(volatile char *);
extern "C" void UNSET_VECTORES(void);
extern volatile char mapa_teclado[512];