Add documentation
This commit is contained in:
parent
62853bcedc
commit
c6063e28a4
47 changed files with 1011 additions and 148750 deletions
|
|
@ -16,12 +16,12 @@
|
|||
#include "prototype.h"
|
||||
|
||||
|
||||
// Objects (they could have been called GameObjects) have a simple
|
||||
// hierarchy. A prototype/flyweight motivated system is used.
|
||||
// Each type has some common data and methods which are stored
|
||||
// in their respective prototype.
|
||||
// This module provides us with the methods to easily and mostly
|
||||
// transparently access an object's prototype.
|
||||
/// Objects (they could have been called GameObjects) have a simple
|
||||
/// hierarchy. A prototype/flyweight motivated system is used.
|
||||
/// Each type has some common data and methods which are stored
|
||||
/// in their respective prototype.
|
||||
/// This module provides us with the methods to easily and mostly
|
||||
/// transparently access an object's prototype.
|
||||
|
||||
|
||||
typedef union {
|
||||
|
|
@ -39,30 +39,30 @@ struct _object_t {
|
|||
object_specific_data_t as;
|
||||
};
|
||||
|
||||
// Set the prototype of the holder and initialize all the holder's
|
||||
// vale to zero. Return the freshly updated holder
|
||||
/// Set the prototype of the holder and initialize all the holder's
|
||||
/// vale to zero. Return the freshly updated holder
|
||||
Object* createObject(Prototype const* prototype, Object* holder);
|
||||
|
||||
// Call the tick function referenced in the object's prototype
|
||||
// on the object itself
|
||||
// Object might react to the elapsed time.
|
||||
// Does nothing when called with NULL.
|
||||
/// Call the tick function referenced in the object's prototype
|
||||
/// on the object itself
|
||||
/// Object might react to the elapsed time.
|
||||
/// Does nothing when called with NULL.
|
||||
void tickObject(Object* object, uint8_t previousFrameTime);
|
||||
|
||||
// Call the draw function referenced in the object's prototype
|
||||
// on the object itself.
|
||||
// Does nothing when called with NULL.
|
||||
/// Call the draw function referenced in the object's prototype
|
||||
/// on the object itself.
|
||||
/// Does nothing when called with NULL.
|
||||
void drawObject(Object* object, Rectangle compositingWindow);
|
||||
|
||||
// Find out the prototype of the object and return the size of that
|
||||
/// Find out the prototype of the object and return the size of that
|
||||
Vec2 getSize(Object const* object);
|
||||
Vec2 getSizeFromPrototype(Prototype const* prototype);
|
||||
|
||||
// Move the position of the object by a vector
|
||||
/// Move the position of the object by a vector
|
||||
void move(Object* object, Vec2 value);
|
||||
|
||||
// Get a new rectangle from the objects position and its
|
||||
// prototype's size
|
||||
/// Get a new rectangle from the objects position and its
|
||||
/// prototype's size
|
||||
Rectangle getBoundingBox(Object const* object);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue