OctaCore/src/engine/main.hh

57 lines
1.4 KiB
C++
Raw Permalink Normal View History

2020-06-10 01:46:45 +02:00
#ifndef ENGINE_MAIN_HH
#define ENGINE_MAIN_HH
#include <shared/tools.hh>
extern int initing, numcpus;
extern int mainmenu;
extern int screenw, screenh;
extern bool minimized;
extern float loadprogress;
extern bool inbetweenframes, renderedframe;
2020-07-29 03:41:48 +02:00
extern int curtime; // current frame time
extern int lastmillis; // last time
extern int elapsedtime; // elapsed frame time
extern int totalmillis; // total elapsed time
2020-06-23 00:30:39 +02:00
struct dynent;
extern dynent *player;
2020-06-10 01:46:45 +02:00
void clearmainmenu();
enum
{
NOT_INITING = 0,
INIT_GAME,
INIT_LOAD,
INIT_RESET
};
bool initwarning(const char *desc, int level = INIT_RESET, int type = 0);
bool interceptkey(int sym);
struct Texture;
2020-07-30 03:15:44 +02:00
void renderbackground(const char *caption = nullptr, Texture *mapshot = nullptr, const char *mapname = nullptr, const char *mapinfo = nullptr, bool force = false);
2020-06-10 01:46:45 +02:00
void renderprogress(float bar, const char *text, bool background = false);
void getfps(int &fps, int &bestdiff, int &worstdiff);
int getclockmillis();
enum { KR_CONSOLE = 1<<0, KR_GUI = 1<<1, KR_EDITMODE = 1<<2 };
void keyrepeat(bool on, int mask = ~0);
enum { TI_CONSOLE = 1<<0, TI_GUI = 1<<1 };
void textinput(bool on, int mask = ~0);
2020-06-23 00:48:38 +02:00
void fatal(const char *s, ...) PRINTFARGS(1, 2);
bool isconnected(bool attempt = false, bool local = true);
bool multiplayer(bool msg = true);
2020-06-10 01:46:45 +02:00
#endif