-[FIX] Arreglat el problema de les linies negres
This commit is contained in:
@@ -58,7 +58,7 @@ namespace zxscreen
|
||||
{
|
||||
uint16_t color = 0x5800 + x + (y>>3)*32;
|
||||
uint16_t address = 0x4000 | (x&0x1f) | ((y&0x7)<<8) | ((y&0x38)<<2) | ((y&0xc0)<<5);
|
||||
for (int i=6;i>=0;i-=2)
|
||||
for (int i=7;i>0;i-=2)
|
||||
{
|
||||
*(ptr_pixel++) = (address & 0x1FFF) | (i << 13);
|
||||
*(ptr_color++) = color;
|
||||
@@ -83,7 +83,7 @@ namespace zxscreen
|
||||
void show()
|
||||
{
|
||||
if (win) return;
|
||||
win = SDL_CreateWindow("ZX Spectrum Screen", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 352, 296, SDL_WINDOW_RESIZABLE);
|
||||
win = SDL_CreateWindow("ZX Spectrum Screen", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 352, 296, SDL_WINDOW_SHOWN);
|
||||
ren = SDL_CreateRenderer(win, -1, 0);
|
||||
tex = SDL_CreateTexture(ren, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 352, 296);
|
||||
create_tables();
|
||||
|
||||
Reference in New Issue
Block a user