resource.pack
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "asset.h" // for Asset
|
||||
#include "mouse.hpp" // for Mouse::cursorVisible, Mouse::lastMouseMoveTime
|
||||
#include "resource.h"
|
||||
#include "text.h" // for Text, TXT_CENTER, TXT_COLOR, TXT_STROKE
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
@@ -82,8 +83,8 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options
|
||||
// Establece el modo de video
|
||||
setVideoMode(options->videoMode != 0);
|
||||
|
||||
// Inicializa el sistema de notificaciones
|
||||
notificationText = new Text(asset->get("8bithud.png"), asset->get("8bithud.txt"), renderer);
|
||||
// Inicializa el sistema de notificaciones (Text compartido de Resource)
|
||||
notificationText = Resource::get()->getText("8bithud");
|
||||
notificationMessage = "";
|
||||
notificationTextColor = {0xFF, 0xFF, 0xFF};
|
||||
notificationOutlineColor = {0x00, 0x00, 0x00};
|
||||
@@ -96,7 +97,7 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options
|
||||
|
||||
// Destructor
|
||||
Screen::~Screen() {
|
||||
delete notificationText;
|
||||
// notificationText es propiedad de Resource — no liberar.
|
||||
SDL_DestroyTexture(gameCanvas);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user