diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 2c9204e..e9a275c 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -288,7 +288,7 @@ SIP_SUPPORT = NO # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. -IDL_PROPERTY_SUPPORT = YES +IDL_PROPERTY_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first diff --git a/src/land.c b/src/land.c index c945452..30823f0 100644 --- a/src/land.c +++ b/src/land.c @@ -1297,6 +1297,7 @@ static unsigned int refuel_price(void) { /** * @brief Refuel the player. + * @param wid Land window. * @param str Unused. */ static void spaceport_refuel(unsigned int wid, char* str) { diff --git a/src/pack.c b/src/pack.c index e1c4569..15c6c77 100644 --- a/src/pack.c +++ b/src/pack.c @@ -75,7 +75,7 @@ struct Packcache_s { #endif #undef DEBUG /* This will be spammy. */ -#define DEBUG(str, args...) do{;} while(0) +#define DEBUG(str, args...) do{;} while(0) /**< Hack to disable debugging. */ #define BLOCKSIZE 128*1024 /**< The read/write block size */ @@ -305,11 +305,11 @@ int pack_check(const char* filename) { #ifdef _POSIX_SOURCE #define WRITE(b,n) if(write(outfd, b, n)==-1) { \ ERR("Error writing to file: %s", strerror(errno)); \ - free(buf); return -1; } + free(buf); return -1; } /**< Macro to help check for errors. #else #define WRITE(b,n) if(fwrite(b, 1, n, outf)==0) { \ ERR("Error writing to file: %s", strerror(errno)); \ - free(buf); return -1; } + free(buf); return -1; } /**< Macro to help check for errors. */ #endif /** diff --git a/src/player.c b/src/player.c index dffccf6..e4c2c0b 100644 --- a/src/player.c +++ b/src/player.c @@ -58,7 +58,11 @@ /* Player stuff. */ Pilot* player = NULL; /**< The player. */ static Ship* player_ship = NULL; /**< Temp ship to hold when naming it. */ -static double player_px, player_py, player_vx, player_vy, player_dir; /**< More hack. */ +static double player_px; /**< Temp X position. */ +static double player_py; /**< Temp Y position. */ +static double player_vx; /**< Temp X velocity. */ +static double player_vy; /**< Temp Y velocity. */ +static double player_dir; /**< Temp direction. */ static int player_credits = 0; /**< Temp hack on create. */ static char* player_mission = NULL; /**< More hack. */ @@ -255,8 +259,6 @@ void player_brokeHyperspace(void); double player_faceHyperspace(void); /** - * @fn void player_new(void) - * * @brief Create a new player. * * - Cleans up after old player. @@ -430,9 +432,6 @@ static int player_newMake(void) { } /** - * @fn int player_newShip(Ship* ship, double px, double py, - * double vx, double vy, double dir) - * * @brief Create a new ship for player. * @return 0 indicates success, -1 means dialogue was cancelled. * @@ -466,8 +465,6 @@ int player_newShip(Ship* ship, double px, double py, } /** - * @fn static void player_newShipMake(char* name) - * * @brief Actually create the new ship. */ static void player_newShipMake(char* name) { @@ -512,8 +509,6 @@ static void player_newShipMake(char* name) { } /** - * @fn void player_swapShip(char* shipname) - * * @brief Swap players current ship with her ship named 'shipname'. * @param shipname Ship to change to. */ @@ -551,8 +546,6 @@ void player_swapShip(char* shipname) { } /** - * @fn int player_shipPrice(char* shipname) - * * @brief Calculate the price of one of the players ships. * @param shipname Name of the ship. * @return The price of the ship in credits. @@ -581,8 +574,6 @@ int player_shipPrice(char* shipname) { } /** - * @fn void player_rmShip(char* shipname) - * * @brief Remove one of the players ships. * @param shipname Name of the ship to remove. */ @@ -667,12 +658,10 @@ void player_cleanup(void) { } } +static int player_soundReserved = 0; /**< Has the player already reserved sound? */ /** - * @fn static void player_initSound(void) - * * @brief Initialize the player sounds. */ -static int player_soundReserved = 0; /**< Has the player already reserved sound? */ static void player_initSound(void) { if(player_soundReserved) return; @@ -689,8 +678,6 @@ static void player_initSound(void) { } /** - * @fn static void player_playSound(int sound, int once) - * * @brief Play a sound at the player. * @param sound ID of the sound to play. * @param once Play only once? @@ -708,8 +695,6 @@ void player_stopSound(void) { } /** - * @fn void player_message(const char* fmt, ...) - * * @brief Add a msg to the queue to be displayed on screen. * @param fmt String with formatting like prinf. */ @@ -735,8 +720,6 @@ void player_message(const char* fmt, ...) { } /** - * @fn void player_warp(const double x, const double y) - * * @brief Warp the player to the new position. * @param x X value of the position to warp to. * @param y Y value of the position to warp to. @@ -746,8 +729,6 @@ void player_warp(const double x, const double y) { } /** - * @fn player_clear(void) - * * @brief Clear the targets. */ void player_clear(void) { @@ -757,13 +738,6 @@ void player_clear(void) { hyperspace_target = -1; } -/** - * @fn const char* player_rating(void) - * - * @brief Get the players combat rating in a human readable string. - * - * @return The players combat rating in a human readable string. - */ static char* player_ratings[] = { "None", "Smallfry", @@ -772,8 +746,12 @@ static char* player_ratings[] = { "Major", "Fearsome", "Godlike" -}; +}; /**< Combat ratings. */ +/** + * @brief Get the players combat rating in a human readable string. + * @return The players combat rating in a human readable string. + */ const char* player_rating(void) { if(player_crating == 0.) return player_ratings[0]; else if(player_crating < 50.) return player_ratings[1]; @@ -786,8 +764,6 @@ const char* player_rating(void) { } /** - * @fn int player_outfitOwned(const char* outfitname) - * * @brief Get how many of the outfits the player owns. * @param outfitname Outfit to check how many the player owns. * @return The number of outfits matching outfitname owned. @@ -803,8 +779,6 @@ int player_outfitOwned(const char* outfitname) { } /** - * @fn int player_cargoOwned(const char* commodityname) - * * @brief Get how many of the commodity the player has. * @param commodityname Commodity to check how many the player has. * @return The number of commodities owned matching commodityname. @@ -821,8 +795,6 @@ int player_cargoOwned(const char* commodityname) { } /** - * @fn void player_renderBG(void) - * * @brief Render the background player stuff, namely planet target gfx. */ void player_renderBG(void) { @@ -854,8 +826,6 @@ void player_renderBG(void) { } /** - * @fn void player_render(void) - * * @brief Render the player. */ void player_render(void) { @@ -1360,8 +1330,6 @@ static void gui_renderHealth(const glColour* c, const Rect* r, const glTexture* } /** - * @fn int gui_init(void) - * * @brief Initialize the GUI system. * @return 0 on success. */ @@ -1385,8 +1353,6 @@ int gui_init(void) { } /** - * @fn int gui_load(const char* name) - * * @brief Attempt to load the actual GUI. * @brief name Name of the GUI to load. * @brief 0 on success. @@ -1547,9 +1513,10 @@ static void gui_createInterference(void) { } } -/* Parse a gui node. */ #define RELATIVIZE(a) \ { (a).x += VX(gui.frame); (a).y = VY(gui.frame) + gui.gfx_frame->h-(a).y; } +/**< Converts a rect to absolute coords. */ + /** * @brief Parses a gui node. * @param Parent node to parse from. @@ -1773,8 +1740,6 @@ void gui_free(void) { } /** - * @fn void player_startAutonav(void) - * * @brief Start autonav. */ void player_startAutonav(void) { @@ -1815,8 +1780,6 @@ void player_abortAutonav(char* reason) { } /** - * @fn void player_think(Pilot* pplayer) - * * @brief Basically uses keyboard input instead of AI input. Used in pilot.c. * @param pplayer Player to think. */ @@ -1915,8 +1878,6 @@ void player_think(Pilot* pplayer) { * For use in keybindings. */ /** - * @fn void player_setRadarRel(int mod) - * * @brief Modify the radar resolution. * @param mod Number of intervals to jump (up or down). */ @@ -1930,8 +1891,6 @@ void player_setRadarRel(int mod) { } /** - * @fn void player_secondaryNext(void) - * * @brief Get the next secondary weapon. */ void player_secondaryNext(void) { @@ -1958,8 +1917,6 @@ void player_secondaryNext(void) { } /** - * @fn void player_targetPlanet(void) - * * @brief Cycle through planet targets. */ void player_targetPlanet(void) { @@ -2063,8 +2020,6 @@ void player_land(void) { } /** - * @fn void player_targetHyperspace(void) - * * @brief Get a hyperspace target. */ void player_targetHyperspace(void) { @@ -2088,8 +2043,6 @@ void player_targetHyperspace(void) { } /** - * @fn void player_jump(void) - * * @brief Actually attempt to jump in hyperspace. */ void player_jump(void) { @@ -2124,8 +2077,6 @@ void player_jump(void) { } /** - * @fn void player_brokeHyperspace(void) - * * @brief Player actually broke hyperspace (entering new system). */ void player_brokeHyperspace(void) { @@ -2173,8 +2124,6 @@ void player_brokeHyperspace(void) { } /** - * @fn double player_faceHyperspace(void) - * * @brief Make player face her hyperspace target. * @return direction to face. */ @@ -2189,8 +2138,6 @@ double player_faceHyperspace(void) { } /** - * @fn void player_afterburn(void) - * * @brief Activate the afterburner. */ void player_afterburn(void) { @@ -2206,8 +2153,6 @@ void player_afterburn(void) { } /** - * @fn void player_afterburnOver(void) - * * @brief Deactivate the afterburner. */ void player_afterburnOver(void) { @@ -2219,8 +2164,6 @@ void player_afterburnOver(void) { } /** - * @fn void player_accel(double acc) - * * @brief Start accelerating. * @param acc How much thrust should be applied of maximum (0 - 1). */ @@ -2234,8 +2177,6 @@ void player_accel(double acc) { } /** - * @fn void player_accelOver(void) - * * @brief Done accelerating. */ void player_accelOver(void) { @@ -2244,8 +2185,6 @@ void player_accelOver(void) { } /** - * @fn void player_targetHostile(void) - * * @brief Target the nearest hostile enemy to the player. */ void player_targetHostile(void) { @@ -2278,8 +2217,6 @@ void player_targetHostile(void) { } /** - * @fn void player_targetNext(void) - * * @brief Cycles to next target. */ void player_targetNext(void) { @@ -2289,9 +2226,6 @@ void player_targetNext(void) { player_playSound(snd_target, 1); } -/** - * @fn - */ void player_targetPrev(void) { player->target = pilot_getPrevID(player->target); @@ -2300,8 +2234,6 @@ void player_targetPrev(void) { } /** - * @fn player_targetNearest(void) - * * @brief Player targets nearest pilot. */ void player_targetNearest(void) { @@ -2314,12 +2246,10 @@ void player_targetNearest(void) { player_playSound(snd_target, 1); } +static int screenshot_cur = 0; /**< Current screenshot at. */ /** - * @fn void player_screenshot(void) - * * @brief Take a screenshot. */ -static int screenshot_cur = 0; /**< Current screenshot at. */ void player_screenshot(void) { FILE* fp; int done; @@ -2355,14 +2285,15 @@ void player_screenshot(void) { gl_screenshot(filename); } +/** + * @brief Open communication with the players target. + */ void player_hail(void) { if(player->target != player->id) comm_open(player->target); } /** - * @fn void player_dead(void) - * * @brief Player got killed. */ void player_dead(void) { @@ -2371,8 +2302,6 @@ void player_dead(void) { } /** - * @fn void player_destroyed(void) - * * @brief Player blew up in a nice fireball. */ void player_destroyed(void) { @@ -2385,8 +2314,6 @@ void player_destroyed(void) { } /** - * @fn void player_ships(char** ssships, glTexture** tships) - * * @brief Return a buffer with all the players ship names * or "None" if there are no ships. * @@ -2407,8 +2334,6 @@ void player_ships(char** sships, glTexture** tships) { } /** - * @fn int player_nships(void) - * * @brief Get the ammount of ships player has in storage. * @return The number of ships the player has. */