~ubuntu-branches/ubuntu/lucid/warzone2100/lucid

« back to all changes in this revision

Viewing changes to src/droiddef.h

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger, Paul Wise, Christoph Egger
  • Date: 2009-06-29 17:12:52 UTC
  • mfrom: (1.1.11 upstream) (2.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090629171252-5ddnlfg3zfchrega
Tags: 2.2.1+dfsg1-1
[ Paul Wise ]
* New upstream release (Closes: #534962)
* Adjust the flex build-depends to take account of the conflict
  with all the versions of flex 2.5.34 (LP: #372872)
* Make the -music Recommends more strict, 2.1 music doesn't work
  with 2.2.
* Upstream moved the downloads to sourceforge, update the watch file
* Bump Standards-Version, no changes needed
* Drop use of dh_desktop since it no longer does anything
* Recommend the new warzone2100-video package, version 2.2 or similar
* Mention the warzone2100 crash reports in the -dbg package description

[ Christoph Egger ]
* Replace CC-2.0 graphic from cybersphinx, create a new tarball
* Add myself to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        This file is part of Warzone 2100.
3
3
        Copyright (C) 1999-2004  Eidos Interactive
4
 
        Copyright (C) 2005-2007  Warzone Resurrection Project
 
4
        Copyright (C) 2005-2009  Warzone Resurrection Project
5
5
 
6
6
        Warzone 2100 is free software; you can redistribute it and/or modify
7
7
        it under the terms of the GNU General Public License as published by
26
26
 
27
27
#include "lib/gamelib/animobj.h"
28
28
 
 
29
#include "stringdef.h"
29
30
#include "basedef.h"
30
31
#include "movedef.h"
31
32
#include "statsdef.h"
32
33
#include "weapondef.h"
33
34
 
34
 
/* The number of components in the asParts / asBits arrays */
35
 
#define DROID_MAXCOMP           (COMP_NUMCOMPONENTS - 1)//(COMP_NUMCOMPONENTS - 2)
 
35
/*!
 
36
 * The number of components in the asParts / asBits arrays.
 
37
 * Weapons are stored seperately, thus the maximum index into the array
 
38
 * is 1 smaller than the number of components.
 
39
 */
 
40
#define DROID_MAXCOMP (COMP_NUMCOMPONENTS - 1)
36
41
 
37
42
/* The maximum number of droid weapons */
38
43
#define DROID_MAXWEAPS          3
92
97
 
93
98
        UBYTE           NameVersion;                //< Version number used in name (e.g. Viper Mk "I" would be stored as 1 - Viper Mk "X" as 10)
94
99
 
95
 
        /* The droid components.  This array is indexed by COMPONENT_TYPE
96
 
         * so the ECM would be accessed using asParts[COMP_ECM].
 
100
        /*!
 
101
         * The droid components.
 
102
         *
 
103
         * This array is indexed by COMPONENT_TYPE so the ECM would be accessed
 
104
         * using asParts[COMP_ECM].
97
105
         * COMP_BRAIN is an index into the asCommandDroids array NOT asBrainStats
 
106
         *
 
107
         * Weapons are stored in asWeaps, _not_ here at index COMP_WEAPON! (Which is the reason we do not have a COMP_NUMCOMPONENTS sized array here.)
98
108
         */
99
109
        SDWORD          asParts[DROID_MAXCOMP];
100
110
 
109
119
        DROID_TYPE      droidType;                  ///< The type of droid
110
120
        UDWORD          multiPlayerID;              ///< multiplayer unique descriptor(cant use id's for templates). Used for save games as well now - AB 29/10/98
111
121
        struct _droid_template* psNext;             ///< Pointer to next template
112
 
} DROID_TEMPLATE;
 
122
} WZ_DECL_MAY_ALIAS DROID_TEMPLATE;
113
123
 
114
 
typedef struct _droid
 
124
typedef struct DROID
115
125
{
116
126
        /* The common structure elements for all objects */
117
 
        BASE_ELEMENTS(struct _droid);
 
127
        BASE_ELEMENTS(struct DROID);
118
128
 
119
129
        /// UTF-8 name of the droid. This is generated from the droid template and cannot be changed by the game player after creation.
120
130
        char            aName[MAX_STR_LENGTH];
135
145
        UDWORD          baseSpeed;                      ///< the base speed dependant on propulsion type
136
146
        UDWORD          originalBody;                   ///< the original body points
137
147
        float           experience;
138
 
        UWORD           turretRotation[DROID_MAXWEAPS]; ///< Watermelon:turretRotation info for multiple turrents :)
139
 
        UWORD           turretPitch[DROID_MAXWEAPS];    ///< Watermelon:turrentPitch info for multiple turrents :)
140
148
        UBYTE           NameVersion;                    ///< Version number used for generating on-the-fly names (e.g. Viper Mk "I" would be stored as 1 - Viper Mk "X" as 10)  - copied from droid template
141
149
 
142
150
        SWORD           resistance;                     ///< used in Electronic Warfare
146
154
 
147
155
        // The group the droid belongs to
148
156
        struct _droid_group* psGroup;
149
 
        struct _droid*  psGrpNext;
 
157
        struct DROID*  psGrpNext;
150
158
        struct _structure* psBaseStruct;                ///< a structure that this droid might be associated with. For VTOLs this is the rearming pad
151
159
        // queued orders
152
160
        SDWORD          listSize;