source: abuse/trunk/src/go.h @ 484

Last change on this file since 484 was 481, checked in by Sam Hocevar, 11 years ago

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

  • Property svn:keywords set to Id
File size: 2.1 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 __GO_HPP_
11#define __GO_HPP_
12#include "objects.h"
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(InputManager *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(InputManager *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(InputManager *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.