📄 main_upgrade.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- http://hge.relishgames.com -->
<html>
<head>
<meta name="Keywords" content="game engine, 2d, hardware accelerated, hge, engine, relish games, game development">
<meta name="Description" content="Haaf's Game Engine - Hardware accelerated 2D games engine">
<title>Haaf's Game Engine - Hardware accelerated 2D games engine</title>
<link rel=stylesheet type=text/css href=hge.css>
<script language="JavaScript" src="hge.js"></script>
</head>
<body onload="setContents('cnt_main.html');" bgcolor=#ffffff text=#000000 link=#7F0000 vlink=#7F0000 alink=#7F0000 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table height=100% cellspacing=0 cellpadding=0 border=0><tr>
<td valign=top>
<table width=566 cellspacing=0 cellpadding=20 border=0><tr><td>
<h1 style="margin-top:0px">Upgrading from older HGE</h1>
<p>
<b>S</b>ince <b>HGE</b> interface is slightly changing with new releases, you have to do minor changes
to your code written for previous versions to compile it with the latest release of <b>HGE</b>. Here's the brief guidelines
for the modifications needed:
</p>
<h2>Upgrading from HGE 1.3</h2>
<p>
<ol>
<li>Replace <b>Mouse_GetPosition</b>, <b>Mouse_GetWheel</b>, <b>Key_GetState</b>, <b>Key_GetKey</b> calls with <a href="hgefunc_inputgetmousepos.html">Input_GetMousePos</a>, <a href="hgefunc_inputgetmousewheel.html">Input_GetMouseWheel</a>, <a href="hgefunc_inputgetkeystate.html">Input_GetKeyState</a>, <a href="hgefunc_inputgetkey.html">Input_GetKey</a> respectively
<li><a href="hgesprite__main.html">hgeSprite</a> methods <b>SetColorI</b> and <b>SetZI</b> were removed, use the updated <a href="hgesprite_setcolor.html">SetColor</a> and <a href="hgesprite_setz.html">SetZ</a> instead
<li>If you created custom GUI controls, update your <a href="hgeguio_keyclick.html">hgeGUIObject::KeyClick</a> method. It now takes additional character parameter.
<li>If you used default GUI controls, include additional header: <b>hgeguictrls.h</b>
</ol>
</p>
<h2>Upgrading from HGE 1.2</h2>
<p>
<ol>
<li>Remove any version checks with <b>System_GetVersion</b> if you made them.
<li>Just provide <a href="hgefunc_interfaceget.html">hgeCreate</a> calls with <b>HGE_VERSION</b> as a parameter.
<li><a href="hgeanim_play.html">hgeAnimation::Play</a> now takes no parameters. Use <a href="hgeanim_setmode.html">hgeAnimation::SetMode</a> to set the playback mode.
<li>You should rewrite your code for the new GUI architecture (see <a href="hgegui__main.html">hgeGUI</a> and <a href="hgeguio__main.html">hgeGUIObject</a>).
If you haven't created custom controls just replace <b>hgeGUI::ProcessInput</b> calls with <a href="hgegui_update.html">hgeGUI::Update</a>.
<li>Particle Editor's default update rate is now 50 FPS. It is recommended to adjust all your presets for this rate. Although you could restore previous behavior,
just write "UpdatesPerSec=0" in the <a href="peditor_ini.html">particleed.ini</a> file.
</ol>
</p>
<h2>Upgrading from HGE 1.1</h2>
<p>
<ol>
<li>You don't need to link to <b>d3d8.lib</b>, <b>d3dx8.lib</b> and <b>winmm.lib</b> anymore. Remove them from the project. Link to the correct versions of <b>hge.lib</b> and <b>hgehelp.lib</b> for your compiler.
<li>Replace all your <b>Interface_Get</b> calls with <a href="hgefunc_interfaceget.html">hgeCreate</a> calls.
<li>Replace all your <b>Interface_Release</b> calls with <a href="hgefunc_interfacerelease.html">Release</a> calls.
<li>Replace all your <b>System_LoadResource</b> calls with <a href="hgefunc_resourceload.html">Resource_Load</a> calls.
<li><b>IMPORTANT:</b> The resources loaded with <a href="hgefunc_resourceload.html">Resource_Load</a> now should be freed with <a href="hgefunc_resourcefree.html">Resource_Free</a> call, not with
operator <b>delete</b> as earlier.
<li>If you used <b>Key_Clear</b> function, you may replace it with <a href="hgefunc_inputgetkey.html">Key_GetKey</a> call.
</ol>
</p>
<br>
</td></tr></table>
</td>
</tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -