随笔分类 - HGE游戏引擎
HGE游戏引擎之实战篇,渐变的游戏开场
摘要:#include #include "menuitem.h"//#include #include #include //定义全局变量long int zhen = 0;//定义当前关卡int SCENCE = 0;//HGE句柄HGE * hge = NULL;//背景音乐,图片HEFFECT BG_Music;HTEXTURE BG_Texture;hgeSprite *BG_pic;hgeQuad Background;//游戏时间float time;//hgeBackground test;hgeGUI *gui;hgeFont ...
阅读全文
HGE游戏引擎之hgeQuad结构体的使用(用于渲染图片)
摘要:HGE基本的渲染图元是hgeQuad (Quad is the basicHGEgraphic primitive),其中有一个hgeVertex成员结构,它用来描述图元顶点信息。ThehgeVertexstructure is used to describe vertices of whichHGEgraphic primitives consist.两个结构信息如下:struct hgeQuad{ hgeVertex v[4]; HTEXTURE tex; int blend;};struct hgeVertex{ float x, y; float z...
阅读全文
HGE引擎之hgeSprite
摘要:一、hgeSprite类hgeSprite是一个精灵实体的HGE帮助类。1、构造函数创建和初始化一个hgeSprite对象。hgeSprite(HTEXTURE tex, float x, float y, float w, float h);其中:tex为纹理图片,x与y为精灵对应纹理图片的左上角位置,w与h为精灵的宽度与高度。2、渲染函数1) Render 将精灵渲染到屏幕上void Render(float x, float y);其中:x与y为显示精灵的屏幕位置2) RenderEx 可使用缩放和旋转的方式来渲染精灵void RenderEx(float x, float y, flo
阅读全文
浙公网安备 33010602011771号