diff options
Diffstat (limited to 'engines/xeen/scripts.h')
-rw-r--r-- | engines/xeen/scripts.h | 143 |
1 files changed, 88 insertions, 55 deletions
diff --git a/engines/xeen/scripts.h b/engines/xeen/scripts.h index f2ffc90b5f..cd548f8516 100644 --- a/engines/xeen/scripts.h +++ b/engines/xeen/scripts.h @@ -158,149 +158,182 @@ private: /** * Handles executing a given script command */ - void doOpcode(MazeEvent &event); + bool doOpcode(MazeEvent &event); + + /** + * Do nothing + */ + bool cmdDoNothing(Common::Array<byte> ¶ms); /** * Display a msesage on-screen */ - void cmdDisplay1(Common::Array<byte> ¶ms); + bool cmdDisplay1(Common::Array<byte> ¶ms); /** * Displays a door text message using the small font */ - void cmdDoorTextSml(Common::Array<byte> ¶ms); + bool cmdDoorTextSml(Common::Array<byte> ¶ms); /** * Displays a door text message using the large font */ - void cmdDoorTextLrg(Common::Array<byte> ¶ms); + bool cmdDoorTextLrg(Common::Array<byte> ¶ms); /** * Show a sign text on-screen */ - void cmdSignText(Common::Array<byte> ¶ms); - void cmdNPC(Common::Array<byte> ¶ms); + bool cmdSignText(Common::Array<byte> ¶ms); + + /** + * Show an NPC interaction message + */ + bool cmdNPC(Common::Array<byte> ¶ms); /** * Play a sound FX */ - void cmdPlayFX(Common::Array<byte> ¶ms); - void cmdTeleport(Common::Array<byte> ¶ms); + bool cmdPlayFX(Common::Array<byte> ¶ms); + + /** + * Handles teleportation + */ + bool cmdTeleport(Common::Array<byte> ¶ms); /** * Do a conditional check */ - void cmdIf(Common::Array<byte> ¶ms); + bool cmdIf(Common::Array<byte> ¶ms); /** * Moves the position of an object */ - void cmdMoveObj(Common::Array<byte> ¶ms); - void cmdTakeOrGive(Common::Array<byte> ¶ms); + bool cmdMoveObj(Common::Array<byte> ¶ms); + + /** + * Take or give amounts from various character or party figures + */ + bool cmdTakeOrGive(Common::Array<byte> ¶ms); /** - * Move to the next line of the script + * Removes an object from the playfield */ - void cmdNoAction(Common::Array<byte> ¶ms); - void cmdRemove(Common::Array<byte> ¶ms); + bool cmdRemove(Common::Array<byte> ¶ms); /** * Set the currently active character for other script operations */ - void cmdSetChar(Common::Array<byte> ¶ms); + bool cmdSetChar(Common::Array<byte> ¶ms); /** * Spawn a monster */ - void cmdSpawn(Common::Array<byte> ¶ms); - void cmdDoTownEvent(Common::Array<byte> ¶ms); + bool cmdSpawn(Common::Array<byte> ¶ms); + + /** + * Does various things that can be done within towns, like visiting + * banks, guilds, etc. + */ + bool cmdDoTownEvent(Common::Array<byte> ¶ms); /** * Stop executing the script */ - void cmdExit(Common::Array<byte> ¶ms); + bool cmdExit(Common::Array<byte> ¶ms); /** * Changes the value for the wall on a given cell */ - void cmdAlterMap(Common::Array<byte> ¶ms); - void cmdGiveExtended(Common::Array<byte> ¶ms); - void cmdConfirmWord(Common::Array<byte> ¶ms); - void cmdDamage(Common::Array<byte> ¶ms); + bool cmdAlterMap(Common::Array<byte> ¶ms); + + /** + * + */ + bool cmdGiveExtended(Common::Array<byte> ¶ms); + + /** + * Confirms with the player for initiating the endgame + */ + bool cmdConfirmEnding(Common::Array<byte> ¶ms); + + /** + * Deals damage to a character + */ + bool cmdDamage(Common::Array<byte> ¶ms); /** * Jump if a random number matches a given value */ - void cmdJumpRnd(Common::Array<byte> ¶ms); + bool cmdJumpRnd(Common::Array<byte> ¶ms); /** * Alter an existing event */ - void cmdAlterEvent(Common::Array<byte> ¶ms); + bool cmdAlterEvent(Common::Array<byte> ¶ms); /** * Stores the current location and line for later resuming, and set up to execute * a script at a given location */ - void cmdCallEvent(Common::Array<byte> ¶ms); + bool cmdCallEvent(Common::Array<byte> ¶ms); /** * Return from executing a script to the script location that previously * called the script */ - void cmdReturn(Common::Array<byte> ¶ms); - void cmdSetVar(Common::Array<byte> ¶ms); - void cmdCutsceneEndClouds(Common::Array<byte> ¶ms); - void cmdWhoWill(Common::Array<byte> ¶ms); - void cmdRndDamage(Common::Array<byte> ¶ms); - void cmdMoveWallObj(Common::Array<byte> ¶ms); - void cmdAlterCellFlag(Common::Array<byte> ¶ms); - void cmdAlterHed(Common::Array<byte> ¶ms); - void cmdDisplayStat(Common::Array<byte> ¶ms); - void cmdSeatTextSml(Common::Array<byte> ¶ms); - void cmdPlayEventVoc(Common::Array<byte> ¶ms); - void cmdDisplayBottom(Common::Array<byte> ¶ms); - void cmdIfMapFlag(Common::Array<byte> ¶ms); - void cmdSelRndChar(Common::Array<byte> ¶ms); - void cmdGiveEnchanted(Common::Array<byte> ¶ms); - void cmdItemType(Common::Array<byte> ¶ms); + bool cmdReturn(Common::Array<byte> ¶ms); + bool cmdSetVar(Common::Array<byte> ¶ms); + bool cmdCutsceneEndClouds(Common::Array<byte> ¶ms); + bool cmdWhoWill(Common::Array<byte> ¶ms); + bool cmdRndDamage(Common::Array<byte> ¶ms); + bool cmdMoveWallObj(Common::Array<byte> ¶ms); + bool cmdAlterCellFlag(Common::Array<byte> ¶ms); + bool cmdAlterHed(Common::Array<byte> ¶ms); + bool cmdDisplayStat(Common::Array<byte> ¶ms); + bool cmdSeatTextSml(Common::Array<byte> ¶ms); + bool cmdPlayEventVoc(Common::Array<byte> ¶ms); + bool cmdDisplayBottom(Common::Array<byte> ¶ms); + bool cmdIfMapFlag(Common::Array<byte> ¶ms); + bool cmdSelRndChar(Common::Array<byte> ¶ms); + bool cmdGiveEnchanted(Common::Array<byte> ¶ms); + bool cmdItemType(Common::Array<byte> ¶ms); /** * Disable all the scripts at the party's current position */ - void cmdMakeNothingHere(Common::Array<byte> ¶ms); - void cmdCheckProtection(Common::Array<byte> ¶ms); + bool cmdMakeNothingHere(Common::Array<byte> ¶ms); + bool cmdCheckProtection(Common::Array<byte> ¶ms); /** * Given a number of options, and a list of line numbers associated with * those options, jumps to whichever line for the option the user selects */ - void cmdChooseNumeric(Common::Array<byte> ¶ms); - void cmdDisplayBottomTwoLines(Common::Array<byte> ¶ms); - void cmdDisplayLarge(Common::Array<byte> ¶ms); + bool cmdChooseNumeric(Common::Array<byte> ¶ms); + bool cmdDisplayBottomTwoLines(Common::Array<byte> ¶ms); + bool cmdDisplayLarge(Common::Array<byte> ¶ms); /** * Exchange the positions of two objects in the maze */ - void cmdExchObj(Common::Array<byte> ¶ms); - void cmdFallToMap(Common::Array<byte> ¶ms); - void cmdDisplayMain(Common::Array<byte> ¶ms); + bool cmdExchObj(Common::Array<byte> ¶ms); + bool cmdFallToMap(Common::Array<byte> ¶ms); + bool cmdDisplayMain(Common::Array<byte> ¶ms); /** * Jumps to a given line number if the surface at relative cell position 1 matches * a specified surface. * @remarks This opcode is apparently never actually used */ - void cmdGoto(Common::Array<byte> ¶ms); + bool cmdGoto(Common::Array<byte> ¶ms); /** * Pick a random value from the parameter list and jump to that line number */ - void cmdGotoRandom(Common::Array<byte> ¶ms); - void cmdCutsceneEndDarkside(Common::Array<byte> ¶ms); - void cmdCutsceneEdWorld(Common::Array<byte> ¶ms); - void cmdFlipWorld(Common::Array<byte> ¶ms); - void cmdPlayCD(Common::Array<byte> ¶ms); + bool cmdGotoRandom(Common::Array<byte> ¶ms); + bool cmdCutsceneEndDarkside(Common::Array<byte> ¶ms); + bool cmdCutsceneEdWorld(Common::Array<byte> ¶ms); + bool cmdFlipWorld(Common::Array<byte> ¶ms); + bool cmdPlayCD(Common::Array<byte> ¶ms); int whoWill(int v1, int v2, int v3); |