Afegits destructors virtuals en les classes Sprite

This commit is contained in:
2024-10-13 21:23:15 +02:00
parent 7c876e1d4d
commit d0a6e4c572
19 changed files with 142 additions and 131 deletions

View File

@@ -1,39 +1,41 @@
#include "game.h"
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3, SDLK_h
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_R...
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_FOCUS_GAINED, SDL_...
#include <stdlib.h> // for rand
#include <algorithm> // for min
#include <fstream> // for basic_ifstream
#include <iostream> // for char_traits, basic_istream, ifstream
#include <numeric>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_KEYDOWN
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3, SDLK_4
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_R...
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_FOCUS_GAINED, SDL_...
#include <stdlib.h> // for rand
#include <algorithm> // for min, remove_if
#include <fstream> // for basic_ostream, operator<<, basic_i...
#include <iostream> // for cout
#include <numeric> // for accumulate
#include <utility> // for move
#include "asset.h" // for Asset
#include "background.h" // for Background
#include "balloon.h" // for Balloon, BALLOON_SPEED_1, BALLOON_...
#include "bullet.h" // for Bullet, BulletType::LEFT, BulletType::RIGHT
#include "balloon_formations.h" // for Stage, EnemyFormations, enemyIni...
#include "balloon.h" // for Balloon, BALLOON_SCORE_1, BALLOON_...
#include "balloon_formations.h" // for Stage, BalloonFormationParams, Bal...
#include "bullet.h" // for Bullet, BulletType, BulletMoveStatus
#include "explosions.h" // for Explosions
#include "fade.h" // for Fade, FadeType::RANDOM_SQUARE, FADE_VEN...
#include "global_inputs.h" // for globalInputs::check
#include "input.h" // for inputs_e, Input, INPUT_DO_NOT_ALLO...
#include "fade.h" // for Fade, FadeType
#include "global_inputs.h" // for check
#include "input.h" // for InputType, Input, INPUT_DO_NOT_ALL...
#include "item.h" // for Item, ITEM_COFFEE_MACHINE, ITEM_CLOCK
#include "jail_audio.h" // for JA_PlaySound, JA_DeleteSound, JA_L...
#include "lang.h" // for getText
#include "manage_hiscore_table.h" // for ManageHiScoreTable
#include "options.h" // for options
#include "param.h" // for param
#include "player.h" // for Player, PlayerStatus::PLAYING, PLA...
#include "scoreboard.h" // for Scoreboard, scoreboard_modes_e
#include "player.h" // for Player, PlayerStatus
#include "scoreboard.h" // for Scoreboard, ScoreboardMode, SCOREB...
#include "screen.h" // for Screen
#include "section.h" // for Name, name, Options, options
#include "smart_sprite.h" // for SmartSprite
#include "text.h" // for Text, TEXT_CENTER
#include "texture.h" // for Texture
#include "dbgtxt.h"
struct JA_Music_t;
struct JA_Sound_t;
struct JA_Music_t; // lines 35-35
struct JA_Sound_t; // lines 36-36
// Constructor
Game::Game(int player_id, int current_stage, bool demo, JA_Music_t *music)