~ubuntu-branches/ubuntu/trusty/lordsawar/trusty

« back to all changes in this revision

Viewing changes to src/armybase.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2009-10-21 08:02:12 UTC
  • mfrom: (1.1.8 upstream) (5.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091021080212-wpmd6xdaxrgnn63y
Tags: 0.1.6-1
[ Barry deFreese ]
* New upstream release.
  + Drop libsdl-image1.2 from build-deps, no longer needed.
* Add README.source for quilt patch system.
* Clean up debian/copyright some.
* Bump Standards Version to 3.8.3. (No changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
//  This program is free software; you can redistribute it and/or modify
8
8
//  it under the terms of the GNU General Public License as published by
9
 
//  the Free Software Foundation; either version 2 of the License, or
 
9
//  the Free Software Foundation; either version 3 of the License, or
10
10
//  (at your option) any later version.
11
11
//
12
12
//  This program is distributed in the hope that it will be useful,
22
22
#ifndef ARMY_BASE_H
23
23
#define ARMY_BASE_H
24
24
 
25
 
#include <SDL.h>
 
25
#include <gtkmm.h>
26
26
#include <string>
27
27
 
28
28
 
63
63
          //! Provides a +1 strength to all Army units in a fortified Stack.
64
64
          FORTIFY            = 0x00002000,
65
65
        };
66
 
        static Uint32 bonusFlagsFromString(const std::string str);
67
 
        static std::string bonusFlagsToString(const Uint32 bonus);
 
66
        static guint32 bonusFlagsFromString(const std::string str);
 
67
        static std::string bonusFlagsToString(const guint32 bonus);
68
68
        static ArmyBase::Bonus bonusFlagFromString(const std::string str);
69
69
        static std::string bonusFlagToString(const ArmyBase::Bonus bonus);
70
70
        
92
92
          MOVES_MULTIPLIER = 9,
93
93
        };
94
94
 
95
 
        static Uint32 moveFlagsFromString(const std::string str);
96
 
        static std::string moveFlagsToString(const Uint32 move_bonus);
 
95
        static guint32 moveFlagsFromString(const std::string str);
 
96
        static std::string moveFlagsToString(const guint32 move_bonus);
97
97
 
98
98
        //! Copy constructor.
99
99
        ArmyBase(const ArmyBase& army);
110
110
        // Set functions:
111
111
        
112
112
        //! Set how much gold this unit requires per turn.
113
 
        void setUpkeep(Uint32 upkeep){d_upkeep = upkeep;}
 
113
        void setUpkeep(guint32 upkeep){d_upkeep = upkeep;}
114
114
        
115
115
        //! Set the strength of the army.
116
 
        void setStrength(Uint32 strength) {d_strength = strength;}
 
116
        void setStrength(guint32 strength) {d_strength = strength;}
117
117
 
118
118
        // Get functions
119
119
        
120
120
        //! Returns how many gold pieces this Army needs per turn.
121
 
        Uint32 getUpkeep() const {return d_upkeep;}
 
121
        guint32 getUpkeep() const {return d_upkeep;}
122
122
        
123
123
 
124
124
        //! Get the army bonus of the army.
125
 
        Uint32 getArmyBonus() const {return d_army_bonus;}
 
125
        guint32 getArmyBonus() const {return d_army_bonus;}
126
126
 
127
127
        //! Get the move bonus.
128
128
        /**
131
131
         *
132
132
         * @return A bitwise OR-ing of the values in Tile::Type.
133
133
         */
134
 
        Uint32 getMoveBonus() const {return d_move_bonus;}
 
134
        guint32 getMoveBonus() const {return d_move_bonus;}
135
135
 
136
136
        //! Get the move bonus of the army.
137
 
        Uint32 getMaxMoves() const {return d_max_moves;}
 
137
        guint32 getMaxMoves() const {return d_max_moves;}
138
138
 
139
139
        //! Get the strength of the army.
140
 
        Uint32 getStrength() const {return d_strength;}
 
140
        guint32 getStrength() const {return d_strength;}
141
141
 
142
142
        //! Get the distance this army can see on a hidden map.
143
 
        Uint32 getSight() const {return d_sight;}
 
143
        guint32 getSight() const {return d_sight;}
144
144
 
145
145
        std::string getArmyBonusDescription() const;
146
146
 
163
163
         * @note Some special units have an upkeep of 0, but usually this
164
164
         * value is more than zero.
165
165
         */
166
 
        Uint32 d_upkeep;
 
166
        guint32 d_upkeep;
167
167
 
168
168
        /**
169
169
         * The strength of the Army unit is the prime factor when 
180
180
         * This value does not decrease during gameplay.
181
181
         */
182
182
        //! The base strength of the Army unit.
183
 
        Uint32 d_strength;
 
183
        guint32 d_strength;
184
184
 
185
185
        //! The maximum number of movement points that this Army unit has.
186
186
        /**
195
195
         * tripled due to a Hero carrying an Item, this value does not 
196
196
         * reflect that doubling or tripling.
197
197
         */
198
 
        Uint32 d_max_moves;
 
198
        guint32 d_max_moves;
199
199
 
200
200
        //! How far the Army unit can see on a hidden map.
201
201
        /**
208
208
         *
209
209
         * This value does not decrease during gameplay.
210
210
         */
211
 
        Uint32 d_sight;
 
211
        guint32 d_sight;
212
212
 
213
213
        //! The movement bonus of the Army unit.
214
214
        /**
225
225
         *
226
226
         * This value does not change during gameplay.
227
227
         */
228
 
        Uint32 d_move_bonus;
 
228
        guint32 d_move_bonus;
229
229
 
230
230
        /**
231
231
         * d_army_bonus represents the special abilities this Army unit has.
236
236
         * This value does not change during gameplay.
237
237
         */
238
238
        //! The special capbilities of the Army unit.
239
 
        Uint32 d_army_bonus;
 
239
        guint32 d_army_bonus;
240
240
 
241
241
        //! The amount of XP this Army unit worth when killed by an assailant.
242
242
        /**