Skip to content

Commit

Permalink
TETRAEDGE: Fix missing scene object textures.
Browse files Browse the repository at this point in the history
Fixes missing textures caused by empty path returned from
Common::Path::getParent().

https://bugs.scummvm.org/ticket/14418
  • Loading branch information
Deledrius authored and mduggan committed Sep 8, 2023
1 parent 61c4fe2 commit 6452300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/tetraedge/game/in_game_scene.cpp
Expand Up @@ -688,7 +688,7 @@ bool InGameScene::load(const Common::FSNode &sceneNode) {
return false;

close();
_loadedPath = sceneNode.getPath();
_loadedPath = sceneNode.getParent().getPath();
Common::File scenefile;
if (!scenefile.open(sceneNode))
return false;
Expand Down Expand Up @@ -1026,7 +1026,7 @@ bool InGameScene::loadObjectMaterials(const Common::String &name) {
if (obj._name.empty())
continue;

Common::Path mpath = _loadedPath.getParent().join(name).join(obj._name + ".png");
Common::Path mpath = _loadedPath.join(name).join(obj._name + ".png");
if (img.load(core->findFile(mpath))) {
Te3DTexture *tex = Te3DTexture::makeInstance();
tex->load(img);
Expand Down

0 comments on commit 6452300

Please sign in to comment.