Group_B_VirtualEscapeRoom
|
#include <stdio.h>
#include <string.h>
#include "arghandling.h"
#include "object.h"
#include "helper.h"
#include "puzzle.h"
Functions | |
bool | execute_leave () |
Executed when the player tries to leave the final stage. More... | |
void | execute_look (const char *arg) |
Executed when the player is trying to look around the stage. More... | |
void | execute_examine (const char *arg) |
Executed when the player is trying to examine an object to get more detail. More... | |
void | execute_read (const char *arg) |
Attempt to "read" an object with a given tag matching arg More... | |
void | execute_go (const char *arg) |
Executed when the player is trying to go to a new stage. More... | |
void | execute_get (const char *arg) |
Executed when the player tries to put a usable item into their bag. More... | |
void | execute_check (void) |
Executed when the player tries to check what they currently have in their bag. More... | |
void | execute_use (const char *arg) |
Executed when the player tries to use an item. More... | |
bool | execute_open (const char *arg) |
Executed when the player tries to open a door. More... | |
void | execute_map () |
Executed when player tries to view a map of the world. More... | |
void | execute_call (const char *arg) |
Executed when the player attempst to make a call (mostly used for calling a friend) More... | |
void | execute_help () |
Executed when the player needs directions for common commands. More... | |
void execute_call | ( | const char * | arg | ) |
Executed when the player attempst to make a call (mostly used for calling a friend)
Attempts a call. If arg
is "friend", triggers the start of puzzle 8, otherwise, prints an error message.
[in] | arg | Name to call. |
void execute_check | ( | void | ) |
Executed when the player tries to check what they currently have in their bag.
Prints a list of usable items in the current stage.
void execute_examine | ( | const char * | arg | ) |
Executed when the player is trying to examine an object to get more detail.
Gives more detail about a specific object. Objects are looked up by tag and matched against arg
.
[in] | arg | Tag of an object to retrieve and examine |
Trigger puzzle1
void execute_get | ( | const char * | arg | ) |
Executed when the player tries to put a usable item into their bag.
Attempts to put an item referred to by tag value arg
into the player's bag.
[in] | arg | Tag of an object to get |
Conditions for getting silver_key
Conditions for getting gold_key
Conditions for getting ruby_key
void execute_go | ( | const char * | arg | ) |
Executed when the player is trying to go to a new stage.
Attempts to move to a location specified by arg
. The location is looked up by tag value.
[in] | arg | Tag of a location to go to |
void execute_help | ( | void | ) |
Executed when the player needs directions for common commands.
Prints information on available commands.
bool execute_leave | ( | void | ) |
Executed when the player tries to leave the final stage.
Prints a congratulatory message if all three stages have been cleared. Otherwise, prints an error message.
void execute_look | ( | const char * | arg | ) |
Executed when the player is trying to look around the stage.
Gives some details about the current stage, by either specifying arg
as "around" or "closely". Does nothing useful when another string is passed.
[in] | arg | Either "around" or "closely" |
void execute_map | ( | void | ) |
Executed when player tries to view a map of the world.
Print out a textual representation of the game map, which lays out where stages are relative to eachother.
bool execute_open | ( | const char * | arg | ) |
Executed when the player tries to open a door.
Attempt to open door with tag arg
. This may do nothing useful if the door is locked.
[in] | arg | Tag of item to open |
void execute_read | ( | const char * | arg | ) |
Attempt to "read" an object with a given tag matching arg
Read is performed by printing out the object's detailed information, if the object is not hidden or otherwise inaccessible.
[in] | arg | Tag of an object to retrieve and read |
void execute_use | ( | const char * | arg | ) |
Executed when the player tries to use an item.
Attempt to use item with tag arg
. Does nothing useful if the item cannot be used.
[in] | arg | Tag of item to use |