aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/people.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r--engines/dreamweb/people.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 4d66134e96..a6ebbcc1ec 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) {
@@ -273,7 +271,7 @@ void DreamBase::sparky(ReelRoutine &routine) {
if (data.word(kCard1money))
routine.b7 = 3;
if (checkSpeed(routine)) {
- if (routine.reelPointer() != 34) {
+ if (routine.reelPointer() == 34) {
if (engine->randomNumber() < 30)
routine.incReelPointer();
else
@@ -923,7 +921,7 @@ void DreamBase::mugger(ReelRoutine &routine) {
const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0);
uint16 y = 104;
printDirect(&string, 33 + 20, &y, 241, 241 & 1);
- workToScreenCPP();
+ workToScreen();
hangOn(300);
routine.setReelPointer(140);
data.byte(kManspath) = 2;
@@ -1032,7 +1030,7 @@ void DreamBase::endGameSeq(ReelRoutine &routine) {
if (routine.reelPointer() == 145) {
routine.setReelPointer(146);
- rollEndCredits();
+ rollEndCreditsGameWon();
}
}