ScummVM API documentation
appleIIgs_timedelay_overwrite.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef AGI_APPLEIIGS_DELAY_OVERWRITE_H
23 #define AGI_APPLEIIGS_DELAY_OVERWRITE_H
24 
25 namespace Agi {
26 
28  int16 fromRoom;
29  int16 toRoom;
30  int16 activePictureNr; // resource number of current active background picture
31  int16 timeDelayOverwrite; // time delay here is like on PC
32  // so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles, -1 means do not touch speed set by scripts
33  bool onlyWhenPlayerNotInControl; // only sets speed, when play is not in control
34 };
35 
37  uint32 gameId;
38  int16 defaultTimeDelayOverwrite; // time delay here is like on PC
39  // so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles, -1 means do not touch speed set by scripts
40  const AgiAppleIIgsDelayOverwriteRoomEntry *roomTable; // pointer to room table (optional)
41 };
42 
43 static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteKQ4[] = {
44  { 120, 121, -1, -1, true }, // Part of the intro: Graham gets his hat, throws it and breaks down, don't touch speed (3 is set)
45  { 128, 128, -1, -1, true }, // Part of the intro: first actual room for gameplay, but during intro, don't touch speed (3 is set)
46  { 92, 92, -1, -1, true }, // Part of caught by gargoyle w/ Lolotte cutscene (3 is set)
47  // room 54 sets the speed for a short time to 3 right after entering "clean" command. It doesn't seem to hurt that we switch it down to 2
48  // room 92 is dual use, part of cutscenes, part of gameplay, that's why we only stop touching it, when player is not in control
49  { 135, 135, -1, -1, true }, // Part of ending cutscene. Don't touch speed (3 is set)
50  { -1, -1, -1, -1, false }
51 };
52 
53 static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteMH1[] = {
54  //{ 153, 153, -1, 2, false }, // Intro w/ credits
55  //{ 104, 104, -1, 2, false }, // Intro cutscene
56  //{ 117, 117, -1, 2, false }, // Intro cutscene (ego waking up)
57  { 114, 114, -1, -1, false }, // interactive MAD map
58  { 124, 125, -1, -1, false }, // MAD during intro (tracking), seem to work properly at given speed
59  { 132, 133, -1, -1, false }, // MAD day 2 intro (tracking)
60  { 137, 137, 17, -1, false }, // Night Club 4th arcade game - game sets speed to 7, needs to run that slow to be playable
61  { 137, 137, -1, 4, false }, // Night Club first few arcade games - game sets speed to 0, we need to fix it
62  { 115, 116, -1, -1, false }, // MAD day 3 intro (tracking)
63  { 148, 148, -1, -1, false }, // day 3: arcade sequence under pawn shop (game sets speed to 6)
64  { 103, 103, -1, -1, false }, // MAD day 4 intro (tracking)
65  { 105, 105, -1, -1, false }, // day 4 tracking mini game right at the start (game sets speed to 3)
66  { 107, 107, -1, -1, false }, // MAD day 4 intro (tracking)
67  { 112, 112, -1, -1, false }, // MAD day 4 intro (tracking)
68  { -1, -1, -1, -1, false }
69 };
70 
71 static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteMIXEDUP[] = {
72  { 1, 1, -1, 3, true }, // Jack and Jill cutscene (issue 11210)
73  { -1, -1, -1, -1, false }
74 };
75 
76 
77 static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteSQ2[] = {
78  { 1, 1, -1, -1, false }, // Intro: space ship entering space port, don't touch speed
79  { -1, -1, -1, -1, false }
80 };
81 
82 static const AgiAppleIIgsDelayOverwriteGameEntry appleIIgsDelayOverwriteGameTable[] = {
83  { GID_BC, 2, nullptr }, // sets the speed at the start and doesn't modify it
84  { GID_GOLDRUSH, 2, nullptr },
85  { GID_KQ1, 2, nullptr },
86  // KQ2 seems to work fine at speed given by scripts
87  { GID_KQ3, 2, nullptr },
88  { GID_KQ4, 2, appleIIgsDelayOverwriteKQ4 },
89  { GID_LSL1, 2, nullptr }, // Switch Larry 1 to 10 cycles per second (that's around PC Larry 1's "normal" speed
90  { GID_MH1, 2, appleIIgsDelayOverwriteMH1 },
91  { GID_MIXEDUP, 2, appleIIgsDelayOverwriteMIXEDUP },
92  { GID_PQ1, 2, nullptr },
93  { GID_SQ1, 2, nullptr }, // completed, no issues using these settings
94  { GID_SQ2, 2, appleIIgsDelayOverwriteSQ2 },
95  { GID_AGIDEMO, -1, nullptr }
96 };
97 
98 static const AgiAppleIIgsDelayOverwriteGameEntry *getAppleIIgsDelayOverwriteGameEntry(uint32 gameId) {
99  const AgiAppleIIgsDelayOverwriteGameEntry *appleIIgsDelayOverwrite = appleIIgsDelayOverwriteGameTable;
100  while (appleIIgsDelayOverwrite->gameId != GID_AGIDEMO) {
101  if (appleIIgsDelayOverwrite->gameId == gameId)
102  break; // game found
103  appleIIgsDelayOverwrite++;
104  }
105  return appleIIgsDelayOverwrite;
106 }
107 
108 } // End of namespace Agi
109 
110 #endif /* AGI_APPLEIIGS_DELAY_OVERWRITE_H */
Definition: appleIIgs_timedelay_overwrite.h:27
Definition: appleIIgs_timedelay_overwrite.h:36
Definition: agi.h:63