游戏开发论坛

 找回密码
 立即注册
搜索
查看: 4972|回复: 4

HGE中文参考指南

[复制链接]

2

主题

12

帖子

12

积分

新手上路

Rank: 1

积分
12
发表于 2007-4-13 15:32:00 | 显示全部楼层 |阅读模式
http://www.cppblog.com/bogy/archive/2007/04/13/21793.html

开放HGE中文参考指南

86

主题

2251

帖子

2386

积分

金牌会员

Rank: 6Rank: 6

积分
2386
QQ
发表于 2007-4-13 16:54:00 | 显示全部楼层

Re:HGE中文参考指南

好!

85

主题

824

帖子

878

积分

高级会员

Rank: 4

积分
878
QQ
发表于 2007-4-14 12:55:00 | 显示全部楼层

Re:HGE中文参考指南

Good job!
不过应注意语言的本地化,
不要仅按字面意思翻译!
如hgeCreate函数:

Creates the HGE object if needed and returns a pointer to the HGE interface.
在需要时创建HGE对象并返回一个HGE接口指针。


HGE *hgeCreate(int ver);

Parameters
参数
ver
    HGE API version number. Just pass the HGE_VERSION constant here.
    HGE API 版本号。在这里只需传递常数HGE_VERSION即可

Return value
返回值
    If the loaded HGE.DLL contains compatible API, hgeCreate returns a pointer to the HGE interface. Otherwise it returns 0.
    如果载入的HGE.DLL版本号与API一致,该函数将返回一个HGE接口指针。否则它将返回0。

Remarks
注释
    hgeCreate is a global C function. It is located outside of any classes and is imported from the HGE DLL.
    hgeCreate是一个全局性的C函数。它位于所有类之外,从HGE DLL中导入。

    To access HGE functions you need the HGE interface pointer that is returned by hgeCreate function. hgeCreate creates a

HGE object if needed and increases the internal reference counter. To free obtained interface you must call the Release

function.
    要使用HGE的函数你需要一个从hgeCreate函数返回的HGE接口指针。hgeCreate在需要时会创建一个HGE对象并增加其内部的引用计数。
要释放已获得的接口你必须调用Release函数。

    You may call hgeCreate every time you need access to HGE, then call Release.Or you may get the interface just once during

startup and store it in a global variable, then release during cleanup.Although the latter is supposed to be 'bad style',

this works fine with not very big projects.
    无论何时当你需要使用HGE的函数时,你只需调用hgeCreate函数,当你完成操作后调用Release函数释放它。或者你也可以在程序启动时一

次性获得接口并保存到一个全局变量中,当程序结束时释放它。尽管后者被认为是坏的编程风格,但是在不是非常大的工程中它还是工作得不错

的。


另外,
有一些函数需要查看源代码弄清是怎么一回事再翻译,
如HGE::Gfx_SetTransform函数

Sets global transformation for all graphics being rendered further.
为所有将要渲染的图形设置全局变换。

Remarks
注释
    Transformations are applied in this order: first scaling, then rotation and finally displacement.
    变换应用顺序: 先缩放,然后旋转最后位移。

    If all the parameters are 0 or omitted, global transformation will be reset. When the render target is switched, global

transformation is also reset.
    如果所有的参数为0或者省略,全局变换将会重置。同样的,当渲染目标更改后,全局变换也会被重置。

    Gfx_SetTransform flushes all accumulated graphic primitives.
    Gfx_SetTransform会刷新所有积累的图元。

最后,
翻译这个文档并不是一件轻松的事,
祝楼主早日完工,
加油吧!

2

主题

50

帖子

50

积分

注册会员

Rank: 2

积分
50
发表于 2007-4-15 11:47:00 | 显示全部楼层

Re:HGE中文参考指南

虽然序言有点刺耳,还是感谢译者的辛苦劳动。

44

主题

305

帖子

435

积分

中级会员

Rank: 3Rank: 3

积分
435
发表于 2007-4-19 13:57:00 | 显示全部楼层

Re:HGE中文参考指南

恩,正是我们需要的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-26 18:07

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表