From a74c8d5122e8009adf657468bdbd7381462d5234 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 25 Sep 2022 20:17:06 +0200 Subject: [PATCH] Eliminado codigo sin usar --- source/game.cpp | 33 --------------------------------- source/game.h | 10 ---------- 2 files changed, 43 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index 6b5f08e..c14fe35 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -342,8 +342,6 @@ void Game::init() mStageBitmapCounter = STAGE_COUNTER; mDeathCounter = DEATH_COUNTER; mExplosionTime = false; - mRemainingExplosions = REMAINING_EXPLOSIONS; - mRemainingExplosionsCounter = REMAINING_EXPLOSIONS_COUNTER; mTimeStopped = false; mTimeStoppedCounter = 0; mCounter = 0; @@ -2700,36 +2698,6 @@ bool Game::isExplosionTime() return mExplosionTime; } -// Establece el valor de la variable -void Game::setRemainingExplosions(Uint8 value) -{ - mRemainingExplosions = value; -} - -// Actualiza y comprueba el valor de la variable -void Game::updateRemainingExplosionsCounter() -{ - if (isExplosionTime()) - { - if (mRemainingExplosionsCounter > 0) - { - mRemainingExplosionsCounter--; - } - else if (mRemainingExplosions > 0) - { - popAllBalloons(); - mRemainingExplosions--; - mRemainingExplosionsCounter = REMAINING_EXPLOSIONS_COUNTER; - } - else - { - mExplosionTime = false; - mRemainingExplosions = REMAINING_EXPLOSIONS; - mRemainingExplosionsCounter = REMAINING_EXPLOSIONS_COUNTER; - } - } -} - // Actualiza la variable mEnemyDeployCounter void Game::updateEnemyDeployCounter() { @@ -2771,7 +2739,6 @@ void Game::updatePlayField() // Actualiza los contadores de estado y efectos updateTimeStoppedCounter(); - updateRemainingExplosionsCounter(); updateEnemyDeployCounter(); updateShakeEffect(); diff --git a/source/game.h b/source/game.h index 5ea4ef4..1c14ac2 100644 --- a/source/game.h +++ b/source/game.h @@ -53,8 +53,6 @@ #define MAX_ITEMS 10 // Valores para las variables asociadas a los objetos -#define REMAINING_EXPLOSIONS 3 -#define REMAINING_EXPLOSIONS_COUNTER 50 #define TIME_STOPPED_COUNTER 300 // Clase Game @@ -223,8 +221,6 @@ private: Uint8 mMenaceThreshold; // Umbral del nivel de amenaza. Si el nivel de amenaza cae por debajo del umbral, se generan más globos. Si el umbral aumenta, aumenta el numero de globos bool mTimeStopped; // Indica si el tiempo está detenido Uint16 mTimeStoppedCounter; // Temporizador para llevar la cuenta del tiempo detenido - Uint8 mRemainingExplosions; // Cantidad de explosiones restantes - Uint16 mRemainingExplosionsCounter; // Temporizador para la cantidad de explosiones restantes bool mExplosionTime; // Indica si las explosiones estan en marcha Uint32 mCounter; // Contador para el juego Uint32 mScoreDataFile[TOTAL_SCORE_DATA]; // Datos del fichero de puntos @@ -469,12 +465,6 @@ private: // Obtiene el valor de la variable bool isExplosionTime(); - // Establece el valor de la variable - void setRemainingExplosions(Uint8 value); - - // Actualiza y comprueba el valor de la variable - void updateRemainingExplosionsCounter(); - // Gestiona el nivel de amenaza void updateMenace();