no message
This commit is contained in:
parent
05bad24852
commit
01669fcd89
|
@ -31,7 +31,8 @@ extern "C" {
|
||||||
|
|
||||||
#define TIC80_WIDTH 240
|
#define TIC80_WIDTH 240
|
||||||
#define TIC80_HEIGHT 136
|
#define TIC80_HEIGHT 136
|
||||||
#define TIC80_FULLWIDTH 256
|
#define TIC80_FULLWIDTH_BITS 8
|
||||||
|
#define TIC80_FULLWIDTH (1 << TIC80_FULLWIDTH_BITS)
|
||||||
#define TIC80_FULLHEIGHT (TIC80_FULLWIDTH*9/16)
|
#define TIC80_FULLHEIGHT (TIC80_FULLWIDTH*9/16)
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -1862,7 +1862,7 @@ static void drawRecordLabel(u32* frame, s32 pitch, s32 sx, s32 sy, const u32* co
|
||||||
for(s32 x = 0; x < sizeof RecLabel[0]*BITS_IN_BYTE; x++)
|
for(s32 x = 0; x < sizeof RecLabel[0]*BITS_IN_BYTE; x++)
|
||||||
{
|
{
|
||||||
if(RecLabel[y] & (1 << x))
|
if(RecLabel[y] & (1 << x))
|
||||||
memcpy(&frame[sx + 15 - x + (y+sy)*TIC80_FULLWIDTH], color, sizeof *color);
|
memcpy(&frame[sx + 15 - x + ((y+sy) << TIC80_FULLWIDTH_BITS)], color, sizeof *color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,9 +149,14 @@ static void resetPalette(tic_mem* memory)
|
||||||
memory->ram.vram.vars.mask.data = TIC_GAMEPAD_MASK;
|
memory->ram.vram.vars.mask.data = TIC_GAMEPAD_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline u8 mapColor(tic_mem* tic, u8 color)
|
||||||
|
{
|
||||||
|
return tic_tool_peek4(tic->ram.vram.mapping, color & 0xf);
|
||||||
|
}
|
||||||
|
|
||||||
static void dmaPixel(tic_mem* tic, s32 x, s32 y, u8 color)
|
static void dmaPixel(tic_mem* tic, s32 x, s32 y, u8 color)
|
||||||
{
|
{
|
||||||
tic_tool_poke4(tic->ram.vram.screen.data, y * TIC80_WIDTH + x, tic_tool_peek4(tic->ram.vram.mapping, color & 0xf));
|
tic_tool_poke4(tic->ram.vram.screen.data, y * TIC80_WIDTH + x, mapColor(tic, color));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ovrPixel(tic_mem* tic, s32 x, s32 y, u8 color)
|
static void ovrPixel(tic_mem* tic, s32 x, s32 y, u8 color)
|
||||||
|
@ -161,7 +166,7 @@ static void ovrPixel(tic_mem* tic, s32 x, s32 y, u8 color)
|
||||||
enum {Top = (TIC80_FULLHEIGHT-TIC80_HEIGHT)/2};
|
enum {Top = (TIC80_FULLHEIGHT-TIC80_HEIGHT)/2};
|
||||||
enum {Left = (TIC80_FULLWIDTH-TIC80_WIDTH)/2};
|
enum {Left = (TIC80_FULLWIDTH-TIC80_WIDTH)/2};
|
||||||
|
|
||||||
tic->screen[x + y * TIC80_FULLWIDTH + (Left + Top * TIC80_FULLWIDTH)] = machine->state.ovr.palette[color & 0xf];
|
*(tic->screen + x + (y << TIC80_FULLWIDTH_BITS) + (Left + Top * TIC80_FULLWIDTH)) = *(machine->state.ovr.palette + mapColor(tic, color));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setPixel(tic_machine* machine, s32 x, s32 y, u8 color)
|
static void setPixel(tic_machine* machine, s32 x, s32 y, u8 color)
|
||||||
|
|
Loading…
Reference in New Issue