[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/include master.h menus.h minimap....
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/include master.h menus.h minimap.... |
Date: |
22 Dec 2003 15:54:08 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 03/12/22 15:54:07
Modified files:
src/include : master.h menus.h minimap.h missile.h movie.h
mpq.h myendian.h
Log message:
Tabs Cleanup
Patches:
Index: stratagus/src/include/master.h
diff -u stratagus/src/include/master.h:1.14 stratagus/src/include/master.h:1.15
--- stratagus/src/include/master.h:1.14 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/master.h Mon Dec 22 15:54:06 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 master.h - The master server headerfile. */
+/address@hidden master.h - The master server headerfile. */
//
-// (c) Copyright 2003 by Tom Zickel and Jimmy Salmon
+// (c) Copyright 2003-2004 by Tom Zickel and Jimmy Salmon
//
// 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: master.h,v 1.14 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: master.h,v 1.15 2003/12/22 04:54:06 wizzard Exp $
#ifndef __MASTER_H__
#define __MASTER_H__
@@ -34,22 +34,22 @@
//@{
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Defines
+-- Defines
----------------------------------------------------------------------------*/
#define MASTER_HOST "mohydine.no-ip.com"
#define MASTER_PORT 7775
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
extern int MetaServerInUse;
@@ -61,4 +61,4 @@
extern int RecvMetaReply(char** reply);
extern int GetMetaParameter(char* reply, int pos, char** value);
-#endif // !__MASTER_H__
+#endif // !__MASTER_H__
Index: stratagus/src/include/menus.h
diff -u stratagus/src/include/menus.h:1.119 stratagus/src/include/menus.h:1.120
--- stratagus/src/include/menus.h:1.119 Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/menus.h Mon Dec 22 15:54:06 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 menus.h - The menu headerfile. */
+/address@hidden menus.h - The menu headerfile. */
//
-// (c) Copyright 1999-2003 by Andreas Arens and Jimmy Salmon
+// (c) Copyright 1999-2004 by Andreas Arens and Jimmy Salmon
//
// 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: menus.h,v 1.119 2003/12/20 05:33:26 jsalmon3 Exp $
+// $Id: menus.h,v 1.120 2003/12/22 04:54:06 wizzard Exp $
#ifndef __MENUS_H__
#define __MENUS_H__
@@ -34,108 +34,108 @@
//@{
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "map.h"
#include "etlib/hash.h"
/*----------------------------------------------------------------------------
--- Defines/Declarations
+-- Defines/Declarations
----------------------------------------------------------------------------*/
// DISABLED grays out the menu item
-#define MI_DISABLED -1
-#define MI_ENABLED 0
+#define MI_DISABLED -1
+#define MI_ENABLED 0
-#define MenuButtonActive 1 /// cursor on button
-#define MenuButtonClicked 2 /// mouse button down
on button
-#define MenuButtonSelected 4 /// selected button
-#define MenuButtonDisabled 8 /// button cannot be
depressed
+#define MenuButtonActive 1 /// cursor on button
+#define MenuButtonClicked 2 /// mouse button down on button
+#define MenuButtonSelected 4 /// selected button
+#define MenuButtonDisabled 8 /// button cannot be depressed
/**
-** Menu button referencing
-** Each button is 300 x 144 => 50 buttons (53 for
Expansion GFX)
-** For multi-version buttons: button - 1 == disabled, + 1 ==
depressed
-** For gems: -1 == disabled, +1 == depressed, +2 checked,
-** +3 checked+depressed
+** Menu button referencing
+** Each button is 300 x 144 => 50 buttons (53 for Expansion GFX)
+** For multi-version buttons: button - 1 == disabled, + 1 == depressed
+** For gems: -1 == disabled, +1 == depressed, +2 checked,
+** +3 checked+depressed
*/
typedef int MenuButtonId;
/// FIXME: FILL IN THIS TABLE!!!!
-#define MBUTTON_MAIN 4 /// FIXME:
write docu
-#define MBUTTON_NETWORK 7
-#define MBUTTON_GM_HALF 10
-#define MBUTTON_132 13
-#define MBUTTON_GM_FULL 16
-#define MBUTTON_GEM_ROUND 19
-#define MBUTTON_GEM_SQUARE 24
-#define MBUTTON_UP_ARROW 29
-#define MBUTTON_DOWN_ARROW 32
-#define MBUTTON_LEFT_ARROW 35
-#define MBUTTON_RIGHT_ARROW 38
-#define MBUTTON_S_KNOB 40
-#define MBUTTON_S_VCONT 42
-#define MBUTTON_S_HCONT 44
-#define MBUTTON_PULLDOWN 46
-#define MBUTTON_VTHIN 48
-#define MBUTTON_FOLDER 51 /* expansion
gfx only */
-
-#define MBUTTON_SC_GEM_ROUND 7
-#define MBUTTON_SC_GEM_SQUARE 12
-#define MBUTTON_SC_UP_ARROW 17
-#define MBUTTON_SC_DOWN_ARROW 20
-#define MBUTTON_SC_LEFT_ARROW 23
-#define MBUTTON_SC_RIGHT_ARROW 26
-#define MBUTTON_SC_S_KNOB 28
-#define MBUTTON_SC_S_VCONT 30
-#define MBUTTON_SC_S_HCONT 33
-#define MBUTTON_SC_PULLDOWN_DOWN_ARROW 50
-#define MBUTTON_SC_PULLDOWN_DISABLED 54
-#define MBUTTON_SC_PULLDOWN 57
-#define MBUTTON_SC_PULLDOWN_TOP
60
-#define MBUTTON_SC_PULLDOWN_MIDDLE 63
-#define MBUTTON_SC_PULLDOWN_BOTTOM 66
-#define MBUTTON_SC_PULLDOWN_BOTTOM_SELECTED 69
-#define MBUTTON_SC_PULLDOWN_TOP_SELECTED 72
-#define MBUTTON_SC_INPUT 81
-#define MBUTTON_SC_BUTTON_LEFT 107
-#define MBUTTON_SC_BUTTON 116
-#define MBUTTON_SC_BUTTON_RIGHT 125
-
-// For the game speed slider in the speed settings screen.
-#define MIN_GAME_SPEED 50
-#define MAX_GAME_SPEED 250
+#define MBUTTON_MAIN 4 /// FIXME: write docu
+#define MBUTTON_NETWORK 7
+#define MBUTTON_GM_HALF 10
+#define MBUTTON_132 13
+#define MBUTTON_GM_FULL 16
+#define MBUTTON_GEM_ROUND 19
+#define MBUTTON_GEM_SQUARE 24
+#define MBUTTON_UP_ARROW 29
+#define MBUTTON_DOWN_ARROW 32
+#define MBUTTON_LEFT_ARROW 35
+#define MBUTTON_RIGHT_ARROW 38
+#define MBUTTON_S_KNOB 40
+#define MBUTTON_S_VCONT 42
+#define MBUTTON_S_HCONT 44
+#define MBUTTON_PULLDOWN 46
+#define MBUTTON_VTHIN 48
+#define MBUTTON_FOLDER 51 /* expansion gfx only */
+
+#define MBUTTON_SC_GEM_ROUND 7
+#define MBUTTON_SC_GEM_SQUARE 12
+#define MBUTTON_SC_UP_ARROW 17
+#define MBUTTON_SC_DOWN_ARROW 20
+#define MBUTTON_SC_LEFT_ARROW 23
+#define MBUTTON_SC_RIGHT_ARROW 26
+#define MBUTTON_SC_S_KNOB 28
+#define MBUTTON_SC_S_VCONT 30
+#define MBUTTON_SC_S_HCONT 33
+#define MBUTTON_SC_PULLDOWN_DOWN_ARROW 50
+#define MBUTTON_SC_PULLDOWN_DISABLED 54
+#define MBUTTON_SC_PULLDOWN 57
+#define MBUTTON_SC_PULLDOWN_TOP 60
+#define MBUTTON_SC_PULLDOWN_MIDDLE 63
+#define MBUTTON_SC_PULLDOWN_BOTTOM 66
+#define MBUTTON_SC_PULLDOWN_BOTTOM_SELECTED 69
+#define MBUTTON_SC_PULLDOWN_TOP_SELECTED 72
+#define MBUTTON_SC_INPUT 81
+#define MBUTTON_SC_BUTTON_LEFT 107
+#define MBUTTON_SC_BUTTON 116
+#define MBUTTON_SC_BUTTON_RIGHT 125
+
+// For the game speed slider in the speed settings screen.
+#define MIN_GAME_SPEED 50
+#define MAX_GAME_SPEED 250
/*----------------------------------------------------------------------------
--- Menus
+-- Menus
----------------------------------------------------------------------------*/
/**
-** Menuitem definition.
+** Menuitem definition.
*/
struct _menuitem_;
typedef struct _menuitem_text_ {
- unsigned char *text;
+ unsigned char* text;
unsigned int tflags;
- char *normalcolor;
- char *reversecolor;
+ char* normalcolor;
+ char* reversecolor;
int align;
void (*action)(struct _menuitem_ *);
} MenuitemText;
typedef struct _menuitem_button_ {
- unsigned char *text;
+ unsigned char* text;
int xsize;
int ysize;
MenuButtonId button;
- char *normalcolor;
- char *reversecolor;
+ char* normalcolor;
+ char* reversecolor;
void (*handler)(void);
unsigned hotkey;
} MenuitemButton;
typedef struct _menuitem_pulldown_ {
- unsigned char **options;
+ unsigned char** options;
int xsize;
int ysize;
MenuButtonId button;
@@ -143,7 +143,7 @@
int noptions;
int defopt;
int curopt;
- int cursel; /* used in popup state */
+ int cursel; /* used in popup state */
unsigned int state;
char *normalcolor;
char *reversecolor;
@@ -157,38 +157,38 @@
int noptions;
int defopt;
int curopt;
- int cursel; /* used in mouse-over state */
+ int cursel; /* used in mouse-over state */
int nlines;
int startline;
int dohandler;
char *normalcolor;
char *reversecolor;
void *(*retrieveopt)(struct _menuitem_ *, int);
- void (*handler)(void); /* for return key */
+ void (*handler)(void); /* for return key */
} MenuitemListbox;
typedef struct _menuitem_vslider_ {
unsigned cflags;
- int xsize; // x-size of slider, not
including buttons
- int ysize; // y-size of slider, not
including buttons
+ int xsize; // x-size of slider, not including buttons
+ int ysize; // y-size of slider, not including buttons
void (*action)(struct _menuitem_ *, int);
int defper;
- int percent; // percent of the way to bottom (0 to 100)
- int curper; /* used in mouse-move state */
- int cursel; /* used in mouse-over state */
+ int percent; // percent of the way to bottom (0 to 100)
+ int curper; /* used in mouse-move state */
+ int cursel; /* used in mouse-over state */
int style;
- void (*handler)(void); /* for return key */
+ void (*handler)(void); /* for return key */
} MenuitemVslider;
typedef struct _menuitem_hslider_ {
unsigned cflags;
- int xsize; // x-size of slider, not
including buttons
- int ysize; // y-size of slider, not
including buttons
+ int xsize; // x-size of slider, not including buttons
+ int ysize; // y-size of slider, not including buttons
void (*action)(struct _menuitem_ *);
int defper;
- int percent; // percent of the way to right (0 to 100)
- int curper; /* used in mouse-move state */
- int cursel; /* used in mouse-over state */
+ int percent; // percent of the way to right (0 to 100)
+ int curper; /* used in mouse-move state */
+ int cursel; /* used in mouse-over state */
int style;
- void (*handler)(void); /* for return key */
+ void (*handler)(void); /* for return key */
} MenuitemHslider;
typedef struct _menuitem_drawfunc_ {
void (*draw)(struct _menuitem_ *);
@@ -198,7 +198,7 @@
int xsize;
int ysize;
MenuButtonId button;
- void (*action)(struct _menuitem_ *, int); /* for key */
+ void (*action)(struct _menuitem_ *, int); /* for key */
int nch;
int maxch;
char *normalcolor;
@@ -217,15 +217,15 @@
struct _menus_;
typedef struct _menuitem_ {
- int mitype;
/// FIXME: write docu
+ int mitype; /// FIXME: write docu
int xofs;
int yofs;
unsigned flags;
int font;
- int transparent;
/// Add the transparent flag to draw a translucide menu
- void (*initfunc)(struct _menuitem_ *); /// constructor
- void (*exitfunc)(struct _menuitem_ *); /// destructor
- struct _menus_ *menu; ///
backpointer for speedups
+ int transparent; /// Add the transparent flag to draw a
translucide menu
+ void (*initfunc)(struct _menuitem_ *); /// constructor
+ void (*exitfunc)(struct _menuitem_ *); /// destructor
+ struct _menus_ *menu; /// backpointer for speedups
union {
MenuitemText text;
MenuitemButton button;
@@ -241,7 +241,7 @@
} d;
} Menuitem;
-#define MI_TYPE_TEXT 1 /// FIXME:
write docu
+#define MI_TYPE_TEXT 1 /// FIXME: write docu
#define MI_TYPE_BUTTON 2
#define MI_TYPE_PULLDOWN 3
#define MI_TYPE_LISTBOX 4
@@ -265,61 +265,61 @@
#define MI_CFLAGS_CONT 8
/// for MI_TYPE_PULLDOWN
-#define MI_PSTATE_PASSIVE 1 /// Pulldown is passive
(grey) drawn
+#define MI_PSTATE_PASSIVE 1 /// Pulldown is passive (grey) drawn
/// for MI_TYPE_GEM
-#define MI_GSTATE_UNCHECKED 0 /// Gem has no check
mark
-#define MI_GSTATE_PASSIVE 1 /// Gem is passive
(grey) drawn
-#define MI_GSTATE_INVISIBLE 2 /// Gem is not drawn
-#define MI_GSTATE_CHECKED 4 /// Gem is with check
mark drawn
+#define MI_GSTATE_UNCHECKED 0 /// Gem has no check mark
+#define MI_GSTATE_PASSIVE 1 /// Gem is passive (grey) drawn
+#define MI_GSTATE_INVISIBLE 2 /// Gem is not drawn
+#define MI_GSTATE_CHECKED 4 /// Gem is with check mark drawn
#define MI_STYLE_SC_VSLIDER 1
#define MI_STYLE_SC_HSLIDER 2
/**
-** Menu definition.
+** Menu definition.
*/
typedef struct _menus_ {
- // FIXME: char* Name; /// menu name
- int X; ///
menu area x pos
- int Y; ///
menu area y pos
- int Width; ///
menu area width
- int Height; ///
menu area height
- char* Panel; /// optional background
panel
- int DefSel; ///
initial selected item number (or -1)
- int NumItems; /// number of
items to follow
- Menuitem* Items; /// buttons, etc
- void (*NetAction)(void); /// network action callback
+ // FIXME: char* Name; /// menu name
+ int X; /// menu area x pos
+ int Y; /// menu area y pos
+ int Width; /// menu area width
+ int Height; /// menu area height
+ char* Panel; /// optional background panel
+ int DefSel; /// initial selected item number (or -1)
+ int NumItems; /// number of items to follow
+ Menuitem* Items; /// buttons, etc
+ void (*NetAction)(void); /// network action callback
} Menu;
/**
-** Struct which specifies the buttons gfx
+** Struct which specifies the buttons gfx
*/
typedef struct _menu_graphics_ {
- char* File[MAX_RACES]; /// resource filename
one for each race
- int Width[MAX_RACES]; ///
Width of button
- int Height[MAX_RACES]; ///
Height of button
- Graphic* Sprite; ///
sprite : FILLED
+ char* File[MAX_RACES]; /// resource filename one for each race
+ int Width[MAX_RACES]; /// Width of button
+ int Height[MAX_RACES]; /// Height of button
+ Graphic* Sprite; /// sprite : FILLED
} MenuGraphics;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern int GuiGameStarted; /// Game Started?
-extern Menu *CurrentMenu; /// Currently processed
menu
-extern MenuGraphics MenuButtonGfx; /// Menu button graphics
+extern int GuiGameStarted; /// Game Started?
+extern Menu *CurrentMenu; /// Currently processed menu
+extern MenuGraphics MenuButtonGfx; /// Menu button graphics
-extern MapInfo *MenuMapInfo; /// MapInfo of map used
in gui menus
-extern char MenuMapFullPath[1024]; /// Full path to currently
selected map
+extern MapInfo *MenuMapInfo; /// MapInfo of map used in gui menus
+extern char MenuMapFullPath[1024]; /// Full path to currently selected map
-extern int nKeyStrokeHelps; /// Number of loaded
keystroke helps
-extern char **KeyStrokeHelps; /// Keystroke help pairs
+extern int nKeyStrokeHelps; /// Number of loaded keystroke helps
+extern char **KeyStrokeHelps; /// Keystroke help pairs
-#define MENUS_MAXMENU 128 /// FIXME: wrong place,
docu
-#define MENUS_MAXFUNC 128 /// FIXME: wrong place,
docu
+#define MENUS_MAXMENU 128 /// FIXME: wrong place, docu
+#define MENUS_MAXFUNC 128 /// FIXME: wrong place, docu
-#ifdef DOXYGEN // no real code, only
for document
+#ifdef DOXYGEN // no real code, only for document
#else
@@ -333,7 +333,7 @@
#endif
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Menu button style to char*
@@ -348,9 +348,8 @@
/// Draw menu
extern void DrawMenu(Menu *menu);
/// Draw menu button
-extern void DrawMenuButton(MenuButtonId button,unsigned flags,int
transparent,int w,int h,
- int x,int y,const int
font,const unsigned char *text,
- char *normalcolor, char
*reversecolor);
+extern void DrawMenuButton(MenuButtonId button, unsigned flags, int
transparent, int w, int h,
+ int x, int y, const int font, const unsigned char *text, char
*normalcolor, char *reversecolor);
/// Set menu backgound and draw it
extern void MenusSetBackground(void);
/// Draw and process a menu
@@ -424,4 +423,4 @@
//@}
-#endif // !__MENUS_H__
+#endif // !__MENUS_H__
Index: stratagus/src/include/minimap.h
diff -u stratagus/src/include/minimap.h:1.23
stratagus/src/include/minimap.h:1.24
--- stratagus/src/include/minimap.h:1.23 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/minimap.h Mon Dec 22 15:54:06 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 minimap.h - The minimap headerfile. */
+/address@hidden minimap.h - The minimap headerfile. */
//
-// (c) Copyright 1998,2000-2003 by Lutz Sammer and Jimmy Salmon
+// (c) Copyright 1998,2000-2003 by Lutz Sammer and Jimmy Salmon
//
// 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: minimap.h,v 1.23 2003/12/20 05:33:27 jsalmon3 Exp $
+// $Id: minimap.h,v 1.24 2003/12/22 04:54:06 wizzard Exp $
#ifndef __MINIMAP_H__
#define __MINIMAP_H__
@@ -34,36 +34,36 @@
//@{
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
-#define MINIMAP_FAC (16*3) /// integer
scale factor
+#define MINIMAP_FAC (16*3) /// integer scale factor
/// unit attacked are shown red for at least this amount of cycles
-#define ATTACK_RED_DURATION (1*CYCLES_PER_SECOND)
+#define ATTACK_RED_DURATION (1*CYCLES_PER_SECOND)
/// unit attacked are shown blinking for this amount of cycles
-#define ATTACK_BLINK_DURATION (7*CYCLES_PER_SECOND)
+#define ATTACK_BLINK_DURATION (7*CYCLES_PER_SECOND)
/// Update seen tile change in minimap
-#define UpdateMinimapSeenXY(tx,ty)
+#define UpdateMinimapSeenXY(tx, ty)
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern int MinimapX; /// Minimap
drawing position x offset
-extern int MinimapY; /// Minimap
drawing position y offset
+extern int MinimapX; /// Minimap drawing position x offset
+extern int MinimapY; /// Minimap drawing position y offset
-extern int MinimapWithTerrain; /// display minimap
with terrain
-extern int MinimapFriendly; /// switch colors of
friendly units
-extern int MinimapShowSelected; /// highlight
selected units
+extern int MinimapWithTerrain; /// display minimap with terrain
+extern int MinimapFriendly; /// switch colors of friendly units
+extern int MinimapShowSelected; /// highlight selected units
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Update tile change in minimap
-extern void UpdateMinimapXY(int tx,int ty);
+extern void UpdateMinimapXY(int tx, int ty);
/// Update minimap terrain
extern void UpdateMinimapTerrain(void);
/// Update complete minimap
@@ -73,17 +73,17 @@
/// Destroy minimap
extern void DestroyMinimap(void);
/// Draw minimap with viewpoint
-extern void DrawMinimap(int vx,int vy);
+extern void DrawMinimap(int vx, int vy);
/// Hide minimap cursor
extern void HideMinimapCursor(void);
/// Draw minimap viewpoint cursor
-extern void DrawMinimapCursor(int vx,int vy);
+extern void DrawMinimapCursor(int vx, int vy);
- /// Convert minimap cursor X position to tile map coordinate
+ /// Convert minimap cursor X position to tile map coordinate
extern int ScreenMinimap2MapX(int);
- /// Convert minimap cursor Y position to tile map coordinate
+ /// Convert minimap cursor Y position to tile map coordinate
extern int ScreenMinimap2MapY(int);
//@}
-#endif // !__MINIMAP_H__
+#endif // !__MINIMAP_H__
Index: stratagus/src/include/missile.h
diff -u stratagus/src/include/missile.h:1.77
stratagus/src/include/missile.h:1.78
--- stratagus/src/include/missile.h:1.77 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/missile.h Mon Dec 22 15:54:06 2003
@@ -4,13 +4,13 @@
// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
-// ______________________ ______________________
-// 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 missile.h - The missile headerfile. */
+/address@hidden missile.h - The missile headerfile. */
//
-// (c) Copyright 1998-2002 by Lutz Sammer
+// (c) Copyright 1998-2002 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: missile.h,v 1.77 2003/12/20 05:33:27 jsalmon3 Exp $
+// $Id: missile.h,v 1.78 2003/12/22 04:54:06 wizzard Exp $
#ifndef __MISSILE_H__
#define __MISSILE_H__
@@ -34,298 +34,298 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/**
-** @struct _missile_type_ missile.h
+** @struct _missile_type_ missile.h
**
-** \#include "missile.h"
+** \#include "missile.h"
**
-** typedef struct _missile_type_ MissileType;
+** typedef struct _missile_type_ MissileType;
**
-** This structure defines the base type information of all
missiles. It
-** contains all information that all missiles of the same type
shares.
-** The fields are filled from the configuration files (CCL). See
-** (define-missile-type).
+** This structure defines the base type information of all missiles. It
+** contains all information that all missiles of the same type shares.
+** The fields are filled from the configuration files (CCL). See
+** (define-missile-type).
**
**
-** The missile-type structure members:
+** The missile-type structure members:
**
-** MissileType::OType
+** MissileType::OType
**
-** Object type (future extensions).
+** Object type (future extensions).
**
-** MissileType::Ident
+** MissileType::Ident
**
-** Unique identifier of the missile-type, used to
reference it in
-** config files and during startup.
-** @note Don't use this member in game, use
instead the pointer
-** to this structure. See MissileTypeByIdent().
+** Unique identifier of the missile-type, used to reference it in
+** config files and during startup.
+** @note Don't use this member in game, use instead the pointer
+** to this structure. See MissileTypeByIdent().
**
-** MissileType::File
+** MissileType::File
**
-** File containing the image (sprite) graphics of
the missile.
-** The file can contain multiple sprite frames.
The sprite frames
-** for the different directions are placed in the
row.
-** The different animations steps are placed in
the column. But
-** the correct order depends on MissileType::Class
(
-** ::_missile_class_, ...). Missiles like fire
have no directions,
-** missiles like arrows have a direction.
-** @note Note that only 8 directions are currently
supported and
-** only 5 are stored in the image (N NW W SW S)
and 4 are mirrored.
+** File containing the image (sprite) graphics of the missile.
+** The file can contain multiple sprite frames. The sprite frames
+** for the different directions are placed in the row.
+** The different animations steps are placed in the column. But
+** the correct order depends on MissileType::Class (
+** ::_missile_class_, ...). Missiles like fire have no directions,
+** missiles like arrows have a direction.
+** @note Note that only 8 directions are currently supported and
+** only 5 are stored in the image (N NW W SW S) and 4 are mirrored.
**
-** MissileType::DrawLevel
+** MissileType::DrawLevel
**
-** The Level/Order to draw the missile in, usually
0-255
+** The Level/Order to draw the missile in, usually 0-255
**
-** MissileType::Width MissileType::Height
+** MissileType::Width MissileType::Height
**
-** Size (width and height) of a frame in the
image. All sprite
-** frames of the missile-type must have the same
size.
+** Size (width and height) of a frame in the image. All sprite
+** frames of the missile-type must have the same size.
**
-** MissileType::SpriteFrames
+** MissileType::SpriteFrames
**
-** Total number of sprite frames in the graphic
image.
-** @note If the image is smaller than the number
of directions,
-** width/height and/or framecount suggest the
engine crashes.
-** @note There is currently a limit of 127 sprite
frames, which
-** can be lifted if needed.
+** Total number of sprite frames in the graphic image.
+** @note If the image is smaller than the number of directions,
+** width/height and/or framecount suggest the engine crashes.
+** @note There is currently a limit of 127 sprite frames, which
+** can be lifted if needed.
**
-** MissileType::NumDirections
+** MissileType::NumDirections
**
-** Number of directions missile can face.
+** Number of directions missile can face.
**
-** MissileType::Transparency
+** MissileType::Transparency
**
-** Set a missile transparency. Current supported
value is 50 only.
+** Set a missile transparency. Current supported value is 50 only.
**
-** MissileType::FiredSound
+** MissileType::FiredSound
**
-** Sound of the missile, if fired. @note currently
not used.
+** Sound of the missile, if fired. @note currently not used.
**
-** MissileType::ImpactSound
+** MissileType::ImpactSound
**
-** Impact sound for this missile.
+** Impact sound for this missile.
**
-** MissileType::CanHitOwner
+** MissileType::CanHitOwner
**
-** Can hit the unit that have fired the missile.
-** @note Currently no missile can hurt its owner.
+** Can hit the unit that have fired the missile.
+** @note Currently no missile can hurt its owner.
**
-** MissileType::FriendlyFire
+** MissileType::FriendlyFire
**
-** Can't hit the units of the same player, that
has the
-** missile fired.
+** Can't hit the units of the same player, that has the
+** missile fired.
**
-** MissileType::Class
+** MissileType::Class
**
-** Class of the missile-type, defines the basic
effects of the
-** missile. Look at the different class
identifiers for more
-** informations (::_missile_class_,
::MissileClassNone, ...).
+** Class of the missile-type, defines the basic effects of the
+** missile. Look at the different class identifiers for more
+** informations (::_missile_class_, ::MissileClassNone, ...).
**
-** MissileType::NumBounces
+** MissileType::NumBounces
**
-** This is the number of bounces, and it is only
valid with
-** MissileClassBounce. The missile will hit this
many times in
-** a row.
+** This is the number of bounces, and it is only valid with
+** MissileClassBounce. The missile will hit this many times in
+** a row.
**
-** MissileType::StartDelay
+** MissileType::StartDelay
**
-** Delay in game cycles after the missile
generation, until the
-** missile animation and effects starts. Delay
denotes the number
-** of display cycles to skip before drawing the
first sprite frame
-** and only happens once at start.
+** Delay in game cycles after the missile generation, until the
+** missile animation and effects starts. Delay denotes the number
+** of display cycles to skip before drawing the first sprite frame
+** and only happens once at start.
**
-** MissileType::Sleep
+** MissileType::Sleep
**
-** This are the number of game cycles to wait for
the next
-** animation or the sleeping between the animation
steps.
-** All animations steps use the same delay. 0 is
the
-** fastest and 255 the slowest animation.
-** @note Perhaps we should later allow animation
scripts for
-** more complex animations.
+** This are the number of game cycles to wait for the next
+** animation or the sleeping between the animation steps.
+** All animations steps use the same delay. 0 is the
+** fastest and 255 the slowest animation.
+** @note Perhaps we should later allow animation scripts for
+** more complex animations.
**
-** MissileType::Speed
+** MissileType::Speed
**
-** The speed how fast the missile moves. 0 the
missile didn't
-** move, 1 is the slowest speed and 32 s the
fastest supported
-** speed. This is how many pixels the missiles
moves with each
-** animation step. The real use of this member
depends on the
-** MissileType::Class
-** @note This is currently only used by the
point-to-point
-** missiles (::MissileClassPointToPoint, ...).
Perhaps we should
-** later allow animation scripts for more complex
animations.
+** The speed how fast the missile moves. 0 the missile didn't
+** move, 1 is the slowest speed and 32 s the fastest supported
+** speed. This is how many pixels the missiles moves with each
+** animation step. The real use of this member depends on the
+** MissileType::Class
+** @note This is currently only used by the point-to-point
+** missiles (::MissileClassPointToPoint, ...). Perhaps we should
+** later allow animation scripts for more complex animations.
**
-** MissileType::Range
+** MissileType::Range
**
-** Determines the range in which a projectile will
deal its damage.
-** A range of 0 will mean that the damage will be
limited to the
-** targetted unit only. So if you shot a missile
at a unit, it
-** would only damage that unit. A value of 1 only
affects the
-** field where the missile hits. A value of 2
would mean that
-** the damage for that particular missile would be
dealt for a range
-** of 1 around the impact spot. All fields that
aren't the center
-** get only 1/SpashFactor of the damage. Fields 2
away get
-** 1/(SplashFactor*2), and following...
+** Determines the range in which a projectile will deal its damage.
+** A range of 0 will mean that the damage will be limited to the
+** targetted unit only. So if you shot a missile at a unit, it
+** would only damage that unit. A value of 1 only affects the
+** field where the missile hits. A value of 2 would mean that
+** the damage for that particular missile would be dealt for a range
+** of 1 around the impact spot. All fields that aren't the center
+** get only 1/SpashFactor of the damage. Fields 2 away get
+** 1/(SplashFactor*2), and following...
**
-** MissileType::SplashFactor
+** MissileType::SplashFactor
**
-** Determines The Splash damage divisor, see Range
+** Determines The Splash damage divisor, see Range
**
-** MissileType::ImpactName
+** MissileType::ImpactName
**
-** The name of the next (other) missile to
generate, when this
-** missile reached its end point or its life time
is over. So it
-** can be used to generate a chain of missiles.
-** @note Used and should only be used during
configuration and
-** startup.
+** The name of the next (other) missile to generate, when this
+** missile reached its end point or its life time is over. So it
+** can be used to generate a chain of missiles.
+** @note Used and should only be used during configuration and
+** startup.
**
-** MissileType::ImpactMissile
+** MissileType::ImpactMissile
**
-** Pointer to the impact missile-type. Used during
run time.
+** Pointer to the impact missile-type. Used during run time.
**
-** MissileType::SmokeName
+** MissileType::SmokeName
**
-** The name of the next (other) missile to
generate a trailing smoke. So it
-** can be used to generate a chain of missiles.
-** @note Used and should only be used during
configuration and
-** startup.
+** The name of the next (other) missile to generate a trailing smoke. So it
+** can be used to generate a chain of missiles.
+** @note Used and should only be used during configuration and
+** startup.
**
-** MissileType::SmokeMissile
+** MissileType::SmokeMissile
**
-** Pointer to the smoke missile-type. Used during
run time.
+** Pointer to the smoke missile-type. Used during run time.
**
-** MissileType::Sprite
+** MissileType::Sprite
**
-** Missile sprite image loaded from
MissileType::File
+** Missile sprite image loaded from MissileType::File
*/
/**
-** @struct _missile_ missile.h
+** @struct _missile_ missile.h
**
-** \#include "missile.h"
+** \#include "missile.h"
**
-** typedef struct _missile_ Missile;
+** typedef struct _missile_ Missile;
**
-** This structure contains all informations about a missile in
game.
-** A missile could have different effects, based on its
missile-type.
-** Missiles could be saved and stored with CCL. See (missile).
-** Currently only a tile, an unit or a missile could be placed on
the map.
+** This structure contains all informations about a missile in game.
+** A missile could have different effects, based on its missile-type.
+** Missiles could be saved and stored with CCL. See (missile).
+** Currently only a tile, an unit or a missile could be placed on the map.
**
**
-** The missile structure members:
+** The missile structure members:
**
-** Missile::X Missile::Y
+** Missile::X Missile::Y
**
-** Missile current map position in pixels. To
convert a map tile
-** position to pixel position use:
(mapx*::TileSizeX+::TileSizeX/2)
-** and (mapy*::TileSizeY+::TileSizeY/2)
-** @note ::TileSizeX%2==0 && ::TileSizeY%2==0 and
::TileSizeX,
-** ::TileSizeY are currently fixed 32 pixels.
+** Missile current map position in pixels. To convert a map tile
+** position to pixel position use: (mapx*::TileSizeX+::TileSizeX/2)
+** and (mapy*::TileSizeY+::TileSizeY/2)
+** @note ::TileSizeX%2==0 && ::TileSizeY%2==0 and ::TileSizeX,
+** ::TileSizeY are currently fixed 32 pixels.
**
-** Missile::SourceX Missile::SourceY
+** Missile::SourceX Missile::SourceY
**
-** Missile original map position in pixels. To
convert a map tile
-** position to pixel position use:
(mapx*::TileSizeX+::TileSizeX/2)
-** and (mapy*::TileSizeY+::TileSizeY/2)
-** @note ::TileSizeX%2==0 && ::TileSizeY%2==0 and
::TileSizeX,
-** ::TileSizeY are currently fixed 32 pixels.
+** Missile original map position in pixels. To convert a map tile
+** position to pixel position use: (mapx*::TileSizeX+::TileSizeX/2)
+** and (mapy*::TileSizeY+::TileSizeY/2)
+** @note ::TileSizeX%2==0 && ::TileSizeY%2==0 and ::TileSizeX,
+** ::TileSizeY are currently fixed 32 pixels.
**
-** Missile::DX Missile::DY
+** Missile::DX Missile::DY
**
-** Missile destination on the map in pixels. If
-** Missile::X==Missile::DX and
Missile::Y==Missile::DY the missile
-** stays at its position. But the movement also
depends on
-** MissileType::Class.
+** Missile destination on the map in pixels. If
+** Missile::X==Missile::DX and Missile::Y==Missile::DY the missile
+** stays at its position. But the movement also depends on
+** MissileType::Class.
**
-** Missile::Type
+** Missile::Type
**
-** ::MissileType pointer of the missile, contains
the shared
-** informations of all missiles of the same type.
+** ::MissileType pointer of the missile, contains the shared
+** informations of all missiles of the same type.
**
-** Missile::SpriteFrame
+** Missile::SpriteFrame
**
-** Current sprite frame of the missile. The range
is from 0
-** to MissileType::SpriteFrames-1. The topmost
bit (128) is
-** used as flag to mirror the sprites in X
direction.
-** Animation scripts aren't currently supported
for missiles,
-** everything is handled by MissileType::Class
-** @note If wanted, we can add animation scripts
support to the
-** engine.
+** Current sprite frame of the missile. The range is from 0
+** to MissileType::SpriteFrames-1. The topmost bit (128) is
+** used as flag to mirror the sprites in X direction.
+** Animation scripts aren't currently supported for missiles,
+** everything is handled by MissileType::Class
+** @note If wanted, we can add animation scripts support to the
+** engine.
**
-** Missile::State
+** Missile::State
**
-** Current state of the missile. Used for a
simple state machine.
+** Current state of the missile. Used for a simple state machine.
**
-** Missile::AnimWait
+** Missile::AnimWait
**
-** Animation wait. Used internally by missile
actions, to run the
-** animation in parallel with the rest.
+** Animation wait. Used internally by missile actions, to run the
+** animation in parallel with the rest.
**
-** Missile::Wait
+** Missile::Wait
**
-** Wait this number of game cycles until the next
state or
-** animation of this missile is handled. This
counts down from
-** MissileType::Sleep to 0.
+** Wait this number of game cycles until the next state or
+** animation of this missile is handled. This counts down from
+** MissileType::Sleep to 0.
**
-** Missile::Delay
+** Missile::Delay
**
-** Number of game cycles the missile isn't shown
on the map.
-** This counts down from MissileType::StartDelay
to 0, before this
-** happens the missile isn't shown and has no
effects.
-** @note This can also be used by
MissileType::Class
-** for temporary removement of the missile.
+** Number of game cycles the missile isn't shown on the map.
+** This counts down from MissileType::StartDelay to 0, before this
+** happens the missile isn't shown and has no effects.
+** @note This can also be used by MissileType::Class
+** for temporary removement of the missile.
**
-** Missile::SourceUnit
+** Missile::SourceUnit
**
-** The owner of the missile. Normally the one who
fired the
-** missile. Used to check units, to prevent
hitting the owner
-** when field MissileType::CanHitOwner==1. Also
used for kill
-** and experience points.
+** The owner of the missile. Normally the one who fired the
+** missile. Used to check units, to prevent hitting the owner
+** when field MissileType::CanHitOwner==1. Also used for kill
+** and experience points.
**
-** Missile::TargetUnit
+** Missile::TargetUnit
**
-** The target of the missile. Normally the unit
which should be
-** hit by the missile.
+** The target of the missile. Normally the unit which should be
+** hit by the missile.
**
-** Missile::Damage
+** Missile::Damage
**
-** Damage done by missile. See also
MissileType::Range, which
-** denoted the 100% damage in center.
+** Damage done by missile. See also MissileType::Range, which
+** denoted the 100% damage in center.
**
-** Missile::TTL
+** Missile::TTL
**
-** Time to live in game cycles of the missile, if
it reaches zero
-** the missile is automatic removed from the map.
If -1 the
-** missile lives for ever and the lifetime is
handled by
-** Missile::Type:MissileType::Class
+** Time to live in game cycles of the missile, if it reaches zero
+** the missile is automatic removed from the map. If -1 the
+** missile lives for ever and the lifetime is handled by
+** Missile::Type:MissileType::Class
**
-** Missile::Hidden
+** Missile::Hidden
**
-** When you set this to 1 the unit becomes hidden
for a while.
+** When you set this to 1 the unit becomes hidden for a while.
**
-** Missile::CurrentStep
+** Missile::CurrentStep
**
-** Movement step. Used for the different
trajectories.
+** Movement step. Used for the different trajectories.
**
-** Missile::TotalStep
+** Missile::TotalStep
**
-** Maximum number of step. When CurrentStep >=
TotalStep, the movement is finished.
+** Maximum number of step. When CurrentStep >= TotalStep, the movement is
finished.
**
-** Missile::Local
+** Missile::Local
**
-** This is a local missile, which can be different
on all
-** computer in play. Used for the user interface
(fe the green
-** cross).
+** This is a local missile, which can be different on all
+** computer in play. Used for the user interface (fe the green
+** cross).
**
-** Missile::MissileSlot
+** Missile::MissileSlot
**
-** Pointer to the slot of this missile. Used for
faster freeing.
+** Pointer to the slot of this missile. Used for faster freeing.
*/
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "unitsound.h"
@@ -335,171 +335,171 @@
#include "video.h"
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Missile-type
+-- Missile-type
----------------------------------------------------------------------------*/
#ifndef __STRUCT_MISSILETYPE__
-#define __STRUCT_MISSILETYPE__ /// protect duplicate
missile typedef
+#define __STRUCT_MISSILETYPE__ /// protect duplicate missile typedef
/**
-** Missile-type typedef
+** Missile-type typedef
*/
typedef struct _missile_type_ MissileType;
#endif
-#define MAX_MISSILES 1800 /// maximum number of missiles
+#define MAX_MISSILES 1800 /// maximum number of missiles
/**
-** Missile-type-class typedef
+** Missile-type-class typedef
*/
typedef int MissileClass;
/**
-** Missile-class this defines how a missile-type reacts.
+** Missile-class this defines how a missile-type reacts.
**
*/
enum _missile_class_ {
- // Missile does nothing
+ // Missile does nothing
MissileClassNone,
- // Missile flies from x,y to x1,y1
+ // Missile flies from x,y to x1,y1
MissileClassPointToPoint,
- // Missile flies from x,y to x1,y1 than shows hit
animation.
+ // Missile flies from x,y to x1,y1 than shows hit animation.
MissileClassPointToPointWithHit,
- // Missile flies from x,y to x1,y1 and animates ONCE
from start to finish and back
+ // Missile flies from x,y to x1,y1 and animates ONCE from start
to finish and back
MissileClassPointToPointCycleOnce,
- // Missile flies from x,y to x1,y1 than bounces three
times.
+ // Missile flies from x,y to x1,y1 than bounces three times.
MissileClassPointToPointBounce,
- // Missile appears at x,y, does it's anim and vanishes.
+ // Missile appears at x,y, does it's anim and vanishes.
MissileClassStay,
- // Missile appears at x,y, then cycle through the frames
once.
+ // Missile appears at x,y, then cycle through the frames once.
MissileClassCycleOnce,
- // Missile doesn't move, than checks the source unit for
HP.
+ // Missile doesn't move, than checks the source unit for HP.
MissileClassFire,
- // Missile shows the hit points.
+ // Missile shows the hit points.
MissileClassHit,
- // Missile flies from x,y to x1,y1 using a
parabolic path
+ // Missile flies from x,y to x1,y1 using a parabolic path
MissileClassParabolic,
- // Missile wait on x,y until a non-air unit comes
by, the explodes.
+ // Missile wait on x,y until a non-air unit comes by, the
explodes.
MissileClassLandMine,
- // Missile appears at x,y, is whirlwind
+ // Missile appears at x,y, is whirlwind
MissileClassWhirlwind,
- // Missile surround x,y
+ // Missile surround x,y
MissileClassFlameShield,
- // Missile is death coil.
+ // Missile is death coil.
MissileClassDeathCoil
};
- /// Base structure of missile-types
+ /// Base structure of missile-types
struct _missile_type_ {
- const void* OType; ///
object type (future extensions)
+ const void* OType; /// object type (future extensions)
- char* Ident; ///
missile name
- char* File; ///
missile sprite file
- int Transparency;
/// Missile transparency possible value is 50 (later 25 and 75)
- int Width;
/// missile width in pixels
- int Height;
/// missile height in pixels
- int DrawLevel;
/// Level to draw missile at
- int SpriteFrames;
/// number of sprite frames in graphic
- int NumDirections;
/// number of directions missile can face
-
- // FIXME: FireSound defined but not used!
- SoundConfig FiredSound; /// fired sound
- SoundConfig ImpactSound; /// impact
sound for this missile-type
-
- unsigned CanHitOwner : 1; /// missile can
hit the owner
- unsigned FriendlyFire : 1; /// missile
can't hit own units
-
- MissileClass Class; /// missile
class
- int NumBounces;
/// number of bounces
- int StartDelay;
/// missile start delay
- int Sleep;
/// missile sleep
- int Speed;
/// missile speed
-
- int Range;
/// missile damage range
- int SplashFactor;
/// missile splash divisor
- char* ImpactName; /// impact
missile-type name
- MissileType*ImpactMissile; /// missile
produces an impact
- char* SmokeName; /// impact
missile-type name
- MissileType*SmokeMissile; /// Trailling
missile
+ char* Ident; /// missile name
+ char* File; /// missile sprite file
+ int Transparency; /// Missile transparency possible value is 50
(later 25 and 75)
+ int Width; /// missile width in pixels
+ int Height; /// missile height in pixels
+ int DrawLevel; /// Level to draw missile at
+ int SpriteFrames; /// number of sprite frames in graphic
+ int NumDirections; /// number of directions missile can face
+
+ // FIXME: FireSound defined but not used!
+ SoundConfig FiredSound; /// fired sound
+ SoundConfig ImpactSound; /// impact sound for this missile-type
+
+ unsigned CanHitOwner:1; /// missile can hit the owner
+ unsigned FriendlyFire:1; /// missile can't hit own units
+
+ MissileClass Class; /// missile class
+ int NumBounces; /// number of bounces
+ int StartDelay; /// missile start delay
+ int Sleep; /// missile sleep
+ int Speed; /// missile speed
+
+ int Range; /// missile damage range
+ int SplashFactor; /// missile splash divisor
+ char* ImpactName; /// impact missile-type name
+ MissileType* ImpactMissile; /// missile produces an impact
+ char* SmokeName; /// impact missile-type name
+ MissileType* SmokeMissile; /// Trailling missile
// --- FILLED UP ---
- Graphic* Sprite;
/// missile sprite image
+ Graphic* Sprite; /// missile sprite image
};
/*----------------------------------------------------------------------------
--- Missile
+-- Missile
----------------------------------------------------------------------------*/
/**
-** Missile typedef.
+** Missile typedef.
*/
typedef struct _missile_ Missile;
typedef void FuncController(Missile *);
/// Missile on the map
struct _missile_ {
- int SourceX;
/// Missile Source X
- int SourceY;
/// Missile Source Y
- int X;
/// missile pixel position
- int Y;
/// missile pixel position
- int DX;
/// missile pixel destination
- int DY;
/// missile pixel destination
- MissileType*Type; ///
missile-type pointer
- int SpriteFrame;
/// sprite frame counter
- int State;
/// state
- int AnimWait;
/// Animation wait.
- int Wait;
/// delay between frames
- int Delay;
/// delay to showup
+ int SourceX; /// Missile Source X
+ int SourceY; /// Missile Source Y
+ int X; /// missile pixel position
+ int Y; /// missile pixel position
+ int DX; /// missile pixel destination
+ int DY; /// missile pixel destination
+ MissileType* Type; /// missile-type pointer
+ int SpriteFrame; /// sprite frame counter
+ int State; /// state
+ int AnimWait; /// Animation wait.
+ int Wait; /// delay between frames
+ int Delay; /// delay to showup
- Unit* SourceUnit; /// unit that
fires (could be killed)
- Unit* TargetUnit; /// target
unit, used for spells
+ Unit* SourceUnit; /// unit that fires (could be killed)
+ Unit* TargetUnit; /// target unit, used for spells
- int Damage;
/// direct damage that missile applies
+ int Damage; /// direct damage that missile applies
- int TTL;
/// time to live (ticks) used for spells
- int Hidden; /// If
this is 1 then the missile is invisible
+ int TTL; /// time to live (ticks) used for spells
+ int Hidden; /// If this is 1 then the missile is invisible
// Internal use:
- int CurrentStep;
/// Current step (0 <= x < TotalStep).
- int TotalStep;
/// Total step.
+ int CurrentStep; /// Current step (0 <= x < TotalStep).
+ int TotalStep; /// Total step.
- unsigned Local : 1; ///
missile is a local missile
- Missile** MissileSlot; ///
pointer to missile slot
+ unsigned Local:1; /// missile is a local missile
+ Missile** MissileSlot; /// pointer to missile slot
};
typedef struct _burning_building_frame_ {
- int Percent;
/// HP percent
- MissileType* Missile;
/// Missile to draw
- struct _burning_building_frame_* Next; /// Next pointer
+ int Percent; /// HP percent
+ MissileType* Missile; /// Missile to draw
+ struct _burning_building_frame_* Next; /// Next pointer
} BurningBuildingFrame;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
-extern char** MissileTypeWcNames; /// Mapping wc-number 2 symbol
+extern char** MissileTypeWcNames; /// Mapping wc-number 2 symbol
-extern MissileType* MissileTypes; /// All
missile-types
+extern MissileType* MissileTypes; /// All missile-types
-extern const char* MissileClassNames[]; ///
Missile class names
+extern const char* MissileClassNames[]; /// Missile class names
-extern BurningBuildingFrame *BurningBuildingFrames; /// Burning building
frames
+extern BurningBuildingFrame* BurningBuildingFrames; /// Burning building
frames
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
-// In ccl_missile.c
+// In ccl_missile.c
/// register ccl features
extern void MissileCclRegister(void);
-// In missile.c
+// In missile.c
/// load the graphics for the missiles
extern void LoadMissileSprites(void);
@@ -508,16 +508,16 @@
/// Get missile-type by ident
extern MissileType* MissileTypeByIdent(const char*);
/// create a missile
-extern Missile* MakeMissile(MissileType*,int,int,int,int);
+extern Missile* MakeMissile(MissileType*, int, int, int, int);
/// create a local missile
-extern Missile* MakeLocalMissile(MissileType*,int,int,int,int);
+extern Missile* MakeLocalMissile(MissileType*, int, int, int, int);
/// fire a missile
extern void FireMissile(Unit*);
/// check if missile should be drawn
extern int CheckMissileToBeDrawn(const Missile* missile);
/// Draw all missiles
-extern void DrawMissile(const MissileType* mtype,int frame,int x,int y);
+extern void DrawMissile(const MissileType* mtype, int frame, int x, int y);
extern int FindAndSortMissiles(const Viewport* vp, Missile** table);
/// handle all missiles
@@ -529,7 +529,7 @@
extern MissileType* MissileBurningBuilding(int percent);
/// Save missile-types
-extern void SaveMissileTypes(CLFile *);
+extern void SaveMissileTypes(CLFile*);
/// Save missiles
extern void SaveMissiles(CLFile*);
@@ -559,4 +559,4 @@
//@}
-#endif // !__MISSILE_H__
+#endif // !__MISSILE_H__
Index: stratagus/src/include/movie.h
diff -u stratagus/src/include/movie.h:1.9 stratagus/src/include/movie.h:1.10
--- stratagus/src/include/movie.h:1.9 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/movie.h Mon Dec 22 15:54:07 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 movie.h - The movie header file. */
+/address@hidden movie.h - The movie header file. */
//
-// (c) Copyright 2002 by Lutz Sammer
+// (c) Copyright 2002-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: movie.h,v 1.9 2003/12/20 05:33:27 jsalmon3 Exp $
+// $Id: movie.h,v 1.10 2003/12/22 04:54:07 wizzard Exp $
#ifndef __MOVIE_H__
#define __MOVIE_H__
@@ -34,39 +34,39 @@
//@{
/*----------------------------------------------------------------------------
--- Documentation
+-- Documentation
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/**
-** Play movie flags.
+** Play movie flags.
*/
enum _play_movie_flags_ {
- PlayMovieFullScreen = 1, /// Switch to
full screen
- PlayMovieZoomScreen = 2, /// Zoom to
screen size
- PlayMovieKeepAspect = 4, /// Keep the
aspect while zooming
+ PlayMovieFullScreen = 1, /// Switch to full screen
+ PlayMovieZoomScreen = 2, /// Zoom to screen size
+ PlayMovieKeepAspect = 4, /// Keep the aspect while zooming
};
/**
-** Movie handle.
+** Movie handle.
*/
typedef struct _movie_ {
- void* File; ///
Demux handler
+ void* File; /// Demux handler
} Movie;
/*----------------------------------------------------------------------------
--- Variables
+-- Variables
----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Play a movie file
@@ -79,4 +79,4 @@
//@}
-#endif // !__MOVIE_H__
+#endif // !__MOVIE_H__
Index: stratagus/src/include/mpq.h
diff -u stratagus/src/include/mpq.h:1.9 stratagus/src/include/mpq.h:1.10
--- stratagus/src/include/mpq.h:1.9 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/mpq.h Mon Dec 22 15:54:07 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 mpq.h - The mpq headerfile. */
+/address@hidden mpq.h - The mpq headerfile. */
//
-// (c) Copyright 2002 by Jimmy Salmon, Lutz Sammer
+// (c) Copyright 2002-2004 by Jimmy Salmon, 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: mpq.h,v 1.9 2003/12/20 05:33:27 jsalmon3 Exp $
+// $Id: mpq.h,v 1.10 2003/12/22 04:54:07 wizzard Exp $
#ifndef __MPQ_H__
#define __MPQ_H__
@@ -34,33 +34,33 @@
//@{
/*----------------------------------------------------------------------------
--- Defines
+-- Defines
----------------------------------------------------------------------------*/
-#define UInt32 unsigned long
+#define UInt32 unsigned long
/*----------------------------------------------------------------------------
--- Declarations
+-- Declarations
----------------------------------------------------------------------------*/
/// Block table
-extern UInt32 *MpqBlockTable;
+extern UInt32* MpqBlockTable;
/// Filename table
-extern char *MpqFilenameTable;
+extern char* MpqFilenameTable;
/// Identify table
-extern char *MpqIdentifyTable;
+extern char* MpqIdentifyTable;
/// File count
extern int MpqFileCount;
/*----------------------------------------------------------------------------
--- Functions
+-- Functions
----------------------------------------------------------------------------*/
/// Read mpq info
-extern int MpqReadInfo(FILE *fpMpq);
+extern int MpqReadInfo(FILE* fpMpq);
/// Extract mpq entry
-extern int MpqExtractTo(unsigned char *mpqbuf, UInt32 entry, FILE *fpMpq);
+extern int MpqExtractTo(unsigned char* mpqbuf, UInt32 entry, FILE* fpMpq);
/// Clean mpq
extern void CleanMpq(void);
Index: stratagus/src/include/myendian.h
diff -u stratagus/src/include/myendian.h:1.18
stratagus/src/include/myendian.h:1.19
--- stratagus/src/include/myendian.h:1.18 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/myendian.h Mon Dec 22 15:54:07 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 myendian.h - The endian-specific headerfile. */
+/address@hidden myendian.h - The endian-specific headerfile. */
//
-// (c) Copyright 2000,2001 by Lutz Sammer
+// (c) Copyright 2000-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: myendian.h,v 1.18 2003/12/20 05:33:27 jsalmon3 Exp $
+// $Id: myendian.h,v 1.19 2003/12/22 04:54:07 wizzard Exp $
#ifndef __ENDIAN_H__
#define __ENDIAN_H__
@@ -34,45 +34,45 @@
//@{
// ============================================================================
-#ifdef USE_SDL // {
+#ifdef USE_SDL // {
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#include "SDL_endian.h"
/*----------------------------------------------------------------------------
--- Macros
+-- Macros
----------------------------------------------------------------------------*/
/**
-** Convert a 16 bit value in little endian and return it in native
format.
+** Convert a 16 bit value in little endian and return it in native format.
*/
-#define ConvertLE16(v) SDL_SwapLE16((v))
+#define ConvertLE16(v) SDL_SwapLE16((v))
/**
-** Convert a 32 bit value in little endian and return it in native
format.
+** Convert a 32 bit value in little endian and return it in native format.
*/
-#define ConvertLE32(v) SDL_SwapLE32((v))
+#define ConvertLE32(v) SDL_SwapLE32((v))
/**
-** Access a 16 bit value in little endian and return it in native
format.
+** Access a 16 bit value in little endian and return it in native format.
*/
#ifdef __ULTRA_SPARC__
extern unsigned short inline AccessLE16(unsigned char *p) {
- return p[0] + (p[1] << 8);
+ return p[0] + (p[1] << 8);
}
#else
-#define AccessLE16(p) SDL_SwapLE16(*((unsigned
short*)(p)))
+#define AccessLE16(p) SDL_SwapLE16(*((unsigned short*)(p)))
#endif
/**
-** Access a 32 bit value in little endian and return it in native
format.
+** Access a 32 bit value in little endian and return it in native format.
*/
#ifdef __ULTRA_SPARC__
@@ -82,13 +82,13 @@
#else
-#define AccessLE32(p) SDL_SwapLE32(*((unsigned
int*)(p)))
+#define AccessLE32(p) SDL_SwapLE32(*((unsigned int*)(p)))
#endif
/**
-** Fetch a 16 bit value in little endian with incrementing pointer
-** and return it in native format.
+** Fetch a 16 bit value in little endian with incrementing pointer
+** and return it in native format.
*/
#ifdef __ULTRA_SPARC__
@@ -98,17 +98,17 @@
(*pp) += 2;
return i;
}
-#define FetchLE16(p) _FetchLE16(&p)
+#define FetchLE16(p) _FetchLE16(&p)
#else
-#define FetchLE16(p) SDL_SwapLE16(*((unsigned
short*)(p))++)
+#define FetchLE16(p) SDL_SwapLE16(*((unsigned short*)(p))++)
#endif
/**
-** Fetch a 32 bit value in little endian with incrementing pointer
-** and return it in native format.
+** Fetch a 32 bit value in little endian with incrementing pointer
+** and return it in native format.
*/
#ifdef __ULTRA_SPARC__
@@ -118,20 +118,20 @@
(*pp) += 4;
return i;
}
-#define FetchLE32(p) _FetchLE32(&p)
+#define FetchLE32(p) _FetchLE32(&p)
#else
-#define FetchLE32(p) SDL_SwapLE32(*((unsigned
int*)(p))++)
+#define FetchLE32(p) SDL_SwapLE32(*((unsigned int*)(p))++)
#endif
// ============================================================================
-#else // }{ SDL
+#else // }{ SDL
// ============================================================================
/*----------------------------------------------------------------------------
--- Includes
+-- Includes
----------------------------------------------------------------------------*/
#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(_MSC_VER)
@@ -139,7 +139,7 @@
#include <sys/types.h>
#else
#include <endian.h>
-#endif // BSD
+#endif // BSD
#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
#include <byteswap.h>
@@ -150,81 +150,81 @@
#endif
/*----------------------------------------------------------------------------
--- Macros
+-- Macros
----------------------------------------------------------------------------*/
#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
/**
-** Convert a 16 bit value in little endian and return it in native
format.
+** Convert a 16 bit value in little endian and return it in native format.
*/
-#define ConvertLE16(v) bswap_16((v))
+#define ConvertLE16(v) bswap_16((v))
/**
-** Convert a 32 bit value in little endian and return it in native
format.
+** Convert a 32 bit value in little endian and return it in native format.
*/
-#define ConvertLE32(v) bswap_32((v))
+#define ConvertLE32(v) bswap_32((v))
#else
#if defined(__APPLE__)
/**
-** Convert a 16 bit value in little endian and return it in native
format.
+** Convert a 16 bit value in little endian and return it in native format.
*/
-#define ConvertLE16(v) NXSwapLittleShortToHost(v)
+#define ConvertLE16(v) NXSwapLittleShortToHost(v)
/**
-** Convert a 32 bit value in little endian and return it in native
format.
+** Convert a 32 bit value in little endian and return it in native format.
*/
-#define ConvertLE32(v) NXSwapLittleIntToHost(v)
+#define ConvertLE32(v) NXSwapLittleIntToHost(v)
#else
/**
-** Convert a 16 bit value in little endian and return it in native
format.
+** Convert a 16 bit value in little endian and return it in native format.
*/
-#define ConvertLE16(v) (v)
+#define ConvertLE16(v) (v)
/**
-** Convert a 32 bit value in little endian and return it in native
format.
+** Convert a 32 bit value in little endian and return it in native format.
*/
-#define ConvertLE32(v) (v)
+#define ConvertLE32(v) (v)
#endif // defined(__APPLE__)
-#endif // ! defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
+#endif // ! defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
/**
-** Access a 16 bit value in little endian and return it in native
format.
+** Access a 16 bit value in little endian and return it in native format.
*/
-#define AccessLE16(p) ConvertLE16(*((unsigned
short*)(p)))
+#define AccessLE16(p) ConvertLE16(*((unsigned short*)(p)))
/**
-** Access a 32 bit value in little endian and return it in native
format.
+** Access a 32 bit value in little endian and return it in native format.
*/
-#define AccessLE32(p) ConvertLE32(*((unsigned
int*)(p)))
+#define AccessLE32(p) ConvertLE32(*((unsigned int*)(p)))
/**
-** Fetch a 16 bit value in little endian with incrementing pointer
-** and return it in native format.
+** Fetch a 16 bit value in little endian with incrementing pointer
+** and return it in native format.
*/
-#define FetchLE16(p) ConvertLE16(*((unsigned
short*)(p))++)
+#define FetchLE16(p) ConvertLE16(*((unsigned short*)(p))++)
/**
-** Fetch a 32 bit value in little endian with incrementing pointer
-** and return it in native format.
+** Fetch a 32 bit value in little endian with incrementing pointer
+** and return it in native format.
*/
-#define FetchLE32(p) ConvertLE32(*((unsigned
int*)(p))++)
+#define FetchLE32(p) ConvertLE32(*((unsigned int*)(p))++)
-#endif // } !SDL
+#endif // } !SDL
// ============================================================================
/**
-** Fetch a 8 bit value with incrementing pointer
-** and return it in native format.
+** Fetch a 8 bit value with incrementing pointer
+** and return it in native format.
*/
-#define FetchByte(p) (*((unsigned char*)(p))++)
+#define FetchByte(p) (*((unsigned char*)(p))++)
//@}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/include master.h menus.h minimap....,
address@hidden <=