Last change
on this file since 2 was
2,
checked in by Sam Hocevar, 17 years ago
|
- imported original 0.7.0 tarball
|
File size:
914 bytes
|
Rev | Line | |
---|
[2] | 1 | #ifndef __CONTROLLED_HPP_ |
---|
| 2 | #define __CONTROLLED_HPP_ |
---|
| 3 | |
---|
| 4 | #include "objects.hpp" |
---|
| 5 | #include "chars.hpp" |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | // The controlled character is you! |
---|
| 9 | |
---|
| 10 | #define CHAR_HUMAN 0 |
---|
| 11 | #define CHAR_IGUANA 1 |
---|
| 12 | |
---|
| 13 | #define GAME_CHARACTERS 2 |
---|
| 14 | #define TOTAL_CHARACTERS 10 |
---|
| 15 | |
---|
| 16 | #define MORPH_TABLE_WIDTH (GAME_CHARACTERS-1) |
---|
| 17 | |
---|
| 18 | extern sequence *morph_table[MORPH_TABLE_WIDTH*MORPH_TABLE_WIDTH]; |
---|
| 19 | |
---|
| 20 | class controlled_character : public game_object |
---|
| 21 | { |
---|
| 22 | game_object *cur_char; |
---|
| 23 | signed char morphing_to; // who you are right now |
---|
| 24 | unsigned long abilities; // if 1<<character bit is set then you have that ability |
---|
| 25 | void change_character(int char_type); |
---|
| 26 | |
---|
| 27 | public : |
---|
| 28 | controlled_character(long X, long Y); |
---|
| 29 | controlled_character(FILE *fp); |
---|
| 30 | virtual int size(); |
---|
| 31 | virtual game_objects type() { return O_starting_position; } |
---|
| 32 | virtual void save(FILE *fp); |
---|
| 33 | virtual int decide(); |
---|
| 34 | |
---|
| 35 | void do_damage(int amount, game_object *who, game_object *from); |
---|
| 36 | } ; |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | #endif |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
Note: See
TracBrowser
for help on using the repository browser.