~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/immovable_program.h

  • Committer: Nicolai Hähnle
  • Date: 2010-10-31 12:50:41 UTC
  • mto: (5614.3.1 campaigns)
  • mto: This revision was merged to the branch mainline in revision 5692.
  • Revision ID: prefect_@gmx.net-20101031125041-z0qh421qs7gjix50
Initial cut of ship construction, untested, without proper savegame support

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * Implementation is in immovable.cc
25
25
 */
26
26
 
 
27
#include "buildcost.h"
27
28
#include "immovable.h"
28
29
 
29
30
#include <string>
127
128
                uint8_t     priority;
128
129
        };
129
130
 
 
131
        /**
 
132
         * Puts the immovable into construction mode.
 
133
         *
 
134
         * Parameter syntax:
 
135
         *    parameters ::= animation decay-time
 
136
         * Parameter semantics:
 
137
         *    animation:
 
138
         *       The basic animation to be displayed during construction.
 
139
         *    decay-time:
 
140
         *       Time until construction decays one step if no progress has been made.
 
141
         */
 
142
        struct ActConstruction : public Action {
 
143
                ActConstruction(char * parameters, Immovable_Descr &, std::string const & directory, Profile &);
 
144
                virtual void execute(Game &, Immovable &) const;
 
145
 
 
146
                Duration decaytime() const {return m_decaytime;}
 
147
 
 
148
        private:
 
149
                uint32_t m_animid;
 
150
                Duration m_decaytime;
 
151
        };
130
152
 
131
153
        /// Create a program with a single action.
132
154
        ImmovableProgram(char const * const _name, Action * const action)
161
183
        Actions     m_actions;
162
184
};
163
185
 
 
186
struct ImmovableActionData {
 
187
        ImmovableActionData() {}
 
188
        virtual ~ImmovableActionData() {}
 
189
};
 
190
 
164
191
}
165
192
 
166
193
#endif