moar documentation

This commit is contained in:
Sebastian Krzyszkowiak 2012-05-21 10:25:22 +02:00
parent 50e9bb8815
commit 87dd644be6
5 changed files with 19 additions and 2 deletions

View file

@ -98,10 +98,10 @@ WARN_LOGFILE =
INPUT = src INPUT = src
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
FILE_PATTERNS = FILE_PATTERNS =
RECURSIVE = NO RECURSIVE = YES
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS = src/data/*
EXCLUDE_SYMBOLS = EXCLUDE_SYMBOLS =
EXAMPLE_PATH = EXAMPLE_PATH =
EXAMPLE_PATTERNS = EXAMPLE_PATTERNS =

View file

@ -22,28 +22,41 @@
#include "../main.h" #include "../main.h"
#include "../timeline.h" #include "../timeline.h"
/*! \brief Display level failed screen and set fade-out to be run after few seconds. */
bool LevelFailed(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool LevelFailed(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Accelerate current speed game until threshold is reached */
bool Accelerate(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Accelerate(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Set Derpy to walk and move her position on screen. */
bool Walk(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Walk(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Move screen until some position is reached. */
bool Move(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Move(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Fade-in HP meter. */
bool ShowMeter(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool ShowMeter(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Fly Derpy, fly! */
bool Fly(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Fly(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Generates obstracles. */
bool GenerateObstacles(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool GenerateObstacles(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Stops Derpy. */
bool Stop(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Stop(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Shows letter from Twilight on screen. */
bool Letter(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Letter(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Fade-in screen. */
bool FadeIn(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool FadeIn(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Fade-out screen. */
bool FadeOut(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool FadeOut(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Show welcome screen (for instance "Level 1: Fluttershy"). */
bool Welcome(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool Welcome(struct Game *game, struct TM_Action *action, enum TM_ActionState state);
/*! \brief Pass level and fade-out after few seconds. */
bool PassLevel(struct Game *game, struct TM_Action *action, enum TM_ActionState state); bool PassLevel(struct Game *game, struct TM_Action *action, enum TM_ActionState state);

View file

@ -21,6 +21,8 @@
#include "../main.h" #include "../main.h"
/*! \brief Move up or down until reaching the edge of the screen. After that - change direction. */
void Obst_MoveUpDown(struct Game *game, struct Obstacle *obstacle); void Obst_MoveUpDown(struct Game *game, struct Obstacle *obstacle);
/*! \brief Move in sinusoidal way in Y-axis relative to position at beginning. */
void Obst_MoveSin(struct Game *game, struct Obstacle *obstacle); void Obst_MoveSin(struct Game *game, struct Obstacle *obstacle);

View file

@ -173,6 +173,7 @@ void DrawGameState(struct Game *game) {
} }
} }
/*! \brief Scales bitmap using software linear filtering method to current target. */
void ScaleBitmap(ALLEGRO_BITMAP* source, int width, int height) { void ScaleBitmap(ALLEGRO_BITMAP* source, int width, int height) {
if ((al_get_bitmap_width(source)==width) && (al_get_bitmap_height(source)==height)) { if ((al_get_bitmap_width(source)==width) && (al_get_bitmap_height(source)==height)) {
al_draw_bitmap(source, 0, 0, 0); al_draw_bitmap(source, 0, 0, 0);

View file

@ -199,6 +199,7 @@ struct TM_Action* TM_AddBackgroundAction(bool (*func)(struct Game*, struct TM_Ac
return action; return action;
} }
/*! \brief Predefined action used by TM_AddQueuedBackgroundAction */
bool runinbackground(struct Game* game, struct TM_Action* action, enum TM_ActionState state) { bool runinbackground(struct Game* game, struct TM_Action* action, enum TM_ActionState state) {
if (state != TM_ACTIONSTATE_RUNNING) return false; if (state != TM_ACTIONSTATE_RUNNING) return false;
float* delay = (float*) action->arguments->next->value; float* delay = (float*) action->arguments->next->value;