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

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

lisp: populate LispSymbol? with symbol-related methods.

  • 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 *
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 __DEMO_HPP_
11#define __DEMO_HPP_
12
13#include "lisp.h"
14#include "jwindow.h"
15
16class demo_manager
17{
18  LispSymbol *initial_difficulty;
19  bFILE *record_file;
20  int skip_next;
21
22  public :
23  enum demo_state { NORMAL,
24            RECORDING,
25            PLAYING    } state;
26  int set_state(demo_state new_state, char *filename=NULL);
27  demo_state current_state() { return state; }
28  int save_packet(void *packet, int packet_size);   // returns non 0 if actually saved
29  int get_packet(void *packet, int &packet_size);   // returns non 0 if actually loaded
30
31  int start_playing(char *filename);
32  int start_recording(char *filename);
33  void reset_game();
34  int demo_skip() { if (skip_next) { skip_next--; return 1; } else return 0; }
35  demo_manager() { state=NORMAL; skip_next=0; }
36  void do_inputs();
37} ;
38
39extern demo_manager demo_man;
40
41extern void get_event(event &ev);
42extern int event_waiting();
43
44
45
46extern int32_t last_demo_mx,last_demo_my,last_demo_mbut;
47//extern ulong demo_tick_on;
48#endif
49
Note: See TracBrowser for help on using the repository browser.