# 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 Adjust all your particle system presets with the new editor. Basically you should just raise "Start speed", "Gravity", "Radial acceleration" and "Tangential acceleration" values. Use HGE_SHOWSPLASH to hide HGE splash screen instead of earlier (hgeIntState)14 hack. If you used hgeSprite::SetTextureRect or hgeAnimation::SetTextureRect, put additional false argument into the calls. If you used render targets, you now should restore them in HGE_GFXRESTOREFUNC, not in HGE_FOCUSGAINFUNC as earlier. If you used Gfx_StartBatch - insert a check if the return value is not 0. ## Upgrading from HGE 1.54 Convert you bitmap fonts with fontconv.exe to the newer format. Modify your hgeFont::Render and hgeFont::printf calls according to their new declarations. 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 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 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. hgeParticleSystem::Transpose behaviour has slightly changed. Use MoveTo(X,Y,true) to reproduce previous Transpose behaviour. 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. Remove all references to the reserved field of hgeVertex, it isn't required anymore. Remove all -0.5 coordinate adjustments previously used to ensure exact texel-to-pixel mapping, this is done automatically now. Change Ini_GetString calls to newer, simplified syntax. Replace all System_Rand calls with Random_Float calls. HGE_RESOURCEFILE system state was removed. Use Resource_AttachPack function instead. Music_Play now takes additional loop parameter. ## Upgrading from HGE 1.3 Replace Mouse_GetPosition, Mouse_GetWheel, Key_GetState, Key_GetKey calls with Input_GetMousePos, Input_GetMouseWheel, Input_GetKeyState, Input_GetKey respectively hgeSprite methods SetColorI and SetZI were removed, use the updated SetColor and SetZ instead If you created custom GUI controls, update your hgeGUIObject::KeyClick method. It now takes additional character parameter. If you used default GUI controls, include additional header: hgeguictrls.h ## Upgrading from HGE 1.2 Remove any version checks with System_GetVersion if you made them. Just provide hgeCreate calls with HGE_VERSION as a parameter. hgeAnimation::Play now takes no parameters. Use hgeAnimation::SetMode to set the playback mode. 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. 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 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. Replace all your Interface_Get calls with hgeCreate calls. Replace all your Interface_Release calls with Release calls. Replace all your System_LoadResource calls with Resource_Load calls. IMPORTANT: The resources loaded with Resource_Load now should be freed with Resource_Free call, not with operator delete as earlier. If you used Key_Clear function, you may replace it with Key_GetKey call.