📄 resourcelib.h
字号:
// ***************************************************************
// HtextureLib version: 1.0
// -------------------------------------------------------------
// File Name: ResourceLib.h
// Created: 2007/07/18
// Modified: 2007/07/20 00:52
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef HTEXTURE_LIB_HEAD_FILE
#define HTEXTURE_LIB_HEAD_FILE
#pragma once
#include "GameFrame.h"
//***************************************************************
// 帖图资源库
// 负责保存游戏中所需的资源,在ObjectCom内全局共享使用。
//***************************************************************
class GAME_FRAME_CLASS CResourceLib
{
friend class CSoundHelper;
protected:
LPGDI m_lpGDI; //图形引擎
CListTemplate<CResource*, _CString> m_lstResourcs; //资源库
CListTemplate<LPCTSTR, DWORD> m_lstResourcePacks; //资源包库
public:
//构造函数
CResourceLib(LPGDI lpGDI);
//析构函数
virtual ~CResourceLib(void);
public:
//加载资源包
virtual void __cdecl LoadTexture(LPCTSTR lpFileName);
//添加资源
virtual void __cdecl Add(LPCTSTR lpFileName, _CString szName, enResourceType ResourceType=Resource_Picture);
//返回帖图资源
virtual CResource* __cdecl operator[](INT_PTR nIndex);
//返回帖图资源
virtual CResource* __cdecl GetTexture(_CString szName);
//返回资源
virtual CResource* __cdecl GetResource(_CString szName);
//返回帖图大小
virtual _SIZE __cdecl GetTextureSize(INT_PTR nIndex);
//返回帖图大小
virtual _SIZE __cdecl GetTextureSize(_CString szName);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -