2015-01-02 14:09:29 +00:00
|
|
|
#ifndef _TTRTS_FILESYSTEM_H_
|
|
|
|
#define _TTRTS_FILESYSTEM_H_
|
|
|
|
|
|
|
|
#include <string>
|
2015-01-02 15:03:29 +00:00
|
|
|
#include <chrono>
|
2015-01-02 14:09:29 +00:00
|
|
|
|
2015-01-02 15:03:29 +00:00
|
|
|
#include "game.h"
|
|
|
|
|
|
|
|
#define STRINGIFY(x) _STRINGIFY(x)
|
|
|
|
#define _STRINGIFY(x) #x
|
|
|
|
|
|
|
|
bool FileExists( const std::string& name );
|
|
|
|
|
|
|
|
void WaitForFile( const std::string& name, const std::chrono::milliseconds& time );
|
|
|
|
|
2015-01-03 19:31:42 +00:00
|
|
|
bool OutputGameStateFile(CTTRTSGame &game);
|
2015-01-02 15:03:29 +00:00
|
|
|
|
2015-01-03 19:27:08 +00:00
|
|
|
std::string GetOrdersFromPlayerFile(const CTTRTSGame &game, player_t &player);
|
|
|
|
|
2015-01-02 17:14:16 +00:00
|
|
|
CTTRTSGame GetGameFromFile( const std::string& file );
|
|
|
|
|
2015-01-02 15:03:29 +00:00
|
|
|
std::string getMapsDir();
|
|
|
|
std::string getGamesDir();
|
2015-01-02 14:09:29 +00:00
|
|
|
|
2015-01-02 15:06:04 +00:00
|
|
|
int runFromFilesystem(int argc, char* argv[]);
|
|
|
|
|
2015-01-03 20:04:31 +00:00
|
|
|
int CreateAndCleanGameDir(const std::string& gameName);
|
|
|
|
|
2015-01-02 14:09:29 +00:00
|
|
|
#endif
|