Upgrading from older HGE

Since HGE 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 HGE. Here's the brief guidelines for the modifications needed:

Upgrading from HGE 1.6

  1. Adjust all your particle system presets with the new editor. Basically you should just raise "Start speed", "Gravity", "Radial acceleration" and "Tangential acceleration" values.
  2. Use HGE_SHOWSPLASH to hide HGE splash screen instead of earlier (hgeIntState)14 hack.
  3. If you used hgeSprite::SetTextureRect or hgeAnimation::SetTextureRect, put additional false argument into the calls.
  4. If you used render targets, you now should restore them in HGE_GFXRESTOREFUNC, not in HGE_FOCUSGAINFUNC as earlier.
  5. If you used Gfx_StartBatch - insert a check if the return value is not 0.

Upgrading from HGE 1.54

  1. Convert you bitmap fonts with fontconv.exe to the newer format.
  2. Modify your hgeFont::Render and hgeFont::printf calls according to their new declarations.
  3. It is recommended to take the rendering code out of HGE_FRAMEFUNC and place it into HGE_RENDERFUNC callback. Though your application will run as earlier without this modification.

Upgrading from HGE 1.53

  1. When using System_GetState, you don't need to select the type (you can simply erase .int_value, .func_value, etc., from your code).

Upgrading from HGE 1.4

  1. PAY ATTENTION! hgeSprite::RenderEx and hgeSprite::GetBoundingBoxEx have updated syntax with different parameters order. Your old code may compile fine but work incorrectly if you miss this.
  2. hgeParticleSystem::Transpose behaviour has slightly changed. Use MoveTo(X,Y,true) to reproduce previous Transpose behaviour.
  3. By default a particle system's bounding box isn't tracked now. If you used this feature you should turn it on explicitly with TrackBoundingBox call.
  4. Remove all references to the reserved field of hgeVertex, it isn't required anymore.
  5. Remove all -0.5 coordinate adjustments previously used to ensure exact texel-to-pixel mapping, this is done automatically now.
  6. Change Ini_GetString calls to newer, simplified syntax.
  7. Replace all System_Rand calls with Random_Float calls.
  8. HGE_RESOURCEFILE system state was removed. Use Resource_AttachPack function instead.
  9. Music_Play now takes additional loop parameter.

Upgrading from HGE 1.3

  1. Replace Mouse_GetPosition, Mouse_GetWheel, Key_GetState, Key_GetKey calls with Input_GetMousePos, Input_GetMouseWheel, Input_GetKeyState, Input_GetKey respectively
  2. hgeSprite methods SetColorI and SetZI were removed, use the updated SetColor and SetZ instead
  3. If you created custom GUI controls, update your hgeGUIObject::KeyClick method. It now takes additional character parameter.
  4. If you used default GUI controls, include additional header: hgeguictrls.h

Upgrading from HGE 1.2

  1. Remove any version checks with System_GetVersion if you made them.
  2. Just provide hgeCreate calls with HGE_VERSION as a parameter.
  3. hgeAnimation::Play now takes no parameters. Use hgeAnimation::SetMode to set the playback mode.
  4. You should rewrite your code for the new GUI architecture (see hgeGUI and hgeGUIObject). If you haven't created custom controls just replace hgeGUI::ProcessInput calls with hgeGUI::Update.
  5. 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 particleed.ini file.

Upgrading from HGE 1.1

  1. You don't need to link to d3d8.lib, d3dx8.lib and winmm.lib anymore. Remove them from the project. Link to the correct versions of hge.lib and hgehelp.lib for your compiler.
  2. Replace all your Interface_Get calls with hgeCreate calls.
  3. Replace all your Interface_Release calls with Release calls.
  4. Replace all your System_LoadResource calls with Resource_Load calls.
  5. IMPORTANT: The resources loaded with Resource_Load now should be freed with Resource_Free call, not with operator delete as earlier.
  6. If you used Key_Clear function, you may replace it with Key_GetKey call.