⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sys.h

📁 3D游戏模板
💻 H
字号:
/* miscellaneous * Template CS game * (C)2001 Mat Sutcliffe. See license.txt for license info (GPL) */#ifndef __SYS_H__#define __SYS_H__#include <csutil/ref.h>#include <iutil/objreg.h>#include <iutil/plugin.h>#include <ivaria/conout.h>#include <ivaria/reporter.h>#define SYS_BUG		CS_REPORTER_SEVERITY_BUG#define SYS_ERROR	CS_REPORTER_SEVERITY_ERROR#define SYS_WARNING	CS_REPORTER_SEVERITY_WARNING#define SYS_NOTIFY	CS_REPORTER_SEVERITY_NOTIFY#define SYS_DEBUG	CS_REPORTER_SEVERITY_DEBUGstruct gamedata_t;class System {	private:		csRef<iConsoleOutput> conout;		csRef<iPluginManager> plugmgr;	public:		System(iObjectRegistry *);		~System();		static void report(const char *desc, int severity = SYS_WARNING);	/* Report using the CS standard reporter.	 * severity==SYS_ERROR will cause an exit.	 */		static void conprint(const char *text);	/* Print text on the console.	 */		static void require(bool state, const char *desc);	/* Like assert(); Exits with appropriate error if !state	 * Shouldn't be used in your game except for debugging.	 */		static bool savegame(const char *file, gamedata_t *data, size_t size);	/* Save a gamedata_t struct. Call with address-of your data.         * size is sizeof(gamedata_t)	 * Savegames are currently not guaranteed to work on a different	 * platform from that which they have been saved on.	 */		static gamedata_t* loadgame(const char *file, size_t size);	/* Load a gamedata_t struct. Dereference returned pointer and         * assign to your data object. size is sizeof(gamedata_t)	 */		static csPtr<iStrVector> listsaves();	/* List savegames. DecRef the iStrVector when done.	 */		static bool deletesave(const char *file);	/* Delete a savegame.	 */};#endif#ifndef GAME#	define GAME "Game" // GUI title bar title and common config option prefix#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -