mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 17:21:27 +01:00
moar docs
This commit is contained in:
parent
cd65b1d8e5
commit
50e9bb8815
2 changed files with 85 additions and 86 deletions
151
src/main.h
151
src/main.h
|
@ -155,39 +155,39 @@ enum menustate_enum {
|
||||||
|
|
||||||
/*! \brief Resources used by Menu state. */
|
/*! \brief Resources used by Menu state. */
|
||||||
struct Menu {
|
struct Menu {
|
||||||
ALLEGRO_BITMAP *menu_fade_bitmap;
|
ALLEGRO_BITMAP *menu_fade_bitmap; /*!< Screenshot bitmap used for fades. */
|
||||||
ALLEGRO_BITMAP *image;
|
ALLEGRO_BITMAP *image; /*!< Bitmap with lower portion of menu landscape. */
|
||||||
ALLEGRO_BITMAP *cloud;
|
ALLEGRO_BITMAP *cloud; /*!< Bitmap with bigger cloud. */
|
||||||
ALLEGRO_BITMAP *cloud2;
|
ALLEGRO_BITMAP *cloud2; /*!< Bitmap with small cloud. */
|
||||||
ALLEGRO_BITMAP *pie;
|
ALLEGRO_BITMAP *pie; /*!< Unscaled bitmap with pie. */
|
||||||
ALLEGRO_BITMAP *pie_bitmap;
|
ALLEGRO_BITMAP *pie_bitmap; /*!< Scaled and "rendered" bitmap with pies. */
|
||||||
ALLEGRO_BITMAP *pinkcloud_bitmap;
|
ALLEGRO_BITMAP *pinkcloud_bitmap; /*!< Scaled bitmap with pinkcloud and home. */
|
||||||
ALLEGRO_BITMAP *pinkcloud;
|
ALLEGRO_BITMAP *pinkcloud; /*!< Unscaled bitmap with pinkcloud and home. */
|
||||||
ALLEGRO_BITMAP *rain;
|
ALLEGRO_BITMAP *rain; /*!< Unscaled bitmap with rain drop. */
|
||||||
ALLEGRO_BITMAP *rain_bitmap;
|
ALLEGRO_BITMAP *rain_bitmap; /*!< Scaled and "rendered" bitmap with rain drops. */
|
||||||
ALLEGRO_BITMAP *mountain;
|
ALLEGRO_BITMAP *mountain; /*!< Flashing mountain in background bitmap. */
|
||||||
float cloud_position;
|
float cloud_position; /*!< Position of bigger cloud. */
|
||||||
float cloud2_position;
|
float cloud2_position; /*!< Position of small cloud. */
|
||||||
int mountain_position;
|
int mountain_position; /*!< Position of flashing mountain. */
|
||||||
ALLEGRO_SAMPLE *sample;
|
ALLEGRO_SAMPLE *sample; /*!< Background music sample. */
|
||||||
ALLEGRO_SAMPLE *rain_sample;
|
ALLEGRO_SAMPLE *rain_sample; /*!< Rain sound sample. */
|
||||||
ALLEGRO_SAMPLE *click_sample;
|
ALLEGRO_SAMPLE *click_sample; /*!< Click sound sample. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *rain_sound; /*!< Sample instance with rain sound. */
|
ALLEGRO_SAMPLE_INSTANCE *rain_sound; /*!< Sample instance with rain sound. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *click; /*!< Sample instance with click sound. */
|
ALLEGRO_SAMPLE_INSTANCE *click; /*!< Sample instance with click sound. */
|
||||||
ALLEGRO_FONT *font_title;
|
ALLEGRO_FONT *font_title; /*!< Font of "Super Derpy" text. */
|
||||||
ALLEGRO_FONT *font_subtitle;
|
ALLEGRO_FONT *font_subtitle; /*!< Font of "Muffin Attack" text. */
|
||||||
ALLEGRO_FONT *font;
|
ALLEGRO_FONT *font; /*!< Font of standard menu item. */
|
||||||
ALLEGRO_FONT *font_selected;
|
ALLEGRO_FONT *font_selected; /*!< Font of selected menu item. */
|
||||||
int selected;
|
int selected; /*!< Number of selected menu item. */
|
||||||
enum menustate_enum menustate;
|
enum menustate_enum menustate; /*!< Current menu page. */
|
||||||
bool loaded;
|
bool loaded; /*!< True if Menu state has been already loaded. */
|
||||||
struct {
|
struct {
|
||||||
bool fullscreen;
|
bool fullscreen;
|
||||||
int fps;
|
int fps;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
} options;
|
} options; /*!< Options which can be changed in menu. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Resources used by Loading state. */
|
/*! \brief Resources used by Loading state. */
|
||||||
|
@ -217,71 +217,70 @@ struct About {
|
||||||
|
|
||||||
/*! \brief Resources used by Map state. */
|
/*! \brief Resources used by Map state. */
|
||||||
struct Map {
|
struct Map {
|
||||||
ALLEGRO_BITMAP *map;
|
ALLEGRO_BITMAP *map; /*!< Background table bitmap. */
|
||||||
ALLEGRO_BITMAP *background;
|
ALLEGRO_BITMAP *map_bg; /*!< Map bitmap. */
|
||||||
ALLEGRO_BITMAP *map_bg;
|
ALLEGRO_BITMAP *highlight; /*!< Level highlights bitmap. */
|
||||||
ALLEGRO_BITMAP *highlight;
|
ALLEGRO_BITMAP *arrow; /*!< Arrow bitmap. */
|
||||||
ALLEGRO_BITMAP *arrow;
|
int selected; /*!< Number of currently selected level. */
|
||||||
int selected;
|
int available; /*!< Number of highest available level. */
|
||||||
int available;
|
|
||||||
float arrowpos; /*!< Vertical position of the arrow. */
|
float arrowpos; /*!< Vertical position of the arrow. */
|
||||||
ALLEGRO_SAMPLE *sample;
|
ALLEGRO_SAMPLE *sample; /*!< Sample with backgrond music. */
|
||||||
ALLEGRO_SAMPLE *click_sample;
|
ALLEGRO_SAMPLE *click_sample; /*!< Sample with click sound. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *click; /*!< Sample instance with click sound. */
|
ALLEGRO_SAMPLE_INSTANCE *click; /*!< Sample instance with click sound. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Resources used by Intro state. */
|
/*! \brief Resources used by Intro state. */
|
||||||
struct Intro {
|
struct Intro {
|
||||||
int position;
|
int position; /*!< Position of the page. */
|
||||||
int page;
|
int page; /*!< Current page number. */
|
||||||
bool in_animation; /*!< Animation as in page transition animation. */
|
bool in_animation; /*!< Animation as in page transition animation. */
|
||||||
float anim;
|
float anim; /*!< Counter used for spritesheet animations. */
|
||||||
ALLEGRO_BITMAP *table;
|
ALLEGRO_BITMAP *table; /*!< Background paper bitmap, two pages long. */
|
||||||
ALLEGRO_BITMAP *table_bitmap;
|
ALLEGRO_BITMAP *table_bitmap; /*!< Unscaled background paper bitmap. */
|
||||||
ALLEGRO_BITMAP *frame;
|
ALLEGRO_BITMAP *frame; /*!< Bitmap with frame around the screen. */
|
||||||
ALLEGRO_BITMAP *animsprites[5];
|
ALLEGRO_BITMAP *animsprites[5]; /*!< Array with spritesheet bitmaps. */
|
||||||
ALLEGRO_FONT *font;
|
ALLEGRO_FONT *font; /*!< Font used for text. */
|
||||||
ALLEGRO_SAMPLE *sample;
|
ALLEGRO_SAMPLE *sample; /*!< Background music sample. */
|
||||||
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
ALLEGRO_SAMPLE_INSTANCE *music; /*!< Sample instance with background music. */
|
||||||
ALLEGRO_AUDIO_STREAM *audiostream;
|
ALLEGRO_AUDIO_STREAM *audiostream; /*!< Audiostream used for Celestia voice. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Resources used by Game state. */
|
/*! \brief Resources used by Game state. */
|
||||||
struct Game {
|
struct Game {
|
||||||
ALLEGRO_DISPLAY *display;
|
ALLEGRO_DISPLAY *display; /*!< Main Allegro display. */
|
||||||
ALLEGRO_FONT *font;
|
ALLEGRO_FONT *font; /*!< Main font used in game. */
|
||||||
ALLEGRO_FONT *font_console;
|
ALLEGRO_FONT *font_console; /*!< Font used in game console. */
|
||||||
enum gamestate_enum gamestate;
|
enum gamestate_enum gamestate; /*!< Current game state. */
|
||||||
enum gamestate_enum loadstate;
|
enum gamestate_enum loadstate; /*!< Game state to be loaded. */
|
||||||
ALLEGRO_EVENT_QUEUE *event_queue;
|
ALLEGRO_EVENT_QUEUE *event_queue; /*!< Main event queue. */
|
||||||
ALLEGRO_TIMER *timer;
|
ALLEGRO_TIMER *timer; /*!< Main FPS timer. */
|
||||||
ALLEGRO_BITMAP *console;
|
ALLEGRO_BITMAP *console; /*!< Bitmap with game console. */
|
||||||
bool showconsole;
|
bool showconsole; /*!< If true, game console is rendered on screen. */
|
||||||
int fx;
|
int fx; /*!< Effects volume. */
|
||||||
int music;
|
int music; /*!< Music volume. */
|
||||||
int voice;
|
int voice; /*!< Voice volume. */
|
||||||
bool fullscreen;
|
bool fullscreen; /*!< Fullscreen toggle. */
|
||||||
bool debug;
|
bool debug; /*!< Toggles debug mode. */
|
||||||
int fps;
|
int fps; /*!< FPS limit */
|
||||||
int width;
|
int width; /*!< Width of window as being set in configuration. */
|
||||||
int height;
|
int height; /*!< Height of window as being set in configuration. */
|
||||||
bool shuttingdown;
|
bool shuttingdown; /*!< If true then shut down of the game is pending. */
|
||||||
bool restart;
|
bool restart; /*!< If true then restart of the game is pending. */
|
||||||
struct Menu menu;
|
struct Menu menu; /*!< Resources used by Menu state. */
|
||||||
struct Loading loading;
|
struct Loading loading; /*!< Resources used by Menu state. */
|
||||||
struct Intro intro;
|
struct Intro intro; /*!< Resources used by Intro state. */
|
||||||
struct About about;
|
struct About about; /*!< Resources used by About state. */
|
||||||
struct Map map;
|
struct Map map; /*!< Resources used by Map state. */
|
||||||
struct Level level;
|
struct Level level; /*!< Resources used by Level state. */
|
||||||
struct Pause pause;
|
struct Pause pause; /*!< Resources used by Pause state. */
|
||||||
struct {
|
struct {
|
||||||
ALLEGRO_VOICE *v;
|
ALLEGRO_VOICE *v; /*!< Main voice used by the game. */
|
||||||
ALLEGRO_MIXER *mixer;
|
ALLEGRO_MIXER *mixer; /*!< Main mixer of the game. */
|
||||||
ALLEGRO_MIXER *music;
|
ALLEGRO_MIXER *music; /*!< Music mixer. */
|
||||||
ALLEGRO_MIXER *voice;
|
ALLEGRO_MIXER *voice; /*!< Voice mixer. */
|
||||||
ALLEGRO_MIXER *fx;
|
ALLEGRO_MIXER *fx; /*!< Effects mixer. */
|
||||||
} audio;
|
} audio; /*!< Audio resources. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Preloads gamestate set in game->loadstate. */
|
/*! \brief Preloads gamestate set in game->loadstate. */
|
||||||
|
|
|
@ -32,20 +32,20 @@ enum TM_ActionState {
|
||||||
|
|
||||||
/*! \brief Arguments for TM_Action. */
|
/*! \brief Arguments for TM_Action. */
|
||||||
struct TM_Arguments {
|
struct TM_Arguments {
|
||||||
void *value;
|
void *value; /*!< Value of argument. */
|
||||||
struct TM_Arguments *next;
|
struct TM_Arguments *next; /*!< Pointer to next argument. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Timeline action. */
|
/*! \brief Timeline action. */
|
||||||
struct TM_Action {
|
struct TM_Action {
|
||||||
bool (*function)(struct Game*, struct TM_Action*, enum TM_ActionState);
|
bool (*function)(struct Game*, struct TM_Action*, enum TM_ActionState); /*!< Function callback of the action. */
|
||||||
struct TM_Arguments *arguments;
|
struct TM_Arguments *arguments; /*!< Arguments of the action. */
|
||||||
ALLEGRO_TIMER *timer;
|
ALLEGRO_TIMER *timer; /*!< Delay timer. */
|
||||||
bool active;
|
bool active; /*!< If false, then this action is waiting for it's delay to finish. */
|
||||||
int delay;
|
int delay; /*!< Number of miliseconds to delay before action is started. */
|
||||||
struct TM_Action *next;
|
struct TM_Action *next; /*!< Pointer to next action in queue. */
|
||||||
unsigned int id;
|
unsigned int id; /*!< ID of the action. */
|
||||||
char* name;
|
char* name; /*!< "User friendly" name of the action. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Init timeline. */
|
/*! \brief Init timeline. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue