source: abuse/trunk/src/go.hpp @ 112

Last change on this file since 112 was 57, checked in by Sam Hocevar, 12 years ago
  • Move each header to the same directory as its corresponding source, to get a better idea of which files are likely to export symbols.
File size: 2.2 KB
RevLine 
[56]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
[2]10#ifndef __GO_HPP_
11#define __GO_HPP_
12#include "objects.hpp"
13
14class elcontrol : public game_object
15{
16public: 
17  short allow_dir; 
18  elcontrol(long X, long Y); 
19  elcontrol(FILE *fp, unsigned char *state_remap);
20  virtual int size() { return game_object::size()+2; }
21  virtual game_objects type() { return O_elcontrol; } 
22  virtual ifield *make_fields(int ystart, ifield *Next);
23  virtual void gather_input(input_manager *inm);
24  virtual void save(FILE *fp) { game_object::save(fp); write_short(fp,allow_dir); }
25  virtual int decide() { return 1; }  // not dead
26  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked         
27  virtual void draw();  // only show when DEV mode is on   
28} ;
29
30 
31
32class elevator : public game_object
33{
34  short dir,speed;
35public : 
36  elcontrol *find_stop();
37  elevator(long X, long Y);   
38  elevator(FILE *fp, unsigned char *state_remap);
39  virtual int size();
40  virtual void recieve_signal(long signal) { ; }
41  virtual game_objects type() { return O_elevator; }
42  virtual ifield *make_fields(int ystart, ifield *Next); 
43  virtual void gather_input(input_manager *inm); 
44  virtual void save(FILE *fp);
45  virtual int can_block(game_object *who);
46  virtual int decide();
47  virtual void draw();  // draw cables above the elevator
48} ;
49
50class sensor : public game_object
51{
52  short xrange,yrange,signal,activate; 
53public :
54  sensor(long X, long Y) { defaults(); xrange=yrange=signal=0; activate=-1; }
55  sensor(FILE *fp, unsigned char *state_remap);
56  virtual int size();
57  virtual game_objects type() { return O_sensor; }
58  virtual ifield *make_fields(int ystart, ifield *Next);
59  virtual void gather_input(input_manager *inm); 
60  virtual void save(FILE *fp);
61
62  virtual void draw();  // only show when DEV mode is on   
63  virtual int decide();
64  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked         
65
66  char *aname();
67  void get_activate(char *name);
68 
69} ;
70
71
72#endif
73
Note: See TracBrowser for help on using the repository browser.