In the past I always tried to hold HEL Library compatible with previous versions. That's really a good thing though, but I had to come up with a lot of workarounds for compatibility issues. HEL 2 Library does not have these workarounds anymore. Most Sub-Systems have been a bit redesigned to fit more into my vision of HEL. This includes renaming functions, removing functions which where only intended for the mentioned workarounds and structure the whole things (more) clearly.
A lot of functions have been removed, but the functionality itself is still the same or even more extended.
For the entire changed, please take a look at the Version History.
sumiguchi
for this great idea!Init
, Quit
, Create
and Delete
function.
If it helps you to see it a bit C++'ish, think of it like having a base class with the preceding methods and Sub-Systems just derive from it. The hel_
string is the namespace, Map
the class and Init
, Quit
etc the methods of the class.
Some Sub-System's don't have a Create
or Delete
function, because there is nothing to create or delete. This applies for example for the Pad Functions.
Init
function of the Sub-System in question before you use any other function from it. If you don't call Init
, the program behaviour is undefined and it is very unlike that the program operates correctly.
Some Init
functions expect an incoming parameter called pBuffer
. This includes hel_ObjInit, hel_ObjRotScaleInit, hel_MapInit and hel_TileInit. The buffer is used for management of internal states of the corresponding Sub-System. Advantage is, if it is not allocated in the library, it does not waste memory when you don't use the corresponding Sub-System. Plus, you have even control over the memory location, where it is actually stored!. For example, if use store the buffer in IWRAM, you can achieve a little performance increase. The recommended memory location is EWRAM. The function documentation provides example code that shows how to initialize each of these Sub-Systems.
Quit
function has been provided to uninitialize a Sub-System. It releases earlier created resources.Create
functions are intended to create a new item of the Sub-System. This can be a Map-System, Tile-System or whatever Sub-System's Create
function you call.
Some Sub-System actually have only one item which they can work with and in this case the corresponding Create
function has been left away.
Delete
function of the Sub-System.
You don't need to use the old "TMapScroll"
thingy anymore. It's manageged internally now. You only need to pass the background number.
Coordinates have to be entirely specified in fixed point format now. See Fixed Point macros
I removed a huge amount of functions which where basically only workarounds for compability issues with previous versions of HEL. It uses entirely fixed point math now. Functions to explicitly enable or disable parallax scrolling went into the recycle-bin. The hel_MapScroll function expects the delta's in fixed point format now, which makes it a lot easier to use. The boundschecking mechanism has been extented, you can now specify a rectangle on the map which cannot crossed.
The only thing you must be very careful about, is to use only functions from one object manager, either HEL or HAM -- not both! If you mix calls to object functions from HEL and HAM, the program will probably behave unexpected.
Object attributes *and* graphic updates are shadowed internally to avoid screen tearing!
hel_Pad
variable to access the current joypad state, this one does not exist anymore. It is called hel_PadQuery and returns a pointer to the pad information now. Please see demos and hel_PadQuery for example code.