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

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

imlib: remove unused code and tag unused method arguments.

  • Property svn:keywords set to Id
File size: 2.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 __GO_HPP_
12#define __GO_HPP_
13#include "objects.h"
14
15class elcontrol : public game_object
16{
17public:
18  short allow_dir;
19  elcontrol(long X, long Y);
20  elcontrol(FILE *fp, unsigned char *state_remap);
21  virtual int size() { return game_object::size()+2; }
22  virtual game_objects type() { return O_elcontrol; }
23  virtual ifield *make_fields(int ystart, ifield *Next);
24  virtual void gather_input(InputManager *inm);
25  virtual void save(FILE *fp) { game_object::save(fp); write_short(fp,allow_dir); }
26  virtual int decide() { return 1; }  // not dead
27  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked
28  virtual void draw();  // only show when DEV mode is on
29} ;
30
31
32
33class elevator : public game_object
34{
35  short dir,speed;
36public :
37  elcontrol *find_stop();
38  elevator(long X, long Y);
39  elevator(FILE *fp, unsigned char *state_remap);
40  virtual int size();
41  virtual void receive_signal(long signal) { (void)signal; }
42  virtual game_objects type() { return O_elevator; }
43  virtual ifield *make_fields(int ystart, ifield *Next);
44  virtual void gather_input(InputManager *inm);
45  virtual void save(FILE *fp);
46  virtual int can_block(game_object *who);
47  virtual int decide();
48  virtual void draw();  // draw cables above the elevator
49} ;
50
51class sensor : public game_object
52{
53  short xrange,yrange,signal,activate;
54public :
55  sensor(long X, long Y) { defaults(); xrange=yrange=signal=0; activate=-1; }
56  sensor(FILE *fp, unsigned char *state_remap);
57  virtual int size();
58  virtual game_objects type() { return O_sensor; }
59  virtual ifield *make_fields(int ystart, ifield *Next);
60  virtual void gather_input(InputManager *inm);
61  virtual void save(FILE *fp);
62
63  virtual void draw();  // only show when DEV mode is on
64  virtual int decide();
65  virtual int move(int cx, int cy, int button)  { return 0; }  // not blocked
66
67  char *aname();
68  void get_activate(char *name);
69
70} ;
71
72
73#endif
74
Note: See TracBrowser for help on using the repository browser.