📄 util.h
字号:
#ifndef UTIL_H
#define UTIL_H
#ifdef _WIN32 #include <windows.h>
#include <hash_set>
#else
#include <ext/hash_set>
#endif
// STL headers
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <set>
#include <sstream>
#include <vector>
// Standard C++ headers
#include <stdio.h>
// wx
#include <wx/filename.h>
#include <wx/fileconf.h>
#include <wx/string.h>
#include <wx/log.h>
// Our other utility headers
#include "vec3d.h"
// opengl
#ifdef __WXMAC__ //Mac
# ifdef __DARWIN__
# include <OpenGL/gl.h>
# include <OpenGL/glaux.h>
# include <OpenGL/glu.h>
# else
# include <gl.h>
# include <glu.h>
# include <glaux.h>
# endif
#else
# include <GL/gl.h>
# include <GL/glu.h>
# ifdef _WIN32
# include <GL/glaux.h>
# endif
#endif
using namespace std;
extern wxString gamePath;extern wxString testPath;extern wxString cfgPath;extern wxString bgImagePath;extern bool useTestPatch;extern bool usePatch;extern bool useLocalFiles;extern bool useELP;extern bool useFLP;extern bool useGLP;extern long langID;extern int ssCounter;
float frand();
float randfloat(float lower, float upper);
int randint(int lower, int upper);
template <class T>
bool from_string(T& t, const string& s, ios_base& (*f)(ios_base&))
{
istringstream iss(s);
return !(iss >> f >> t).fail();
}
void fixname(std::string &name);
void fixnamen(char *name, size_t len);
wxString Vec3DToString(Vec3D vec);void getGamePath();void Screenshot(const wxString fn);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -