Skip to content

Commit

Permalink
Doxygen and Luadoc fixes galore.
Browse files Browse the repository at this point in the history
  • Loading branch information
Deiz committed Jun 28, 2011
1 parent b0ebd05 commit d1bdc59
Show file tree
Hide file tree
Showing 62 changed files with 130 additions and 130 deletions.
42 changes: 22 additions & 20 deletions src/ai.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* *
* Concept: Goal (Task) Based AI with additional Optimization * Concept: Goal (Task) Based AI with additional Optimization
* *
* AI uses the goal (task) based AI approach with tasks scripted in lua, * AI uses the goal (task) based AI approach with tasks scripted in Lua,
* additionally there is a task that is hardcoded and obligatory in any AI * additionally there is a task that is hard-coded and obligatory in any AI
* script, the 'control' task, whose sole purpose is to assign tasks if there * script, the 'control' task, whose sole purpose is to assign tasks if there
* is no current tasks and optimizes or changes tasks if there are. * is no current tasks and optimizes or changes tasks if there are.
* *
Expand Down Expand Up @@ -42,7 +42,7 @@
* *
* The AI currently has per-pilot memory which is accessible as "mem". This * The AI currently has per-pilot memory which is accessible as "mem". This
* memory is actually stored in the table pilotmem[cur_pilot->id]. This allows * memory is actually stored in the table pilotmem[cur_pilot->id]. This allows
* the pilot to keep some memory always accesible between runs without having * the pilot to keep some memory always accessible between runs without having
* to rely on the storage space a task has. * to rely on the storage space a task has.
* *
* Garbage Collector * Garbage Collector
Expand Down Expand Up @@ -449,7 +449,7 @@ static void ai_setMemory (void)




/** /**
* @brief Sets the pilot for furthur AI calls. * @brief Sets the pilot for further AI calls.
* *
* @param p Pilot to set. * @param p Pilot to set.
*/ */
Expand Down Expand Up @@ -1027,7 +1027,7 @@ void ai_getDistress( Pilot* p, const Pilot* distressed )
/** /**
* @brief Runs the create() function in the pilot. * @brief Runs the create() function in the pilot.
* *
* Should create all the gear and sucth the pilot has. * Should create all the gear and such the pilot has.
* *
* @param pilot Pilot to "create". * @param pilot Pilot to "create".
* @param param Parameter to pass to "create" function. * @param param Parameter to pass to "create" function.
Expand Down Expand Up @@ -1925,7 +1925,7 @@ static int aiL_isenemy( lua_State *L )
} }


/* /*
* checks if pillot is an ally * checks if pilot is an ally
*/ */
static int aiL_isally( lua_State *L ) static int aiL_isally( lua_State *L )
{ {
Expand Down Expand Up @@ -2815,7 +2815,7 @@ static int aiL_relvel( lua_State *L )
} }


/* /*
* completely stops the pilot if it is below minimum vel error (no instastops) * completely stops the pilot if it is below minimum vel error (no insta-stops)
*/ */
static int aiL_stop( lua_State *L ) static int aiL_stop( lua_State *L )
{ {
Expand All @@ -2828,7 +2828,7 @@ static int aiL_stop( lua_State *L )
} }


/* /*
* Tells the pilot's escort's to attack its target. * Tells the pilot's escorts to attack its target.
*/ */
static int aiL_e_attack( lua_State *L ) static int aiL_e_attack( lua_State *L )
{ {
Expand Down Expand Up @@ -3017,19 +3017,21 @@ static int aiL_getenemy_size( lua_State *L )
* @brief gets the nearest enemy within specified heuristic * @brief gets the nearest enemy within specified heuristic
* *
* @luaparam Mass goal mass map (0-1) * @luaparam Mass goal mass map (0-1)
* @luaparam DPS goal DPS map (0-1)
* @luaparam HP goal HP map (0-1) * @luaparam HP goal HP map (0-1)
* @luapa * @luaparam DPS goal DPS map (0-1)
* @luaparam Range weighting for range (typically > 1)
* @luareturn the best fitting target * @luareturn the best fitting target
* @luafunc getenemy_heuristic( Mass, DPS, HP, range ) * @luafunc getenemy_heuristic( Mass, DPS, HP, range )
*/ */
static int aiL_getenemy_heuristic( lua_State *L ) static int aiL_getenemy_heuristic( lua_State *L )
{ {


unsigned int p; unsigned int p;
double mass_factor = 0, health_factor = 0, damage_factor = 0, range_factor = 0; double mass_factor, health_factor, damage_factor, range_factor;
NLUA_MIN_ARGS(4); NLUA_MIN_ARGS(4);


mass_factor = health_factor = damage_factor = range_factor = 0;

mass_factor = luaL_checklong(L,1); mass_factor = luaL_checklong(L,1);
health_factor = luaL_checklong(L,2); health_factor = luaL_checklong(L,2);
damage_factor = luaL_checklong(L,3); damage_factor = luaL_checklong(L,3);
Expand Down Expand Up @@ -3124,10 +3126,10 @@ static int aiL_canboard( lua_State *L )
} }


/** /**
* @brief Lua wrapper: Gets the relative size(shipmass) between the current pilot and the specified target * @brief Lua wrapper: Gets the relative size (ship mass) between the current pilot and the specified target.
* *
* @param pilot_ID the ID of the pilot whose mass we will compare * @param pilot_ID the ID of the pilot whose mass we will compare.
* @luareturn A number from 0 to 1 mapping the relative masses * @luareturn A number from 0 to 1 mapping the relative masses.
* @luafunc relsize( id ) * @luafunc relsize( id )
*/ */
static int aiL_relsize( lua_State *L ) static int aiL_relsize( lua_State *L )
Expand All @@ -3150,10 +3152,10 @@ static int aiL_relsize( lua_State *L )




/** /**
* @brief Gets the relative damage output(total DPS) between the current pilot and the specified target * @brief Gets the relative damage output (total DPS) between the current pilot and the specified target.
* *
* @param pilot_ID the ID of the pilot whose DPS we will compare * @param pilot_ID ID of the pilot whose DPS we will compare.
* @luareturn A number from 0 to 1 mapping the relative DPS's * @luareturn A number from 0 to 1 mapping the relative DPSes.
* @luafunc reldps( id ) * @luafunc reldps( id )
*/ */
static int aiL_reldps( lua_State *L ) static int aiL_reldps( lua_State *L )
Expand All @@ -3176,10 +3178,10 @@ static int aiL_reldps( lua_State *L )




/** /**
* @brief Gets the relative HP(total shields and armor) between the current pilot and the specified target * @brief Gets the relative health (total shields and armour) between the current pilot and the specified target
* *
* @param pilot_ID the ID of the pilot whose HP we will compare * @param pilot_ID ID of the pilot whose health we will compare.
* @luareturn A number from 0 to 1 mapping the relative HPs * @luareturn A number from 0 to 1 mapping the relative healths.
* relhp() * relhp()
*/ */
static int aiL_relhp( lua_State *L ) static int aiL_relhp( lua_State *L )
Expand Down
4 changes: 2 additions & 2 deletions src/array.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ __inline__ static void *_array_end_helper(void *a, size_t e_size)
* *
* @param ptr_array Array being manipulated. * @param ptr_array Array being manipulated.
* @param first First iterator to erase. * @param first First iterator to erase.
* @param last Last iteratior in erase section but is not erased. * @param last Last iterator in erase section but is not erased.
*/ */
#define array_erase(ptr_array, first, last) \ #define array_erase(ptr_array, first, last) \
(_array_erase_helper((void **)(ptr_array), sizeof((ptr_array)[0][0]), (void *)(first), (void *)(last))) (_array_erase_helper((void **)(ptr_array), sizeof((ptr_array)[0][0]), (void *)(first), (void *)(last)))
Expand Down Expand Up @@ -177,7 +177,7 @@ __inline__ static void *_array_end_helper(void *a, size_t e_size)
*/ */
#define array_reserved(array) (_array_private_container(array)->_reserved) #define array_reserved(array) (_array_private_container(array)->_reserved)
/** /**
* @brief Returns a pointer to the begining of the reserved memory space. * @brief Returns a pointer to the beginning of the reserved memory space.
* *
* @param ptr_array Array being manipulated. * @param ptr_array Array being manipulated.
* @return Beginning of memory space. * @return Beginning of memory space.
Expand Down
2 changes: 1 addition & 1 deletion src/background.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static void bkg_sort( background_image_t *arr );




/** /**
* @brief Initilaizes background stars. * @brief Initializes background stars.
* *
* @param n Number of stars to add (stars per 800x640 screen). * @param n Number of stars to add (stars per 800x640 screen).
*/ */
Expand Down
4 changes: 2 additions & 2 deletions src/claim.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file claim.c * @file claim.c
* *
* @brief Handles claiming systems. * @brief Handles claiming of systems.
*/ */


#include "claim.h" #include "claim.h"
Expand Down Expand Up @@ -132,7 +132,7 @@ void claim_destroy( SysClaim_t *claim )




/** /**
* @brief Clears the claimings on all systems. * @brief Clears the claims on all systems.
*/ */
void claim_clear (void) void claim_clear (void)
{ {
Expand Down
2 changes: 1 addition & 1 deletion src/collision.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* *
* @param[in] at Texture a. * @param[in] at Texture a.
* @param[in] asx Position of x of sprite a. * @param[in] asx Position of x of sprite a.
* @param[in] asy Position of y of sprita a. * @param[in] asy Position of y of sprite a.
* @param[in] ap Position in space of sprite a. * @param[in] ap Position in space of sprite a.
* @param[in] bt Texture b. * @param[in] bt Texture b.
* @param[in] bsx Position of x of sprite b. * @param[in] bsx Position of x of sprite b.
Expand Down
4 changes: 2 additions & 2 deletions src/colour.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ glColour cFontNeutral = { .r = 1.0, .g = 0.9, .b = 0.0, .a = 1. }; /**< Neut




/** /**
* @brief Changes colourspace from HSV to RGB. * @brief Changes colour space from HSV to RGB.
* *
* All values go from 0 to 1, except H which is 0-360. * All values go from 0 to 1, except H which is 0-360.
* *
Expand Down Expand Up @@ -146,7 +146,7 @@ void col_hsv2rgb( double *r, double *g, double *b, double h, double s, double v




/** /**
* @brief Changes colourspace from RGB to HSV. * @brief Changes colour space from RGB to HSV.
* *
* All values go from 0 to 1, except H which is 0-360. * All values go from 0 to 1, except H which is 0-360.
* *
Expand Down
4 changes: 2 additions & 2 deletions src/colour.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@




/** /**
* @brief reperesents a colour via its RGBA values. * @brief represents a colour via its RGBA values.
*/ */
typedef struct glColour_ { typedef struct glColour_ {
GLfloat r; /**< Red value of the colour (0 to 1). */ GLfloat r; /**< Red value of the colour (0 to 1). */
Expand Down Expand Up @@ -100,7 +100,7 @@ glColour* col_fromName( const char* name );




/* /*
* Colourspace conversion routines. * Colour space conversion routines.
*/ */
void col_hsv2rgb( double *r, double *g, double *b, double h, double s, double v ); void col_hsv2rgb( double *r, double *g, double *b, double h, double s, double v );
void col_rgb2hsv( double *h, double *s, double *v, double r, double g, double b ); void col_rgb2hsv( double *h, double *s, double *v, double r, double g, double b );
Expand Down
2 changes: 1 addition & 1 deletion src/dev.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file dev.c * @file dev.c
* *
* @brief Generic developement routines. * @brief Generic development routines.
*/ */


#include "dev.h" #include "dev.h"
Expand Down
2 changes: 1 addition & 1 deletion src/dev_outfit.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file dev_outfit.c * @file dev_outfit.c
* *
* @brief Handles the outfit developement routines. * @brief Handles the outfit development routines.
*/ */


#include "dev_outfit.h" #include "dev_outfit.h"
Expand Down
2 changes: 1 addition & 1 deletion src/dev_ship.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file dev_ship.c * @file dev_ship.c
* *
* @brief Handles the ship developement routines. * @brief Handles the ship development routines.
*/ */


#include "dev_ship.h" #include "dev_ship.h"
Expand Down
2 changes: 1 addition & 1 deletion src/dev_system.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file dev_system.c * @file dev_system.c
* *
* @brief Handles developement of star system stuff. * @brief Handles development of star system stuff.
*/ */


#include "dev_system.h" #include "dev_system.h"
Expand Down
2 changes: 1 addition & 1 deletion src/dialogue.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** /**
* @file dialogue.c * @file dialogue.c
* *
* @brief Is a high level api around toolkit.c for easy window creation. * @brief Is a high-level API around toolkit.c for easy window creation.
* *
* Only one dialogue may be open at once or behaviour is unspecified. * Only one dialogue may be open at once or behaviour is unspecified.
* *
Expand Down
6 changes: 3 additions & 3 deletions src/economy.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @brief Handles economy stuff. * @brief Handles economy stuff.
* *
* Economy is handled with Nodal Analysis. Systems are modelled as nodes, * Economy is handled with Nodal Analysis. Systems are modelled as nodes,
* jump routes are resistances and production is modeled as node intensity. * jump routes are resistances and production is modelled as node intensity.
* This is then solved with linear algebra after each time increment. * This is then solved with linear algebra after each time increment.
*/ */


Expand Down Expand Up @@ -112,7 +112,7 @@ void credits2str( char *str, credits_t credits, int decimals )




/** /**
* @brief Gets a commoditiy by name. * @brief Gets a commodity by name.
* *
* @param name Name to match. * @param name Name to match.
* @return Commodity matching name. * @return Commodity matching name.
Expand All @@ -130,7 +130,7 @@ Commodity* commodity_get( const char* name )




/** /**
* @brief Gets a commoditiy by name without warning. * @brief Gets a commodity by name without warning.
* *
* @param name Name to match. * @param name Name to match.
* @return Commodity matching name. * @return Commodity matching name.
Expand Down
6 changes: 3 additions & 3 deletions src/equipment.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ static void equipment_renderOverlaySlots( double bx, double by, double bw, doubl
* @param bw Width of the widget. * @param bw Width of the widget.
* @param bh Height of the widget. * @param bh Height of the widget.
* @param x X position to render at. * @param x X position to render at.
* @param y Y positon to render at. * @param y Y position to render at.
* @param p Pilot to render. * @param p Pilot to render.
*/ */
static void equipment_renderShip( double bx, double by, static void equipment_renderShip( double bx, double by,
Expand Down Expand Up @@ -845,7 +845,7 @@ static int equipment_mouseInColumn( double y, double h, int n, double my )
* @param mx Mouse X event position. * @param mx Mouse X event position.
* @param my Mouse Y event position. * @param my Mouse Y event position.
* @param y Y position of the column. * @param y Y position of the column.
* @param h Heighto f the column. * @param h Height of the column.
* @param n Number of elements in the column. * @param n Number of elements in the column.
* @param os Pointer to elements in the column. * @param os Pointer to elements in the column.
* @param p Pilot to which the elements belong. * @param p Pilot to which the elements belong.
Expand Down Expand Up @@ -1067,7 +1067,7 @@ static int equipment_swapSlot( unsigned int wid, Pilot *p, PilotOutfitSlot *slot
/** /**
* @brief Regenerates the equipment window lists. * @brief Regenerates the equipment window lists.
* *
* @param wid Window to regenrate lists. * @param wid Window to regenerate lists.
* @param outfits Whether or not should regenerate outfits list. * @param outfits Whether or not should regenerate outfits list.
* @param ships Whether or not to regenerate ships list. * @param ships Whether or not to regenerate ships list.
*/ */
Expand Down
2 changes: 1 addition & 1 deletion src/event.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef enum EventTrigger_s {




/* /*
* Loading/exitting. * Loading/exiting.
*/ */
int events_load (void); int events_load (void);
void events_exit (void); void events_exit (void);
Expand Down
2 changes: 1 addition & 1 deletion src/explosion.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void expl_explode( double x, double y, double vx, double vy,
* @param radius Radius of the explosion. * @param radius Radius of the explosion.
* @param dtype Damage type. * @param dtype Damage type.
* @param damage Damage amount. * @param damage Damage amount.
* @param penetration Damage penetratior [0:1]. * @param penetration Damage penetration [0:1].
* @param parent Parent of the explosion, 0 is none. * @param parent Parent of the explosion, 0 is none.
* @param mode Defines the explosion behaviour. * @param mode Defines the explosion behaviour.
*/ */
Expand Down
2 changes: 1 addition & 1 deletion src/faction.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ int factions_load (void)
return -1; return -1;
} }


/* player faction is hardcoded */ /* player faction is hard-coded */
faction_stack = malloc( sizeof(Faction) ); faction_stack = malloc( sizeof(Faction) );
memset(faction_stack, 0, sizeof(Faction) ); memset(faction_stack, 0, sizeof(Faction) );
faction_stack[0].name = strdup("Player"); faction_stack[0].name = strdup("Player");
Expand Down
2 changes: 1 addition & 1 deletion src/fleet.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Fleet* fleet_get( const char* name )




/** /**
* @brief Creates a pilot belonging to afleet. * @brief Creates a pilot belonging to a fleet.
* *
* @param flt Fleet to which pilot belongs to. * @param flt Fleet to which pilot belongs to.
* @param plt Pilot to create. * @param plt Pilot to create.
Expand Down
2 changes: 1 addition & 1 deletion src/font.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* print it all, print to a max width, print centered or print a * print it all, print to a max width, print centered or print a
* block of text. * block of text.
* *
* There are hardcoded size limits. 256 characters for all routines * There are hard-coded size limits. 256 characters for all routines
* except gl_printText which has a 1024 limit. * except gl_printText which has a 1024 limit.
* *
* @todo check if length is too long * @todo check if length is too long
Expand Down
4 changes: 2 additions & 2 deletions src/gui.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ void gui_render( double dt )
/** /**
* @brief Initializes the radar. * @brief Initializes the radar.
* *
* @param circle Whether or not the radar is circlular. * @param circle Whether or not the radar is circular.
*/ */
int gui_radarInit( int circle, int w, int h ) int gui_radarInit( int circle, int w, int h )
{ {
Expand Down Expand Up @@ -1996,7 +1996,7 @@ void gui_updateFaction (void)
/** /**
* @brief Calls trigger functions depending on who the pilot is. * @brief Calls trigger functions depending on who the pilot is.
* *
* @param The pilot to act base dupon. * @param The pilot to act based upon.
*/ */
void gui_setGeneric (Pilot* pilot) void gui_setGeneric (Pilot* pilot)
{ {
Expand Down
Loading

0 comments on commit d1bdc59

Please sign in to comment.