pasada la granera per la carpeta

This commit is contained in:
2026-04-04 12:38:48 +02:00
parent 6474d731d0
commit 9e0ab87c76
42 changed files with 128 additions and 37 deletions

64
source/mapa.h Normal 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;
Uint16 x, y;
};
struct Vertex {
Uint8 columna;
Uint8 fila;
};
class Mapa {
public:
Mapa( JD8_Surface gfx, 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;
Uint8 frame_torxes;
Prota* sam;
bool farao;
bool clau;
bool porta_oberta;
bool nova_momia;
};