From 83f485e6eb164a86fe6a12bd3534c99ca7b0d467 Mon Sep 17 00:00:00 2001
From: johns <>
Date: Wed, 20 Mar 2002 21:53:50 +0000
Subject: [PATCH] Fixed doxygen warnings.

---
 src/action/action_resource.cpp |  10 +-
 src/action/action_unload.cpp   |   1 -
 src/ai/ai.cpp                  |   3 +-
 src/ai/ai_resource.cpp         |   8 +-
 src/ai/script_ai.cpp           |   6 +-
 src/game/campaign.cpp          |   2 +-
 src/map/map.cpp                |  39 +++---
 src/map/map_draw.cpp           |  39 +++---
 src/map/map_fog.cpp            |  11 +-
 src/map/map_wall.cpp           |   3 +
 src/map/script_map.cpp         |   2 +-
 src/map/script_tileset.cpp     |   6 +
 src/network/commands.cpp       |  10 +-
 src/network/network.cpp        |  12 ++
 src/pathfinder/pathfinder.cpp  |  13 +-
 src/sound/script_sound.cpp     |  10 +-
 src/stratagus/construct.cpp    |   4 +-
 src/stratagus/iolib.cpp        |   6 +-
 src/stratagus/missile.cpp      |  21 ++--
 src/stratagus/stratagus.cpp    |   2 +-
 src/ui/icons.cpp               |   3 +-
 src/ui/interface.cpp           |   5 +-
 src/ui/menus.cpp               |  31 ++---
 src/ui/mouse.cpp               |   8 +-
 src/ui/script_ui.cpp           |   8 +-
 src/unit/script_unit.cpp       |   5 +-
 src/unit/script_unittype.cpp   |   2 +-
 src/video/cursor.cpp           |   2 +
 src/video/intern_video.h       | 224 +++++++++++++++++----------------
 src/video/linedraw.cpp         |  37 +++---
 30 files changed, 299 insertions(+), 234 deletions(-)

diff --git a/src/action/action_resource.cpp b/src/action/action_resource.cpp
index 4692bc77b..6855bb4bf 100644
--- a/src/action/action_resource.cpp
+++ b/src/action/action_resource.cpp
@@ -77,7 +77,7 @@ typedef struct _resource_ {
 **	Move unit to resource.
 **
 **	@param unit	Pointer to unit.
-**	@param resouce	How to handle the resource.
+**	@param resource	How to handle the resource.
 **
 **	@return		TRUE if reached, otherwise FALSE.
 */
@@ -202,7 +202,7 @@ local int MoveToResource(Unit* unit,const Resource* resource)
 **	Wait in resource, for collecting the resource.
 **
 **	@param unit	Pointer to unit.
-**	@param resouce	How to handle the resource.
+**	@param resource	How to handle the resource.
 **
 **	@return		TRUE if ready, otherwise FALSE.
 */
@@ -323,7 +323,7 @@ local int WaitInResource(Unit* unit,const Resource* resource)
 **	Move to resource depot
 **
 **	@param unit	Pointer to unit.
-**	@param resouce	How to handle the resource.
+**	@param resource	How to handle the resource.
 **
 **	@return		TRUE if reached, otherwise FALSE.
 */
@@ -434,7 +434,7 @@ local int MoveToDepot(Unit* unit,const Resource* resource)
 **	Wait in depot, for the resources stored.
 **
 **	@param unit	Pointer to unit.
-**	@param resouce	How to handle the resource.
+**	@param resource	How to handle the resource.
 **
 **	@return		TRUE if ready, otherwise FALSE.
 */
@@ -499,7 +499,7 @@ local int WaitInDepot(Unit* unit,const Resource* resource)
 **	This the generic function for oil, gold, ...
 **
 **	@param unit	Pointer to unit.
-**	@param resouce	How to handle the resource.
+**	@param resource	How to handle the resource.
 */
 global void HandleActionResource(Unit* unit,const Resource* resource)
 {
diff --git a/src/action/action_unload.cpp b/src/action/action_unload.cpp
index 83c231f6e..71e1466af 100644
--- a/src/action/action_unload.cpp
+++ b/src/action/action_unload.cpp
@@ -50,7 +50,6 @@
 **	Reappear unit on map.
 **
 **	@param unit	Unit to drop out.
-**	@param heading	Direction in which the unit should appear.
 **	@param addx	Tile size in x.
 **	@param addy	Tile size in y.
 **
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp
index 334fc1c49..b06f59a49 100644
--- a/src/ai/ai.cpp
+++ b/src/ai/ai.cpp
@@ -585,7 +585,8 @@ local void AiReduceMadeInBuilded(const PlayerAi* pai,const UnitType* type)
 /**
 **	Called if a Unit is Attacked
 **
-**	@param unit	Pointer to unit that is being attacked.
+**	@param attacker	Pointer to attacker unit.
+**	@param defender	Pointer to unit that is being attacked.
 */
 global void AiHelpMe(const Unit* attacker,Unit* defender)
 {
diff --git a/src/ai/ai_resource.cpp b/src/ai/ai_resource.cpp
index 6ee594b3f..310edf2f6 100644
--- a/src/ai/ai_resource.cpp
+++ b/src/ai/ai_resource.cpp
@@ -144,7 +144,7 @@ local int AiCheckFood(const PlayerAi* pai,const UnitType* type)
 **
 **	Take reserve and already used resources into account.
 **
-**	@param costs	Costs for something.
+**	@param type	Unit-type to check the costs for.
 **
 **	@return		A bit field of the missing costs.
 */
@@ -700,9 +700,9 @@ local void AiCheckingWork(void)
 /**
 **	Find the nearest gold mine for unit from x,y.
 **
-**	@param unit	Pointer for source unit.
-**	@param x	X tile position to start.
-**	@param y	Y tile position to start.
+**	@param source	Pointer for source unit.
+**	@param x	X tile position to start (Unused).
+**	@param y	Y tile position to start (Unused).
 **
 **	@return		Pointer to the nearest reachable gold mine.
 **
diff --git a/src/ai/script_ai.cpp b/src/ai/script_ai.cpp
index 8863e57a2..5954d63af 100644
--- a/src/ai/script_ai.cpp
+++ b/src/ai/script_ai.cpp
@@ -14,8 +14,7 @@
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -73,7 +72,7 @@ local void AiHelperSetupTable(int* count,AiUnitTypeTable*** table,int n)
 /**
 **	Insert new unit-type element.
 **
-**	@param table	Pointer to table with elements.
+**	@param tablep	Pointer to table with elements.
 **	@param base	Base type to insert into table.
 */
 local void AiHelperInsert(AiUnitTypeTable** tablep,UnitType* base)
@@ -682,6 +681,7 @@ local SCM CclAiForce(SCM list)
 **	Define the role of a force.
 **
 **	@param value	Force number.
+**	@param flag	Which role of the force.
 */
 local SCM CclAiForceRole(SCM value,SCM flag)
 {
diff --git a/src/game/campaign.cpp b/src/game/campaign.cpp
index bcadbdd91..0ccc24b8a 100644
--- a/src/game/campaign.cpp
+++ b/src/game/campaign.cpp
@@ -99,7 +99,7 @@ global char* NextChapter(void)
 /**
 **	Play the campaign.
 **
-**	@param ident	Name of the campaign.
+**	@param name	Name of the campaign.
 */
 global void PlayCampaign(const char* name)
 {
diff --git a/src/map/map.cpp b/src/map/map.cpp
index b7f320da2..0cbd16b46 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -14,8 +14,7 @@
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -203,8 +202,8 @@ global void MapCenter(int x,int y)
 /**
 **	Tile is empty, no rocks, walls, forest, building?
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **
 **	@return		True if empty, false otherwise.
 */
@@ -218,8 +217,8 @@ global int IsMapFieldEmpty(int tx,int ty)
 /**
 **	Water on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **
 **	@return		True if water, false otherwise.
 */
@@ -231,8 +230,8 @@ global int WaterOnMap(int tx,int ty)
 /**
 **	Coast on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **	@return		True if coast, false otherwise.
 */
 global int CoastOnMap(int tx,int ty)
@@ -243,8 +242,8 @@ global int CoastOnMap(int tx,int ty)
 /**
 **	Wall on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **	@return		True if wall, false otherwise.
 */
 global int WallOnMap(int tx,int ty)
@@ -255,8 +254,8 @@ global int WallOnMap(int tx,int ty)
 /**
 **	Human wall on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **	@return		True if human wall, false otherwise.
 */
 global int HumanWallOnMap(int tx,int ty)
@@ -268,8 +267,8 @@ global int HumanWallOnMap(int tx,int ty)
 /**
 **	Orc wall on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **	@return		True if orcish wall, false otherwise.
 */
 global int OrcWallOnMap(int tx,int ty)
@@ -281,8 +280,8 @@ global int OrcWallOnMap(int tx,int ty)
 /**
 **	Forest on map tile. Checking version.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **
 **	@return		True if forest, false otherwise.
 */
@@ -297,8 +296,8 @@ global int CheckedForestOnMap(int tx,int ty)
 /**
 **	Forest on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **
 **	@return		True if forest, false otherwise.
 */
@@ -319,8 +318,8 @@ global int ForestOnMap(int tx,int ty)
 /**
 **	Rock on map tile.
 **
-**	@param x	X map tile position.
-**	@param y	Y map tile position.
+**	@param tx	X map tile position.
+**	@param ty	Y map tile position.
 **
 **	@return		True if rock, false otherwise.
 */
diff --git a/src/map/map_draw.cpp b/src/map/map_draw.cpp
index 735f6b373..2f4670388 100644
--- a/src/map/map_draw.cpp
+++ b/src/map/map_draw.cpp
@@ -13,12 +13,11 @@
 **	@todo FIXME: Johns: More to come: zooming, scaling, 64x64 tiles...
 */
 //
-//	(c) Copyright 1999-2001 by Lutz Sammer
+//	(c) Copyright 1999-2002 by Lutz Sammer
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,7 +46,7 @@
 */
 
 /**
-**	@relates USE_TILECACHE
+**	@def noUSE_TILECACHE
 **
 **	If USE_TILECACHE is defined, the code is compiled with the tile-cache
 **	support. With the tile-cache support a tile is only converted once to
@@ -252,7 +251,6 @@ local Deco *mapdeco = NULL;
 /**
 **	Fast draw 32x32 tile for 8 bpp video modes.
 **
-**	@param graphic	Graphic structure for the tile
 **	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
@@ -299,7 +297,6 @@ global void VideoDraw8Tile32(const unsigned char* data,int x,int y)
 /**
 **	Fast draw 32x32 tile for 16 bpp video modes.
 **
-**	@param graphic	Graphic structure for the tile
 **	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
@@ -354,7 +351,6 @@ global void VideoDraw16Tile32(const unsigned char* data,int x,int y)
 /**
 **	Fast draw 32x32 tile for 24 bpp video modes.
 **
-**	@param graphic	Graphic structure for the tile
 **	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
@@ -1400,9 +1396,10 @@ global void MapColorCycle(void)
 /**
 **	Mark position inside screenmap be drawn for next display update.
 **
-**	@param x,y  position in Map to be checked.
+**	@param x	X map tile position of point in Map to be marked.
+**	@param y	Y map tile position of point in Map to be marked.
 **
-**	@return	    True if inside and marked, false otherwise.
+**	@return		True if inside and marked, false otherwise.
 */
 global int MarkDrawPosMap( int x, int y )
 {
@@ -1419,9 +1416,12 @@ global int MarkDrawPosMap( int x, int y )
 /**
 **	Denote wether area in screenmap is overlapping
 **
-**	@param sx,sy,ex,ey  area in Map to be checked.
+**	@param sx	X map tile position of area in Map to be checked.
+**	@param sy	Y map tile position of area in Map to be checked.
+**	@param ex	X map tile position of area in Map to be checked.
+**	@param ey	Y map tile position of area in Map to be checked.
 **
-**	@return		    True if overlapping, false otherwise.
+**	@return		True if overlapping, false otherwise.
 */
 global int MapAreaVisibleOnScreen( int sx, int sy, int ex, int ey )
 {
@@ -1431,7 +1431,8 @@ global int MapAreaVisibleOnScreen( int sx, int sy, int ex, int ey )
 /**
 **	Check if a point is visible
 **
-**	@param x,y	point in Map to be checked.
+**	@param x	X map tile position of point in Map to be checked.
+**	@param y	Y map tile position of point in Map to be checked.
 **
 **	@return		True if point is in the visible map, false otherwise
 */
@@ -1443,9 +1444,12 @@ local inline int PointOnScreen(int x, int y)
 /**
 **	Check if any part of an area is visible
 **
-**	@param sx,sy,ex,ey  area in Map to be checked.
+**	@param sx	X map tile position of area in Map to be checked.
+**	@param sy	Y map tile position of area in Map to be checked.
+**	@param ex	X map tile position of area in Map to be checked.
+**	@param ey	Y map tile position of area in Map to be checked.
 **
-**	@return		    True if any part of area is visible, false otherwise
+**	@return		True if any part of area is visible, false otherwise
 */
 global int AnyMapAreaVisibleOnScreen( int sx, int sy, int ex, int ey )
 {
@@ -1457,9 +1461,12 @@ global int AnyMapAreaVisibleOnScreen( int sx, int sy, int ex, int ey )
 /**
 **	Mark overlapping area with screenmap be drawn for next display update.
 **
-**	@param sx,sy,ex,ey  area in Map to be checked.
+**	@param sx	X map tile position of area in Map to be marked.
+**	@param sy	Y map tile position of area in Map to be marked.
+**	@param ex	X map tile position of area in Map to be marked.
+**	@param ey	Y map tile position of area in Map to be marked.
 **
-**	@return		    True if overlapping and marked, false otherwise.
+**	@return		True if overlapping and marked, false otherwise.
 **
 **	@see MustRedrawRow @see MustRedrawTile.
 */
diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp
index 68289b14b..78528902b 100644
--- a/src/map/map_fog.cpp
+++ b/src/map/map_fog.cpp
@@ -346,10 +346,11 @@ global void MapMarkSight(int tx,int ty,int range)
 /**
 **	Mark the new sight of unit. (Explore and make visible.)
 **
-**	@param player	Player to mark sight.
-**	@param tx	X center position.
-**	@param ty	Y center position.
+**	@param tx	X map tile position of center.
+**	@param ty	Y map tile position of center.
 **	@param range	Radius to mark.
+**	@param dx	Unused: Delta in tiles in X direction.
+**	@param dy	Unused: Delta in tiles in Y direction.
 */
 global void MapMarkNewSight(int tx,int ty,int range
 	,int dx __attribute__((unused)),int dy __attribute__((unused)))
@@ -677,6 +678,7 @@ global void VideoDraw8OnlyFog32Solid(const GraphicData* data __attribute__((unus
 /**
 **	Fast draw solid unexplored 32x32 tile for 8 bpp video modes.
 **
+**	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
 */
@@ -800,6 +802,7 @@ global void VideoDraw16OnlyFog32Solid(const GraphicData* data __attribute__((unu
 /**
 **	Fast draw solid unexplored 32x32 tile for 16 bpp video modes.
 **
+**	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
 */
@@ -922,6 +925,7 @@ global void VideoDraw24OnlyFog32Solid(const GraphicData* data __attribute__((unu
 /**
 **	Fast draw solid unexplored 32x32 tile for 24 bpp video modes.
 **
+**	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
 */
@@ -1044,6 +1048,7 @@ global void VideoDraw32OnlyFog32Solid(const GraphicData* data __attribute__((unu
 /**
 **	Fast draw solid unexplored 32x32 tile for 32 bpp video modes.
 **
+**	@param data	pointer to tile graphic data
 **	@param x	X position into video memory
 **	@param y	Y position into video memory
 */
diff --git a/src/map/map_wall.cpp b/src/map/map_wall.cpp
index 6f4905c80..aa0da50b8 100644
--- a/src/map/map_wall.cpp
+++ b/src/map/map_wall.cpp
@@ -342,6 +342,9 @@ global void MapRemoveWall(unsigned x,unsigned y)
 **
 **	@param x	Map X position.
 **	@param y	Map Y position.
+**	@param humanwall	Flag, if true set a human wall.
+**
+**	@todo	FIXME: support for more races.
 */
 global void MapSetWall(unsigned x,unsigned y,int humanwall)
 {
diff --git a/src/map/script_map.cpp b/src/map/script_map.cpp
index 3d14765dc..c1d8398b8 100644
--- a/src/map/script_map.cpp
+++ b/src/map/script_map.cpp
@@ -404,7 +404,7 @@ local SCM CclSetForestRegeneration(SCM speed)
 /**
 **	Set gold-mine depleted rate.
 **
-**	@param speed	New depleted rate (0 disabled)
+**	@param rate	New depleted rate (0 disabled)
 **
 **	@return		Old rate
 */
diff --git a/src/map/script_tileset.cpp b/src/map/script_tileset.cpp
index 96f947b10..a1a2baa48 100644
--- a/src/map/script_tileset.cpp
+++ b/src/map/script_tileset.cpp
@@ -78,6 +78,7 @@ local SCM CclDefineTilesetWcNames(SCM list)
 /**
 **	Parse the special slot part of a tileset definition
 **
+**	@param tileset	Tileset to be filled.
 **	@param list	Tagged list defining a special slot.
 */
 local void DefineTilesetParseSpecial(Tileset* tileset,SCM list)
@@ -166,6 +167,8 @@ local void DefineTilesetParseSpecial(Tileset* tileset,SCM list)
 /**
 **	Parse the solid slot part of a tileset definition
 **
+**	@param tileset	Tileset to be filled.
+**	@param index	Current table index.
 **	@param list	Tagged list defining a solid slot.
 */
 local int DefineTilesetParseSolid(Tileset* tileset,int index,SCM list)
@@ -226,6 +229,8 @@ local int DefineTilesetParseSolid(Tileset* tileset,int index,SCM list)
 /**
 **	Parse the mixed slot part of a tileset definition
 **
+**	@param tileset	Tileset to be filled.
+**	@param index	Current table index.
 **	@param list	Tagged list defining a mixed slot.
 */
 local int DefineTilesetParseMixed(Tileset* tileset,int index,SCM list)
@@ -299,6 +304,7 @@ local int DefineTilesetParseMixed(Tileset* tileset,int index,SCM list)
 /**
 **	Parse the slot part of a tileset definition
 **
+**	@param tileset	Tileset to be filled.
 **	@param list	Tagged list defining a slot.
 */
 local void DefineTilesetParseSlot(Tileset* tileset,SCM list)
diff --git a/src/network/commands.cpp b/src/network/commands.cpp
index f1be2c666..a4836daa6 100644
--- a/src/network/commands.cpp
+++ b/src/network/commands.cpp
@@ -70,7 +70,7 @@ global int CommandLogEnabled;		/// True if command log is on
 **	@param x	optional X map position.
 **	@param y	optional y map position.
 **	@param dest	optional destination unit.
-**	@param type	optional command argument (unit-type,...).
+**	@param value	optional command argument (unit-type,...).
 **	@param num	optional number argument
 */
 local void CommandLog(const char* name,const Unit* unit,int flag,
@@ -182,8 +182,7 @@ global void SendCommandStandGround(Unit* unit,int flush)
 **	Send command: Follow unit to position.
 **
 **	@param unit	pointer to unit.
-**	@param x	X map tile position to move to.
-**	@param y	Y map tile position to move to.
+**	@param dest	follow this unit.
 **	@param flush	Flag flush all pending commands.
 */
 global void SendCommandFollow(Unit* unit,Unit* dest,int flush)
@@ -292,6 +291,8 @@ global void SendCommandPatrol(Unit* unit,int x,int y,int flush)
 **	Send command: Unit board unit.
 **
 **	@param unit	pointer to unit.
+**	@param x	X map tile position (unused).
+**	@param y	Y map tile position (unused).
 **	@param dest	Destination to be boarded.
 **	@param flush	Flag flush all pending commands.
 */
@@ -348,6 +349,7 @@ global void SendCommandBuildBuilding(Unit* unit,int x,int y
 **	Send command: Cancel this building construction.
 **
 **	@param unit	pointer to unit.
+**	@param worker	Worker which should stop.
 */
 global void SendCommandCancelBuilding(Unit* unit,Unit* worker)
 {
@@ -557,7 +559,7 @@ global void SendCommandDemolish(Unit* unit,int x,int y,Unit* attack,int flush)
 **	@param unit	pointer to unit.
 **	@param x	X map tile position where to cast spell.
 **	@param y	Y map tile position where to cast spell.
-**	@param attack	Cast spell on unit (if exist).
+**	@param dest	Cast spell on unit (if exist).
 **	@param spellid  Spell type id.
 **	@param flush	Flag flush all pending commands.
 */
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 94764bfff..7cb688a94 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -25,6 +25,18 @@
 
 //@{
 
+//----------------------------------------------------------------------------
+//	Documentation
+//----------------------------------------------------------------------------
+
+/**
+**      @page NetworkModule Module - Network
+**
+**      @subsection Basics How does it work.
+**
+**      @subsection API How should it be used.
+*/
+
 // FIXME: should split the next into small modules!
 // FIXME: I (Johns) leave this for other people (this means you!)
 
diff --git a/src/pathfinder/pathfinder.cpp b/src/pathfinder/pathfinder.cpp
index ffedd31a3..c05163bf9 100644
--- a/src/pathfinder/pathfinder.cpp
+++ b/src/pathfinder/pathfinder.cpp
@@ -12,12 +12,11 @@
 //
 //	I use breadth-first.
 //
-//	(c) Copyright 1998,2000,2001 by Lutz Sammer
+//	(c) Copyright 1998,2000-2002 by Lutz Sammer
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -88,7 +87,7 @@ global unsigned PfCounterNotReachable;
 /**
 **	Create empty movement matrix.
 **
-**	NOTE: double border for ships/flyers.
+**	@NOTE	Double border for ships/flyers.
 **
 **		98 98 98 98 98
 **		98 98 98 98 98
@@ -397,7 +396,7 @@ global int UnitReachable(const Unit* src,const Unit* dst,int range)
 **	@param oy	Offset in Y.
 **
 **	@param xdp	OUT: Pointer for x direction.
-**	@param xdp	OUT: Pointer for y direction.
+**	@param ydp	OUT: Pointer for y direction.
 **
 **      @return		>0 remaining path length, 0 wait for path, -1
 **			reached goal, -2 can't reach the goal.
@@ -839,11 +838,11 @@ local int ComplexNewPath(Unit* unit,int gx,int gy,int ox,int oy,char* path)
 **	The destination could be an unit or a field.
 **	Range gives how far we must reach the goal.
 **
-**	NOTE: the destination could become negative coordinates!
+**	@NOTE	The destination could become negative coordinates!
 **
 **	@param unit	Path for this unit.
 **	@param xdp	Pointer for x direction return.
-**	@param xdp	Pointer for y direction return.
+**	@param ydp	Pointer for y direction return.
 **
 **      @return		>0 remaining path length, 0 wait for path, -1
 **			reached goal, -2 can't reach the goal.
diff --git a/src/sound/script_sound.cpp b/src/sound/script_sound.cpp
index 2d70953ba..438fe0bb4 100644
--- a/src/sound/script_sound.cpp
+++ b/src/sound/script_sound.cpp
@@ -405,10 +405,12 @@ local SCM CclSoundThread(void)
     return SCM_UNSPECIFIED;
 }
 
-/** Set the range of a given sound.
-    @param sound the sound id or name of the sound
-    @range the new range for this sound
- */
+/**
+**	Set the range of a given sound.
+**
+**	@param sound	the sound id or name of the sound
+**	@param		range the new range for this sound
+*/
 local SCM CclSetSoundRange(SCM sound,SCM range) {
     //FIXME check for errors
     unsigned char TheRange;
diff --git a/src/stratagus/construct.cpp b/src/stratagus/construct.cpp
index 43762c970..6cf5688b5 100644
--- a/src/stratagus/construct.cpp
+++ b/src/stratagus/construct.cpp
@@ -198,7 +198,7 @@ global void CleanConstructions(void)
 /**
 **	Draw construction.
 **
-**	@param type	Type number of construction.
+**	@param construction	Construction pointer.
 **	@param frame	Frame number to draw.
 **	@param x	X position.
 **	@param y	Y position.
@@ -217,6 +217,8 @@ global void DrawConstruction(const Construction* construction,int frame,
 **	Get construction by identifier.
 **
 **	@param ident	Identfier of the construction
+**
+**	@return		Construction structure pointer
 */
 global Construction* ConstructionByIdent(const char* ident)
 {
diff --git a/src/stratagus/iolib.cpp b/src/stratagus/iolib.cpp
index 03e168a7c..5fdad72cd 100644
--- a/src/stratagus/iolib.cpp
+++ b/src/stratagus/iolib.cpp
@@ -10,12 +10,11 @@
 //
 /**@name iolib.c	-	Compression-IO helper functions. */
 //
-//	(c) Copyright 2000,2001 by Andreas Arens
+//	(c) Copyright 2000-2002 by Andreas Arens
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -505,6 +504,7 @@ __my_zzip_open_zip(const char* filename, int filemode)
 **
 **	@param dirname	Directory to read.
 **	@param filter	Optional xdata-filter function.
+**	@param flp	Filelist pointer.
 **
 **	@return		Pointer to FileList struct describing Files found.
 */
diff --git a/src/stratagus/missile.cpp b/src/stratagus/missile.cpp
index b8bd57d23..cf0268948 100644
--- a/src/stratagus/missile.cpp
+++ b/src/stratagus/missile.cpp
@@ -344,6 +344,7 @@ local Missile* NewLocalMissile(void)
 /**
 **	Initialize a new made missle.
 **
+**	@param missile	Pointer to new uninitialized missile.
 **	@param mtype	Type pointer of missile.
 **	@param sx	Missile x start point in pixel.
 **	@param sy	Missile y start point in pixel.
@@ -498,14 +499,14 @@ local void FreeMissile(Missile* missile)
 **	NOTE: hidden targets are hit worser.
 **	NOTE: targets higher are hit worser.
 **
-**	@param attack_stats	Attacker attributes.
+**	@param attacker_stats	Attacker attributes.
 **	@param goal_stats	Goal attributes.
 **	@param bloodlust	If attacker has bloodlust
 **
 **	@return			damage produces on goal.
 */
-local int CalculateDamageStats(const UnitStats * attacker_stats,
-	const UnitStats * goal_stats, int bloodlust)
+local int CalculateDamageStats(const UnitStats* attacker_stats,
+	const UnitStats* goal_stats, int bloodlust)
 {
     int damage;
     int basic_damage;
@@ -536,7 +537,7 @@ local int CalculateDamageStats(const UnitStats * attacker_stats,
 /**
 **	Calculate damage.
 **
-**	@param attack_stats	Attacker attributes.
+**	@param attacker_stats	Attacker attributes.
 **	@param goal		Goal unit.
 **	@param bloodlust	If attacker has bloodlust
 **	@return			damage produces on goal.
@@ -660,10 +661,14 @@ global void FireMissile(Unit* unit)
 **      Get area of tiles covered by missile
 **
 **      @param missile  Missile to be checked and set.
+**	@param sx	OUT: Pointer to X of top left corner in map tiles.
+**	@param sy	OUT: Pointer to Y of top left corner in map tiles.
+**	@param ex	OUT: Pointer to X of bottom right corner in map tiles.
+**	@param ey	OUT: Pointer to Y of bottom right corner in map tiles.
 **      @return         sx,sy,ex,ey defining area in Map
 */
 local void GetMissileMapArea( const Missile* missile,
-			      int *sx, int *sy, int *ex, int *ey )
+			      int* sx, int* sy, int* ex, int* ey )
 {
     *sx=missile->X/TileSizeX;
     *sy=missile->Y/TileSizeY;
@@ -949,9 +954,11 @@ local void MissileHitsGoal(const Missile* missile,Unit* goal,int splash)
 **	Missile hits wall.
 **
 **	@param missile	Missile hitting the goal.
-**	@param X	Wall X position.
-**	@param Y	Wall Y position.
+**	@param x	Wall X map tile position.
+**	@param y	Wall Y map tile position.
 **	@param splash	Splash damage divisor.
+**
+**	@todo	FIXME: Support for more races.
 */
 local void MissileHitsWall(const Missile* missile,int x,int y,int splash)
 {
diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp
index fd3aac0f6..35a90c67e 100644
--- a/src/stratagus/stratagus.cpp
+++ b/src/stratagus/stratagus.cpp
@@ -358,7 +358,7 @@ local void WaitCallbackExit(void)
 /**
 **	Wait for any input.
 **
-**	@param time	Time in seconds to wait.
+**	@param timeout	Time in seconds to wait.
 */
 local void WaitForInput(int timeout)
 {
diff --git a/src/ui/icons.cpp b/src/ui/icons.cpp
index fc0922d94..4dbc8302d 100644
--- a/src/ui/icons.cpp
+++ b/src/ui/icons.cpp
@@ -244,7 +244,7 @@ global void CleanIcons(void)
 
 	    free(Icons[i]->Ident);
 	    free(Icons[i]->Tileset);
-	    
+
 	    ptr=(void**)hash_find(IconFileHash,Icons[i]->File->FileName);
 	    if( ptr && *ptr ) {
 		table[n++]=*ptr;
@@ -323,6 +323,7 @@ global const char* IdentOfIcon(const Icon* icon)
 /**
 **	Draw unit icon 'icon' with border on x,y
 **
+**	@param player	Player pointer used for icon colors
 **	@param icon	Icon identifier
 **	@param flags	State of icon (clicked, mouse over...)
 **	@param x	X display position
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 4ea9bdfc4..df8c60e60 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -732,6 +732,7 @@ local int InputKey(int key)
 **	Handle key down.
 **
 **	@param key	Key scancode.
+**	@param keychar	Character code.
 */
 global void HandleKeyDown(unsigned key,unsigned keychar)
 {
@@ -784,6 +785,7 @@ global void HandleKeyDown(unsigned key,unsigned keychar)
 **	Handle key up.
 **
 **	@param key	Key scancode.
+**	@param keychar	Character code.
 */
 global void HandleKeyUp(unsigned key,unsigned keychar __attribute__((unused)))
 {
@@ -994,7 +996,8 @@ global void InputMouseButtonRelease(const EventCallback* callbacks,
 **
 **	@param callbacks	Callback structure for events.
 **	@param ticks		Denotes time-stamp of video-system
-**
+**	@param x		X movement
+**	@param y		Y movement
 */
 global void InputMouseMove(const EventCallback* callbacks,
 	unsigned ticks,int x,int y)
diff --git a/src/ui/menus.cpp b/src/ui/menus.cpp
index 6e700e0dc..0cdd683b6 100644
--- a/src/ui/menus.cpp
+++ b/src/ui/menus.cpp
@@ -1179,21 +1179,21 @@ local void DrawInput(Menuitem *mi, unsigned mx, unsigned my)
 
 
 /**
-**	Draw menu  'menu'
+**	Draw a menu.
 **
-**	@param Menu	The menu number to display
+**	@param menu_id	The menu number to display
 */
-global void DrawMenu(int MenuId)
+global void DrawMenu(int menu_id)
 {
     int i, n, l;
     Menu *menu;
     Menuitem *mi, *mip;
 
     MustRedraw &= ~RedrawMenu;
-    if (MenuId == -1) {
+    if (menu_id == -1) {
 	return;
     }
-    menu = Menus + MenuId;
+    menu = Menus + menu_id;
     switch( menu->image ) {
 	case ImagePanel1:
 	    VideoDrawSub(TheUI.GameMenuePanel.Graphic,0,0,
@@ -3091,12 +3091,12 @@ local void EndMenu(void)
 
 
 /**
-**	Process menu  'menu'
+**	Process a menu.
 **
-**	@param Menu	The menu number to process
-**	@param Loop	Indicates to setup handlers and really 'Process'
+**	@param menu_id	The menu number to process
+**	@param loop	Indicates to setup handlers and really 'Process'
 */
-global void ProcessMenu(int MenuId, int Loop)
+global void ProcessMenu(int menu_id, int loop)
 {
     int i, oldncr;
     Menu *menu;
@@ -3104,7 +3104,7 @@ global void ProcessMenu(int MenuId, int Loop)
     int CurrentMenuSave = -1, MenuButtonUnderCursorSave = -1, MenuButtonCurSelSave = -1;
 
     // Recursion protection:
-    if (Loop) {
+    if (loop) {
 	CurrentMenuSave = CurrentMenu;
 	MenuButtonUnderCursorSave = MenuButtonUnderCursor;
 	MenuButtonCurSelSave = MenuButtonCurSel;
@@ -3116,7 +3116,7 @@ global void ProcessMenu(int MenuId, int Loop)
     MustRedraw |= RedrawCursor;
     CursorState = CursorStatePoint;
     GameCursor = TheUI.Point.Cursor;
-    CurrentMenu = MenuId;
+    CurrentMenu = menu_id;
     menu = Menus + CurrentMenu;
     MenuButtonCurSel = -1;
     for (i = 0; i < menu->nitems; ++i) {
@@ -3127,7 +3127,8 @@ global void ProcessMenu(int MenuId, int Loop)
 	    case MI_TYPE_LISTBOX:
 	    case MI_TYPE_VSLIDER:
 	    case MI_TYPE_INPUT:
-		mi->flags &= ~(MenuButtonClicked|MenuButtonActive|MenuButtonSelected);
+		mi->flags &= ~(MenuButtonClicked|MenuButtonActive
+				|MenuButtonSelected);
 		if (i == menu->defsel) {
 		    mi->flags |= MenuButtonSelected;
 		    MenuButtonCurSel = i;
@@ -3159,7 +3160,7 @@ global void ProcessMenu(int MenuId, int Loop)
 	}
     }
     MenuButtonUnderCursor = -1;
-    if (Loop) {
+    if (loop) {
 	SetVideoSync();
 	MustRedraw = 0;
 	MenuHandleMouseMove(CursorX,CursorY);	// This activates buttons as appropriate!
@@ -3167,7 +3168,7 @@ global void ProcessMenu(int MenuId, int Loop)
     }
     DrawMenu(CurrentMenu);
 
-    if (Loop) {
+    if (loop) {
 	while (CurrentMenu != -1) {
 	    DebugLevel3("MustRedraw: 0x%08x\n",MustRedraw);
 	    UpdateDisplay();
@@ -3192,7 +3193,7 @@ global void ProcessMenu(int MenuId, int Loop)
 	}
     }
 
-    if (Loop) {
+    if (loop) {
 	CurrentMenu = CurrentMenuSave;
 	MenuButtonUnderCursor = MenuButtonUnderCursorSave;
 	MenuButtonCurSel = MenuButtonCurSelSave;
diff --git a/src/ui/mouse.cpp b/src/ui/mouse.cpp
index 9d4434e55..d5619a179 100644
--- a/src/ui/mouse.cpp
+++ b/src/ui/mouse.cpp
@@ -794,8 +794,8 @@ local void SendMove(int x,int y)
 **	To unit:
 **		Move to unit attacking and tracing the unit until dead.
 **
-**	@param x	X screen map position.
-**	@param y	Y screen map position.
+**	@param sx	X screen map position.
+**	@param sy	Y screen map position.
 **
 **	@see Selected, @see NumSelected
 */
@@ -892,7 +892,9 @@ local void SendDemolish (int sx,int sy)
 /**
 **	Let units harvest wood/mine gold/haul oil
 **
-**	@param x,y	Map coordinate of the destination
+**	@param x	X map coordinate of the destination
+**	@param y	Y map coordinate of the destination
+**
 **	@see Selected
 */
 local void SendHarvest(int x,int y)
diff --git a/src/ui/script_ui.cpp b/src/ui/script_ui.cpp
index 50121e9af..523a57121 100644
--- a/src/ui/script_ui.cpp
+++ b/src/ui/script_ui.cpp
@@ -139,8 +139,8 @@ local SCM CclSetContrast(SCM contrast)
 /**
 **	Game brightness.
 **
-**	@param contrast	New brightness -100 - 100.
-**	@return		Old brightness.
+**	@param brightness	New brightness -100 - 100.
+**	@return			Old brightness.
 */
 local SCM CclSetBrightness(SCM brightness)
 {
@@ -163,8 +163,8 @@ local SCM CclSetBrightness(SCM brightness)
 /**
 **	Game saturation.
 **
-**	@param contrast	New saturation -100 - 200.
-**	@return		Old saturation.
+**	@param saturation	New saturation -100 - 200.
+**	@return			Old saturation.
 */
 local SCM CclSetSaturation(SCM saturation)
 {
diff --git a/src/unit/script_unit.cpp b/src/unit/script_unit.cpp
index e074ff0ad..b3255d9ae 100644
--- a/src/unit/script_unit.cpp
+++ b/src/unit/script_unit.cpp
@@ -118,6 +118,7 @@ local Unit* CclGetUnit(SCM value)
 **	Parse order
 **
 **	@param list	All options of the order.
+**	@param order	OUT: resulting order.
 */
 local void CclParseOrder(SCM list,Order* order)
 {
@@ -257,8 +258,9 @@ local void CclParseOrder(SCM list,Order* order)
 }
 
 /**
-**	Parse orders
+**	Parse orders.
 **
+**	@param unit	Unit pointer which should get the orders.
 **	@param vector	All options of the order.
 */
 local void CclParseOrders(Unit* unit,SCM vector)
@@ -276,6 +278,7 @@ local void CclParseOrders(Unit* unit,SCM vector)
 /**
 **	Parse builded
 **
+**	@param unit	Unit pointer which should be filled with the data.
 **	@param list	All options of the builded data.
 */
 local void CclParseBuilded(Unit* unit __attribute__((unused)),
diff --git a/src/unit/script_unittype.cpp b/src/unit/script_unittype.cpp
index 18ef1af90..ef8260c5c 100644
--- a/src/unit/script_unittype.cpp
+++ b/src/unit/script_unittype.cpp
@@ -873,7 +873,7 @@ local SCM CclGetUnitTypeProperty(SCM ptr)
 **	Set the property of the unit-type structure.
 **
 **	@param ptr	Unit-type object.
-**	@param name	The property to set.
+**	@param property	The property to set.
 **
 **	@return		The property of the unit-type.
 */
diff --git a/src/video/cursor.cpp b/src/video/cursor.cpp
index a7d213c88..b6ce97e89 100644
--- a/src/video/cursor.cpp
+++ b/src/video/cursor.cpp
@@ -156,6 +156,7 @@ local int HiddenCursorRectangleH;	/// saved cursor height in pixel
 /**
 **	Function pointer: Save rectangle behind cursor
 **
+**	@param buffer	Buffer in which the graphic is stored.
 **	@param x	Screen X pixels coordinate for left-top corner.
 **	@param y	Screen Y pixels coordinate for left-top corner.
 **	@param w	Width in pixels for rectangle starting at left-top.
@@ -170,6 +171,7 @@ global void (*SaveCursorRectangle)(void *buffer,int x,int y,int w,int h);
 /**
 **	Function pointer: Load rectangle behind cursor
 **
+**	@param buffer	Buffer in which the graphic is stored.
 **	@param x	Screen X pixels coordinate.
 **	@param y	Screen Y pixels coordinate.
 **	@param w	Width in pixels.
diff --git a/src/video/intern_video.h b/src/video/intern_video.h
index 23ab2f2b8..6ebe981b7 100644
--- a/src/video/intern_video.h
+++ b/src/video/intern_video.h
@@ -1,21 +1,20 @@
 //   ___________		     _________		      _____  __
-//   \_	  _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
-//    |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __\ 
-//    |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
-//    \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
+//   \_	  _____/______	 ____	____ \_	  ___ \____________ _/ ____\/  |_
+//    |	   __) \_  __ \_/ __ \_/ __ \/	  \  \/\_  __ \__  \\	__\\   __\ 
+//    |	    \	|  | \/\  ___/\	 ___/\	   \____|  | \// __ \|	|   |  |
+//    \___  /	|__|	\___  >\___  >\______  /|__|  (____  /__|   |__|
 //	  \/		    \/	   \/	     \/		   \/
-//  ______________________                           ______________________
-//			  T H E   W A R   B E G I N S
+//  ______________________			     ______________________
+//			  T H E	  W A R	  B E G I N S
 //	   FreeCraft - A free fantasy real time strategy game engine
 //
-/**@name intern_video.h	- The video headerfile for video sources only. */
+///@file intern_video.h - The video headerfile for video sources only. */
 //
-//	(c) Copyright 1999-2001 by Lutz Sammer
+//	(c) Copyright 1999-2002 by Stephan Rasenbergver.
 //
 //	FreeCraft is free software; you can redistribute it and/or modify
 //	it under the terms of the GNU General Public License as published
-//	by the Free Software Foundation; either version 2 of the License,
-//	or (at your option) any later version.
+//	by the Free Software Foundation; only version 2 of the License.
 //
 //	FreeCraft is distributed in the hope that it will be useful,
 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,20 +28,22 @@
 
 //@{
 
-
 /*----------------------------------------------------------------------------
 --	Documentation
 ----------------------------------------------------------------------------*/
+
 /**
-**  THIS HEADER FILE SHOULD ONLY BE INCLUDED BY SOURCE-FILES IN VIDEO !!!
+**	@file intern_video.h	
 **
-**  This delivers an interface to basic video operations in video.c, while 
-**  keeping these detailed operations out of the main include-file video.h
+**	THIS HEADER FILE SHOULD ONLY BE INCLUDED BY SOURCE-FILES IN VIDEO !!!
 **
-**  FIXME: Currently some interfaces listed in video.h should be moved in
-**         here, this includes possible "extern" declarations in source-files
-**         themselves.
+**	This delivers an interface to basic video operations in video.c, while 
+**	keeping these detailed operations out of the main include-file video.h
 **
+**	@todo FIXME: Currently some interfaces listed in video.h should be
+**		moved in here, this includes possible "extern" declarations in
+**		source-files themselves.
+**		The doxygen docs looks not good, but now contains all info.
 */
 
 /*----------------------------------------------------------------------------
@@ -58,121 +59,122 @@
 /*----------------------------------------------------------------------------
 --	Variables
 ----------------------------------------------------------------------------*/
-    /// Direct acces to clipping rectangle for macro CLIP_RECTANGLE
-extern int ClipX1;                      /// current clipping top left
-extern int ClipY1;                      /// current clipping top left
-extern int ClipX2;                      /// current clipping bottom right
-extern int ClipY2;                      /// current clipping bottom right
 
+    // Direct acces to clipping rectangle for macro CLIP_RECTANGLE
+extern int ClipX1;			/// current clipping top left
+extern int ClipY1;			/// current clipping top left
+extern int ClipX2;			/// current clipping bottom right
+extern int ClipY2;			/// current clipping bottom right
 
 /*----------------------------------------------------------------------------
 --	Macros
 ----------------------------------------------------------------------------*/
+
 /**
-**      Clip rectangle area to clipping rectangle.
+**	Clip rectangle area to clipping rectangle.
 **	This means given arguments can be changed to take the clipping
-**      rectangle into account.
+**	rectangle into account.
 **
-**      FIXME: not easy to debug, but making it a function needs:
-**             - pointers to be able to alter given arguments
-**             - special return value to denote 'outside' clipping region
-**               (which is now handled by a simple return in caller function)
+**	@todo FIXME: not easy to debug, but making it a function needs:
+**		- pointers to be able to alter given arguments
+**		- special return value to denote 'outside' clipping region
+**		(which is now handled by a simple return in caller function)
 **
-**      @param x        int X screen position
-**      @param y        int Y screen position
-**                      (return value of X and Y can be made larger)
-**      @param w        unsigned int width to display
-**      @param h        unsigned int height to display
-**                      (return value of width and height can be made smaller)
+**	@param x	int X screen pixel position
+**	@param y	int Y screen pixel position
+**			(return value of X and Y can be made larger)
+**	@param width	unsigned int width to display
+**	@param height	unsigned int height to display
+**			(return value of width and height can be made smaller)
 */
 #define CLIP_RECTANGLE(x,y,width,height) { \
-  unsigned int f;                          \
-  if( x<ClipX1 ) {                         \
-    f=ClipX1-x;                            \
-    if( width<=f ) {                       \
-       return;                             \
-    }                                      \
-    width-=f;                              \
-    x=ClipX1;                              \
-  }                                        \
-  if( (x+width)>ClipX2+1 ) {               \
-    if( x>ClipX2 ) {                       \
-      return;                              \
-    }                                      \
-    width=ClipX2-x+1;                      \
-  }                                        \
-  if( y<ClipY1 ) {                         \
-    f=ClipY1-y;                            \
-    if( height<=f ) {                      \
-      return;                              \
-    }                                      \
-    height-=f;                             \
-    y=ClipY1;                              \
-  }                                        \
-  if( (y+height)>ClipY2+1 ) {              \
-    if( y>ClipY2 ) {                       \
-        return;                            \
-    }                                      \
-    height=ClipY2-y+1;                     \
-  }                                        \
+  unsigned int f;			   \
+  if( x<ClipX1 ) {			   \
+    f=ClipX1-x;				   \
+    if( width<=f ) {			   \
+       return;				   \
+    }					   \
+    width-=f;				   \
+    x=ClipX1;				   \
+  }					   \
+  if( (x+width)>ClipX2+1 ) {		   \
+    if( x>ClipX2 ) {			   \
+      return;				   \
+    }					   \
+    width=ClipX2-x+1;			   \
+  }					   \
+  if( y<ClipY1 ) {			   \
+    f=ClipY1-y;				   \
+    if( height<=f ) {			   \
+      return;				   \
+    }					   \
+    height-=f;				   \
+    y=ClipY1;				   \
+  }					   \
+  if( (y+height)>ClipY2+1 ) {		   \
+    if( y>ClipY2 ) {			   \
+	return;				   \
+    }					   \
+    height=ClipY2-y+1;			   \
+  }					   \
 }
 
 /**
-**      Clip rectangle area (just like CLIP_RECTANGLE), but also return offsets
+**	Clip rectangle area (just like CLIP_RECTANGLE), but also return offsets
 **	(these offsets can be used to skip data when used for sprites and such)
 **
-**      FIXME: not easy to debug, but making it a function needs:
-**             - pointers to be able to alter given arguments
-**             - special return value to denote 'outside' clipping region
-**               (which is now handled by a simple return in caller function)
+**	@todo FIXME: not easy to debug, but making it a function needs:
+**		- pointers to be able to alter given arguments
+**		- special return value to denote 'outside' clipping region
+**		(which is now handled by a simple return in caller function)
 **
-**      @param x     int X screen position
-**      @param y     int Y screen position
-**                   (return value of X and Y can be made larger)
-**      @param w     unsigned int width to display
-**      @param h     unsigned int height to display
-**                   (return value of width and height can be made smaller)
+**	@param x	int X screen position
+**	@param y	int Y screen position
+**			(return value of X and Y can be made larger)
+**	@param width	unsigned int width to display
+**	@param height	unsigned int height to display
+**			(return value of width and height can be made smaller)
 **  returns:
-**      @param ofsx  unsigned int offset X from start of sprite data
-**      @param ofsy  unsigned int offset Y from start of sprite data
-**      @param endx  unsigned int offset to skip the remaining data at the end
-**                   of each horizontal line of the sprite.
+**	@param ofsx	unsigned int offset X from start of sprite data
+**	@param ofsy	unsigned int offset Y from start of sprite data
+**	@param endx	unsigned int offset to skip the remaining data at the
+**			end of each horizontal line of the sprite.
 **
-**  @note there was no need for 'endy', as it isn't used to draw sprites..
+**	@note there was no need for 'endy', as it isn't used to draw sprites..
 */
 #define CLIP_RECTANGLE_OFS(x,y,width,height,ofsx,ofsy,endx) { \
-  if( y<ClipY1 ) {                                            \
-    ofsy=ClipY1-y;                                            \
-    if( height<=ofsy ) {                                      \
-      return;                                                 \
-    }                                                         \
-    height-=ofsy;                                             \
-    y=ClipY1;                                                 \
-  }                                                           \
-  else ofsy=0;                                                \
-  if( (y+height)>ClipY2+1 )   {                               \
-    if( y>ClipY2 ) {                                          \
-        return;                                               \
-    }                                                         \
-    height=ClipY2-y+1;                                        \
-  }                                                           \
-  if( x<ClipX1 ) {                                            \
-    ofsx=ClipX1-x;                                            \
-    if( width<=ofsx ) {                                       \
-       return;                                                \
-    }                                                         \
-    width-=ofsx;                                              \
-    x=ClipX1;                                                 \
-  }                                                           \
-  else ofsx=0;                                                \
-  if( (x+width)>ClipX2+1 ) {                                  \
-    if( x>ClipX2 ) {                                          \
-      return;                                                 \
-    }                                                         \
-    endx=(x+width)-(ClipX2+1);                                \
-    width=ClipX2-x+1;                                         \
-  }                                                           \
-  else endx=0;                                                \
+  if( y<ClipY1 ) {					      \
+    ofsy=ClipY1-y;					      \
+    if( height<=ofsy ) {				      \
+      return;						      \
+    }							      \
+    height-=ofsy;					      \
+    y=ClipY1;						      \
+  }							      \
+  else ofsy=0;						      \
+  if( (y+height)>ClipY2+1 )   {				      \
+    if( y>ClipY2 ) {					      \
+	return;						      \
+    }							      \
+    height=ClipY2-y+1;					      \
+  }							      \
+  if( x<ClipX1 ) {					      \
+    ofsx=ClipX1-x;					      \
+    if( width<=ofsx ) {					      \
+       return;						      \
+    }							      \
+    width-=ofsx;					      \
+    x=ClipX1;						      \
+  }							      \
+  else ofsx=0;						      \
+  if( (x+width)>ClipX2+1 ) {				      \
+    if( x>ClipX2 ) {					      \
+      return;						      \
+    }							      \
+    endx=(x+width)-(ClipX2+1);				      \
+    width=ClipX2-x+1;					      \
+  }							      \
+  else endx=0;						      \
 }
 
 
diff --git a/src/video/linedraw.cpp b/src/video/linedraw.cpp
index ac09ed814..6eaca79e0 100644
--- a/src/video/linedraw.cpp
+++ b/src/video/linedraw.cpp
@@ -442,8 +442,10 @@ local void DebugBits(unsigned long bits)
 
 #endif
 
+#if 0
+
 // ===========================================================================
-//	Color
+//	Color - unused!
 // ===========================================================================
 
 /**
@@ -532,7 +534,7 @@ local unsigned long irgb2rgb( unsigned char irgb )
 **	Convert unsigned long RGB to IRGB
 **      FIXME: will not work, improve and move to video.c?
 **
-**	@param r	Color Red-value.
+**	@param rbg	Color Red-value.
 **
 **	|0000|0000|RRRR|0000|00GG|GG00|0000|BBBB| --> |IIRR|GGBB|
 */
@@ -551,6 +553,7 @@ local unsigned char rgb2irgb( unsigned long rgb )
   return i;
 }
 
+#endif
 
 // ===========================================================================
 //	Pixel
@@ -1753,10 +1756,11 @@ local void DrawTransHLine8(SysColors color,int x,int y,unsigned width
 /**
 **	Draw horizontal line unclipped into 8bit framebuffer (ignoring alpha).
 **
-**	@param color	Color index.
-**	@param x	x coordinate on the screen
-**	@param y	y coordinate on the screen
-**      @param alpha    alpha value of pixel.
+**	@param color	Color index
+**	@param x	x pixel coordinate on the screen
+**	@param y	y pixel coordinate on the screen
+**	@param width	Line width in pixel
+**      @param alpha    alpha value of pixel
 */
 local void DrawNoTransHLine8(SysColors color,int x,int y,unsigned width
         ,unsigned char alpha __attribute__((unused)))
@@ -1990,11 +1994,11 @@ global void VideoDraw75TransHLineClip(SysColors color,int x,int y,unsigned width
 /**
 **	Draw translucent horizontal line clipped.
 **
-**	@param color	Color index.
-**	@param x	x coordinate on the screen
-**	@param y	y coordinate on the screen
-**	@param width	width of line.
-**	@param alpha	alpha value of pixels.
+**	@param color	Color index
+**	@param x	X pixel coordinate on the screen
+**	@param y	Y c pixeloordinate on the screen
+**	@param width	Width of line (0=don't draw)
+**	@param alpha	Alpha value of pixels
 */
 global void VideoDrawTransHLineClip(SysColors color,int x,int y,unsigned width
 	,unsigned char alpha)
@@ -2564,6 +2568,7 @@ local void DrawTransVLine8(SysColors color,int x,int y,unsigned height
 **	@param color	Color index.
 **	@param x	x coordinate on the screen
 **	@param y	y coordinate on the screen
+**	@param height	Height = length of the line.
 **      @param alpha    alpha value of pixel.
 */
 local void DrawNoTransVLine8(SysColors color,int x,int y,unsigned height
@@ -4278,10 +4283,12 @@ local void DrawTransRectangle8(SysColors color,int x,int y
 /**
 **	Draw rectangle into 8bpp frame buffer (ignoring alpha).
 **
-**	@param color	Color index.
-**	@param x	x coordinate on the screen
-**	@param y	y coordinate on the screen
-**      @param alpha    alpha value of pixel.
+**	@param color	Color index
+**	@param x	X pixel coordinate on the screen
+**	@param y	Y pixel coordinate on the screen
+**	@param w	Width in pixel of the rectangle
+**	@param h	Height in pixel of the rectangle
+**      @param alpha    Alpha value of pixel
 */
 local void DrawNoTransRectangle8(SysColors color,int x,int y
 	,unsigned w,unsigned h,unsigned char alpha __attribute__((unused)))