diff --git a/src/areadata.h b/src/areadata.h index e983019..327db34 100644 --- a/src/areadata.h +++ b/src/areadata.h @@ -9,30 +9,32 @@ // -=[ Area/Paths: ]=-: // ==================== +// Let the compiler know that we're going to define these types: typedef struct playerPath playerPath; typedef struct playerArea playerArea; +// A path, which contains a name, and a pointer to the area which the player will travel to: struct playerPath { char pathName[32]; playerArea * areaToJoin; }; +// An area, containing a list of paths exiting from the area, and a name and description of the area: struct playerArea { list * pathList; char areaName[32]; char areaDescription[MAX - 35]; -// playerPath * areaExits[16]; }; -// Create an area given a name and description: +// Create an area given a name and description, returning a pointer to the new area: playerArea * createArea(char * nameString, char * descriptionString); -// Create a path between two areas given two areas and two strings: +// Create a path between two areas given two areas and two strings, adding it to the both area's list of paths: int createPath(playerArea * fromArea, playerArea * toArea, char * fromDescription, char * toDescription); -// Create a one-way path between two areas given two areas and a string: +// Create a one-way path between two areas given two areas and a string, adding it to the first area's list of paths: int createOneWayPath(playerArea * fromArea, playerArea * toArea, char * description); // TO BE IMPLEMENTED: diff --git a/src/gamelogic.h b/src/gamelogic.h index 631ef6b..cc672e4 100644 --- a/src/gamelogic.h +++ b/src/gamelogic.h @@ -12,6 +12,7 @@ // -=[ Data Structures ]=-: // ======================== +// An event for storing the information typedef struct commandEvent commandEvent; typedef struct commandEvent { @@ -83,6 +84,7 @@ int evaluateNextCommand(gameLogicParameters * parameters, commandQueue * queue); // -=[ Gameplay Primitives ]=-: // ============================ +// The possible outcomes of a check or challenge: typedef enum outcome { CRITICAL_FAILURE,