mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
DGDS: Fix reading per-scene globals
The functions that were passed to the constructor would not be called in the order that they appear, causing the globals list to be initialized incorrectly
This commit is contained in:
parent
5ddc825c2c
commit
8459c6f277
@ -1647,8 +1647,11 @@ void GDSScene::initIconSizes() {
|
||||
|
||||
bool GDSScene::readPerSceneGlobals(Common::SeekableReadStream *s) {
|
||||
uint16 numGlobals = s->readUint16LE();
|
||||
uint16 num, scene;
|
||||
for (uint16 i = 0; i < numGlobals; i++) {
|
||||
_perSceneGlobals.push_back(PerSceneGlobal(s->readUint16LE(), s->readUint16LE()));
|
||||
num = s->readUint16LE();
|
||||
scene = s->readUint16LE();
|
||||
_perSceneGlobals.push_back(PerSceneGlobal(num, scene));
|
||||
_perSceneGlobals.back()._val = s->readSint16LE();
|
||||
}
|
||||
return !s->err();
|
||||
|
Loading…
Reference in New Issue
Block a user