forked from jaildesigner-jailgames/jaildoctors_dilemma
renombrades les clases SSprite a SurfaceSprite
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "external/jail_audio.h" // Para JA_PlaySound
|
||||
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
|
||||
#include "game/options.hpp" // Para Options, OptionsStats, options
|
||||
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData
|
||||
#include "game/options.hpp" // Para Options, OptionsStats, options
|
||||
#include "utils/defines.hpp" // Para BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH
|
||||
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
|
||||
@@ -931,7 +931,7 @@ void Room::setAnimatedTiles() {
|
||||
const int yc = (tile_map_[i] / tile_set_width_) * TILE_SIZE_;
|
||||
|
||||
AnimatedTile at;
|
||||
at.sprite = std::make_shared<SSprite>(surface_, x, y, 8, 8);
|
||||
at.sprite = std::make_shared<SurfaceSprite>(surface_, x, y, 8, 8);
|
||||
at.sprite->setClip(xc, yc, 8, 8);
|
||||
at.x_orig = xc;
|
||||
animated_tiles_.push_back(at);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "game/entities/enemy.hpp" // Para EnemyData
|
||||
#include "game/entities/item.hpp" // Para ItemData
|
||||
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
class SSprite; // lines 12-12
|
||||
class SurfaceSprite; // lines 12-12
|
||||
class Surface; // lines 13-13
|
||||
struct ScoreboardData; // lines 15-15
|
||||
|
||||
@@ -31,8 +31,8 @@ enum class RoomBorder : int {
|
||||
};
|
||||
|
||||
struct AnimatedTile {
|
||||
std::shared_ptr<SSprite> sprite; // SSprite para dibujar el tile
|
||||
int x_orig; // Poicion X donde se encuentra el primer tile de la animacion en la tilesheet
|
||||
std::shared_ptr<SurfaceSprite> sprite; // SSprite para dibujar el tile
|
||||
int x_orig; // Poicion X donde se encuentra el primer tile de la animacion en la tilesheet
|
||||
};
|
||||
|
||||
struct RoomData {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/options.hpp" // Para Options, options, Cheat, OptionsGame
|
||||
#include "game/options.hpp" // Para Options, options, Cheat, OptionsGame
|
||||
#include "utils/defines.hpp" // Para BLOCK
|
||||
#include "utils/utils.hpp" // Para stringToColor
|
||||
|
||||
@@ -22,7 +22,7 @@ Scoreboard::Scoreboard(std::shared_ptr<ScoreboardData> data)
|
||||
// Reserva memoria para los objetos
|
||||
auto player_texture = Resource::get()->getSurface(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.gif" : "player.gif");
|
||||
auto player_animations = Resource::get()->getAnimations(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.ani" : "player.ani");
|
||||
player_sprite_ = std::make_shared<SAnimatedSprite>(player_texture, player_animations);
|
||||
player_sprite_ = std::make_shared<SurfaceAnimatedSprite>(player_texture, player_animations);
|
||||
player_sprite_->setCurrentAnimation("walk_menu");
|
||||
|
||||
surface_ = std::make_shared<Surface>(SURFACE_WIDTH_, SURFACE_HEIGHT_);
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string, basic_string
|
||||
#include <vector> // Para vector
|
||||
class SAnimatedSprite; // lines 10-10
|
||||
class Surface; // lines 11-11
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string, basic_string
|
||||
#include <vector> // Para vector
|
||||
class SurfaceAnimatedSprite; // lines 10-10
|
||||
class Surface; // lines 11-11
|
||||
|
||||
struct ScoreboardData {
|
||||
int items; // Lleva la cuenta de los objetos recogidos
|
||||
@@ -62,10 +62,10 @@ class Scoreboard {
|
||||
};
|
||||
|
||||
// Objetos y punteros
|
||||
std::shared_ptr<SAnimatedSprite> player_sprite_; // Sprite para mostrar las vidas en el marcador
|
||||
std::shared_ptr<Surface> item_surface_; // Surface con los graficos para los elementos del marcador
|
||||
std::shared_ptr<ScoreboardData> data_; // Contiene las variables a mostrar en el marcador
|
||||
std::shared_ptr<Surface> surface_; // Surface donde dibujar el marcador;
|
||||
std::shared_ptr<SurfaceAnimatedSprite> player_sprite_; // Sprite para mostrar las vidas en el marcador
|
||||
std::shared_ptr<Surface> item_surface_; // Surface con los graficos para los elementos del marcador
|
||||
std::shared_ptr<ScoreboardData> data_; // Contiene las variables a mostrar en el marcador
|
||||
std::shared_ptr<Surface> surface_; // Surface donde dibujar el marcador;
|
||||
|
||||
// Variables
|
||||
std::vector<Uint8> color_; // Vector con los colores del objeto
|
||||
|
||||
Reference in New Issue
Block a user