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

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