forked from jaildesigner-jailgames/jaildoctors_dilemma
unificats els resources en un namespace
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/resources/resource_cache.hpp" // Para Resource
|
||||
#include "core/resources/resource_helper.hpp" // Para ResourceHelper
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
|
||||
@@ -23,7 +23,7 @@
|
||||
// Constructor
|
||||
Room::Room(const std::string& room_path, std::shared_ptr<Scoreboard::Data> data)
|
||||
: data_(std::move(std::move(data))) {
|
||||
auto room = Resource::get()->getRoom(room_path);
|
||||
auto room = Resource::Cache::get()->getRoom(room_path);
|
||||
initializeRoom(*room);
|
||||
|
||||
openTheJail(); // Abre la Jail si se da el caso
|
||||
@@ -49,8 +49,8 @@ void Room::initializeRoom(const Data& room) {
|
||||
tile_set_file_ = room.tile_set_file;
|
||||
tile_map_file_ = room.tile_map_file;
|
||||
conveyor_belt_direction_ = room.conveyor_belt_direction;
|
||||
tile_map_ = Resource::get()->getTileMap(room.tile_map_file);
|
||||
surface_ = Resource::get()->getSurface(room.tile_set_file);
|
||||
tile_map_ = Resource::Cache::get()->getTileMap(room.tile_map_file);
|
||||
surface_ = Resource::Cache::get()->getSurface(room.tile_set_file);
|
||||
tile_set_width_ = surface_->getWidth() / TILE_SIZE;
|
||||
is_paused_ = false;
|
||||
time_accumulator_ = 0.0F;
|
||||
@@ -930,7 +930,7 @@ auto Room::loadRoomTileFile(const std::string& file_path, bool verbose) -> std::
|
||||
const std::string FILENAME = file_path.substr(file_path.find_last_of("\\/") + 1);
|
||||
|
||||
// Load file using ResourceHelper (supports both filesystem and pack)
|
||||
auto file_data = Jdd::ResourceHelper::loadFile(file_path);
|
||||
auto file_data = Resource::Helper::loadFile(file_path);
|
||||
|
||||
if (!file_data.empty()) {
|
||||
// Convert bytes to string and parse
|
||||
@@ -992,7 +992,7 @@ auto Room::loadRoomFile(const std::string& file_path, bool verbose) -> Data {
|
||||
room.number = FILE_NAME.substr(0, FILE_NAME.find_last_of('.'));
|
||||
|
||||
// Load file using ResourceHelper (supports both filesystem and pack)
|
||||
auto file_data = Jdd::ResourceHelper::loadFile(file_path);
|
||||
auto file_data = Resource::Helper::loadFile(file_path);
|
||||
|
||||
if (!file_data.empty()) {
|
||||
// Convert bytes to string and parse
|
||||
|
||||
Reference in New Issue
Block a user