|
|
发表于 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会刷新所有积累的图元。
最后,
翻译这个文档并不是一件轻松的事,
祝楼主早日完工,
加油吧! |
|