Do not pass memory for screen_palette
This commit is contained in:
parent
5571e0a92b
commit
03328cfc68
|
@ -156,14 +156,14 @@ screen_rect(Uint8 *layer, Uint16 x1, Uint16 y1, Uint16 x2, Uint16 y2, int color)
|
|||
}
|
||||
|
||||
void
|
||||
screen_palette(Uint8 *addr)
|
||||
screen_palette(void)
|
||||
{
|
||||
int i, shift;
|
||||
for(i = 0, shift = 4; i < 4; ++i, shift ^= 4) {
|
||||
Uint8
|
||||
r = (addr[0 + i / 2] >> shift) & 0xf,
|
||||
g = (addr[2 + i / 2] >> shift) & 0xf,
|
||||
b = (addr[4 + i / 2] >> shift) & 0xf;
|
||||
r = (uxn.dev[0x8 + i / 2] >> shift) & 0xf,
|
||||
g = (uxn.dev[0xa + i / 2] >> shift) & 0xf,
|
||||
b = (uxn.dev[0xc + i / 2] >> shift) & 0xf;
|
||||
uxn_screen.palette[i] = 0x0f000000 | r << 16 | g << 8 | b;
|
||||
uxn_screen.palette[i] |= uxn_screen.palette[i] << 4;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ int screen_changed(void);
|
|||
void screen_change(int x1, int y1, int x2, int y2);
|
||||
void screen_fill(Uint8 *layer, int color);
|
||||
void screen_rect(Uint8 *layer, Uint16 x1, Uint16 y1, Uint16 x2, Uint16 y2, int color);
|
||||
void screen_palette(Uint8 *addr);
|
||||
void screen_palette(void);
|
||||
void screen_resize(Uint16 width, Uint16 height, int scale);
|
||||
void screen_redraw();
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ emu_deo(Uint8 addr, Uint8 value)
|
|||
case 0x00:
|
||||
system_deo(p);
|
||||
if(p > 0x7 && p < 0xe)
|
||||
screen_palette(&uxn.dev[0x8]);
|
||||
screen_palette();
|
||||
break;
|
||||
case 0x10: console_deo(p); break;
|
||||
case 0x20: screen_deo(p); break;
|
||||
|
|
Loading…
Reference in New Issue