#10482 - goro - Sat Sep 06, 2003 11:58 am
Please don't cuss me for being dumb but I've been learning/coding for
too many hours so my brain is probably fried.
temp is a pointer to a u16 (unsigned int)
and OAM is a pointer to the address of OAM
but in the 'for loop' they are treated as arrays and data is copied from
one to the other.
Is this some form of sorcery?
too many hours so my brain is probably fried.
Code: |
//create an OAM variable and make it point to the address of OAM u16* OAM = (u16*)0x7000000; //Copy our sprite array to OAM void CopyOAM() { u16 loop; u16* temp; temp = (u16*)sprites; for(loop = 0; loop < 128*4; loop++) { OAM[loop] = temp[loop]; } } |
temp is a pointer to a u16 (unsigned int)
and OAM is a pointer to the address of OAM
but in the 'for loop' they are treated as arrays and data is copied from
one to the other.
Is this some form of sorcery?