source: abuse/branches/pd/abuse/inc/go.hpp @ 608

Last change on this file since 608 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
File size: 1.9 KB
Line 
1#ifndef __GO_HPP_
2#define __GO_HPP_
3#include "objects.hpp"
4
5class elcontrol : public game_object
6{
7public: 
8  short allow_dir; 
9  elcontrol(long X, long Y); 
10  elcontrol(FILE *fp, unsigned char *state_remap);
11  virtual int size() { return game_object::size()+2; }
12  virtual game_objects type() { return O_elcontrol; } 
13  virtual ifield *make_fields(int ystart, ifield *Next);
14  virtual void gather_input(input_manager *inm);
15  virtual void save(FILE *fp) { game_object::save(fp); write_short(fp,allow_dir); }
16  virtual int decide() { return 1; }  // not dead
17  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked         
18  virtual void draw();  // only show when DEV mode is on   
19} ;
20
21 
22
23class elevator : public game_object
24{
25  short dir,speed;
26public : 
27  elcontrol *find_stop();
28  elevator(long X, long Y);   
29  elevator(FILE *fp, unsigned char *state_remap);
30  virtual int size();
31  virtual void recieve_signal(long signal) { ; }
32  virtual game_objects type() { return O_elevator; }
33  virtual ifield *make_fields(int ystart, ifield *Next); 
34  virtual void gather_input(input_manager *inm); 
35  virtual void save(FILE *fp);
36  virtual int can_block(game_object *who);
37  virtual int decide();
38  virtual void draw();  // draw cables above the elevator
39} ;
40
41class sensor : public game_object
42{
43  short xrange,yrange,signal,activate; 
44public :
45  sensor(long X, long Y) { defaults(); xrange=yrange=signal=0; activate=-1; }
46  sensor(FILE *fp, unsigned char *state_remap);
47  virtual int size();
48  virtual game_objects type() { return O_sensor; }
49  virtual ifield *make_fields(int ystart, ifield *Next);
50  virtual void gather_input(input_manager *inm); 
51  virtual void save(FILE *fp);
52
53  virtual void draw();  // only show when DEV mode is on   
54  virtual int decide();
55  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked         
56
57  char *aname();
58  void get_activate(char *name);
59 
60} ;
61
62
63#endif
64
Note: See TracBrowser for help on using the repository browser.