this is not correct but it is drawing on the screen
This commit is contained in:
parent
5f55357441
commit
8f40d18f9a
1 changed files with 3 additions and 1 deletions
|
@ -44,12 +44,14 @@ int isPositionWhite(long x, int y)
|
||||||
return 0; // 0 er false...
|
return 0; // 0 er false...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://archive.org/details/The_Graphics_Book_for_the_Commodore_64/page/n129/
|
||||||
void setPositionBlack(unsigned short x, BYTE y)
|
void setPositionBlack(unsigned short x, BYTE y)
|
||||||
{
|
{
|
||||||
int ra = 320 * (int)(y/8) + (y & 7);
|
int ra = 320 * (int)(y/8) + (y & 7);
|
||||||
int ba = 8 * (int)(x/8);
|
int ba = 8 * (int)(x/8);
|
||||||
int ma = 2^(7-(x & 7));
|
int ma = 2^(7-(x & 7));
|
||||||
int ad = ma+ra+ba;
|
int sa = 0x2000;
|
||||||
|
int ad = sa+ra+ba;
|
||||||
*(BYTE*)(ad) = *(BYTE*)(ad) | ma;
|
*(BYTE*)(ad) = *(BYTE*)(ad) | ma;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue