From 99f1a912a62c6aef0587e1a166d53a2c518dd789 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 11:48:04 +0300 Subject: [PATCH] no message --- src/start.c | 3 --- src/studio.c | 8 +++++--- src/studio.h | 2 -- src/surf.c | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/start.c b/src/start.c index 930a08b..9761ac9 100644 --- a/src/start.c +++ b/src/start.c @@ -100,7 +100,4 @@ void initStart(Start* start, tic_mem* tic) .tick = tick, .play = false, }; - - memcpy(tic->cart.palette.data, tic->config.palette.data, sizeof(tic_palette)); - tic->api.reset(tic); } diff --git a/src/studio.c b/src/studio.c index ef75d63..d90ca7d 100644 --- a/src/studio.c +++ b/src/studio.c @@ -815,9 +815,11 @@ EditorMode getStudioMode() return studio.mode; } -void showGameMenu() +static void showGameMenu() { studio.tic->api.pause(studio.tic); + studio.tic->api.reset(studio.tic); + initMenuMode(); studio.mode = TIC_MENU_MODE; } @@ -2005,7 +2007,7 @@ static void renderCursor() blitCursor(studio.tic->config.gfx.tiles[getConfig()->theme.cursor.sprite].data); } -void useSystemPalette() +static void useSystemPalette() { memcpy(studio.tic->ram.vram.palette.data, studio.tic->config.palette.data, sizeof(tic_palette)); } @@ -2272,7 +2274,7 @@ static void setWindowIcon() u32* pixels = SDL_malloc(Size * Size * sizeof(u32)); - const u32* pal = paletteBlit(); + const u32* pal = srcPaletteBlit(studio.tic->config.palette.data); for(s32 j = 0, index = 0; j < Size; j++) for(s32 i = 0; i < Size; i++, index++) diff --git a/src/studio.h b/src/studio.h index eed87b7..f9b4ade 100644 --- a/src/studio.h +++ b/src/studio.h @@ -183,7 +183,6 @@ typedef void(*DialogCallback)(bool yes, void* data); void showDialog(const char** text, s32 rows, DialogCallback callback, void* data); void hideDialog(); -void showGameMenu(); void hideGameMenu(); bool studioCartChanged(); @@ -193,4 +192,3 @@ void runGameFromSurf(); void gotoSurf(); void exitFromGameMenu(); void runProject(); -void useSystemPalette(); \ No newline at end of file diff --git a/src/surf.c b/src/surf.c index 4d13402..4b063d5 100644 --- a/src/surf.c +++ b/src/surf.c @@ -482,7 +482,7 @@ static void updateMenuItemCover(Surf* surf, const u8* cover, s32 size) { const gif_color* c = &image->palette[image->buffer[i]]; tic_rgb rgb = { c->r, c->g, c->b }; - u8 color = tic_tool_find_closest_color(tic->cart.palette.colors, &rgb); + u8 color = tic_tool_find_closest_color(tic->config.palette.colors, &rgb); tic_tool_poke4(item->cover->data, i, color); } }