![]() | ![]() ![]() |
| Home · Downloads · Your Account · Submit News |
|
Documentation Homepage HAMLib reference Back to HAM Homepage |
|
if(~(*(volatile unsigned short *)(0x04000130) & 0x0001))
{
*(volatile unsigned short *) 0x0400004C = 2 | (2<<4) |(0<<8) |(0<<12)
}
Using HAM macros, the very same task looks like this:
if(F_CTRLINPUT_A_PRESSED)
{
M_MOSAIC_SET(2,2,0,0);
}
I think the advantage is obvious.
Now, what macros are there, and how can I find what I need quickly? Read on in the next topic to learn about the different Macro Types in HAM. It is also a good idea to just try the Macros, or look how they are used in sample sources. All Macro definitions are documented (almost hehe) and can be found in include/mygba.h.