[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/include ccl_helpers.h ccl_sound.h...
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/include ccl_helpers.h ccl_sound.h... |
Date: |
22 Dec 2003 12:17:02 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 03/12/22 12:17:01
Modified files:
src/include : ccl_helpers.h ccl_sound.h cdaudio.h commands.h
construct.h cursor.h deco.h depend.h
Log message:
Tabs Cleanup
Patches:
Index: stratagus/src/include/ccl_helpers.h
diff -u stratagus/src/include/ccl_helpers.h:1.5
stratagus/src/include/ccl_helpers.h:1.6
--- stratagus/src/include/ccl_helpers.h:1.5 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/ccl_helpers.h Mon Dec 22 12:17:01 2003
@@ -8,9 +8,9 @@
// T H E W A R B E G I N S
// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden ccl_helpers.h - The clone configuration
language headerfile. */
+/address@hidden ccl_helpers.h - The clone configuration language headerfile. */
//
-// (c) Copyright 2003 by Ludovic Pollet
+// (c) Copyright 2003-2004 by Ludovic Pollet
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_helpers.h,v 1.5 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: ccl_helpers.h,v 1.6 2003/12/22 01:17:01 wizzard Exp $
#ifndef __CCL_HELPERS__
#define __CCL_HELPERS__
@@ -35,115 +35,115 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/**
**
-** This Module is a translator to and from scheme.
+** This Module is a translator to and from scheme.
**
-** It builds a nice looking scheme list from a structure and it's
description
-** It can also load a structure from this list and the description
+** It builds a nice looking scheme list from a structure and it's description
+** It can also load a structure from this list and the description
**
-** The IOLoadingMode variable control wether IO functions will
load or save datas.
-** Theses IO functions all take the same parameters :
-** A list : The ccl list to translate into data
(unused when saving)
-** A pointer : points to the structure to load,
-** or to a (structure*),
when loading a ptr
-** A parameter which is used differently by the
functions
-**
-** Example:
-** 1 To load or save a unit ptr
-**
-** void load_dummy_struct(void)
-** {
-** Unit* u;
-** IOLoadingMode=1;
-** IOUnitPtr(list, (void*)&u, 0);
-** }
-**
-**
-** 2 To load/save a full struct
-**
-** If the struct is :
-**
-** typedef struct _my_struct_{
-** UnitType* unit;
-** int count;
-** } MyStruct;
-**
-** These describe the structure :
-**
-** IOStructDef MyStructDef = {
-** "MyStruct", // Name
-** sizeof(MyStruct), // Size
-** -1,
// Array size
-** {
-** { "unit", IOUnitPtr, &((MyStruct *)
0)->Unit, 0 },
-** { "count",IOInt, &((MyStruct *)
0)->Count, 0 },
-** { 0,0,0,0 }
-** }
-**
-** Then :
-** IOStructPtr(list,(void*)&myglobalstructptr,(void*)&MyStructDef);
-** This code will load or save the myglobalstructptr, depending on
IOLoadingMode value
+** The IOLoadingMode variable control wether IO functions will load or save
datas.
+** Theses IO functions all take the same parameters :
+** A list : The ccl list to translate into data (unused when saving)
+** A pointer : points to the structure to load,
+** or to a (structure*), when loading a ptr
+** A parameter which is used differently by the functions
+**
+** Example:
+** 1 To load or save a unit ptr
+**
+** void load_dummy_struct(void)
+** {
+** Unit* u;
+** IOLoadingMode=1;
+** IOUnitPtr(list, (void*)&u, 0);
+** }
+**
+**
+** 2 To load/save a full struct
+**
+** If the struct is :
+**
+** typedef struct _my_struct_{
+** UnitType* unit;
+** int count;
+** } MyStruct;
+**
+** These describe the structure :
+**
+** IOStructDef MyStructDef = {
+** "MyStruct", /// Name
+** sizeof(MyStruct), /// Size
+** -1, /// Array size
+** {
+** {"unit", IOUnitPtr, &((MyStruct *) 0)->Unit, 0},
+** {"count", IOInt, &((MyStruct *) 0)->Count, 0},
+** { 0,0,0,0 }
+** }
+**
+** Then :
+** IOStructPtr(list,(void*)&myglobalstructptr,(void*)&MyStructDef);
+** This code will load or save the myglobalstructptr, depending on
IOLoadingMode value
**
-** There are more facility available ( for handling arrays,linked
list,... ).
-** Have a look at the differents IOxxx functions for details
+** There are more facility available ( for handling arrays,linked
list,... ).
+** Have a look at the differents IOxxx functions for details
*/
/*----------------------------------------------------------------------------
--- Structures
+-- Structures
----------------------------------------------------------------------------*/
/**
-** Definition of flags.
-** Each flag map an int value to a SCM symbol
+** Definition of flags.
+** Each flag map an int value to a SCM symbol
*/
typedef struct _io_flag_def_ {
- char* ident; ///
Flag name
- int value;
/// Flag value
+ char* ident; /// Flag name
+ int value; /// Flag value
} IOFlagDef;
/**
-** The IOFieldDef structure define each field in a structure
-** The name of the field is used to identify the field in Scheme
LIST.
+** The IOFieldDef structure define each field in a structure
+** The name of the field is used to identify the field in Scheme LIST.
**
-** The fonction receive as parameter (binaryform), a void pointer
to the field
+** The fonction receive as parameter (binaryform), a void pointer to the field
*/
typedef struct _io_field_def_ {
- char* name; ///
Name of the field ( used as ccl ident )
+ char* name; /// Name of the field ( used as ccl ident )
#if defined(USE_GUILE) || defined(USE_SIOD)
- void (*convertfunc) (SCM scmfrom, void*
binaryform, void* para);
-
/// Function to load/save the field
+ void (*convertfunc) (SCM scmfrom, void* binaryform, void* para);
+ /// Function to load/save the field
#elif defined(USE_LUA)
#endif
- void* offset; ///
Offset of the field in the structure
- void* para; ///
Parameter passed to the field
+ void* offset; /// Offset of the field in the structure
+ void* para; /// Parameter passed to the field
} IOFieldDef;
/**
-** The IOStructDef define a full structure, for loading & saving.
-** It is meant to be used with the IOStruct or IOStruct parameter,
-** to load or save a structure (depending on IOLoadingMode value)
+** The IOStructDef define a full structure, for loading & saving.
+** It is meant to be used with the IOStruct or IOStruct parameter,
+** to load or save a structure (depending on IOLoadingMode value)
**
*/
typedef struct _io_struct_def_ {
- char* name; ///
Name of the structure (debugging only)
- int size; ///
Size of the structure (for malloc)
- int array_size; /// Number of
element when in an array
- IOFieldDef defs[];
/// Definition of fields, terminated by a null field
+ char* name; /// Name of the structure (debugging only)
+ int size; /// Size of the structure (for malloc)
+ int array_size; /// Number of element when in an array
+ IOFieldDef defs[]; /// Definition of fields, terminated by a null
field
} IOStructDef;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern int IOLoadingMode; /// IOxxx functions do
load (1) or save (0) struct
-extern unsigned int IOTabLevel; /// When saving
to ccl, current indentation level
-extern CLFile *IOOutFile; /// When saving to ccl,
output file
+extern int IOLoadingMode; /// IOxxx functions do load (1) or save
(0) struct
+extern unsigned int IOTabLevel; /// When saving to ccl, current
indentation level
+extern CLFile* IOOutFile; /// When saving to ccl, output file
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Print "IOTabLevel" tabs on the ccl output
@@ -192,4 +192,4 @@
//@}
-#endif // !__CCL_H__
+#endif // !__CCL_H__
Index: stratagus/src/include/ccl_sound.h
diff -u stratagus/src/include/ccl_sound.h:1.20
stratagus/src/include/ccl_sound.h:1.21
--- stratagus/src/include/ccl_sound.h:1.20 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/ccl_sound.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden ccl_sound.h - The Ccl sound header file. */
+/address@hidden ccl_sound.h - The Ccl sound header file. */
//
-// (c) Copyright 1999-2001 by Lutz Sammer and Fabrice Rossi
+// (c) Copyright 1999-2004 by Lutz Sammer and Fabrice Rossi
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_sound.h,v 1.20 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: ccl_sound.h,v 1.21 2003/12/22 01:17:01 wizzard Exp $
#ifndef __CCL_SOUND_H__
#define __CCL_SOUND_H__
@@ -34,34 +34,34 @@
//@{
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
-#ifdef WITH_SOUND // {
+#ifdef WITH_SOUND // {
#include "ccl.h"
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
#if defined(USE_GUILE) || defined(USE_SIOD)
-extern int ccl_sound_p(SCM sound); /// is it a ccl sound?
+extern int ccl_sound_p(SCM sound); /// is it a ccl sound?
-extern SoundId ccl_sound_id(SCM sound); /// scheme -> sound id
+extern SoundId ccl_sound_id(SCM sound); /// scheme -> sound id
#elif defined(USE_LUA)
#endif
-extern void SoundCclRegister(void); /// register ccl features
+extern void SoundCclRegister(void); /// register ccl features
-#else // }{ defined(WITH_SOUND)
+#else // }{ defined(WITH_SOUND)
//-----------------------------------------------------------------------------
-extern void SoundCclRegister(void); /// register ccl features
+extern void SoundCclRegister(void); /// register ccl features
-#endif // } !defined(WITH_SOUND)
+#endif // } !defined(WITH_SOUND)
//@}
-#endif // !__CCL_SOUND_H__
+#endif // !__CCL_SOUND_H__
Index: stratagus/src/include/cdaudio.h
diff -u stratagus/src/include/cdaudio.h:1.11
stratagus/src/include/cdaudio.h:1.12
--- stratagus/src/include/cdaudio.h:1.11 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/cdaudio.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden cdaudio.h - cd audio header file. */
+/address@hidden cdaudio.h - cd audio header file. */
//
-// (c) Copyright 2003 by Nehal Mistry
+// (c) Copyright 2003-2004 by Nehal Mistry
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: cdaudio.h,v 1.11 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: cdaudio.h,v 1.12 2003/12/22 01:17:01 wizzard Exp $
#ifndef __CDAUDIO_H__
#define __CDAUDIO_H__
@@ -44,7 +44,7 @@
#endif
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#if defined(USE_SDLCD)
@@ -61,32 +61,32 @@
#include "sound_server.h"
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
typedef enum _cd_modes_ {
- CDModeStopped = -1, /// Stopped
- CDModeOff, /// Off
- CDModeAll, /// All
- CDModeRandom, /// Random
- CDModeDefined, /// Defined
+ CDModeStopped = -1, /// Stopped
+ CDModeOff, /// Off
+ CDModeAll, /// All
+ CDModeRandom, /// Random
+ CDModeDefined, /// Defined
} CDModes;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern CDModes CDMode; /// CD mode
-extern int CDTrack; /// Current
track
-extern int NumCDTracks; ///
Number of tracks on CD
+extern CDModes CDMode; /// CD mode
+extern int CDTrack; /// Current track
+extern int NumCDTracks; /// Number of tracks on CD
#ifdef USE_CDDA
-extern int CDDrive;
/// CDRom device
-extern struct cdrom_tocentry CDtocentry[64]; /// TOC track header
struct
+extern int CDDrive; /// CDRom device
+extern struct cdrom_tocentry CDtocentry[64]; /// TOC track header struct
#endif
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
#ifdef USE_CDDA
@@ -115,10 +115,10 @@
#else
-#define QuitCD() /// Dummy macro
for without cd
+#define QuitCD() /// Dummy macro for without cd
#endif
//@}
-#endif // !__CDAUDIO_H__
+#endif // !__CDAUDIO_H__
Index: stratagus/src/include/commands.h
diff -u stratagus/src/include/commands.h:1.27
stratagus/src/include/commands.h:1.28
--- stratagus/src/include/commands.h:1.27 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/commands.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden commands.h - The commands header file. */
+/address@hidden commands.h - The commands header file. */
//
-// (c) Copyright 1998-2003 by Lutz Sammer
+// (c) Copyright 1998-2004 by Lutz Sammer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: commands.h,v 1.27 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: commands.h,v 1.28 2003/12/22 01:17:01 wizzard Exp $
#ifndef __COMMANDS_H__
#define __COMMANDS_H__
@@ -34,24 +34,24 @@
//@{
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
typedef enum _replay_type_ {
- ReplayNone,
/// No replay
- ReplaySinglePlayer, ///
Single player replay
- ReplayMultiPlayer, ///
Multi player replay
-} ReplayType; ///
Replay types
+ ReplayNone, /// No replay
+ ReplaySinglePlayer, /// Single player replay
+ ReplayMultiPlayer, /// Multi player replay
+} ReplayType; /// Replay types
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern int CommandLogDisabled; /// True, if command
log is off
-extern ReplayType ReplayGameType; /// Replay game type
+extern int CommandLogDisabled; /// True, if command log is off
+extern ReplayType ReplayGameType; /// Replay game type
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Log commands into file
@@ -71,9 +71,9 @@
extern void SaveReplayList(CLFile* file);
/*
-** The send command functions sends a command, if needed over the
-** Network, this is only for user commands. Automatic reactions
which
-** are on all computers equal, should use the functions without
Send.
+** The send command functions sends a command, if needed over the
+** Network, this is only for user commands. Automatic reactions which
+** are on all computers equal, should use the functions without Send.
*/
/// Send stop command
@@ -138,4 +138,4 @@
//@}
-#endif // !__COMMANDS_H__
+#endif // !__COMMANDS_H__
Index: stratagus/src/include/construct.h
diff -u stratagus/src/include/construct.h:1.23
stratagus/src/include/construct.h:1.24
--- stratagus/src/include/construct.h:1.23 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/construct.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden construct.h - The constructions headerfile. */
+/address@hidden construct.h - The constructions headerfile. */
//
-// (c) Copyright 1998-2003 by Lutz Sammer
+// (c) Copyright 1998-2004 by Lutz Sammer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: construct.h,v 1.23 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: construct.h,v 1.24 2003/12/22 01:17:01 wizzard Exp $
#ifndef __CONSTRUCT_H__
#define __CONSTRUCT_H__
@@ -34,143 +34,142 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/**
-** @struct _construction_ construct.h
+** @struct _construction_ construct.h
**
-** \#include "construct.h"
+** \#include "construct.h"
**
-** typedef struct _construction_ Construction;
+** typedef struct _construction_ Construction;
**
-** Each building perhaps also units can have its
own construction
-** frames. This construction frames are currently
not animated,
-** this is planned for the future. What
construction frames a
-** building has, is handled by
UnitType::Construction.
+** Each building perhaps also units can have its own construction
+** frames. This construction frames are currently not animated,
+** this is planned for the future. What construction frames a
+** building has, is handled by UnitType::Construction.
**
-** The construction structure members:
+** The construction structure members:
**
-** Construction::OType
+** Construction::OType
**
-** Object type (future extensions).
+** Object type (future extensions).
**
-** Construction::Ident
+** Construction::Ident
**
-** Unique identifier of the construction, used to
reference it in
-** the config files and during startup. As
convention they start
-** with "construction-" fe. "construction-land".
-** @note Don't use this member in game, use
instead the pointer
-** to this structure. See ConstructionByIdent().
+** Unique identifier of the construction, used to reference it in
+** the config files and during startup. As convention they start
+** with "construction-" fe. "construction-land".
+** @note Don't use this member in game, use instead the pointer
+** to this structure. See ConstructionByIdent().
**
-** Construction::File[::TilesetMax]
+** Construction::File[::TilesetMax]
**
-** Path file name of sprite files for the
different tilesets.
-** @note It is planned to change this to support
more and
-** better tilesets.
+** Path file name of sprite files for the different tilesets.
+** @note It is planned to change this to support more and
+** better tilesets.
**
-** Construction::File[::TilesetMax]
+** Construction::File[::TilesetMax]
**
-** Path file name of shadow sprite file for the
different tilesets.
+** Path file name of shadow sprite file for the different tilesets.
**
-** Construction::Nr
+** Construction::Nr
**
-** Slot number of the construction, used for
saving. This should
-** be removed, if we use symbol identifiers.
-** @todo can now be removed
+** Slot number of the construction, used for saving. This should
+** be removed, if we use symbol identifiers.
+** @todo can now be removed
**
-** Construction::Width Construction::Height
+** Construction::Width Construction::Height
**
-** Size of a sprite frame in pixels. All frames of
a sprite have
-** the same size. Also all sprites (tilesets) must
have the same
-** size.
+** Size of a sprite frame in pixels. All frames of a sprite have
+** the same size. Also all sprites (tilesets) must have the same
+** size.
**
-** Construction::ShadowWidth Construction::ShadowHeight
+** Construction::ShadowWidth Construction::ShadowHeight
**
-** Size of a shadow sprite frame in pixels. All
frames of a sprite
-** have the same size. Also all sprites (tilesets)
must have the
-** same size.
+** Size of a shadow sprite frame in pixels. All frames of a sprite
+** have the same size. Also all sprites (tilesets) must have the
+** same size.
**
-** Construction::Sprite
+** Construction::Sprite
**
-** Sprite image.
+** Sprite image.
**
-** Construction::ShadowSprite
+** Construction::ShadowSprite
**
-** Shadow sprite image.
+** Shadow sprite image.
**
-** @todo
-** Need ::TilesetByName, ...
-** Only fixed number of constructions supported,
more than
-** a single construction frame is not supported,
animated
-** constructions aren't supported.
+** @todo
+** Need ::TilesetByName, ...
+** Only fixed number of constructions supported, more than
+** a single construction frame is not supported, animated
+** constructions aren't supported.
*/
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "tileset.h"
#include "video.h"
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/// Construction frame
typedef struct _construction_frame_ {
- int Percent;
/// Percent complete
+ int Percent; /// Percent complete
enum {
ConstructionFileConstruction,
ConstructionFileMain,
- } File; ///
Graphic to use
- int Frame;
/// Frame number
- struct _construction_frame_* Next; /// Next pointer
+ } File; /// Graphic to use
+ int Frame; /// Frame number
+ struct _construction_frame_* Next; /// Next pointer
} ConstructionFrame;
/// Construction shown during construction of a building
typedef struct _construction_ {
- const void* OType; ///
Object type (future extensions)
-
- char* Ident; ///
construction identifier
+ const void* OType; /// Object type (future extensions)
+ char* Ident; /// construction identifier
struct {
- char* File;
/// sprite file
- int Width;
/// sprite width
- int Height;
/// sprite height
+ char* File; /// sprite file
+ int Width; /// sprite width
+ int Height; /// sprite height
} File[TilesetMax], ShadowFile[TilesetMax];
- ConstructionFrame* Frames; ///
construction frames
+ ConstructionFrame* Frames; /// construction frames
// --- FILLED UP ---
- Graphic* Sprite;
/// construction sprite image
- int Width;
/// sprite width
- int Height;
/// sprite height
- Graphic* ShadowSprite; ///
construction shadow sprite image
- int ShadowWidth;
/// shadow sprite width
- int ShadowHeight;
/// shadow sprite height
+ Graphic* Sprite; /// construction sprite image
+ int Width; /// sprite width
+ int Height; /// sprite height
+ Graphic* ShadowSprite; /// construction shadow sprite image
+ int ShadowWidth; /// shadow sprite width
+ int ShadowHeight; /// shadow sprite height
} Construction;
/*----------------------------------------------------------------------------
--- Macros
+-- Macros
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern const char ConstructionType[]; /// Construction type
+extern const char ConstructionType[]; /// Construction type
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
- /// Initialize the constructions module
+ /// Initialize the constructions module
extern void InitConstructions(void);
- /// Load the graphics for constructions
+ /// Load the graphics for constructions
extern void LoadConstructions(void);
/// Save current construction state
extern void SaveConstructions(CLFile* file);
- /// Clean up the constructions module
+ /// Clean up the constructions module
extern void CleanConstructions(void);
/// Get construction by wc number
extern Construction* ConstructionByWcNum(int num);
@@ -182,4 +181,4 @@
//@}
-#endif // !__CONSTRUCT_H__
+#endif // !__CONSTRUCT_H__
Index: stratagus/src/include/cursor.h
diff -u stratagus/src/include/cursor.h:1.38 stratagus/src/include/cursor.h:1.39
--- stratagus/src/include/cursor.h:1.38 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/cursor.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden cursor.h - The cursors header file. */
+/address@hidden cursor.h - The cursors header file. */
//
-// (c) Copyright 1998-2001 by Lutz Sammer
+// (c) Copyright 1998-2004 by Lutz Sammer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: cursor.h,v 1.38 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: cursor.h,v 1.39 2003/12/22 01:17:01 wizzard Exp $
#ifndef __CURSOR_H__
#define __CURSOR_H__
@@ -34,170 +34,164 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/**
-** @struct _cursor_type_ cursor.h
+** @struct _cursor_type_ cursor.h
**
-** \#include "cursor.h"
+** \#include "cursor.h"
**
-** typedef struct _cursor_type_ CursorType;
+** typedef struct _cursor_type_ CursorType;
**
-** This structure contains all informations about a cursor.
-** The cursor changes depending of the current user input state.
-** A cursor can have transparent areas and color cycle animated.
+** This structure contains all informations about a cursor.
+** The cursor changes depending of the current user input state.
+** A cursor can have transparent areas and color cycle animated.
**
-** In the future it is planned to support animated cursors.
+** In the future it is planned to support animated cursors.
**
-** The cursor-type structure members:
+** The cursor-type structure members:
**
-** CursorType::OType
+** CursorType::OType
**
-** Object type (future extensions).
+** Object type (future extensions).
**
-** CursorType::Ident
+** CursorType::Ident
**
-** Unique identifier of the cursor, used to
reference it in config
-** files and during startup. Don't use this in
game, use instead
-** the pointer to this structure.
+** Unique identifier of the cursor, used to reference it in config
+** files and during startup. Don't use this in game, use instead
+** the pointer to this structure.
**
-** CursorType::Race
+** CursorType::Race
**
-** Owning Race of this cursor ("human", "orc",
"alliance",
-** "mythical", ...). If NULL, this cursor could be
used by any
-** race.
+** Owning Race of this cursor ("human", "orc", "alliance",
+** "mythical", ...). If NULL, this cursor could be used by any
+** race.
**
-** CursorType::File
+** CursorType::File
**
-** File containing the image graphics of the
cursor.
+** File containing the image graphics of the cursor.
**
-** CursorType::HotX CursorType::HotY
+** CursorType::HotX CursorType::HotY
**
-** Hot spot of the cursor in pixels. Relative to
the sprite origin
-** (0,0). The hot spot of a cursor is the point to
which Stratagus
-** refers in tracking the cursor's position.
+** Hot spot of the cursor in pixels. Relative to the sprite origin
+** (0,0). The hot spot of a cursor is the point to which Stratagus
+** refers in tracking the cursor's position.
**
-** CursorType::Width CursorType::Height
+** CursorType::Width CursorType::Height
**
-** Size of the cursor in pixels.
+** Size of the cursor in pixels.
**
-** CursorType::SpriteFrame
+** CursorType::SpriteFrame
**
-** Current displayed cursor frame.
-** From 0 to CursorType::Graphic::NumFrames.
+** Current displayed cursor frame.
+** From 0 to CursorType::Graphic::NumFrames.
**
-** CursorType::FrameRate
+** CursorType::FrameRate
**
-** Rate of changing the frames. The "rate" tells
the engine how
-** many milliseconds to hold each frame of the
animation.
+** Rate of changing the frames. The "rate" tells the engine how
+** many milliseconds to hold each frame of the animation.
**
-** @note This is the first time that for timing ms are
used! I would
-** change it to display frames.
+** @note This is the first time that for timing ms are used! I would
+** change it to display frames.
**
-** CursorType::Graphic
+** CursorType::Graphic
**
-** Contains the sprite of the cursor, loaded from
CursorType::File.
-** This can be a multicolor image with alpha or
transparency.
+** Contains the sprite of the cursor, loaded from CursorType::File.
+** This can be a multicolor image with alpha or transparency.
*/
/**
-** @struct _cursor_config_ cursor.h
+** @struct _cursor_config_ cursor.h
**
-** \#include "cursor.h"
+** \#include "cursor.h"
**
-** typedef struct _cursor_config_ CursorConfig;
+** typedef struct _cursor_config_ CursorConfig;
**
-** This structure contains all informations to reference/use a
cursor.
-** It is normally used in other config structures.
+** This structure contains all informations to reference/use a cursor.
+** It is normally used in other config structures.
**
-** CursorConfig::Name
+** CursorConfig::Name
**
-** Name to reference this cursor-type. Used while
initialization.
-** (See CursorType::Ident)
+** Name to reference this cursor-type. Used while initialization.
+** (See CursorType::Ident)
**
-** CursorConfig::Cursor
+** CursorConfig::Cursor
**
-** Pointer to this cursor-type. Used while runtime.
+** Pointer to this cursor-type. Used while runtime.
*/
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "player.h"
#include "video.h"
/*----------------------------------------------------------------------------
--- Definitions
+-- Definitions
----------------------------------------------------------------------------*/
- /// Cursor-type typedef
+ /// Cursor-type typedef
typedef struct _cursor_type_ CursorType;
- /// Private type which specifies the cursor-type
+ /// Private type which specifies the cursor-type
struct _cursor_type_ {
- const void* OType;
/// Object type (future extensions)
+ const void* OType; /// Object type (future extensions)
+ char* Ident; /// Identifier to reference it
+ char* Race; /// Race name
+ char* File; /// Graphic file of the cursor
+
+ int HotX; /// Hot point x
+ int HotY; /// Hot point y
+ int Width; /// Width of cursor
+ int Height; /// Height of cursor
- char* Ident; ///
Identifier to reference it
- char* Race; ///
Race name
-
- char* File; ///
Graphic file of the cursor
-
- int HotX;
/// Hot point x
- int HotY;
/// Hot point y
- int Width;
/// Width of cursor
- int Height;
/// Height of cursor
-
- int SpriteFrame;
/// Current displayed cursor frame
- int FrameRate;
/// Rate of changing the frames
+ int SpriteFrame; /// Current displayed cursor frame
+ int FrameRate; /// Rate of changing the frames
// --- FILLED UP ---
-#ifdef USE_SDL_SURFACE
- Graphic* Sprite;
/// Cursor sprite image
-#else
- Graphic* Sprite;
/// Cursor sprite image
-#endif
+ Graphic* Sprite; /// Cursor sprite image
};
/// Cursor config reference
typedef struct _cursor_config_ {
- char* Name; ///
Config cursor-type name
- CursorType* Cursor;
/// Cursor-type pointer
+ char* Name; /// Config cursor-type name
+ CursorType* Cursor; /// Cursor-type pointer
} CursorConfig;
/// Cursor state
typedef enum _cursor_states_ {
- CursorStatePoint, ///
Normal cursor
- CursorStateSelect, ///
Select position
- CursorStateRectangle, /// Rectangle selecting
+ CursorStatePoint, /// Normal cursor
+ CursorStateSelect, /// Select position
+ CursorStateRectangle, /// Rectangle selecting
} CursorStates;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern const char CursorTypeType[]; /// cursor-type type
-extern CursorType* Cursors; /// cursor-types
description
+extern const char CursorTypeType[]; /// cursor-type type
+extern CursorType* Cursors; /// cursor-types description
-extern CursorStates CursorState; /// current cursor state
(point,...)
-extern int CursorAction; /// action for selection
-extern int CursorValue; ///
value for action (spell type f.e.)
-extern UnitType* CursorBuilding; /// building cursor
-
-extern CursorType* GameCursor; /// cursor-type
-extern int CursorX; /// cursor
position on screen X
-extern int CursorY; /// cursor
position on screen Y
-extern int CursorStartX; /// rectangle started
on screen X
-extern int CursorStartY; /// rectangle started
on screen Y
-extern int CursorStartScrMapX; /// the same in screen map coordinate
system
-extern int CursorStartScrMapY; /// the same in screen map coordinate
system
-extern int SubScrollX; /// pixels the mouse moved while scrolling
-extern int SubScrollY; /// pixels the mouse moved while scrolling
+extern CursorStates CursorState; /// current cursor state (point,...)
+extern int CursorAction; /// action for selection
+extern int CursorValue; /// value for action (spell type f.e.)
+extern UnitType* CursorBuilding; /// building cursor
+
+extern CursorType* GameCursor; /// cursor-type
+extern int CursorX; /// cursor position on screen X
+extern int CursorY; /// cursor position on screen Y
+extern int CursorStartX; /// rectangle started on screen X
+extern int CursorStartY; /// rectangle started on screen Y
+extern int CursorStartScrMapX; /// the same in screen map coordinate system
+extern int CursorStartScrMapY; /// the same in screen map coordinate system
+extern int SubScrollX; /// pixels the mouse moved while scrolling
+extern int SubScrollY; /// pixels the mouse moved while scrolling
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Load all cursors
@@ -216,15 +210,15 @@
/// Save/load rectangle region from/to screen
/// Note: this is made extern for minimap only
#ifdef USE_SDL_SURFACE
-extern void SaveCursorRectangle(void *buffer,int x,int y,int w,int h);
-extern void LoadCursorRectangle(void *buffer,int x,int y,int w,int h);
+extern void SaveCursorRectangle(void *buffer, int x, int y, int w, int h);
+extern void LoadCursorRectangle(void *buffer, int x, int y, int w, int h);
#else
-extern void (*SaveCursorRectangle)(void *buffer,int x,int y,int w,int h);
-extern void (*LoadCursorRectangle)(void *buffer,int x,int y,int w,int h);
+extern void (*SaveCursorRectangle)(void *buffer, int x, int y, int w, int h);
+extern void (*LoadCursorRectangle)(void *buffer, int x, int y, int w, int h);
#endif
/// Invalidate given area and check if cursor won't need any
-extern void InvalidateAreaAndCheckCursor( int x, int y, int w, int h );
+extern void InvalidateAreaAndCheckCursor(int x, int y, int w, int h);
/// Invalidate (remaining) cursor areas
extern void InvalidateCursorAreas(void);
@@ -239,4 +233,4 @@
//@}
-#endif // !__CURSOR_H__
+#endif // !__CURSOR_H__
Index: stratagus/src/include/deco.h
diff -u stratagus/src/include/deco.h:1.13 stratagus/src/include/deco.h:1.14
--- stratagus/src/include/deco.h:1.13 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/deco.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden deco.h - Mechanism for all 2D decorations on
screen */
+/address@hidden deco.h - Mechanism for all 2D decorations on screen */
//
-// (c) Copyright 2002 by Lutz Sammer and Stephan Rasenberg
+// (c) Copyright 2002-2004 by Lutz Sammer and Stephan Rasenberg
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: deco.h,v 1.13 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: deco.h,v 1.14 2003/12/22 01:17:01 wizzard Exp $
#ifndef __DECO_H__
#define __DECO_H__
@@ -34,7 +34,7 @@
//@{
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/**
@@ -56,41 +56,45 @@
} DecorationSingle;
/**
-** A 2D decoration as is supported by this mechanism, add any to
be draw
-** element (sprite/line/button/etc..) as a 2D decoration following
this
-** structu, so the mechanism can use it and automaticly update any
other
-** decoration overlapping it.
+** A 2D decoration as is supported by this mechanism, add any to be draw
+** element (sprite/line/button/etc..) as a 2D decoration following this
+** structu, so the mechanism can use it and automaticly update any other
+** decoration overlapping it.
**
-** draw = an user given function that draws the
decoration using
-** some vidoe functions based on the clip
rectangle ClipX1,..
-** data = an user given data-type given to above function, to be able
-** to provide a generic draw-function
independent of its data.
-** x,y,w,h = dimension as given to DecorationAdd..
-** @note now needed outside, but might be
removed in the future
-** l = decoration level as given to DecorationAdd
(internal use only)
-** singles = The sub-decoration type, as this decoration might be
split
-** into multiple small/fixed-sized data-type
(internal use only)
-** prv = prev decoration based on depth-level
(internal use only)
-** nxt = next decoration based on depth-level
(internal use only)
+** draw = an user given function that draws the decoration using
+** some vidoe functions based on the clip rectangle ClipX1,..
+** data = an user given data-type given to above function, to be able
+** to provide a generic draw-function independent of its data.
+** x,y,w,h = dimension as given to DecorationAdd..
+** @note now needed outside, but might be removed in the future
+** l = decoration level as given to DecorationAdd (internal use only)
+** singles = The sub-decoration type, as this decoration might be split
+** into multiple small/fixed-sized data-type (internal use only)
+** prv = prev decoration based on depth-level (internal use only)
+** nxt = next decoration based on depth-level (internal use only)
**/
typedef struct Deco {
- void *data;
- void (*drawclip)(void *data);
- struct DecorationSingle *singles;
- struct Deco *prv, *nxt;
- int x, y, w, h;
+ void* data;
+ void (*drawclip)(void* data);
+ struct DecorationSingle* singles;
+ struct Deco* prv;
+ struct Deco* nxt;
+ int x;
+ int y;
+ int w;
+ int h;
int level;
} Deco;
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
extern void DecorationInit(void);
extern Deco* DecorationAdd(void *data,void (*drawclip)(void *data),
- int level, int x, int y, int w, int h );
+ int level, int x, int y, int w, int h );
extern Deco* DecorationMove(Deco *d, int x, int y, int w, int h);
extern void DecorationRemove(Deco *d);
extern void DecorationRemoveLevels(int min, int max);
@@ -102,4 +106,4 @@
//@}
-#endif // !__DECO_H__
+#endif // !__DECO_H__
Index: stratagus/src/include/depend.h
diff -u stratagus/src/include/depend.h:1.18 stratagus/src/include/depend.h:1.19
--- stratagus/src/include/depend.h:1.18 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/depend.h Mon Dec 22 12:17:01 2003
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
-/address@hidden depend.h - The units/upgrade dependencies
headerfile. */
+/address@hidden depend.h - The units/upgrade dependencies headerfile. */
//
-// (c) Copyright 2000,2001 by Vladi Belperchinov-Shabanski
+// (c) Copyright 2000-2004 by Vladi Belperchinov-Shabanski
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: depend.h,v 1.18 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: depend.h,v 1.19 2003/12/22 01:17:01 wizzard Exp $
#ifndef __DEPEND_H__
#define __DEPEND_H__
@@ -34,65 +34,65 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/**
-** @struct _depend_rule_ depend.h
+** @struct _depend_rule_ depend.h
**
-** \#include "depend.h"
+** \#include "depend.h"
**
-** typedef struct _depend_rule_ DependRule;
+** typedef struct _depend_rule_ DependRule;
**
-** This structure is used define the requirements of upgrades or
-** unit-types. The structure is used to define the base (the
wanted)
-** upgrade or unit-type and the requirements upgrades or
unit-types.
-** The requirements could be combination of and-rules and or-rules.
+** This structure is used define the requirements of upgrades or
+** unit-types. The structure is used to define the base (the wanted)
+** upgrade or unit-type and the requirements upgrades or unit-types.
+** The requirements could be combination of and-rules and or-rules.
**
-** This structure is very complex because nearly everything has two
-** meanings.
+** This structure is very complex because nearly everything has two
+** meanings.
**
-** The depend-rule structure members:
+** The depend-rule structure members:
**
-** DependRule::Next
+** DependRule::Next
**
-** Next rule in hash chain for the base
upgrade/unit-type.
-** Next and-rule for the requirements.
+** Next rule in hash chain for the base upgrade/unit-type.
+** Next and-rule for the requirements.
**
-** DependRule::Count
+** DependRule::Count
**
-** If DependRule::Type is DependRuleUnitType, the
counter is
-** how many units of the unit-type are required,
if zero no unit
-** of this unit-type is allowed. if
DependRule::Type is
-** DependRuleUpgrade, for a non-zero counter the
upgrade must be
-** researched, for a zero counter the upgrade must
be unresearched.
+** If DependRule::Type is DependRuleUnitType, the counter is
+** how many units of the unit-type are required, if zero no unit
+** of this unit-type is allowed. if DependRule::Type is
+** DependRuleUpgrade, for a non-zero counter the upgrade must be
+** researched, for a zero counter the upgrade must be unresearched.
**
-** DependRule::Type
+** DependRule::Type
**
-** Type of the rule, DependRuleUnitType for an
unit-type,
-** DependRuleUpgrade for an upgrade.
+** Type of the rule, DependRuleUnitType for an unit-type,
+** DependRuleUpgrade for an upgrade.
**
-** DependRule::Kind
+** DependRule::Kind
**
-** Contains the element of rule. Depending on
DependRule::Type.
+** Contains the element of rule. Depending on DependRule::Type.
**
-** DependRule::Kind::UnitType
+** DependRule::Kind::UnitType
**
-** An unit-type pointer.
+** An unit-type pointer.
**
-** DependRule::Kind::Upgrade
+** DependRule::Kind::Upgrade
**
-** An upgrade pointer.
+** An upgrade pointer.
**
-** DependRule::Rule
+** DependRule::Rule
**
-** For the base upgrade/unit-type the rules which
must be meet.
-** For the requirements alternative or-rules.
+** For the base upgrade/unit-type the rules which must be meet.
+** For the requirements alternative or-rules.
**
*/
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "player.h"
@@ -100,38 +100,38 @@
#include "upgrade.h"
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/// Dependency rule typedef
typedef struct _depend_rule_ DependRule;
enum {
- DependRuleUnitType, ///
Kind is an unit-type
- DependRuleUpgrade, ///
Kind is an upgrade
+ DependRuleUnitType, /// Kind is an unit-type
+ DependRuleUpgrade, /// Kind is an upgrade
};
- /// Dependency rule
+ /// Dependency rule
struct _depend_rule_ {
- DependRule* Next;
/// next hash chain, or rules
- unsigned char Count; /// how many
required
- char Type; /// an
unit-type or upgrade
+ DependRule* Next; /// next hash chain, or rules
+ unsigned char Count; /// how many required
+ char Type; /// an unit-type or upgrade
union {
- UnitType* UnitType; /// unit-type
pointer
- Upgrade* Upgrade; /// upgrade
pointer
- } Kind;
/// required object
- DependRule* Rule;
/// requirements, and rule
+ UnitType* UnitType; /// unit-type pointer
+ Upgrade* Upgrade; /// upgrade pointer
+ } Kind; /// required object
+ DependRule* Rule; /// requirements, and rule
};
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
- /// Register CCL features for dependencies
+ /// Register CCL features for dependencies
extern void DependenciesCclRegister(void);
/// Init the dependencies
extern void InitDependencies(void);
@@ -150,4 +150,4 @@
//@}
-#endif // !__DEPEND_H__
+#endif // !__DEPEND_H__
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/include ccl_helpers.h ccl_sound.h...,
address@hidden <=