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

📄 crender.h

📁 我在资源网上发布的一个brickshorterjr的代码
💻 H
字号:
#ifndef	CRENDER_H
#define	CRENDER_H

#include	<hge.h>
#include	<hgeresource.h>
#include	<hgesprite.h>
#include	<hgeparticle.h>
#include	<hgecolor.h>
#include	<hgefont.h>
#include    <hgedistort.h>
#include    <stdio.h>
#include    <math.h>

#include    "g_info.h"

const	DWORD	BrickColor[] = {ARGB(150,255,0,0),	
								ARGB(150,0,0,255),
								ARGB(150,0,255,0),
								ARGB(150,255,234,74),
								ARGB(150,241,121,3),
								ARGB(150,128,128,128),
								ARGB(150,3,205,205),
								ARGB(150,253,0,253),
								ARGB(150,180,255,120)
								};

enum e_SplashPar
{
	SPLASH_BOMB = 0,
	SPLASH_EXPL
};

enum e_GamePar
{
	GAME_BOMB = 0,
	GAME_EXPL,
	GAME_LEVELUP,
	GAME_CHANGE,
	GAME_LIGHT,
	GAME_DIR
};


class CRender
{

static HTARGET   m_Target;
static HTEXTURE  m_Texture;
static hgeSprite *m_Sprite;

static HTARGET   m_TargetSave;
static HTEXTURE  m_TextureSave;
static hgeSprite *m_SpriteSave;

public:
	
	CRender( HGE *hge , hgeResourceManager	*resMgr );	
	bool                Init();	
	void                Release();

	void                RenderStarAlpah();
	void                RenderSplashBack();	
	void                RenderSplashWord();
	void                AddSplashPar( e_SplashPar  ParType );
	void                AddGamePar( e_GamePar  ParType , float x, float y, int type = 0 );

	void                RenderPar();
	void                RenderMouse(float x, float y);
	void	            RenderStatus( int score, int level );

	void                RenderGameBackground();
	void                RenderGameBackgroundUp();

	bool                RenderRotate( int RotateDir );

	void                SaveToTexture();
	void                SaveToTextureSave();
	HTARGET*            GetSaveTarget() { return &m_Target; }

	HTARGET*            GetSaveTargetSave() { return &m_TargetSave; }
private:
	
	HGE					*m_hgeEngine; 
	hgeResourceManager	*m_resMgr;
	hgeParticleManager	*m_ParMgr;
	hgeSprite           *m_Mouse;

	hgeParticleSystem	*m_SplashBombPar;
	hgeParticleSystem	*m_SplashExplPar;

	hgeParticleSystem	*m_GameBombpar;
	hgeParticleSystem	*m_GameExppar;
	hgeParticleSystem	*m_GameColChangepar;
	hgeParticleSystem	*m_GameLeveluppar;
	hgeParticleSystem	*m_GameDirChangerpar;
	hgeParticleSystem	*m_GameLightpar;

	hgeSprite           *m_SplashBack;
	hgeAnimation		*m_SplashBombAnim;

	hgeSprite           *m_GameBack;
	hgeSprite           *m_GameBack2;
	//hgeDistortionMesh   *m_dis;
	//hgeSprite			*m_SplashBack;
	//hgeParticleSystem	*m_parFood;
	//hgeFont             *m_PlayFont;

	hgeFont				*m_Font;
	hgeFont			    *m_digiFont;

	bool                m_alpha_tag;
};

#endif

⌨️ 快捷键说明

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