Last change
on this file since 56 was
56,
checked in by Sam Hocevar, 14 years ago
|
- Add licensing terms to most C / C++ files (Ref #5).
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * Abuse - dark 2D side-scrolling platform game |
---|
3 | * Copyright (c) 1995 Crack dot Com |
---|
4 | * |
---|
5 | * This software was released into the Public Domain. As with most public |
---|
6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
7 | * Jonathan Clark. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __CONTROLLED_HPP_ |
---|
11 | #define __CONTROLLED_HPP_ |
---|
12 | |
---|
13 | #include "objects.hpp" |
---|
14 | #include "chars.hpp" |
---|
15 | |
---|
16 | |
---|
17 | // The controlled character is you! |
---|
18 | |
---|
19 | #define CHAR_HUMAN 0 |
---|
20 | #define CHAR_IGUANA 1 |
---|
21 | |
---|
22 | #define GAME_CHARACTERS 2 |
---|
23 | #define TOTAL_CHARACTERS 10 |
---|
24 | |
---|
25 | #define MORPH_TABLE_WIDTH (GAME_CHARACTERS-1) |
---|
26 | |
---|
27 | extern sequence *morph_table[MORPH_TABLE_WIDTH*MORPH_TABLE_WIDTH]; |
---|
28 | |
---|
29 | class controlled_character : public game_object |
---|
30 | { |
---|
31 | game_object *cur_char; |
---|
32 | signed char morphing_to; // who you are right now |
---|
33 | unsigned long abilities; // if 1<<character bit is set then you have that ability |
---|
34 | void change_character(int char_type); |
---|
35 | |
---|
36 | public : |
---|
37 | controlled_character(long X, long Y); |
---|
38 | controlled_character(FILE *fp); |
---|
39 | virtual int size(); |
---|
40 | virtual game_objects type() { return O_starting_position; } |
---|
41 | virtual void save(FILE *fp); |
---|
42 | virtual int decide(); |
---|
43 | |
---|
44 | void do_damage(int amount, game_object *who, game_object *from); |
---|
45 | } ; |
---|
46 | |
---|
47 | |
---|
48 | #endif |
---|
49 | |
---|
50 | |
---|
51 | |
---|
Note: See
TracBrowser
for help on using the repository browser.