aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-07 08:49:56 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-07 08:49:56 -0500
commitfdd51ab588a2ec9fca54215039803d187a10178e (patch)
tree751708a7602879bf644076f605a0f44db69cd8d8 /include
parent43403a16cd3c625906a6d5417d2108df1ddfb6ce (diff)
doxygen
Diffstat (limited to 'include')
-rw-r--r--include/world.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/include/world.h b/include/world.h
index 8aaba0c..083474a 100644
--- a/include/world.h
+++ b/include/world.h
@@ -78,26 +78,38 @@ protected:
int x_start;
/**
- *
+ * Handle physics for a single entity.
+ * This function handles gravity and death for an entity. The public version
+ * of this, World::detect(), handles all entities in the world as well as
+ * the player. World::singleDetect() should never be used outside of
+ * World::detect(), which is why it is declared private.
*/
void singleDetect(Entity *e);
- /*
- * Deletes all entities in the world.
- */
+ /**
+ * Empties all entity vectors.
+ * Each entity vector is iterated through, calling delete for each entry.
+ * Once all specific vectors are cleared, the general entity vector is
+ * emptied of the pointers to those other vectors. This function should only
+ * be called in World's destructor, as there shouldn't be another reason to
+ * call this function.
+ */
void deleteEntities(void);
- /*
- * The size of the line array. This is set once by World->generate().
- */
+ /**
+ * Number of lines in the world.
+ * While this number is helpful for knowing the world's width, it is kept
+ * private for security reasons. To compensate for this,
+ * World::getTheWidth() is provided (see below).
+ */
unsigned int lineCount;
- /*
- * Contains the background image layers (including the background image).
- */
+ /**
+ * An array of star coordinates.
+ */
vec2 *star;