• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
生若秋叶
gonna to be a designer,a designer of my life!!
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  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 ... 阅读全文
posted @ 2013-07-26 00:33 HappyCoder 阅读(688) 评论(0) 推荐(0)
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... 阅读全文
posted @ 2013-07-26 00:14 HappyCoder 阅读(1302) 评论(0) 推荐(0)
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 阅读全文
posted @ 2013-07-26 00:11 HappyCoder 阅读(821) 评论(0) 推荐(0)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3