diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-08 18:23:50 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-08 18:23:50 -0400 |
commit | e39254e1157c557232ee521b25d2ba5a60fa7578 (patch) | |
tree | 4c3b934a775556b9c8678bfabcafc507dd9a5a4c /doc | |
parent | 60c7924097814686a2fb826b87fd7a3e1ff684de (diff) |
started official documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Quest.htm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/doc/Quest.htm b/doc/Quest.htm new file mode 100644 index 0000000..bc68644 --- /dev/null +++ b/doc/Quest.htm @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> + <title>Quest</title> + <style> + .code{ + background:#555; + color:white; + font-family:Consolas; + font-size:12px; + margin:auto 20px; + padding:20px; + } + </style> +</head> +<body> + <h1>Quest</h1> + <hr> + <h2>Description</h2> + <p>Quest.h provides quest functionality, including the master list of quests and methods for the player to access them.</p> + <br> + <h3>class Quest</h3> + <div class="code"><b>public:</b><br> + char *title,*desc;<br> + unsigned int xp;<br> + Quest();<br> + Quest(const char *t,const char *d,unsigned int x);<br> + ~Quest(); + </div> + <ul> + <li>char *<b>title</b>: Points to a string containing the quest's title.</li> + <li>char *<b>desc</b>: Points to a string containing a description of the quest.</li> + <li>unsigned int <b>xp</b>: Contains the amount of XP rewarded upon quest completion.</li> + <li><b>Quest()</b>: Initializes a blank quest.</li> + <li><b>Quest(const char *t,const char *d,unsigned int x)</b>: Creates a quest with title <i>t</i>, description <i>d</i>, and a reward of <i>x</i> XP.</li> + <li><b> ~Quest()</b>: Frees memory previously used by the quest.</li> + </ul> + <h3>class QuestHandler</h3> + <div class="code"><b>private:</b><br> + unsigned char ccnt;<br> + Quest *current[];<br> +<b>public:</b><br> + QuestHandler();<br> + int assign(const char *t);<br> + int drop(const char *t);<br> + int finish(const char *t);<br> + </div> + <ul> + <li>unsigned char <b>ccnt</b>: Contains an index to the next free slot in current[].</li> + <li>Quest *<b>current[]</b>: Contains all current quests.</li> + <li><b>QuestHandler()</b>: Initializes a blank QuestHandler</li> + <li>int <b>assign(const char *t)</b>: Adds a quest with the name <i>t</i> to current[]. Returns -1 on error.</li> + <li>int <b>drop(const char *t)</b>: Drop a quest in current[] with the name <i>t</i>. Returns -1 on error.</li> + <li>int <b>finish(const char *t)</b>: Removes quest with name <i>t</i> from current[]. Returns quest's reward.</li> +</body> +</html> |