source: abuse/trunk/src/control.h @ 682

Last change on this file since 682 was 555, checked in by Sam Hocevar, 8 years ago

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

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