diff options
author | Willem Jan Palenstijn | 2011-12-23 19:13:42 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-23 19:15:25 +0100 |
commit | 0f36350e03c69ce605fde1277118c43487f724af (patch) | |
tree | 15431ddc2de6a52ef66ef6686c95886db7875150 /engines/dreamweb/people.cpp | |
parent | c4af50ae63fc93e221306440fee0337a77059295 (diff) | |
download | scummvm-rg350-0f36350e03c69ce605fde1277118c43487f724af.tar.gz scummvm-rg350-0f36350e03c69ce605fde1277118c43487f724af.tar.bz2 scummvm-rg350-0f36350e03c69ce605fde1277118c43487f724af.zip |
DREAMWEB: Fix regression from moving ReelRoutines out of data
The struct People still had an old-style pointer to a ReelRoutine.
Fix this by converting People to use a real ReelRoutine * and moving
the PeopleList from the buffers segment to a Common::List.
Thanks to digitall for the assistance with tracking this down.
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r-- | engines/dreamweb/people.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 1e79471a65..32fbbc04e5 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -129,8 +129,7 @@ void DreamBase::setupInitialReelRoutines() { } void DreamBase::updatePeople() { - data.word(kListpos) = kPeoplelist; - memset(getSegment(data.word(kBuffers)).ptr(kPeoplelist, 12 * sizeof(People)), 0xff, 12 * sizeof(People)); + _peopleList.clear(); ++data.word(kMaintimer); for (int i = 0; _reelRoutines[i].reallocation != 255; ++i) { @@ -220,13 +219,12 @@ void DreamBase::madMode() { } void DreamBase::addToPeopleList(ReelRoutine *routine) { - uint16 routinePointer = (const uint8 *)routine - data.ptr(0, 0); + People people; + people._reelPointer = routine->reelPointer(); + people._routinePointer = routine; + people.b4 = routine->b7; - People *people = (People *)getSegment(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People)); - people->setReelPointer(routine->reelPointer()); - people->setRoutinePointer(routinePointer); - people->b4 = routine->b7; - data.word(kListpos) += sizeof(People); + _peopleList.push_back(people); } bool DreamBase::checkSpeed(ReelRoutine &routine) { |