Skip to content

Commit

Permalink
XEEN: Fix loading of event text in Darkside southern skyroad
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Apr 26, 2018
1 parent 72d9c94 commit beeddc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions engines/xeen/map.cpp
Expand Up @@ -713,7 +713,7 @@ void Map::load(int mapId) {
}

// Load any events for the new map
loadEvents(mapId);
loadEvents(mapId, _loadCcNum);

// Iterate through loading the given maze as well as the two successive
// mazes in each of the four cardinal directions
Expand Down Expand Up @@ -1069,19 +1069,19 @@ int Map::mazeLookup(const Common::Point &pt, int layerShift, int wallMask) {
}
}

void Map::loadEvents(int mapId) {
void Map::loadEvents(int mapId, int ccNum) {
// Load events
Common::String filename = Common::String::format("maze%c%03d.evt",
(mapId >= 100) ? 'x' : '0', mapId);
File fEvents(filename);
File fEvents(filename, ccNum);
XeenSerializer sEvents(&fEvents, nullptr);
_events.synchronize(sEvents);
fEvents.close();

// Load text data
filename = Common::String::format("aaze%c%03d.txt",
(mapId >= 100) ? 'x' : '0', mapId);
File fText(filename);
File fText(filename, ccNum);
_events._text.clear();
while (fText.pos() < fText.size())
_events._text.push_back(fText.readString());
Expand Down
2 changes: 1 addition & 1 deletion engines/xeen/map.h
Expand Up @@ -413,7 +413,7 @@ class Map {
/**
* Load the events for a new map
*/
void loadEvents(int mapId);
void loadEvents(int mapId, int ccNum);

/**
* Save the events for a map
Expand Down

0 comments on commit beeddc8

Please sign in to comment.