From 87dd644be6bf895dd931fcf8854c4b102833ab3c Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 21 May 2012 10:25:22 +0200 Subject: [PATCH] moar documentation --- Doxyfile | 4 ++-- src/levels/actions.h | 13 +++++++++++++ src/levels/callbacks.h | 2 ++ src/main.c | 1 + src/timeline.c | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Doxyfile b/Doxyfile index 556bc9a..56c1cb1 100644 --- a/Doxyfile +++ b/Doxyfile @@ -98,10 +98,10 @@ WARN_LOGFILE = INPUT = src INPUT_ENCODING = UTF-8 FILE_PATTERNS = -RECURSIVE = NO +RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = src/data/* EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = diff --git a/src/levels/actions.h b/src/levels/actions.h index 3a9f1ff..080e86f 100644 --- a/src/levels/actions.h +++ b/src/levels/actions.h @@ -22,28 +22,41 @@ #include "../main.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); +/*! \brief Accelerate current speed game until threshold is reached */ 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); +/*! \brief Move screen until some position is reached. */ 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); +/*! \brief Fly Derpy, fly! */ 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); +/*! \brief Stops Derpy. */ 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); +/*! \brief Fade-in screen. */ 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); +/*! \brief Show welcome screen (for instance "Level 1: Fluttershy"). */ 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); diff --git a/src/levels/callbacks.h b/src/levels/callbacks.h index b51797a..a988977 100644 --- a/src/levels/callbacks.h +++ b/src/levels/callbacks.h @@ -21,6 +21,8 @@ #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); +/*! \brief Move in sinusoidal way in Y-axis relative to position at beginning. */ void Obst_MoveSin(struct Game *game, struct Obstacle *obstacle); diff --git a/src/main.c b/src/main.c index 6729d90..515c226 100644 --- a/src/main.c +++ b/src/main.c @@ -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) { if ((al_get_bitmap_width(source)==width) && (al_get_bitmap_height(source)==height)) { al_draw_bitmap(source, 0, 0, 0); diff --git a/src/timeline.c b/src/timeline.c index 03ea1e4..bf56c63 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -199,6 +199,7 @@ struct TM_Action* TM_AddBackgroundAction(bool (*func)(struct Game*, struct TM_Ac return action; } +/*! \brief Predefined action used by TM_AddQueuedBackgroundAction */ bool runinbackground(struct Game* game, struct TM_Action* action, enum TM_ActionState state) { if (state != TM_ACTIONSTATE_RUNNING) return false; float* delay = (float*) action->arguments->next->value;