no message
This commit is contained in:
parent
bf93beb4c4
commit
280828548e
|
@ -1131,6 +1131,11 @@ static void onStudioEvent(Map* map, StudioEvent event)
|
|||
}
|
||||
}
|
||||
|
||||
static void scanline(tic_mem* tic, s32 row)
|
||||
{
|
||||
memcpy(tic->ram.vram.palette.data, row < (TOOLBAR_SIZE-1) ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette));
|
||||
}
|
||||
|
||||
void initMap(Map* map, tic_mem* tic)
|
||||
{
|
||||
if(map->history) history_delete(map->history);
|
||||
|
@ -1171,6 +1176,7 @@ void initMap(Map* map, tic_mem* tic)
|
|||
},
|
||||
.history = history_create(&tic->cart.gfx.map, sizeof tic->cart.gfx.map),
|
||||
.event = onStudioEvent,
|
||||
.scanline = scanline,
|
||||
};
|
||||
|
||||
normalizeMap(&map->scroll.x, &map->scroll.y);
|
||||
|
|
|
@ -80,6 +80,7 @@ struct Map
|
|||
|
||||
void(*tick)(Map*);
|
||||
void(*event)(Map*, StudioEvent);
|
||||
void(*scanline)(tic_mem* tic, s32 row);
|
||||
};
|
||||
|
||||
void initMap(Map*, tic_mem*);
|
15
src/studio.c
15
src/studio.c
|
@ -1411,7 +1411,7 @@ static void blit(u32* out, u32* bgOut, s32 pitch, s32 bgPitch)
|
|||
const s32 pitchWidth = pitch/sizeof *out;
|
||||
const s32 bgPitchWidth = bgPitch/sizeof *bgOut;
|
||||
u32* row = out;
|
||||
const u32* pal = srcPaletteBlit(studio.tic->cart.palette.data);
|
||||
const u32* pal = paletteBlit();
|
||||
|
||||
void(*scanline)(tic_mem* memory, s32 row) = NULL;
|
||||
|
||||
|
@ -1423,6 +1423,9 @@ static void blit(u32* out, u32* bgOut, s32 pitch, s32 bgPitch)
|
|||
case TIC_SPRITE_MODE:
|
||||
scanline = studio.sprite.scanline;
|
||||
break;
|
||||
case TIC_MAP_MODE:
|
||||
scanline = studio.map.scanline;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2040,15 +2043,11 @@ static void renderStudio()
|
|||
}
|
||||
|
||||
studio.tic->api.tick_start(studio.tic, src);
|
||||
|
||||
switch(studio.mode)
|
||||
{
|
||||
case TIC_RUN_MODE: break;
|
||||
default:
|
||||
useSystemPalette();
|
||||
}
|
||||
}
|
||||
|
||||
if(studio.mode != TIC_RUN_MODE)
|
||||
useSystemPalette();
|
||||
|
||||
switch(studio.mode)
|
||||
{
|
||||
case TIC_START_MODE: studio.start.tick(&studio.start); break;
|
||||
|
|
Loading…
Reference in New Issue