#27359 - mr_square - Mon Oct 11, 2004 1:36 pm
My knowledge of pointers is a bit shakey, so bear with me :)
In my bg.h file I have this:
#define ScreenBaseBlock(n) (((n)*0x800)+0x6000000)
which is where the map data for the background is stored, right? Say my background 512x512 background is store at screenblock 28 - how do I get the contents of that memory address? Would this work:
? And how would I get at an offset into that area of memory?
The reason for all this is that I'm toying around with collision detection at the moment and need to get at the map contents of my background at a particular location.
thanks :)
In my bg.h file I have this:
#define ScreenBaseBlock(n) (((n)*0x800)+0x6000000)
which is where the map data for the background is stored, right? Say my background 512x512 background is store at screenblock 28 - how do I get the contents of that memory address? Would this work:
Code: |
u16 blah; blah = &ScreenBaseBlock(28); |
? And how would I get at an offset into that area of memory?
The reason for all this is that I'm toying around with collision detection at the moment and need to get at the map contents of my background at a particular location.
thanks :)