mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 13:32:30 +00:00
Make C example more C, less asm
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
typedef union {
|
||||
unsigned char* ptr;
|
||||
unsigned short word[2];
|
||||
} word_extract_t;
|
||||
|
||||
void
|
||||
PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned offset, unsigned numBitplanes, unsigned screenWidthBytes)
|
||||
{
|
||||
@@ -5,8 +10,10 @@ PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned
|
||||
copper += offset;
|
||||
|
||||
for (i = 0; i < numBitplanes; i++) {
|
||||
*(copper+1) = (unsigned)bitplanes;
|
||||
*(copper+3) = ((unsigned)bitplanes >> 16);
|
||||
word_extract_t extract;
|
||||
extract.ptr = bitplanes;
|
||||
*(copper+1) = extract.word[1];
|
||||
*(copper+3) = extract.word[0];
|
||||
bitplanes += screenWidthBytes;
|
||||
copper += 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user