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

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

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

  • Property svn:keywords set to Id
File size: 1.3 KB
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
[494]4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
[56]5 *
6 *  This software was released into the Public Domain. As with most public
[555]7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
[56]9 */
10
[2]11#ifndef __DEMO_HPP_
12#define __DEMO_HPP_
13
[484]14#include "lisp.h"
[481]15#include "jwindow.h"
[2]16
17class demo_manager
18{
[492]19  LSymbol *initial_difficulty;
[2]20  bFILE *record_file;
21  int skip_next;
22
23  public :
24  enum demo_state { NORMAL,
[124]25            RECORDING,
26            PLAYING    } state;
[2]27  int set_state(demo_state new_state, char *filename=NULL);
28  demo_state current_state() { return state; }
29  int save_packet(void *packet, int packet_size);   // returns non 0 if actually saved
30  int get_packet(void *packet, int &packet_size);   // returns non 0 if actually loaded
[124]31
[2]32  int start_playing(char *filename);
33  int start_recording(char *filename);
34  void reset_game();
35  int demo_skip() { if (skip_next) { skip_next--; return 1; } else return 0; }
36  demo_manager() { state=NORMAL; skip_next=0; }
37  void do_inputs();
38} ;
39
40extern demo_manager demo_man;
41
[106]42extern void get_event(event &ev);
43extern int event_waiting();
[2]44
45
46
[16]47extern int32_t last_demo_mx,last_demo_my,last_demo_mbut;
[2]48//extern ulong demo_tick_on;
49#endif
50
Note: See TracBrowser for help on using the repository browser.