Added some more comments.
- Commented the data structures in areadata.h and gamelogic.h.
This commit is contained in:
parent
d0e4a8f9fc
commit
602f177a8f
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue