core_interface.h

来自「旋转图像Demo和其源代码」· C头文件 代码 · 共 45 行

H
45
字号
/**************************************************
DirectDraw接口模块
Author:  LittleFish     QQ:93663886 
E-Mail:  kittyfish_1981@yahoo.com.cn
Blog:    http://blog.csdn.net/kittyfish
真诚的期待你提出改良方法或程序BUG
**************************************************/

#ifndef _CORE_INTERFACE_H_
#define _CORE_INTERFACE_H_

// Core includes
#include "Core_Common.h"

#include "Core_Graphics.h"
#include "Core_Input.h"
//#include "Core_Sound.h"
//#include "Core_Control.h"
#include "Core_System.h"


extern cApplication*  g_pApplication;
extern cDirectDraw*   g_pDirectDraw;


BOOL CreateApplication( int x, int y, int width, int height, HINSTANCE hInst, TCHAR* chCaption );
/*inline */cDirectDraw* CreateDirectDraw( BOOL bFullScreen=FALSE, int iWidth=800, int iHeight=600 );

inline cDirectDraw*  GetDirectDraw() { return g_pDirectDraw; };
inline cApplication* GetApp()        { return g_pApplication; };

inline void ReleaseDirectDraw() { g_pDirectDraw->Release(); SAFE_DELETE( g_pDirectDraw ) };
inline void ReleaseApp()        { SAFE_DELETE( g_pApplication ) };

//接口全局变量的声明
#ifndef DECLARE_2DENGINE
#define DECLARE_2DENGINE                  \
	extern cDirectDraw*  g_pDirectDraw;   \
	extern cApplication* g_pApplication;  \
	extern cDirectDraw*  GetDirectDraw(); \
	extern cApplication* GetApp();
#endif

#endif

⌨️ 快捷键说明

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