renombrades les clases SSprite a SurfaceSprite

This commit is contained in:
2025-10-26 14:56:56 +01:00
parent fdea094e26
commit 342177a751
34 changed files with 225 additions and 221 deletions

View File

@@ -1,5 +1,3 @@
#include "game/scene_manager.hpp" // Para SceneManager
#include "game/scenes/ending.hpp"
#include <SDL3/SDL.h>
@@ -13,7 +11,8 @@
#include "core/rendering/text.hpp" // Para Text, TEXT_STROKE
#include "core/resources/resource.hpp" // Para Resource
#include "external/jail_audio.h" // Para JA_SetVolume, JA_PlayMusic, JA_StopMusic
#include "game/options.hpp" // Para Options, options, OptionsGame, SectionS...
#include "game/options.hpp" // Para Options, options, OptionsGame, SectionS...
#include "game/scene_manager.hpp" // Para SceneManager
#include "utils/defines.hpp" // Para GAME_SPEED
#include "utils/global_events.hpp" // Para check
#include "utils/utils.hpp" // Para PaletteColor
@@ -168,7 +167,7 @@ void Ending::iniTexts() {
text->writeDX(TEXT_STROKE, 2, 2, txt.caption, 1, text_color, 2, shadow_color);
// Crea el sprite
st.image_sprite = std::make_shared<SSprite>(st.image_surface, 0, 0, st.image_surface->getWidth(), st.image_surface->getHeight());
st.image_sprite = std::make_shared<SurfaceSprite>(st.image_surface, 0, 0, st.image_surface->getWidth(), st.image_surface->getHeight());
st.image_sprite->setPosition((Options::game.width - st.image_surface->getWidth()) / 2, txt.pos);
// Crea la cover_surface
@@ -196,7 +195,7 @@ void Ending::iniTexts() {
surface->fillRect(&rect, color);
// Crea el sprite
st.cover_sprite = std::make_shared<SSprite>(st.cover_surface, 0, 0, st.cover_surface->getWidth(), st.cover_surface->getHeight() - 8);
st.cover_sprite = std::make_shared<SurfaceSprite>(st.cover_surface, 0, 0, st.cover_surface->getWidth(), st.cover_surface->getHeight() - 8);
st.cover_sprite->setPosition((Options::game.width - st.cover_surface->getWidth()) / 2, txt.pos);
st.cover_sprite->setClip(0, 8, st.cover_surface->getWidth(), st.cover_surface->getHeight());
@@ -233,7 +232,7 @@ void Ending::iniPics() {
const float HEIGHT = sp.image_surface->getHeight();
// Crea el sprite
sp.image_sprite = std::make_shared<SSprite>(sp.image_surface, 0, 0, WIDTH, HEIGHT);
sp.image_sprite = std::make_shared<SurfaceSprite>(sp.image_surface, 0, 0, WIDTH, HEIGHT);
sp.image_sprite->setPosition((Options::game.width - WIDTH) / 2, pic.pos);
// Crea la cover_surface
@@ -262,7 +261,7 @@ void Ending::iniPics() {
surface->fillRect(&rect, color);
// Crea el sprite
sp.cover_sprite = std::make_shared<SSprite>(sp.cover_surface, 0, 0, sp.cover_surface->getWidth(), sp.cover_surface->getHeight() - 8);
sp.cover_sprite = std::make_shared<SurfaceSprite>(sp.cover_surface, 0, 0, sp.cover_surface->getWidth(), sp.cover_surface->getHeight() - 8);
sp.cover_sprite->setPosition((Options::game.width - sp.cover_surface->getWidth()) / 2, pic.pos);
sp.cover_sprite->setClip(0, 8, sp.cover_surface->getWidth(), sp.cover_surface->getHeight());