From 8b67b0dc71efddc4b668bde525ba94d701f622ac Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Wed, 26 Dec 2007 01:54:49 +0000 Subject: [PATCH] Added doxygen comments to core game code. SVN-Revision: 5235 --- src/badguy/badguy.hpp | 3 +++ src/badguy/walking_badguy.hpp | 2 +- src/game_object.hpp | 6 ++++-- src/game_session.hpp | 3 +-- src/level.hpp | 5 +++++ src/mainloop.hpp | 3 +++ src/screen.hpp | 6 ++++++ src/screen_fade.hpp | 5 +++-- src/sector.hpp | 5 +++-- src/textscroller.hpp | 3 +++ src/title.hpp | 3 +++ src/worldmap/worldmap.hpp | 2 +- 12 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/badguy/badguy.hpp b/src/badguy/badguy.hpp index 6c1816612..e446133a7 100644 --- a/src/badguy/badguy.hpp +++ b/src/badguy/badguy.hpp @@ -38,6 +38,9 @@ #include "audio/sound_manager.hpp" #include "audio/sound_source.hpp" +/** + * Base class for moving sprites that can hurt the Player. + */ class BadGuy : public MovingSprite, protected UsesPhysic, public Serializable { public: diff --git a/src/badguy/walking_badguy.hpp b/src/badguy/walking_badguy.hpp index 5d8503988..3200cb708 100644 --- a/src/badguy/walking_badguy.hpp +++ b/src/badguy/walking_badguy.hpp @@ -25,7 +25,7 @@ class Timer; /** - * Baseclass for a Badguy that just walks around. + * Base class for Badguys that walk on the floor. */ class WalkingBadguy : public BadGuy { diff --git a/src/game_object.hpp b/src/game_object.hpp index 5acc83338..7c4b59f6c 100644 --- a/src/game_object.hpp +++ b/src/game_object.hpp @@ -26,8 +26,10 @@ class DrawingContext; class ObjectRemoveListener; /** - * This is a base class for all game objects. Each sector of a level will hold a - * list of active GameObject while the game is played. + * Base class for all the things that make up Levels' Sectors. + * + * Each sector of a level will hold a list of active GameObject while the + * game is played. * * This class is responsible for: * - Updating and Drawing the object. This should happen in the update() and diff --git a/src/game_session.hpp b/src/game_session.hpp index fdb8f4f96..028aa0cbc 100644 --- a/src/game_session.hpp +++ b/src/game_session.hpp @@ -35,8 +35,7 @@ class CodeController; class Menu; /** - * The GameSession class controlls the controll flow of the Game (the part - * where you actually play a level) + * Screen that runs a Level, where Players run and jump through Sectors. */ class GameSession : public Screen { diff --git a/src/level.hpp b/src/level.hpp index da2fdf450..eb3ba5ce3 100644 --- a/src/level.hpp +++ b/src/level.hpp @@ -30,6 +30,11 @@ namespace lisp { class Lisp; } +/** + * Represents a collection of Sectors running in a single GameSession. + * + * Each Sector in turn contains GameObjects, e.g. Badguys and Players. + */ class Level { public: diff --git a/src/mainloop.hpp b/src/mainloop.hpp index bd03372b9..6edb42123 100644 --- a/src/mainloop.hpp +++ b/src/mainloop.hpp @@ -28,6 +28,9 @@ class Console; class ScreenFade; class DrawingContext; +/** + * Manages, updates and draws all Screens, Controllers, Menus and the Console. + */ class MainLoop { public: diff --git a/src/screen.hpp b/src/screen.hpp index a2b753c27..ae07d59ec 100644 --- a/src/screen.hpp +++ b/src/screen.hpp @@ -21,6 +21,12 @@ class DrawingContext; +/** + * Abstract base class for code the MainLoop runs exclusively and full-screen. + * + * Examples of Screens are: The TitleScreen, a WorldMap, a level's + * GameSession, a TextScroller, ... + */ class Screen { public: diff --git a/src/screen_fade.hpp b/src/screen_fade.hpp index 952d0341c..38dbd629d 100644 --- a/src/screen_fade.hpp +++ b/src/screen_fade.hpp @@ -22,8 +22,9 @@ #include "screen.hpp" /** - * A ScreenFade screen is displayed simultaneously with another screen. This - * is intended to be used for transitional effects like fade-out or shrink-fade + * Screen to be displayed simultaneously with another Screen. + * + * This is used for Screen transition effects like a fade-out or a shrink-fade */ class ScreenFade : public Screen { diff --git a/src/sector.hpp b/src/sector.hpp index 76a1fa58f..5033959c1 100644 --- a/src/sector.hpp +++ b/src/sector.hpp @@ -60,8 +60,9 @@ enum MusicType { }; /** - * This class holds a sector (a part of a level) and all the game objects in - * the sector + * Represents one of (potentially) multiple, separate parts of a Level. + * + * Sectors contain GameObjects, e.g. Badguys and Players. */ class Sector : public Scripting::SSector { diff --git a/src/textscroller.hpp b/src/textscroller.hpp index cc166dc35..a6dafb680 100644 --- a/src/textscroller.hpp +++ b/src/textscroller.hpp @@ -78,6 +78,9 @@ private: Surface* arrow_scrolldown; }; +/** + * Screen that displays intro text, extro text, etc. + */ class TextScroller : public Screen { public: diff --git a/src/title.hpp b/src/title.hpp index 466ec0e9e..5844bec7b 100644 --- a/src/title.hpp +++ b/src/title.hpp @@ -31,6 +31,9 @@ class Menu; class World; class CodeController; +/** + * Screen that displays the SuperTux logo, lets players start a new game, etc. + */ class TitleScreen : public Screen { public: diff --git a/src/worldmap/worldmap.hpp b/src/worldmap/worldmap.hpp index bfcf96099..71675ab64 100644 --- a/src/worldmap/worldmap.hpp +++ b/src/worldmap/worldmap.hpp @@ -65,7 +65,7 @@ Direction string_to_direction(const std::string& d); Direction reverse_dir(Direction d); /** - * Screen that displays a worldmap + * Screen that runs a WorldMap, which lets the player choose a Level. */ class WorldMap : public Screen { -- 2.11.0