mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
ZVISION: Fix how LeverControl return routes are parsed
This commit is contained in:
parent
94f350b154
commit
97b0d5988a
@ -153,7 +153,7 @@ void LeverControl::parseLevFile(const Common::String &fileName) {
|
||||
_frameInfo[frameNumber].hotspot.bottom = y + _hotspotDelta.y;
|
||||
}
|
||||
|
||||
Common::StringTokenizer tokenizer(line, " ^=");
|
||||
Common::StringTokenizer tokenizer(line, " ^=()");
|
||||
tokenizer.nextToken();
|
||||
tokenizer.nextToken();
|
||||
|
||||
@ -168,8 +168,11 @@ void LeverControl::parseLevFile(const Common::String &fileName) {
|
||||
|
||||
_frameInfo[frameNumber].directions.push_back(Direction(angle, toFrame));
|
||||
} else if (token.hasPrefix("P")) {
|
||||
uint to;
|
||||
sscanf(token.c_str(), "P(%*u to %u)", &to);
|
||||
// Format: P(<from> to <to>)
|
||||
tokenizer.nextToken();
|
||||
tokenizer.nextToken();
|
||||
token = tokenizer.nextToken();
|
||||
uint to = atoi(token.c_str());
|
||||
|
||||
_frameInfo[frameNumber].returnRoute.push_back(to);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user