Afegides mes descripcions a les classes

Eliminat el punter a renderer de les classes-estat que faltava
This commit is contained in:
2024-08-12 08:55:41 +02:00
parent 477891cac7
commit 9d5aee2562
15 changed files with 113 additions and 57 deletions

View File

@@ -3,10 +3,9 @@
#define DEATH_COUNTER 350
// Constructor
Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
Game::Game(int playerID, int currentStage, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
{
// Copia los punteros
this->renderer = renderer;
this->screen = screen;
this->asset = asset;
this->lang = lang;
@@ -15,6 +14,7 @@ Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *scree
this->options = options;
this->section = section;
this->music = music;
renderer = screen->getRenderer();
// Pasa variables
this->demo.enabled = demo;
@@ -967,9 +967,9 @@ void Game::renderPlayers()
{
player->render();
#ifdef DEBUG
//SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
//const circle_t c = player->getCollider();
//DrawCircle(renderer, c.x, c.y, c.r);
// SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
// const circle_t c = player->getCollider();
// DrawCircle(renderer, c.x, c.y, c.r);
#endif
}
}