Own gadgets with banks - chapter ][

BlitzPlus Forums/BlitzPlus Tutorials/Own gadgets with banks - chapter ][

CS_TBL(Posted 2005) [#1]
Here's another tutorial for own gadgets, much in line with the other one. I'm bad with names, so I called this draw-object a M33P :)

Run the code below, and notice that when you put the whole lot of functions in includefiles, you don't need anything else to know. No declarations, no global variables (thank heavens!), no nothing. Just create it, use it, and release it when done.

In a nutshell the basics of this method:

* All variables, images, gadgets etc. go into banks.
* There is a 'create' function
* There is an 'update' function
* There is an 'event' function
* There is a 'free' function
* It's recommended to have banks in banks to allow for expansion without messing-up the bank-structure
* It's recommended to have special gadgetbanks, imagebanks etc.
* Images, gadgets, banks etc. are all 1 int
* Objects like these can be created and free'd locally

One might argue to use consts for the adresses.. that's up to you.. I'm comfy without them..

m33p ^_^