115 | | These probably implement the game logic. |
116 | | |
117 | | CONDSAL is the scripts for each room. I guess this because it has the same number of toplevel chunks as MSG.DAT, and also because "SAL" can be for "salles" (French for "rooms"). |
118 | | |
119 | | CONDGALE may be "conditions générales" and associated with MSGGEN.DAT? |
| 115 | These implement the game logic. |
| 116 | |
| 117 | CONDSAL is the scripts for each room. I found this because it has the same number of toplevel chunks as MSG.DAT, and also because "SAL" can be for "salles" (French for "rooms"). |
| 118 | |
| 119 | CONDGALE may be "conditions générales" and associated with MSGGEN.DAT? It contains the initialization script that is run at the start of the game and a few other global things. |
168 | | ==== 0E: ?? |
| 186 | ==== 0E xx: Check global event |
| 187 | |
| 188 | Check global events, for example event 00 is the start of the game. |
| 189 | |
| 190 | ==== 7E: Or |
| 191 | |
| 192 | Used to combine multiple conditions (0D, 09, 0A, ...) |
| 193 | |
| 194 | ==== 7F: And? |
| 195 | |
| 196 | Probably And, also used to combine several conditions. |
| 197 | |
| 198 | ==== 80 xx: ? |
| 199 | |
| 200 | Currently unknown |
| 201 | |
| 202 | ==== 81 xx: Set flag |
| 203 | |
| 204 | Set flag xx |
| 205 | |
| 206 | ==== 82 xx: Clear flag |
| 207 | |
| 208 | Clear flag xx |
| 209 | |
| 210 | ==== 83 xx: Get item |
| 211 | |
| 212 | Add item number x to the player's inventory |
| 213 | |
| 214 | ==== 85 xx: Remove item |
| 215 | |
| 216 | Remove item from the inventory. |
| 217 | |
| 218 | ==== 87 xx yyyy: Set counter |
| 219 | |
| 220 | Set counter xx to value yyyy |
| 221 | |
| 222 | ==== 89 xx yyyy: Add to counter |
| 223 | |
| 224 | Add value yyyy to counter xx |
| 225 | |
| 226 | ==== 8A xx yyyy: Subtract from counter |
| 227 | |
| 228 | Subtract value yyyy from counter xx |
178 | | TODO parameter on 1 or 2 bytes? Probably 2. |
179 | | |
180 | | ==== 91 xx xx: ?? |
181 | | |
182 | | Followed by a 16 bit value |
183 | | |
184 | | ==== 93 xx xx: ?? |
185 | | |
186 | | {{{93 01 00}}} |
| 238 | ==== 91 xx: Show global screen |
| 239 | |
| 240 | Show one of the global screens (from the unique room in MSGGEN). |
| 241 | |
| 242 | ==== 93 xx: WithScreen |
| 243 | |
| 244 | Combined with a "Go to room", allows to set the target screen in the new room |
| 245 | |
| 246 | ==== 95 xx yy: Initialize flag |
| 247 | |
| 248 | ==== A0 xx yyyy |
| 249 | |
| 250 | Compare counter xx with value yyyy. This triggers an evaluation of the scripts with matching of the corresponding IfLess/IfEqual operations |
| 251 | |
| 252 | ==== FA: stop interpreter |
| 253 | |
| 254 | Do not test the remaining script lines |
| 255 | |
| 256 | ==== FC: Game over |
| 257 | |
| 258 | Trigger the "game over" and stop interpreting. This will ask the user if they want to restart from the last saving point or from the start of the adventure. |
| 259 | |
| 260 | ==== FD: Continue |
| 261 | |
| 262 | Continue execution with the next script line. |
| 263 | |
| 264 | ==== FE xx: Goto |
| 265 | |
| 266 | Call script number xx in the current room |
| 267 | |
| 268 | ==== FF: Winning the game |
| 269 | |
| 270 | The game is won if you manage to execute this opcode! |