[Scummvm-git-logs] scummvm master -> 5157368a9e5788672b8635b989a46c135638712b
dreammaster
noreply at scummvm.org
Wed Sep 4 01:57:58 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5157368a9e NUVIE: Allow custom_tiles.bmp to load from game dir mods/custom_tiles.bmp
Commit: 5157368a9e5788672b8635b989a46c135638712b
https://github.com/scummvm/scummvm/commit/5157368a9e5788672b8635b989a46c135638712b
Author: Eric Fry (yuv422 at reversedgames.com)
Date: 2024-09-03T18:57:54-07:00
Commit Message:
NUVIE: Allow custom_tiles.bmp to load from game dir mods/custom_tiles.bmp
Changed paths:
engines/ultima/nuvie/actors/actor_manager.cpp
engines/ultima/nuvie/actors/actor_manager.h
engines/ultima/nuvie/conf/configuration.h
diff --git a/engines/ultima/nuvie/actors/actor_manager.cpp b/engines/ultima/nuvie/actors/actor_manager.cpp
index 063ae4c0fa0..44333b43fc4 100644
--- a/engines/ultima/nuvie/actors/actor_manager.cpp
+++ b/engines/ultima/nuvie/actors/actor_manager.cpp
@@ -1073,10 +1073,6 @@ void ActorManager::set_combat_movement(bool c) {
}
bool ActorManager::loadCustomTiles(nuvie_game_t game_type) {
- if (obj_manager->use_custom_actor_tiles() == false) {
- return false;
- }
-
Common::Path datadir = "images";
Common::Path path;
@@ -1087,19 +1083,22 @@ bool ActorManager::loadCustomTiles(nuvie_game_t game_type) {
tile_manager->freeCustomTiles(); //FIXME this might need to change if we start using custom tiles outside of ActorManager. eg custom map/object tilesets
- loadCustomBaseTiles(datadir);
- loadAvatarTiles(datadir);
- loadNPCTiles(datadir);
+ loadCustomBaseTiles();
+ if (obj_manager->use_custom_actor_tiles()) {
+ loadAvatarTiles(datadir);
+ loadNPCTiles(datadir);
+ }
return true;
}
-void ActorManager::loadCustomBaseTiles(const Common::Path &datadir) {
+void ActorManager::loadCustomBaseTiles() {
+ Common::Path datadir = "mods";
Common::Path imagefile;
build_path(datadir, "custom_tiles.bmp", imagefile);
//attempt to load custom base tiles if the file exists.
- tile_manager->loadCustomTiles(Game::get_game()->get_data_file_path(imagefile), true, true, 0);
+ tile_manager->loadCustomTiles(imagefile, true, true, 0);
}
void ActorManager::loadAvatarTiles(const Common::Path &datadir) {
diff --git a/engines/ultima/nuvie/actors/actor_manager.h b/engines/ultima/nuvie/actors/actor_manager.h
index fe102b37d5e..68c51dc2280 100644
--- a/engines/ultima/nuvie/actors/actor_manager.h
+++ b/engines/ultima/nuvie/actors/actor_manager.h
@@ -163,7 +163,7 @@ private:
bool loadCustomTiles(nuvie_game_t game_type);
void loadNPCTiles(const Common::Path &datadir);
void loadAvatarTiles(const Common::Path &datadir);
- void loadCustomBaseTiles(const Common::Path &datadir);
+ void loadCustomBaseTiles();
Std::set<Std::string> getCustomTileFilenames(const Common::Path &datadir, const Std::string &filenamePrefix);
};
diff --git a/engines/ultima/nuvie/conf/configuration.h b/engines/ultima/nuvie/conf/configuration.h
index 8ab38024c02..4a4a973b7e2 100644
--- a/engines/ultima/nuvie/conf/configuration.h
+++ b/engines/ultima/nuvie/conf/configuration.h
@@ -44,7 +44,7 @@ class ConfigNode;
* Configuration values are stored in one of two ways -either as a standalone
* nuvie.cfg file, or otherwise from the ScummVM domain for the added game.
*
- * WHen the nuvie.cfg file is present, it's contents are stored as an XML tree
+ * When the nuvie.cfg file is present, it's contents are stored as an XML tree
* (or a forest, technically). All values are stored as strings, but access
* functions for ints and bools are provided
* You should only store values in leaf nodes. (This isn't enforced everywhere,
More information about the Scummvm-git-logs
mailing list