#ifndef SUPERTUX_GAMELOOP_H
#define SUPERTUX_GAMELOOP_H
+#include <string>
#include <SDL.h>
#include "timer.h"
#include "statistics.h"
-
-using namespace SuperTux;
+#include "math/vector.h"
/* GameLoop modes */
-
enum GameSessionMode {
ST_GL_PLAY,
ST_GL_TEST,
/** Enter the busy loop */
ExitStatus run();
+ void record_demo(const std::string& filename);
+ void play_demo(const std::string& filename);
void draw();
void action(float frame_ratio);
void check_end_conditions();
void start_timers();
void process_events();
+ void capture_demo_step();
void levelintro();
void drawstatus(DrawingContext& context);
void on_escape_press();
void process_menu();
- Uint32 fps_ticks;
Timer2 endsequence_timer;
Level* level;
Sector* currentsector;
static GameSession* current_;
- // for cheating
- std::string last_keys;
-
Statistics* best_level_statistics;
-
ExitStatus exit_status;
+
+ std::ostream* capture_demo_stream;
+ std::string capture_file;
+ std::istream* playback_demo_stream;
+ CodeController* demo_controller;
};
std::string slotinfo(int slot);