Primer commit

This commit is contained in:
Raimon Zamora
2014-12-30 22:46:46 +01:00
commit 4a359c46f5
33 changed files with 2778 additions and 0 deletions

64
mapa.h Executable file
View File

@@ -0,0 +1,64 @@
#pragma once
#include "jdraw8.h"
#include "info.h"
#include "prota.h"
#define CONTE_RES 0
#define CONTE_TRESOR 1
#define CONTE_FARAO 2
#define CONTE_CLAU 3
#define CONTE_MOMIA 4
#define CONTE_PERGAMI 5
#define CONTE_DIAMANT 6
#define VALOR_DIAMANT 5
struct Tomba {
bool costat[4];
Uint8 contingut;
bool oberta;
};
struct Vertex {
Uint8 columna;
Uint8 fila;
};
class Mapa {
public:
Mapa( JD8_Surface gfx, Info* info, Prota* sam );
~Mapa(void);
void draw();
void update();
bool novaMomia();
void comprovaCaixa( Uint8 num );
Tomba tombes[16];
protected:
void preparaFondoEstatic();
void preparaTombes();
void comprovaUltimCami();
void comprovaPorta();
JD8_Surface gfx;
JD8_Surface fondo;
Vertex vertex;
Vertex ultim_vertex;
Info* info;
Uint8 frame_torxes;
Prota* sam;
bool farao;
bool clau;
bool porta_oberta;
bool nova_momia;
};