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

📄 res.h

📁 3D游戏疯狂的鸡蛋
💻 H
字号:
#ifndef __res_H__
#define __res_H__

namespace Sexy
{
	class ResourceManager;
	class Image;
	class Font;

	Image* LoadImageById(ResourceManager *theManager, int theId);
	void ReplaceImageById(ResourceManager *theManager, int theId, Image *theImage);
	bool ExtractResourcesByName(ResourceManager *theManager, const char *theName);

	// GUI Resources
	bool ExtractGUIResources(ResourceManager *theMgr);
	extern Image* BOARD;
	extern Image* BRUNCH;
	extern Image* CHECK_BOX;
	extern Image* CURSOR_HIT_IMAGE;
	extern Image* CURSOR_NORMAL_IMAGE;
	extern Image* DIALOG_BTN;
	extern Image* DIALOG_SMALL;
	extern Image* EDIT_BOX;
	extern Image* EXIT_BTN_OFF;
	extern Image* EXIT_BTN_ON;
	extern Image* EXIT_BTN_PUSH;
	extern Image* GAME_OVER;
	extern Image* GAME_TIME_BAR;
	extern Image* GO;
	extern Image* HELP_BTN_OFF;
	extern Image* HELP_BTN_ON;
	extern Image* HELP_BTN_PUSH;
	extern Image* HELP_LINK_TYPE;
	extern Image* HIGHSCORE_BTN_OFF;
	extern Image* HIGHSCORE_BTN_ON;
	extern Image* HIGHSCORE_BTN_PUSH;
	extern Image* HIT_TIME_BAR;
	extern Image* INFO_PANNEL;
	extern Image* LEVEL_CLEAR;
	extern Image* MAIN_BACK;
	extern Image* OPTIONS_BTN_OFF;
	extern Image* OPTIONS_BTN_ON;
	extern Image* OPTIONS_BTN_PUSH;
	extern Image* PLAY_BTN_OFF;
	extern Image* PLAY_BTN_ON;
	extern Image* PLAY_BTN_PUSH;
	extern Image* READY;
	extern Image* SLIDER_THUMB;
	extern Image* SLIDER_TRACK;
	extern Image* STONE_BTN_OFF;
	extern Image* STONE_BTN_ON;
	extern Image* STONE_BTN_PUSH;
	extern Image* TIME_BACK;
	extern Image* TIME_SIGN;

	// Game Resources
	bool ExtractGameResources(ResourceManager *theMgr);
	extern Image* CLOUD1;
	extern Image* CLOUD2;
	extern Image* CLOUD3;
	extern Image* CLOUD4;
	extern Image* CLOUD;
	extern Image* DRAGON_ANGRY;
	extern Image* DRAGON_BREATH;
	extern Image* DRAGON_LAUGH;
	extern Image* DRAGON_SAD;
	extern Image* EGGS;
	extern Image* FLOAT_ISLAND;
	extern Image* HINT_HAND;
	extern Image* LIGHTNING;
	extern Image* LIGHTNING_VER;
	extern Image* LOCK;
	extern Image* SHOOT_FIRE;
	extern Image* SKY;
	extern Image* UNKNOWN_EGG;
	extern int SND_EXPLOSION;
	extern int SND_GAME_BACK;
	extern int SND_GAME_OVER;
	extern int SND_LEVEL_CLEAR;
	extern int SND_MAIN;
	extern int SND_TIMEOUT;

	// Init Resources
	bool ExtractInitResources(ResourceManager *theMgr);
	extern Font* NORMAL_FONT;
	extern Image* LOGO;

	enum ResourceId
	{
		NORMAL_FONT_ID,
		LOGO_ID,
		INFO_PANNEL_ID,
		STONE_BTN_ON_ID,
		STONE_BTN_OFF_ID,
		STONE_BTN_PUSH_ID,
		BOARD_ID,
		TIME_BACK_ID,
		HIT_TIME_BAR_ID,
		GAME_TIME_BAR_ID,
		TIME_SIGN_ID,
		GAME_OVER_ID,
		GO_ID,
		READY_ID,
		LEVEL_CLEAR_ID,
		DIALOG_SMALL_ID,
		DIALOG_BTN_ID,
		MAIN_BACK_ID,
		BRUNCH_ID,
		PLAY_BTN_ON_ID,
		PLAY_BTN_OFF_ID,
		PLAY_BTN_PUSH_ID,
		HIGHSCORE_BTN_ON_ID,
		HIGHSCORE_BTN_OFF_ID,
		HIGHSCORE_BTN_PUSH_ID,
		OPTIONS_BTN_ON_ID,
		OPTIONS_BTN_OFF_ID,
		OPTIONS_BTN_PUSH_ID,
		HELP_BTN_ON_ID,
		HELP_BTN_OFF_ID,
		HELP_BTN_PUSH_ID,
		EXIT_BTN_ON_ID,
		EXIT_BTN_OFF_ID,
		EXIT_BTN_PUSH_ID,
		HELP_LINK_TYPE_ID,
		CHECK_BOX_ID,
		SLIDER_THUMB_ID,
		SLIDER_TRACK_ID,
		EDIT_BOX_ID,
		CURSOR_NORMAL_IMAGE_ID,
		CURSOR_HIT_IMAGE_ID,
		SKY_ID,
		FLOAT_ISLAND_ID,
		EGGS_ID,
		UNKNOWN_EGG_ID,
		LOCK_ID,
		LIGHTNING_ID,
		LIGHTNING_VER_ID,
		CLOUD_ID,
		CLOUD1_ID,
		CLOUD2_ID,
		CLOUD3_ID,
		CLOUD4_ID,
		SHOOT_FIRE_ID,
		HINT_HAND_ID,
		SND_GAME_BACK_ID,
		SND_GAME_OVER_ID,
		SND_LEVEL_CLEAR_ID,
		SND_MAIN_ID,
		SND_EXPLOSION_ID,
		SND_TIMEOUT_ID,
		DRAGON_ANGRY_ID,
		DRAGON_BREATH_ID,
		DRAGON_LAUGH_ID,
		DRAGON_SAD_ID,
		RESOURCE_ID_MAX
	};

	Image* GetImageById(int theId);
	Font* GetFontById(int theId);
	int GetSoundById(int theId);

	Image*& GetImageRefById(int theId);
	Font*& GetFontRefById(int theId);
	int& GetSoundRefById(int theId);

	ResourceId GetIdByImage(Image *theImage);
	ResourceId GetIdByFont(Font *theFont);
	ResourceId GetIdBySound(int theSound);
	const char* GetStringIdById(int theId);
	ResourceId GetIdByStringId(const char *theStringId);

} // namespace Sexy


#endif

⌨️ 快捷键说明

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