Pasaeta de linters
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
#include "game.h"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_EventType, SDL_CreateTexture, SDL_Delay, SDL_DestroyTexture, SDL_Event, SDL_GetRenderTarget, SDL_PollEvent, SDL_RenderTexture, SDL_SetTextureBlendMode, SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Point, SDL_TextureAccess
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_EventType, SDL_CreateTexture, SDL_Delay, SDL_DestroyTexture, SDL_Event, SDL_GetRenderTarget, SDL_PollEvent, SDL_RenderTexture, SDL_SetTextureBlendMode, SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_KP_MINUS, SDLK_KP_PLUS, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Point, SDL_TextureAccess
|
||||
|
||||
#include <algorithm> // Para max, find_if, clamp, find, min
|
||||
#include <algorithm> // Para max, find, clamp, find_if, min
|
||||
#include <array> // Para array
|
||||
#include <cstdlib> // Para rand, size_t
|
||||
#include <functional> // Para function
|
||||
#include <iostream> // Para std::cout, std::endl
|
||||
#include <iterator> // Para distance, size
|
||||
#include <memory> // Para std::make_unique
|
||||
#include <iostream> // Para basic_ostream, basic_ostream::operator<<, cout, endl
|
||||
#include <iterator> // Para size
|
||||
#include <memory> // Para shared_ptr, unique_ptr, __shared_ptr_access, allocator, make_unique, operator==, make_shared
|
||||
#include <utility> // Para move
|
||||
|
||||
#include "asset.h" // Para Asset
|
||||
#include "audio.h" // Para Audio
|
||||
#include "background.h" // Para Background
|
||||
#include "balloon.h" // Para Balloon, Balloon::SPEED
|
||||
#include "balloon.h" // Para Balloon
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "bullet.h" // Para Bullet, BulletType, BulletMoveStatus
|
||||
#include "color.h" // Para Color, FLASH_COLOR
|
||||
@@ -22,20 +23,21 @@
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "hit.h" // Para Hit
|
||||
#include "input.h" // Para InputAction, Input, Input::DO_NOT_ALLOW_REPEAT, Input::ALLOW_REPEAT, InputDevice
|
||||
#include "input.h" // Para Input
|
||||
#include "input_types.h" // Para InputAction
|
||||
#include "item.h" // Para Item, ItemType
|
||||
#include "lang.h" // Para getText
|
||||
#include "manage_hiscore_table.h" // Para ManageHiScoreTable, HiScoreEntry
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry, ManageHiScoreTable
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamScoreboard, ParamFade, ParamBalloon
|
||||
#include "path_sprite.h" // Para Path, PathSprite, createPath, PathType
|
||||
#include "player.h" // Para Player, PlayerState
|
||||
#include "player.h" // Para Player
|
||||
#include "resource.h" // Para Resource
|
||||
#include "scoreboard.h" // Para Scoreboard, ScoreboardMode, SCOREBOARD_LEFT_PANEL, SCOREBOARD_RIGHT_PANEL, SCOREBOARD_CENTER_PANEL
|
||||
#include "scoreboard.h" // Para Scoreboard
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, AttractMode, Options, attract_mode, options
|
||||
#include "smart_sprite.h" // Para SmartSprite
|
||||
#include "stage.h" // Para number, Stage, get, total_power, power, addPower, init, power_can_be_added, stages
|
||||
#include "tabe.h" // Para Tabe, TabeState
|
||||
#include "tabe.h" // Para Tabe
|
||||
#include "text.h" // Para Text
|
||||
#include "texture.h" // Para Texture
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
@@ -903,8 +905,7 @@ void Game::update() {
|
||||
fillCanvas();
|
||||
}
|
||||
|
||||
static const auto audio = Audio::get();
|
||||
audio->update();
|
||||
Audio::update();
|
||||
}
|
||||
|
||||
// Dibuja el juego
|
||||
@@ -1834,8 +1835,8 @@ void Game::playSound(const std::string &name) const {
|
||||
return;
|
||||
}
|
||||
|
||||
static auto audio = Audio::get();
|
||||
audio->playSound(name);
|
||||
static auto *audio_ = Audio::get();
|
||||
audio_->playSound(name);
|
||||
}
|
||||
|
||||
// Organiza los jugadores para que los vivos se pinten sobre los muertos
|
||||
@@ -1903,7 +1904,7 @@ void Game::sendPlayerToTheFront(const std::shared_ptr<Player> &player) {
|
||||
#ifdef _DEBUG
|
||||
// Comprueba los eventos en el modo DEBUG
|
||||
void Game::checkDebugEvents(const SDL_Event &event) {
|
||||
static int formation_id = 0;
|
||||
static int formation_id_ = 0;
|
||||
if (event.type == SDL_EVENT_KEY_DOWN && static_cast<int>(event.key.repeat) == 0) {
|
||||
switch (event.key.key) {
|
||||
case SDLK_1: // Crea una powerball
|
||||
@@ -1966,17 +1967,17 @@ void Game::checkDebugEvents(const SDL_Event &event) {
|
||||
break;
|
||||
}
|
||||
case SDLK_KP_PLUS: {
|
||||
++formation_id;
|
||||
++formation_id_;
|
||||
balloon_manager_->destroyAllBalloons();
|
||||
balloon_manager_->deployFormation(formation_id);
|
||||
std::cout << formation_id << std::endl;
|
||||
balloon_manager_->deployFormation(formation_id_);
|
||||
std::cout << formation_id_ << std::endl;
|
||||
break;
|
||||
}
|
||||
case SDLK_KP_MINUS: {
|
||||
--formation_id;
|
||||
--formation_id_;
|
||||
balloon_manager_->destroyAllBalloons();
|
||||
balloon_manager_->deployFormation(formation_id);
|
||||
std::cout << formation_id << std::endl;
|
||||
balloon_manager_->deployFormation(formation_id_);
|
||||
std::cout << formation_id_ << std::endl;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user