From 11d3309c822aee4ad4144ffa499daf782ceabb3f Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Mon, 16 Oct 2023 20:02:09 +0200 Subject: [PATCH] - Comence amb la classe marcador. --- source/gamestate_prefase.cpp | 6 +++--- source/proc_marcador.cpp | 36 ++++++++++++++++++++++++++++++++++++ source/proc_marcador.h | 11 +++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 source/proc_marcador.cpp create mode 100644 source/proc_marcador.h diff --git a/source/gamestate_prefase.cpp b/source/gamestate_prefase.cpp index 958abe6..bb8fc6e 100644 --- a/source/gamestate_prefase.cpp +++ b/source/gamestate_prefase.cpp @@ -27,9 +27,9 @@ namespace gamestate cursor = draw::loadSurface("cursor.gif"); font = draw::loadSurface("fuente1.gif"); - int size=0; - uint32_t *font_pal = draw::loadPalette("fuente1.gif", &size); - draw::setPalette(font_pal+1, 5, 80); + //int size=0; + //uint32_t *font_pal = draw::loadPalette("fuente1.gif", &size); + //draw::setPalette(font_pal+1, 5, 80); carregarMapa(); diff --git a/source/proc_marcador.cpp b/source/proc_marcador.cpp new file mode 100644 index 0000000..c391bcf --- /dev/null +++ b/source/proc_marcador.cpp @@ -0,0 +1,36 @@ +#include "proc_marcador.h" + +namespace marcador +{ + int orientacioInicial; + int numArounders; + int AroundersNec; + + int numAroundersArrivats; + int numAroundersEixits; + int numAroundersMorts; + + int numParar; + int numCavar; + int numEscalar; + int numPerforar; + int numEscalera; + int numPasarela; + int numCorda; + + int velocitat; + + + //SDL_Surface *boto; + + int contador; + + char *formatejar(int numero); + + void pintar(int accio, int prevista); + int procesar(int mousex, int mousey); + + void setAroundersNum(const int orient, const int total, const int necessaris); + void setActions(const int parar, const int cavar, const int escalar, const int perforar, const int escalera, const int pasarela, const int corda); + +} \ No newline at end of file diff --git a/source/proc_marcador.h b/source/proc_marcador.h new file mode 100644 index 0000000..0b15b3b --- /dev/null +++ b/source/proc_marcador.h @@ -0,0 +1,11 @@ +#pragma once + +namespace marcador +{ + void pintar(int accio, int prevista); + int procesar(int mousex, int mousey); + + void setAroundersNum(const int orient, const int total, const int necessaris); + void setActions(const int parar, const int cavar, const int escalar, const int perforar, const int escalera, const int pasarela, const int corda); + +} \ No newline at end of file