From 948072341894322ed9d9c8bab6bbbd2c7b721ddc Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 09:36:54 +0300 Subject: [PATCH 1/9] no message --- src/sprite.c | 6 ++++++ src/sprite.h | 3 ++- src/studio.c | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/sprite.c b/src/sprite.c index 290cc14..52fb9d6 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -1483,6 +1483,11 @@ static void onStudioEvent(Sprite* sprite, 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 initSprite(Sprite* sprite, tic_mem* tic) { if(sprite->select.back == NULL) sprite->select.back = (u8*)SDL_malloc(CANVAS_SIZE*CANVAS_SIZE); @@ -1511,5 +1516,6 @@ void initSprite(Sprite* sprite, tic_mem* tic) .mode = SPRITE_DRAW_MODE, .history = history_create(tic->cart.gfx.tiles, TIC_SPRITES * sizeof(tic_tile)), .event = onStudioEvent, + .scanline = scanline, }; } \ No newline at end of file diff --git a/src/sprite.h b/src/sprite.h index 815781b..f12bba5 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -60,7 +60,8 @@ struct Sprite struct History* history; void (*tick)(Sprite*); - void(*event)(Sprite*, StudioEvent); + void (*event)(Sprite*, StudioEvent); + void (*scanline)(tic_mem* tic, s32 row); }; void initSprite(Sprite*, tic_mem*); \ No newline at end of file diff --git a/src/studio.c b/src/studio.c index a7b6242..ab5b7a0 100644 --- a/src/studio.c +++ b/src/studio.c @@ -1413,20 +1413,33 @@ static void blit(u32* out, u32* bgOut, s32 pitch, s32 bgPitch) u32* row = out; const u32* pal = srcPaletteBlit(studio.tic->cart.palette.data); + void(*scanline)(tic_mem* memory, s32 row) = NULL; + + switch(studio.mode) + { + case TIC_RUN_MODE: + scanline = studio.tic->api.scanline; + break; + case TIC_SPRITE_MODE: + scanline = studio.sprite.scanline; + break; + default: + break; + } + for(s32 r = 0, pos = 0; r < TIC80_HEIGHT; r++, row += pitchWidth) { - - if(studio.mode == TIC_RUN_MODE || studio.mode == TIC_MENU_MODE) + if(scanline) { - studio.tic->api.scanline(studio.tic, r); - pal = paletteBlit(); + scanline(studio.tic, r); + pal = paletteBlit(); + } - if(bgOut) - { - u8 border = tic_tool_peek4(studio.tic->ram.vram.mapping, studio.tic->ram.vram.vars.border & 0xf); - SDL_memset4(bgOut, pal[border], TIC80_WIDTH); - bgOut += bgPitchWidth; - } + if(bgOut) + { + u8 border = tic_tool_peek4(studio.tic->ram.vram.mapping, studio.tic->ram.vram.vars.border & 0xf); + SDL_memset4(bgOut, pal[border], TIC80_WIDTH); + bgOut += bgPitchWidth; } SDL_memset4(row, 0, pitchWidth); @@ -2022,6 +2035,13 @@ static void renderStudio() } studio.tic->api.tick_start(studio.tic, src); + + switch(studio.mode) + { + case TIC_RUN_MODE: break; + default: + memcpy(studio.tic->ram.vram.palette.data, studio.tic->config.palette.data, sizeof(tic_palette)); + } } switch(studio.mode) From bf93beb4c47c959a92ac5adb4fe40e0a8905057c Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 09:58:35 +0300 Subject: [PATCH 2/9] no message --- src/console.c | 9 ++------- src/sprite.c | 17 ++--------------- src/studio.c | 9 +++++++-- src/studio.h | 3 ++- src/tic.c | 4 ++-- 5 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/console.c b/src/console.c index b39e117..17f6517 100644 --- a/src/console.c +++ b/src/console.c @@ -963,9 +963,6 @@ static void onImportSprites(const char* name, const void* buffer, size_t size, v { Console* console = (Console*)data; - tic_palette pal; - memcpy(&pal, console->tic->ram.vram.palette.data, sizeof(tic_palette)); - if(name) { static const char GifExt[] = ".gif"; @@ -993,7 +990,7 @@ static void onImportSprites(const char* name, const void* buffer, size_t size, v u8 src = image->buffer[x + y * image->width]; const gif_color* c = &image->palette[src]; tic_rgb rgb = {c->r, c->g, c->b}; - u8 color = tic_tool_find_closest_color(console->tic->ram.vram.palette.colors, &rgb); + u8 color = tic_tool_find_closest_color(console->tic->cart.palette.colors, &rgb); setSpritePixel(console->tic->cart.gfx.tiles, x, y, color); } @@ -1010,8 +1007,6 @@ static void onImportSprites(const char* name, const void* buffer, size_t size, v } else printBack(console, "\nfile not imported :|"); - memcpy(console->tic->ram.vram.palette.data, &pal, sizeof(tic_palette)); - commandDone(console); } @@ -2320,7 +2315,7 @@ static void cmdInjectCode(Console* console, const char* param, const char* name) bool watch = strcmp(param, "-code-watch") == 0; if(watch || strcmp(param, "-code") == 0) { - bool loaded = loadFileIntoBuffer(console, &embed.file.code.data, name); + bool loaded = loadFileIntoBuffer(console, embed.file.code.data, name); if(loaded) { diff --git a/src/sprite.c b/src/sprite.c index 52fb9d6..d134b5b 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -513,11 +513,6 @@ static void drawMoveButtons(Sprite* sprite) } } -static void updateCartPalette(Sprite* sprite) -{ - SDL_memcpy(sprite->tic->cart.palette.data, sprite->tic->ram.vram.palette.data, sizeof(tic_palette)); -} - static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) { enum {Size = CANVAS_SIZE, Max = 255}; @@ -545,8 +540,6 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) { s32 mx = getMouseX() - x; *value = mx * Max / (Size-1); - - updateCartPalette(sprite); } } @@ -591,10 +584,7 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) down = true; if(checkMouseClick(&rect, SDL_BUTTON_LEFT)) - { (*value)--; - updateCartPalette(sprite); - } } if(down) @@ -632,10 +622,7 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) down = true; if(checkMouseClick(&rect, SDL_BUTTON_LEFT)) - { (*value)++; - updateCartPalette(sprite); - } } if(down) @@ -682,7 +669,7 @@ static void drawRGBTools(Sprite* sprite, s32 x, s32 y) down = true; if(checkMouseClick(&rect, SDL_BUTTON_LEFT)) - toClipboard(sprite->tic->ram.vram.palette.data, sizeof(tic_palette), false); + toClipboard(sprite->tic->cart.palette.data, sizeof(tic_palette), false); } if(down) @@ -747,7 +734,7 @@ static void drawRGBSliders(Sprite* sprite, s32 x, s32 y) { enum{Gap = 6, Count = sizeof(tic_rgb)}; - u8* data = &sprite->tic->ram.vram.palette.data[sprite->color * Count]; + u8* data = &sprite->tic->cart.palette.data[sprite->color * Count]; for(s32 i = 0; i < Count; i++) drawRGBSlider(sprite, x, y + Gap*i, &data[i]); diff --git a/src/studio.c b/src/studio.c index ab5b7a0..2c85c68 100644 --- a/src/studio.c +++ b/src/studio.c @@ -1390,7 +1390,7 @@ static u32* srcPaletteBlit(const u8* src) memset(pal, 0xff, sizeof pal); u8* dst = (u8*)pal; - const u8* end = src + sizeof studio.tic->ram.vram.palette; + const u8* end = src + sizeof(tic_palette); enum{RGB = sizeof(tic_rgb)}; @@ -2007,6 +2007,11 @@ static void renderCursor() blitCursor(studio.tic->config.gfx.tiles[getConfig()->theme.cursor.sprite].data); } +void useSystemPalette() +{ + memcpy(studio.tic->ram.vram.palette.data, studio.tic->config.palette.data, sizeof(tic_palette)); +} + static void renderStudio() { showTooltip(""); @@ -2040,7 +2045,7 @@ static void renderStudio() { case TIC_RUN_MODE: break; default: - memcpy(studio.tic->ram.vram.palette.data, studio.tic->config.palette.data, sizeof(tic_palette)); + useSystemPalette(); } } diff --git a/src/studio.h b/src/studio.h index 960a459..6a09370 100644 --- a/src/studio.h +++ b/src/studio.h @@ -199,4 +199,5 @@ void playSystemSfx(s32 id); void runGameFromSurf(); void gotoSurf(); void exitFromGameMenu(); -void runProject(); \ No newline at end of file +void runProject(); +void useSystemPalette(); \ No newline at end of file diff --git a/src/tic.c b/src/tic.c index e2baf0f..9d52cbc 100644 --- a/src/tic.c +++ b/src/tic.c @@ -441,8 +441,8 @@ static void api_pause(tic_mem* memory) memcpy(&machine->pause.music_pos, &memory->ram.music_pos, sizeof memory->ram.music_pos); memcpy(&machine->pause.vram, &memory->ram.vram, sizeof memory->ram.vram); - api_reset(memory); - memcpy(memory->ram.vram.palette.data, memory->config.palette.data, sizeof(tic_palette)); + // api_reset(memory); + // memcpy(memory->ram.vram.palette.data, memory->config.palette.data, sizeof(tic_palette)); } static void api_resume(tic_mem* memory) From 280828548eaf0039f4378206f180dc800158402f Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 10:16:38 +0300 Subject: [PATCH 3/9] no message --- src/map.c | 6 ++++++ src/map.h | 1 + src/studio.c | 15 +++++++-------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/map.c b/src/map.c index be701c3..70e439f 100644 --- a/src/map.c +++ b/src/map.c @@ -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); diff --git a/src/map.h b/src/map.h index 41bdcda..8d11256 100644 --- a/src/map.h +++ b/src/map.h @@ -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*); \ No newline at end of file diff --git a/src/studio.c b/src/studio.c index 2c85c68..c495c5b 100644 --- a/src/studio.c +++ b/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; From fe0b2a44b5aa7c2e6fa2a4f8311b69fc12de10ee Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 10:31:38 +0300 Subject: [PATCH 4/9] no message --- src/code.c | 20 +++++++++++--------- src/dialog.c | 10 +++++----- src/map.c | 22 +++++++++++----------- src/menu.c | 10 +++++----- src/music.c | 4 ++-- src/sfx.c | 12 ++++++------ src/sprite.c | 4 ++-- src/studio.c | 2 +- src/studio.h | 2 +- 9 files changed, 44 insertions(+), 42 deletions(-) diff --git a/src/code.c b/src/code.c index 42c5c60..ed41b57 100644 --- a/src/code.c +++ b/src/code.c @@ -26,7 +26,7 @@ #define TEXT_CURSOR_DELAY (TIC_FRAMERATE / 2) #define TEXT_CURSOR_BLINK_PERIOD TIC_FRAMERATE #define TEXT_BUFFER_WIDTH STUDIO_TEXT_BUFFER_WIDTH -#define TEXT_BUFFER_HEIGHT ((TIC80_HEIGHT - TOOLBAR_SIZE - STUDIO_TEXT_HEIGHT) / STUDIO_TEXT_HEIGHT) +#define TEXT_BUFFER_HEIGHT ((TIC80_HEIGHT - TOOLBAR_SIZE_ - STUDIO_TEXT_HEIGHT) / STUDIO_TEXT_HEIGHT) struct OutlineItem { @@ -34,7 +34,7 @@ struct OutlineItem char* pos; }; -#define OUTLINE_SIZE ((TIC80_HEIGHT - TOOLBAR_SIZE*2)/TIC_FONT_HEIGHT) +#define OUTLINE_SIZE ((TIC80_HEIGHT - TOOLBAR_SIZE_*2)/TIC_FONT_HEIGHT) #define OUTLINE_ITEMS_SIZE (OUTLINE_SIZE * sizeof(OutlineItem)) static void history(Code* code) @@ -1408,12 +1408,14 @@ static void textEditTick(Code* code) static void drawPopupBar(Code* code, const char* title) { - code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE-1, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, systemColor(tic_color_blue)); - code->tic->api.fixed_text(code->tic, title, 0, TOOLBAR_SIZE, systemColor(tic_color_white)); + enum {TextY = TOOLBAR_SIZE_ + 1}; - code->tic->api.fixed_text(code->tic, code->popup.text, (s32)strlen(title)*TIC_FONT_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE_, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, systemColor(tic_color_blue)); + code->tic->api.fixed_text(code->tic, title, 0, TextY, systemColor(tic_color_white)); - drawCursor(code, (s32)(strlen(title) + strlen(code->popup.text)) * TIC_FONT_WIDTH, TOOLBAR_SIZE, ' '); + code->tic->api.fixed_text(code->tic, code->popup.text, (s32)strlen(title)*TIC_FONT_WIDTH, TextY, systemColor(tic_color_white)); + + drawCursor(code, (s32)(strlen(title) + strlen(code->popup.text)) * TIC_FONT_WIDTH, TextY, ' '); } static void updateFindCode(Code* code, char* pos) @@ -1574,7 +1576,7 @@ static void textGoToTick(Code* code) code->tic->api.clear(code->tic, getConfig()->theme.code.bg); if(code->jump.line >= 0) - code->tic->api.rect(code->tic, 0, (code->jump.line - code->scroll.y) * TIC_FONT_HEIGHT + TOOLBAR_SIZE-1, + code->tic->api.rect(code->tic, 0, (code->jump.line - code->scroll.y) * TIC_FONT_HEIGHT + TOOLBAR_SIZE_ + 1, TIC80_WIDTH, TIC_FONT_HEIGHT+1, getConfig()->theme.code.select); drawCode(code, false); @@ -1689,7 +1691,7 @@ static void textOutlineTick(Code* code) static void drawCodeToolbar(Code* code) { - code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE-1, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); static const u8 Icons[] = { @@ -1836,7 +1838,7 @@ void initCode(Code* code, tic_mem* tic) .tick = tick, .escape = escape, .cursor = {{tic->cart.code.data, NULL, 0, 0}, NULL, 0}, - .rect = {0, TOOLBAR_SIZE, TIC80_WIDTH, TIC80_HEIGHT - TOOLBAR_SIZE - TIC_FONT_HEIGHT - 1}, + .rect = {0, TOOLBAR_SIZE_ + 1, TIC80_WIDTH, TIC80_HEIGHT - TOOLBAR_SIZE_ - TIC_FONT_HEIGHT - 1}, .scroll = {0, 0, {0, 0}, false}, .tickCounter = 0, .history = NULL, diff --git a/src/dialog.c b/src/dialog.c index 1c9c52a..a0c5cbc 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -117,7 +117,7 @@ static void processKeydown(Dialog* dlg, SDL_Keysym* keysum) static void drawDialog(Dialog* dlg) { - enum {Width = TIC80_WIDTH/2, Height = TIC80_HEIGHT/2-TOOLBAR_SIZE-1}; + enum {Width = TIC80_WIDTH/2, Height = TIC80_HEIGHT/2-TOOLBAR_SIZE_}; tic_mem* tic = dlg->tic; @@ -126,7 +126,7 @@ static void drawDialog(Dialog* dlg) rect.x -= dlg->pos.x; rect.y -= dlg->pos.y; - SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-1}; + SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE_-1), rect.w, TOOLBAR_SIZE_}; if(checkMousePos(&header)) { @@ -159,13 +159,13 @@ static void drawDialog(Dialog* dlg) tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); tic->api.line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-3), rect.w, TOOLBAR_SIZE-3, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-2), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE_-2), rect.w, TOOLBAR_SIZE_-2, systemColor(tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE_-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE_-1), systemColor(tic_color_white)); { static const char Label[] = "WARNING!"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-3), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE_-2), systemColor(tic_color_gray)); } { diff --git a/src/map.c b/src/map.c index 70e439f..f6d107f 100644 --- a/src/map.c +++ b/src/map.c @@ -26,9 +26,9 @@ #define SHEET_COLS (TIC_SPRITESHEET_SIZE / TIC_SPRITESIZE) #define MAP_WIDTH (TIC80_WIDTH) -#define MAP_HEIGHT (TIC80_HEIGHT - TOOLBAR_SIZE) +#define MAP_HEIGHT (TIC80_HEIGHT - TOOLBAR_SIZE_) #define MAP_X (0) -#define MAP_Y (TOOLBAR_SIZE) +#define MAP_Y (TOOLBAR_SIZE_) #define MAX_SCROLL_X (TIC_MAP_WIDTH * TIC_SPRITESIZE) #define MAX_SCROLL_Y (TIC_MAP_HEIGHT * TIC_SPRITESIZE) @@ -293,7 +293,7 @@ static void drawTileIndex(Map* map, s32 x, s32 y) if(map->sheet.show) { - SDL_Rect rect = {TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE-1, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; + SDL_Rect rect = {TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE_, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; if(checkMousePos(&rect)) { @@ -328,7 +328,7 @@ static void drawTileIndex(Map* map, s32 x, s32 y) static void drawMapToolbar(Map* map, s32 x, s32 y) { - map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE-1, systemColor(tic_color_white)); + map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); drawTileIndex(map, TIC80_WIDTH/2 - TIC_FONT_WIDTH, y); @@ -417,7 +417,7 @@ static void drawCursorPos(Map* map, s32 x, s32 y) if(px + width >= TIC80_WIDTH) px = x - (width + 2); s32 py = y - (TIC_FONT_HEIGHT + 2); - if(py <= TOOLBAR_SIZE) py = y + (TIC_SPRITESIZE + 3); + if(py <= TOOLBAR_SIZE_) py = y + (TIC_SPRITESIZE + 3); map->tic->api.rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_white)); map->tic->api.text(map->tic, pos, px, py, systemColor(tic_color_light_blue)); @@ -559,10 +559,10 @@ static void drawSelectionRect(Map* map, s32 x, s32 y, s32 w, s32 h) u8 color = systemColor(tic_color_white); s32 index = map->tickCounter / 10; - for(s32 i = x; i < (x+w); i++) map->tic->api.pixel(map->tic, i, y, index++ % Step ? color : 0); index++; - for(s32 i = y; i < (y+h); i++) map->tic->api.pixel(map->tic, x + w-1, i, index++ % Step ? color : 0); index++; - for(s32 i = (x+w-1); i >= x; i--) map->tic->api.pixel(map->tic, i, y + h-1, index++ % Step ? color : 0); index++; - for(s32 i = (y+h-1); i >= y; i--) map->tic->api.pixel(map->tic, x, i, index++ % Step ? color : 0); + for(s32 i = x; i < (x+w); i++) {map->tic->api.pixel(map->tic, i, y, index++ % Step ? color : 0);} index++; + for(s32 i = y; i < (y+h); i++) {map->tic->api.pixel(map->tic, x + w-1, i, index++ % Step ? color : 0);} index++; + for(s32 i = (x+w-1); i >= x; i--) {map->tic->api.pixel(map->tic, i, y + h-1, index++ % Step ? color : 0);} index++; + for(s32 i = (y+h-1); i >= y; i--) {map->tic->api.pixel(map->tic, x, i, index++ % Step ? color : 0);} } static void drawPasteData(Map* map) @@ -1113,7 +1113,7 @@ static void tick(Map* map) map->tic->api.clear(map->tic, TIC_COLOR_BG); drawMap(map); - drawSheet(map, TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE-1); + drawSheet(map, TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE_); drawMapToolbar(map, TIC80_WIDTH - 9*TIC_FONT_WIDTH, 1); drawToolbar(map->tic, TIC_COLOR_BG, false); } @@ -1133,7 +1133,7 @@ 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)); + memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE_ ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); } void initMap(Map* map, tic_mem* tic) diff --git a/src/menu.c b/src/menu.c index e0467d2..8bf8a92 100644 --- a/src/menu.c +++ b/src/menu.c @@ -24,7 +24,7 @@ #include "fs.h" #define DIALOG_WIDTH (TIC80_WIDTH/2) -#define DIALOG_HEIGHT (TIC80_HEIGHT/2-TOOLBAR_SIZE-1) +#define DIALOG_HEIGHT (TIC80_HEIGHT/2-TOOLBAR_SIZE_) static const char* Rows[] = { @@ -78,7 +78,7 @@ static void drawDialog(Menu* menu) tic_mem* tic = menu->tic; - SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-1}; + SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE_-1), rect.w, TOOLBAR_SIZE_}; if(checkMousePos(&header)) { @@ -113,13 +113,13 @@ static void drawDialog(Menu* menu) tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); tic->api.line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-3), rect.w, TOOLBAR_SIZE-3, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-2), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE_-2), rect.w, TOOLBAR_SIZE_-2, systemColor(tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE_-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE_-1), systemColor(tic_color_white)); { static const char Label[] = "GAME MENU"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-3), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE_-2), systemColor(tic_color_gray)); } { diff --git a/src/music.c b/src/music.c index 799b639..9d5fde6 100644 --- a/src/music.c +++ b/src/music.c @@ -1478,7 +1478,7 @@ static void drawModeTabs(Music* music) static void drawMusicToolbar(Music* music) { - music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE - 1, systemColor(tic_color_white)); + music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); drawPlayButtons(music); drawModeTabs(music); @@ -1573,7 +1573,7 @@ static void drawTrackerLayout(Music* music) music->tic->api.clear(music->tic, systemColor(tic_color_gray)); - drawTopPanel(music, 6, TOOLBAR_SIZE + 4); + drawTopPanel(music, 6, TOOLBAR_SIZE_ + 3); drawTracker(music, 6, 35); } diff --git a/src/sfx.c b/src/sfx.c index 4a8b585..a6b46d3 100644 --- a/src/sfx.c +++ b/src/sfx.c @@ -796,7 +796,7 @@ static void drawModeTabs(Sfx* sfx) static void drawSfxToolbar(Sfx* sfx) { - sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE-1, systemColor(tic_color_white)); + sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); enum{Width = 3 * TIC_FONT_WIDTH}; s32 x = TIC80_WIDTH - Width - TIC_SPRITESIZE*3; @@ -854,13 +854,13 @@ static void envelopesTick(Sfx* sfx) drawSfxToolbar(sfx); drawToolbar(sfx->tic, TIC_COLOR_BG, false); - drawTopPanel(sfx, Start, TOOLBAR_SIZE + Gap - 1); - drawCanvasTabs(sfx, Start-Gap, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+1); + drawTopPanel(sfx, Start, TOOLBAR_SIZE_ + Gap); + drawCanvasTabs(sfx, Start-Gap, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+2); if(sfx->canvasTab == SFX_WAVE_TAB) - drawWaveButtons(sfx, Start + CANVAS_WIDTH + Gap-1, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+1); + drawWaveButtons(sfx, Start + CANVAS_WIDTH + Gap-1, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+2); - drawLoopPanel(sfx, Gap, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+91); - drawCanvas(sfx, Start-1, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT); + drawLoopPanel(sfx, Gap, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+92); + drawCanvas(sfx, Start-1, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT + 1); drawOctavePanel(sfx, Start + Gap + PIANO_WIDTH + Gap-1, TIC80_HEIGHT - TIC_FONT_HEIGHT - (PIANO_HEIGHT - TIC_FONT_HEIGHT)/2 - Gap); } diff --git a/src/sprite.c b/src/sprite.c index d134b5b..b78a21d 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -1334,7 +1334,7 @@ static void processKeydown(Sprite* sprite, SDL_Keycode keycode) static void drawSpriteToolbar(Sprite* sprite) { - sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE-1, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); // draw sprite size control { @@ -1472,7 +1472,7 @@ static void onStudioEvent(Sprite* sprite, 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)); + memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE_ ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); } void initSprite(Sprite* sprite, tic_mem* tic) diff --git a/src/studio.c b/src/studio.c index c495c5b..74547f0 100644 --- a/src/studio.c +++ b/src/studio.c @@ -505,7 +505,7 @@ u8 systemColor(u8 color) void drawToolbar(tic_mem* tic, u8 color, bool bg) { if(bg) - studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE-1, systemColor(tic_color_white)); + studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); static const u8 TabIcon[] = { diff --git a/src/studio.h b/src/studio.h index 6a09370..71a22d0 100644 --- a/src/studio.h +++ b/src/studio.h @@ -43,7 +43,7 @@ #define TIC_MOD_CTRL (KMOD_GUI|KMOD_CTRL) -#define TOOLBAR_SIZE 8 +#define TOOLBAR_SIZE_ 7 #define STUDIO_TEXT_WIDTH (TIC_FONT_WIDTH) #define STUDIO_TEXT_HEIGHT (TIC_FONT_HEIGHT+1) #define STUDIO_TEXT_BUFFER_WIDTH (TIC80_WIDTH / STUDIO_TEXT_WIDTH) From d529493685b0d47eeb031a9528fd07ff8b995622 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 10:32:31 +0300 Subject: [PATCH 5/9] no message --- src/code.c | 14 +++++++------- src/dialog.c | 10 +++++----- src/map.c | 14 +++++++------- src/menu.c | 10 +++++----- src/music.c | 4 ++-- src/sfx.c | 12 ++++++------ src/sprite.c | 4 ++-- src/studio.c | 2 +- src/studio.h | 2 +- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/code.c b/src/code.c index ed41b57..d270d13 100644 --- a/src/code.c +++ b/src/code.c @@ -26,7 +26,7 @@ #define TEXT_CURSOR_DELAY (TIC_FRAMERATE / 2) #define TEXT_CURSOR_BLINK_PERIOD TIC_FRAMERATE #define TEXT_BUFFER_WIDTH STUDIO_TEXT_BUFFER_WIDTH -#define TEXT_BUFFER_HEIGHT ((TIC80_HEIGHT - TOOLBAR_SIZE_ - STUDIO_TEXT_HEIGHT) / STUDIO_TEXT_HEIGHT) +#define TEXT_BUFFER_HEIGHT ((TIC80_HEIGHT - TOOLBAR_SIZE - STUDIO_TEXT_HEIGHT) / STUDIO_TEXT_HEIGHT) struct OutlineItem { @@ -34,7 +34,7 @@ struct OutlineItem char* pos; }; -#define OUTLINE_SIZE ((TIC80_HEIGHT - TOOLBAR_SIZE_*2)/TIC_FONT_HEIGHT) +#define OUTLINE_SIZE ((TIC80_HEIGHT - TOOLBAR_SIZE*2)/TIC_FONT_HEIGHT) #define OUTLINE_ITEMS_SIZE (OUTLINE_SIZE * sizeof(OutlineItem)) static void history(Code* code) @@ -1408,9 +1408,9 @@ static void textEditTick(Code* code) static void drawPopupBar(Code* code, const char* title) { - enum {TextY = TOOLBAR_SIZE_ + 1}; + enum {TextY = TOOLBAR_SIZE + 1}; - code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE_, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, systemColor(tic_color_blue)); + code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, systemColor(tic_color_blue)); code->tic->api.fixed_text(code->tic, title, 0, TextY, systemColor(tic_color_white)); code->tic->api.fixed_text(code->tic, code->popup.text, (s32)strlen(title)*TIC_FONT_WIDTH, TextY, systemColor(tic_color_white)); @@ -1576,7 +1576,7 @@ static void textGoToTick(Code* code) code->tic->api.clear(code->tic, getConfig()->theme.code.bg); if(code->jump.line >= 0) - code->tic->api.rect(code->tic, 0, (code->jump.line - code->scroll.y) * TIC_FONT_HEIGHT + TOOLBAR_SIZE_ + 1, + code->tic->api.rect(code->tic, 0, (code->jump.line - code->scroll.y) * TIC_FONT_HEIGHT + TOOLBAR_SIZE + 1, TIC80_WIDTH, TIC_FONT_HEIGHT+1, getConfig()->theme.code.select); drawCode(code, false); @@ -1691,7 +1691,7 @@ static void textOutlineTick(Code* code) static void drawCodeToolbar(Code* code) { - code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); static const u8 Icons[] = { @@ -1838,7 +1838,7 @@ void initCode(Code* code, tic_mem* tic) .tick = tick, .escape = escape, .cursor = {{tic->cart.code.data, NULL, 0, 0}, NULL, 0}, - .rect = {0, TOOLBAR_SIZE_ + 1, TIC80_WIDTH, TIC80_HEIGHT - TOOLBAR_SIZE_ - TIC_FONT_HEIGHT - 1}, + .rect = {0, TOOLBAR_SIZE + 1, TIC80_WIDTH, TIC80_HEIGHT - TOOLBAR_SIZE - TIC_FONT_HEIGHT - 1}, .scroll = {0, 0, {0, 0}, false}, .tickCounter = 0, .history = NULL, diff --git a/src/dialog.c b/src/dialog.c index a0c5cbc..c5e6006 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -117,7 +117,7 @@ static void processKeydown(Dialog* dlg, SDL_Keysym* keysum) static void drawDialog(Dialog* dlg) { - enum {Width = TIC80_WIDTH/2, Height = TIC80_HEIGHT/2-TOOLBAR_SIZE_}; + enum {Width = TIC80_WIDTH/2, Height = TIC80_HEIGHT/2-TOOLBAR_SIZE}; tic_mem* tic = dlg->tic; @@ -126,7 +126,7 @@ static void drawDialog(Dialog* dlg) rect.x -= dlg->pos.x; rect.y -= dlg->pos.y; - SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE_-1), rect.w, TOOLBAR_SIZE_}; + SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE-1), rect.w, TOOLBAR_SIZE}; if(checkMousePos(&header)) { @@ -159,13 +159,13 @@ static void drawDialog(Dialog* dlg) tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); tic->api.line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE_-2), rect.w, TOOLBAR_SIZE_-2, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE_-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE_-1), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, systemColor(tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-1), systemColor(tic_color_white)); { static const char Label[] = "WARNING!"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE_-2), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_gray)); } { diff --git a/src/map.c b/src/map.c index f6d107f..3319e44 100644 --- a/src/map.c +++ b/src/map.c @@ -26,9 +26,9 @@ #define SHEET_COLS (TIC_SPRITESHEET_SIZE / TIC_SPRITESIZE) #define MAP_WIDTH (TIC80_WIDTH) -#define MAP_HEIGHT (TIC80_HEIGHT - TOOLBAR_SIZE_) +#define MAP_HEIGHT (TIC80_HEIGHT - TOOLBAR_SIZE) #define MAP_X (0) -#define MAP_Y (TOOLBAR_SIZE_) +#define MAP_Y (TOOLBAR_SIZE) #define MAX_SCROLL_X (TIC_MAP_WIDTH * TIC_SPRITESIZE) #define MAX_SCROLL_Y (TIC_MAP_HEIGHT * TIC_SPRITESIZE) @@ -293,7 +293,7 @@ static void drawTileIndex(Map* map, s32 x, s32 y) if(map->sheet.show) { - SDL_Rect rect = {TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE_, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; + SDL_Rect rect = {TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; if(checkMousePos(&rect)) { @@ -328,7 +328,7 @@ static void drawTileIndex(Map* map, s32 x, s32 y) static void drawMapToolbar(Map* map, s32 x, s32 y) { - map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); drawTileIndex(map, TIC80_WIDTH/2 - TIC_FONT_WIDTH, y); @@ -417,7 +417,7 @@ static void drawCursorPos(Map* map, s32 x, s32 y) if(px + width >= TIC80_WIDTH) px = x - (width + 2); s32 py = y - (TIC_FONT_HEIGHT + 2); - if(py <= TOOLBAR_SIZE_) py = y + (TIC_SPRITESIZE + 3); + if(py <= TOOLBAR_SIZE) py = y + (TIC_SPRITESIZE + 3); map->tic->api.rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_white)); map->tic->api.text(map->tic, pos, px, py, systemColor(tic_color_light_blue)); @@ -1113,7 +1113,7 @@ static void tick(Map* map) map->tic->api.clear(map->tic, TIC_COLOR_BG); drawMap(map); - drawSheet(map, TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE_); + drawSheet(map, TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, TOOLBAR_SIZE); drawMapToolbar(map, TIC80_WIDTH - 9*TIC_FONT_WIDTH, 1); drawToolbar(map->tic, TIC_COLOR_BG, false); } @@ -1133,7 +1133,7 @@ static void onStudioEvent(Map* map, StudioEvent event) static void scanline(tic_mem* tic, s32 row) { - memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE_ ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); + memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); } void initMap(Map* map, tic_mem* tic) diff --git a/src/menu.c b/src/menu.c index 8bf8a92..d712ca8 100644 --- a/src/menu.c +++ b/src/menu.c @@ -24,7 +24,7 @@ #include "fs.h" #define DIALOG_WIDTH (TIC80_WIDTH/2) -#define DIALOG_HEIGHT (TIC80_HEIGHT/2-TOOLBAR_SIZE_) +#define DIALOG_HEIGHT (TIC80_HEIGHT/2-TOOLBAR_SIZE) static const char* Rows[] = { @@ -78,7 +78,7 @@ static void drawDialog(Menu* menu) tic_mem* tic = menu->tic; - SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE_-1), rect.w, TOOLBAR_SIZE_}; + SDL_Rect header = {rect.x, rect.y-(TOOLBAR_SIZE-1), rect.w, TOOLBAR_SIZE}; if(checkMousePos(&header)) { @@ -113,13 +113,13 @@ static void drawDialog(Menu* menu) tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); tic->api.line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE_-2), rect.w, TOOLBAR_SIZE_-2, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE_-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE_-1), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, systemColor(tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE-1), systemColor(tic_color_white)); { static const char Label[] = "GAME MENU"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE_-2), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_gray)); } { diff --git a/src/music.c b/src/music.c index 9d5fde6..01cd67d 100644 --- a/src/music.c +++ b/src/music.c @@ -1478,7 +1478,7 @@ static void drawModeTabs(Music* music) static void drawMusicToolbar(Music* music) { - music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); drawPlayButtons(music); drawModeTabs(music); @@ -1573,7 +1573,7 @@ static void drawTrackerLayout(Music* music) music->tic->api.clear(music->tic, systemColor(tic_color_gray)); - drawTopPanel(music, 6, TOOLBAR_SIZE_ + 3); + drawTopPanel(music, 6, TOOLBAR_SIZE + 3); drawTracker(music, 6, 35); } diff --git a/src/sfx.c b/src/sfx.c index a6b46d3..5c9c526 100644 --- a/src/sfx.c +++ b/src/sfx.c @@ -796,7 +796,7 @@ static void drawModeTabs(Sfx* sfx) static void drawSfxToolbar(Sfx* sfx) { - sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); enum{Width = 3 * TIC_FONT_WIDTH}; s32 x = TIC80_WIDTH - Width - TIC_SPRITESIZE*3; @@ -854,13 +854,13 @@ static void envelopesTick(Sfx* sfx) drawSfxToolbar(sfx); drawToolbar(sfx->tic, TIC_COLOR_BG, false); - drawTopPanel(sfx, Start, TOOLBAR_SIZE_ + Gap); - drawCanvasTabs(sfx, Start-Gap, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+2); + drawTopPanel(sfx, Start, TOOLBAR_SIZE + Gap); + drawCanvasTabs(sfx, Start-Gap, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+2); if(sfx->canvasTab == SFX_WAVE_TAB) - drawWaveButtons(sfx, Start + CANVAS_WIDTH + Gap-1, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+2); + drawWaveButtons(sfx, Start + CANVAS_WIDTH + Gap-1, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+2); - drawLoopPanel(sfx, Gap, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT+92); - drawCanvas(sfx, Start-1, TOOLBAR_SIZE_ + Gap + TIC_FONT_HEIGHT + 1); + drawLoopPanel(sfx, Gap, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT+92); + drawCanvas(sfx, Start-1, TOOLBAR_SIZE + Gap + TIC_FONT_HEIGHT + 1); drawOctavePanel(sfx, Start + Gap + PIANO_WIDTH + Gap-1, TIC80_HEIGHT - TIC_FONT_HEIGHT - (PIANO_HEIGHT - TIC_FONT_HEIGHT)/2 - Gap); } diff --git a/src/sprite.c b/src/sprite.c index b78a21d..6caaa9b 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -1334,7 +1334,7 @@ static void processKeydown(Sprite* sprite, SDL_Keycode keycode) static void drawSpriteToolbar(Sprite* sprite) { - sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); // draw sprite size control { @@ -1472,7 +1472,7 @@ static void onStudioEvent(Sprite* sprite, StudioEvent event) static void scanline(tic_mem* tic, s32 row) { - memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE_ ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); + memcpy(tic->ram.vram.palette.data, row < TOOLBAR_SIZE ? tic->config.palette.data : tic->cart.palette.data, sizeof(tic_palette)); } void initSprite(Sprite* sprite, tic_mem* tic) diff --git a/src/studio.c b/src/studio.c index 74547f0..8e6c78f 100644 --- a/src/studio.c +++ b/src/studio.c @@ -505,7 +505,7 @@ u8 systemColor(u8 color) void drawToolbar(tic_mem* tic, u8 color, bool bg) { if(bg) - studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE_, systemColor(tic_color_white)); + studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); static const u8 TabIcon[] = { diff --git a/src/studio.h b/src/studio.h index 71a22d0..0597730 100644 --- a/src/studio.h +++ b/src/studio.h @@ -43,7 +43,7 @@ #define TIC_MOD_CTRL (KMOD_GUI|KMOD_CTRL) -#define TOOLBAR_SIZE_ 7 +#define TOOLBAR_SIZE 7 #define STUDIO_TEXT_WIDTH (TIC_FONT_WIDTH) #define STUDIO_TEXT_HEIGHT (TIC_FONT_HEIGHT+1) #define STUDIO_TEXT_BUFFER_WIDTH (TIC80_WIDTH / STUDIO_TEXT_WIDTH) From e311fa42a80da1c45d0dc36d5fe4b3462ca72440 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 10:37:30 +0300 Subject: [PATCH 6/9] removed system color func --- src/code.c | 22 ++++----- src/config.c | 18 ------- src/console.c | 16 +++---- src/dialog.c | 30 ++++++------ src/keymap.c | 20 ++++---- src/map.c | 30 ++++++------ src/menu.c | 64 ++++++++++++------------- src/music.c | 66 +++++++++++++------------- src/sfx.c | 64 ++++++++++++------------- src/sprite.c | 128 +++++++++++++++++++++++++------------------------- src/start.c | 8 ++-- src/studio.c | 23 ++++----- src/studio.h | 9 +--- src/world.c | 4 +- 14 files changed, 236 insertions(+), 266 deletions(-) diff --git a/src/code.c b/src/code.c index d270d13..aeb31b8 100644 --- a/src/code.c +++ b/src/code.c @@ -46,7 +46,7 @@ static void history(Code* code) static void drawStatus(Code* code) { const s32 Height = TIC_FONT_HEIGHT + 1; - code->tic->api.rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, (tic_color_white)); code->tic->api.fixed_text(code->tic, code->status, 0, TIC80_HEIGHT - TIC_FONT_HEIGHT, getConfig()->theme.code.bg); } @@ -1410,10 +1410,10 @@ static void drawPopupBar(Code* code, const char* title) { enum {TextY = TOOLBAR_SIZE + 1}; - code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, systemColor(tic_color_blue)); - code->tic->api.fixed_text(code->tic, title, 0, TextY, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, TOOLBAR_SIZE, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, (tic_color_blue)); + code->tic->api.fixed_text(code->tic, title, 0, TextY, (tic_color_white)); - code->tic->api.fixed_text(code->tic, code->popup.text, (s32)strlen(title)*TIC_FONT_WIDTH, TextY, systemColor(tic_color_white)); + code->tic->api.fixed_text(code->tic, code->popup.text, (s32)strlen(title)*TIC_FONT_WIDTH, TextY, (tic_color_white)); drawCursor(code, (s32)(strlen(title) + strlen(code->popup.text)) * TIC_FONT_WIDTH, TextY, ' '); } @@ -1609,7 +1609,7 @@ static void drawOutlineBar(Code* code, s32 x, s32 y) } } - code->tic->api.rect(code->tic, rect.x-1, rect.y, rect.w+1, rect.h, systemColor(tic_color_blue)); + code->tic->api.rect(code->tic, rect.x-1, rect.y, rect.w+1, rect.h, (tic_color_blue)); OutlineItem* ptr = code->outline.items; @@ -1618,15 +1618,15 @@ static void drawOutlineBar(Code* code, s32 x, s32 y) if(ptr->pos) { code->tic->api.rect(code->tic, rect.x - 1, rect.y + code->outline.index*STUDIO_TEXT_HEIGHT, - rect.w + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_red)); + rect.w + 1, TIC_FONT_HEIGHT + 1, (tic_color_red)); while(ptr->pos) { - code->tic->api.fixed_text(code->tic, ptr->name, x, y, systemColor(tic_color_white)); + code->tic->api.fixed_text(code->tic, ptr->name, x, y, (tic_color_white)); ptr++; y += STUDIO_TEXT_HEIGHT; } } - else code->tic->api.fixed_text(code->tic, "(empty)", x, y, systemColor(tic_color_white)); + else code->tic->api.fixed_text(code->tic, "(empty)", x, y, (tic_color_white)); } static void textOutlineTick(Code* code) @@ -1691,7 +1691,7 @@ static void textOutlineTick(Code* code) static void drawCodeToolbar(Code* code) { - code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + code->tic->api.rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); static const u8 Icons[] = { @@ -1768,9 +1768,9 @@ static void drawCodeToolbar(Code* code) bool active = i == code->mode - TEXT_EDIT_MODE && i != 0; if(active) - code->tic->api.rect(code->tic, rect.x, rect.y, Size, Size, systemColor(tic_color_blue)); + code->tic->api.rect(code->tic, rect.x, rect.y, Size, Size, (tic_color_blue)); - drawBitIcon(rect.x, rect.y, Icons + i*BITS_IN_BYTE, active ? systemColor(tic_color_white) : (over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue))); + drawBitIcon(rect.x, rect.y, Icons + i*BITS_IN_BYTE, active ? (tic_color_white) : (over ? (tic_color_dark_gray) : (tic_color_light_blue))); } drawToolbar(code->tic, getConfig()->theme.code.bg, false); diff --git a/src/config.c b/src/config.c index 3f3744f..6e1b2e7 100644 --- a/src/config.c +++ b/src/config.c @@ -85,23 +85,6 @@ static void readCursorTheme(Config* config, lua_State* lua) lua_pop(lua, 1); } -static void readPaletteMapTheme(Config* config, lua_State* lua) -{ - lua_getfield(lua, -1, "PALMAP"); - - if(lua_isstring(lua, -1)) - { - const char* val = lua_tostring(lua, -1); - - s32 size = (s32)strlen(val); - if(size == TIC_PALETTE_SIZE) - for(s32 i = 0; i < size; i++) - config->data.theme.palmap.data[i] = val[i] - (val[i] >= '0' && val[i] <= '9' ? '0' : 'a' - 10); - } - - lua_pop(lua, 1); -} - static void readCodeTheme(Config* config, lua_State* lua) { lua_getfield(lua, -1, "CODE"); @@ -154,7 +137,6 @@ static void readTheme(Config* config, lua_State* lua) if(lua_type(lua, -1) == LUA_TTABLE) { - readPaletteMapTheme(config, lua); readCursorTheme(config, lua); readCodeTheme(config, lua); readGamepadTheme(config, lua); diff --git a/src/console.c b/src/console.c index 17f6517..45bd205 100644 --- a/src/console.c +++ b/src/console.c @@ -29,10 +29,10 @@ #include -#define CONSOLE_CURSOR_COLOR (systemColor(tic_color_red)) -#define CONSOLE_BACK_TEXT_COLOR (systemColor(tic_color_dark_gray)) -#define CONSOLE_FRONT_TEXT_COLOR (systemColor(tic_color_white)) -#define CONSOLE_ERROR_TEXT_COLOR (systemColor(tic_color_red)) +#define CONSOLE_CURSOR_COLOR ((tic_color_red)) +#define CONSOLE_BACK_TEXT_COLOR ((tic_color_dark_gray)) +#define CONSOLE_FRONT_TEXT_COLOR ((tic_color_white)) +#define CONSOLE_ERROR_TEXT_COLOR ((tic_color_red)) #define CONSOLE_CURSOR_BLINK_PERIOD (TIC_FRAMERATE) #define CONSOLE_CURSOR_DELAY (TIC_FRAMERATE / 2) #define CONSOLE_BUFFER_WIDTH (STUDIO_TEXT_BUFFER_WIDTH) @@ -1724,10 +1724,10 @@ static void printTable(Console* console, const char* text) case '+': case '|': case '-': - color = systemColor(tic_color_gray); + color = (tic_color_gray); break; default: - color = systemColor(tic_color_white); + color = (tic_color_white); } *(console->colorBuffer + offset) = color; @@ -2065,7 +2065,7 @@ static void processConsoleCommand(Console* console) static void error(Console* console, const char* info) { - consolePrint(console, info ? info : "unknown error", systemColor(tic_color_red)); + consolePrint(console, info ? info : "unknown error", (tic_color_red)); commandDone(console); } @@ -2118,7 +2118,7 @@ static void checkNewVersion(Console* console) { char msg[FILENAME_MAX] = {0}; sprintf(msg, "\n A new version %i.%i.%i is available.\n", version.major, version.minor, version.patch); - consolePrint(console, msg, systemColor(tic_color_light_green)); + consolePrint(console, msg, (tic_color_light_green)); } } } diff --git a/src/dialog.c b/src/dialog.c index c5e6006..ce80edd 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -49,12 +49,12 @@ static void drawButton(Dialog* dlg, const char* label, s32 x, s32 y, u8 color, u if(down) { - tic->api.rect(tic, rect.x, rect.y+1, rect.w, rect.h, systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y+1, rect.w, rect.h, (tic_color_white)); } else { - tic->api.rect(tic, rect.x, rect.y+1, rect.w, rect.h, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y+1, rect.w, rect.h, (tic_color_black)); + tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, (tic_color_white)); } s32 size = tic->api.text(tic, label, 0, -TIC_FONT_HEIGHT, 0); @@ -74,8 +74,8 @@ static void drawButton(Dialog* dlg, const char* label, s32 x, s32 y, u8 color, u 0b00000000, }; - drawBitIcon(rect.x-5, rect.y+3, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x-5, rect.y+2, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x-5, rect.y+3, Icon, (tic_color_black)); + drawBitIcon(rect.x-5, rect.y+2, Icon, (tic_color_white)); } } @@ -156,16 +156,16 @@ static void drawDialog(Dialog* dlg) dlg->drag.active = false; } - tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); - tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); - tic->api.line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-1), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, (tic_color_blue)); + tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, (tic_color_white)); + tic->api.line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, (tic_color_black)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, (tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-1), (tic_color_white)); { static const char Label[] = "WARNING!"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-2), (tic_color_gray)); } { @@ -180,13 +180,13 @@ static void drawDialog(Dialog* dlg) s32 x = rect.x + (Width - size)/2; s32 y = rect.y + (TIC_FONT_HEIGHT+1)*(i+1); - tic->api.text(tic, dlg->text[i], x, y+1, systemColor(tic_color_black)); - tic->api.text(tic, dlg->text[i], x, y, systemColor(tic_color_white)); + tic->api.text(tic, dlg->text[i], x, y+1, (tic_color_black)); + tic->api.text(tic, dlg->text[i], x, y, (tic_color_white)); } } - drawButton(dlg, "YES", rect.x + (Width/2 - 26), rect.y + 45, systemColor(tic_color_dark_red), systemColor(tic_color_red), onYes, 0); - drawButton(dlg, "NO", rect.x + (Width/2 + 6), rect.y + 45, systemColor(tic_color_green), systemColor(tic_color_light_green), onNo, 1); + drawButton(dlg, "YES", rect.x + (Width/2 - 26), rect.y + 45, (tic_color_dark_red), (tic_color_red), onYes, 0); + drawButton(dlg, "NO", rect.x + (Width/2 + 6), rect.y + 45, (tic_color_green), (tic_color_light_green), onNo, 1); } static void tick(Dialog* dlg) diff --git a/src/keymap.c b/src/keymap.c index 62d3cf6..096d83d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -56,7 +56,7 @@ static void drawPlayer(Keymap* keymap, s32 x, s32 y, s32 id) { char label[] = "PLAYER #%i"; sprintf(label, label, id+1); - keymap->tic->api.text(keymap->tic, label, x, y, systemColor(tic_color_white)); + keymap->tic->api.text(keymap->tic, label, x, y, (tic_color_white)); } @@ -84,14 +84,14 @@ static void drawPlayer(Keymap* keymap, s32 x, s32 y, s32 id) bool selected = keymap->button == button; if(over) - keymap->tic->api.rect(keymap->tic, rect.x-1, rect.y-1, rect.w, rect.h, systemColor(tic_color_dark_red)); + keymap->tic->api.rect(keymap->tic, rect.x-1, rect.y-1, rect.w, rect.h, (tic_color_dark_red)); if(selected) - keymap->tic->api.rect(keymap->tic, rect.x-1, rect.y-1, rect.w, rect.h, systemColor(tic_color_white)); + keymap->tic->api.rect(keymap->tic, rect.x-1, rect.y-1, rect.w, rect.h, (tic_color_white)); - keymap->tic->api.text(keymap->tic, ButtonNames[i], rect.x, rect.y, selected ? systemColor(tic_color_black) : systemColor(tic_color_gray)); + keymap->tic->api.text(keymap->tic, ButtonNames[i], rect.x, rect.y, selected ? (tic_color_black) : (tic_color_gray)); - keymap->tic->api.text(keymap->tic, SDL_GetKeyName(SDL_GetKeyFromScancode(codes[button])), rect.x + OffsetX, rect.y, selected ? systemColor(tic_color_black) : systemColor(tic_color_white)); + keymap->tic->api.text(keymap->tic, SDL_GetKeyName(SDL_GetKeyFromScancode(codes[button])), rect.x + OffsetX, rect.y, selected ? (tic_color_black) : (tic_color_white)); } } @@ -102,11 +102,11 @@ static void drawCenterText(Keymap* keymap, const char* text, s32 y, u8 color) static void drawKeymap(Keymap* keymap) { - keymap->tic->api.rect(keymap->tic, 0, 0, TIC80_WIDTH, TIC_FONT_HEIGHT * 3, systemColor(tic_color_white)); + keymap->tic->api.rect(keymap->tic, 0, 0, TIC80_WIDTH, TIC_FONT_HEIGHT * 3, (tic_color_white)); { static const char Label[] = "CONFIGURE BUTTONS MAPPING"; - keymap->tic->api.text(keymap->tic, Label, (TIC80_WIDTH - sizeof Label * TIC_FONT_WIDTH)/2, TIC_FONT_HEIGHT, systemColor(tic_color_black)); + keymap->tic->api.text(keymap->tic, Label, (TIC80_WIDTH - sizeof Label * TIC_FONT_WIDTH)/2, TIC_FONT_HEIGHT, (tic_color_black)); } drawPlayer(keymap, 16, 40, 0); @@ -115,14 +115,14 @@ static void drawKeymap(Keymap* keymap) if(keymap->button < 0) { if(keymap->ticks % TIC_FRAMERATE < TIC_FRAMERATE/2) - drawCenterText(keymap, "SELECT BUTTON", 120, systemColor(tic_color_white)); + drawCenterText(keymap, "SELECT BUTTON", 120, (tic_color_white)); } else { char label[256]; sprintf(label, "PRESS A KEY FOR '%s'", ButtonNames[keymap->button % BUTTONS_COUNT]); - drawCenterText(keymap, label, 120, systemColor(tic_color_white)); - drawCenterText(keymap, "ESC TO CANCEL", 126, systemColor(tic_color_white)); + drawCenterText(keymap, label, 120, (tic_color_white)); + drawCenterText(keymap, "ESC TO CANCEL", 126, (tic_color_white)); } } diff --git a/src/map.c b/src/map.c index 3319e44..3efc8e0 100644 --- a/src/map.c +++ b/src/map.c @@ -99,7 +99,7 @@ static s32 drawWorldButton(Map* map, s32 x, s32 y) setStudioMode(TIC_WORLD_MODE); } - drawBitIcon(x, y, WorldIcon, over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(x, y, WorldIcon, over ? (tic_color_dark_gray) : (tic_color_light_blue)); return x; @@ -137,7 +137,7 @@ static s32 drawGridButton(Map* map, s32 x, s32 y) map->canvas.grid = !map->canvas.grid; } - drawBitIcon(x, y, GridIcon, map->canvas.grid ? systemColor(tic_color_black) : over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(x, y, GridIcon, map->canvas.grid ? (tic_color_black) : over ? (tic_color_dark_gray) : (tic_color_light_blue)); return x; } @@ -186,7 +186,7 @@ static s32 drawSheetButton(Map* map, s32 x, s32 y) } } - drawBitIcon(rect.x, rect.y, map->sheet.show ? UpIcon : DownIcon, over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y, map->sheet.show ? UpIcon : DownIcon, over ? (tic_color_dark_gray) : (tic_color_light_blue)); return x; } @@ -212,7 +212,7 @@ static s32 drawToolButton(Map* map, s32 x, s32 y, const u8* Icon, s32 width, con } } - drawBitIcon(rect.x, rect.y, Icon, map->mode == mode ? systemColor(tic_color_black) : over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y, Icon, map->mode == mode ? (tic_color_black) : over ? (tic_color_dark_gray) : (tic_color_light_blue)); return x; } @@ -322,13 +322,13 @@ static void drawTileIndex(Map* map, s32 x, s32 y) { char buf[] = "#999"; sprintf(buf, "#%03i", index); - map->tic->api.text(map->tic, buf, x, y, systemColor(tic_color_light_blue)); + map->tic->api.text(map->tic, buf, x, y, (tic_color_light_blue)); } } static void drawMapToolbar(Map* map, s32 x, s32 y) { - map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + map->tic->api.rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); drawTileIndex(map, TIC80_WIDTH/2 - TIC_FONT_WIDTH, y); @@ -348,7 +348,7 @@ static void drawSheet(Map* map, s32 x, s32 y) SDL_Rect rect = {x, y, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; - map->tic->api.rect_border(map->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, systemColor(tic_color_white)); + map->tic->api.rect_border(map->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, (tic_color_white)); if(checkMousePos(&rect)) { @@ -398,7 +398,7 @@ static void drawSheet(Map* map, s32 x, s32 y) s32 bw = map->sheet.rect.w * TIC_SPRITESIZE + 2; s32 bh = map->sheet.rect.h * TIC_SPRITESIZE + 2; - map->tic->api.rect_border(map->tic, bx, by, bw, bh, systemColor(tic_color_white)); + map->tic->api.rect_border(map->tic, bx, by, bw, bh, (tic_color_white)); } } @@ -411,7 +411,7 @@ static void drawCursorPos(Map* map, s32 x, s32 y) sprintf(pos, "%03i:%03i", tx, ty); - s32 width = map->tic->api.text(map->tic, pos, TIC80_WIDTH, 0, systemColor(tic_color_gray)); + s32 width = map->tic->api.text(map->tic, pos, TIC80_WIDTH, 0, (tic_color_gray)); s32 px = x + (TIC_SPRITESIZE + 3); if(px + width >= TIC80_WIDTH) px = x - (width + 2); @@ -419,8 +419,8 @@ static void drawCursorPos(Map* map, s32 x, s32 y) s32 py = y - (TIC_FONT_HEIGHT + 2); if(py <= TOOLBAR_SIZE) py = y + (TIC_SPRITESIZE + 3); - map->tic->api.rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_white)); - map->tic->api.text(map->tic, pos, px, py, systemColor(tic_color_light_blue)); + map->tic->api.rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, (tic_color_white)); + map->tic->api.text(map->tic, pos, px, py, (tic_color_light_blue)); } static void setMapSprite(Map* map, s32 x, s32 y) @@ -455,7 +455,7 @@ static void drawTileCursor(Map* map) s32 height = map->sheet.rect.h * TIC_SPRITESIZE + 2; map->tic->api.rect_border(map->tic, mx - 1, my - 1, - width, height, systemColor(tic_color_white)); + width, height, (tic_color_white)); { s32 sx = map->sheet.rect.x; @@ -556,7 +556,7 @@ static void resetSelection(Map* map) static void drawSelectionRect(Map* map, s32 x, s32 y, s32 w, s32 h) { enum{Step = 3}; - u8 color = systemColor(tic_color_white); + u8 color = (tic_color_white); s32 index = map->tickCounter / 10; for(s32 i = x; i < (x+w); i++) {map->tic->api.pixel(map->tic, i, y, index++ % Step ? color : 0);} index++; @@ -867,8 +867,8 @@ static void drawMap(Map* map) s32 screenScrollX = map->scroll.x % TIC80_WIDTH; s32 screenScrollY = map->scroll.y % TIC80_HEIGHT; - map->tic->api.line(map->tic, 0, TIC80_HEIGHT - screenScrollY, TIC80_WIDTH, TIC80_HEIGHT - screenScrollY, systemColor(tic_color_gray)); - map->tic->api.line(map->tic, TIC80_WIDTH - screenScrollX, 0, TIC80_WIDTH - screenScrollX, TIC80_HEIGHT, systemColor(tic_color_gray)); + map->tic->api.line(map->tic, 0, TIC80_HEIGHT - screenScrollY, TIC80_WIDTH, TIC80_HEIGHT - screenScrollY, (tic_color_gray)); + map->tic->api.line(map->tic, TIC80_WIDTH - screenScrollX, 0, TIC80_WIDTH - screenScrollX, TIC80_HEIGHT, (tic_color_gray)); } if(!map->sheet.show && checkMousePos(&rect)) diff --git a/src/menu.c b/src/menu.c index d712ca8..04e4d00 100644 --- a/src/menu.c +++ b/src/menu.c @@ -110,16 +110,16 @@ static void drawDialog(Menu* menu) rect = getRect(menu); - tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_blue)); - tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_white)); - tic->api.line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, systemColor(tic_color_black)); - tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, systemColor(tic_color_white)); - tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE-1), systemColor(tic_color_white)); + tic->api.rect(tic, rect.x, rect.y, rect.w, rect.h, (tic_color_blue)); + tic->api.rect_border(tic, rect.x, rect.y, rect.w, rect.h, (tic_color_white)); + tic->api.line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, (tic_color_black)); + tic->api.rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, (tic_color_white)); + tic->api.line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE-1), (tic_color_white)); { static const char Label[] = "GAME MENU"; s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, 0); - tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-2), systemColor(tic_color_gray)); + tic->api.text(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-2), (tic_color_gray)); } { @@ -149,14 +149,14 @@ static void drawTabDisabled(Menu* menu, s32 x, s32 y, s32 id) } } - tic->api.rect(tic, x, y-1, Width, Height+1, systemColor(tic_color_dark_gray)); - tic->api.pixel(tic, x, y+Height-1, systemColor(tic_color_blue)); - tic->api.pixel(tic, x+Width-1, y+Height-1, systemColor(tic_color_blue)); + tic->api.rect(tic, x, y-1, Width, Height+1, (tic_color_dark_gray)); + tic->api.pixel(tic, x, y+Height-1, (tic_color_blue)); + tic->api.pixel(tic, x+Width-1, y+Height-1, (tic_color_blue)); { char buf[] = "#1"; sprintf(buf, "#%i", id+1); - tic->api.fixed_text(tic, buf, x+2, y, systemColor(over ? tic_color_light_blue : tic_color_gray)); + tic->api.fixed_text(tic, buf, x+2, y, (over ? tic_color_light_blue : tic_color_gray)); } } @@ -165,15 +165,15 @@ static void drawTab(Menu* menu, s32 x, s32 y, s32 id) enum{Width = 15, Height = 7}; tic_mem* tic = menu->tic; - tic->api.rect(tic, x, y-2, Width, Height+2, systemColor(tic_color_white)); - tic->api.pixel(tic, x, y+Height-1, systemColor(tic_color_black)); - tic->api.pixel(tic, x+Width-1, y+Height-1, systemColor(tic_color_black)); - tic->api.rect(tic, x+1, y+Height, Width-2 , 1, systemColor(tic_color_black)); + tic->api.rect(tic, x, y-2, Width, Height+2, (tic_color_white)); + tic->api.pixel(tic, x, y+Height-1, (tic_color_black)); + tic->api.pixel(tic, x+Width-1, y+Height-1, (tic_color_black)); + tic->api.rect(tic, x+1, y+Height, Width-2 , 1, (tic_color_black)); { char buf[] = "#1"; sprintf(buf, "#%i", id+1); - tic->api.fixed_text(tic, buf, x+2, y, systemColor(tic_color_gray)); + tic->api.fixed_text(tic, buf, x+2, y, (tic_color_gray)); } } @@ -218,7 +218,7 @@ static void drawPlayerButtons(Menu* menu, s32 x, s32 y) if(strlen(label) > MaxChars) label[MaxChars] = '\0'; - tic->api.text(tic, label, rect.x+10, rect.y+2, systemColor(over ? tic_color_gray : tic_color_black)); + tic->api.text(tic, label, rect.x+10, rect.y+2, (over ? tic_color_gray : tic_color_black)); } } @@ -228,12 +228,12 @@ static void drawGamepadSetupTabs(Menu* menu, s32 x, s32 y) tic_mem* tic = menu->tic; - tic->api.rect(tic, x, y, Width, Height, systemColor(tic_color_white)); - tic->api.pixel(tic, x, y, systemColor(tic_color_blue)); - tic->api.pixel(tic, x+Width-1, y, systemColor(tic_color_blue)); - tic->api.pixel(tic, x, y+Height-1, systemColor(tic_color_black)); - tic->api.pixel(tic, x+Width-1, y+Height-1, systemColor(tic_color_black)); - tic->api.rect(tic, x+1, y+Height, Width-2 , 1, systemColor(tic_color_black)); + tic->api.rect(tic, x, y, Width, Height, (tic_color_white)); + tic->api.pixel(tic, x, y, (tic_color_blue)); + tic->api.pixel(tic, x+Width-1, y, (tic_color_blue)); + tic->api.pixel(tic, x, y+Height-1, (tic_color_black)); + tic->api.pixel(tic, x+Width-1, y+Height-1, (tic_color_black)); + tic->api.rect(tic, x+1, y+Height, Width-2 , 1, (tic_color_black)); for(s32 i = 0; i < Tabs; i++) { @@ -283,12 +283,12 @@ static void drawGamepadMenu(Menu* menu) if(down) { - tic->api.text(tic, Label, rect.x, rect.y+1, systemColor(tic_color_light_blue)); + tic->api.text(tic, Label, rect.x, rect.y+1, (tic_color_light_blue)); } else { - tic->api.text(tic, Label, rect.x, rect.y+1, systemColor(tic_color_black)); - tic->api.text(tic, Label, rect.x, rect.y, systemColor(over ? tic_color_light_blue : tic_color_white)); + tic->api.text(tic, Label, rect.x, rect.y+1, (tic_color_black)); + tic->api.text(tic, Label, rect.x, rect.y, (over ? tic_color_light_blue : tic_color_white)); } { @@ -304,8 +304,8 @@ static void drawGamepadMenu(Menu* menu) 0b00000000, }; - drawBitIcon(rect.x-7, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x-7, rect.y, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x-7, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x-7, rect.y, Icon, (tic_color_white)); } drawGamepadSetupTabs(menu, dlgRect.x+25, dlgRect.y+4); @@ -349,12 +349,12 @@ static void drawMainMenu(Menu* menu) if(down) { - tic->api.text(tic, Rows[i], label.x, label.y+1, systemColor(tic_color_light_blue)); + tic->api.text(tic, Rows[i], label.x, label.y+1, (tic_color_light_blue)); } else { - tic->api.text(tic, Rows[i], label.x, label.y+1, systemColor(tic_color_black)); - tic->api.text(tic, Rows[i], label.x, label.y, systemColor(over ? tic_color_light_blue : tic_color_white)); + tic->api.text(tic, Rows[i], label.x, label.y+1, (tic_color_black)); + tic->api.text(tic, Rows[i], label.x, label.y, (over ? tic_color_light_blue : tic_color_white)); } if(i == menu->main.focus) @@ -371,8 +371,8 @@ static void drawMainMenu(Menu* menu) 0b00000000, }; - drawBitIcon(label.x-7, label.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(label.x-7, label.y, Icon, systemColor(tic_color_white)); + drawBitIcon(label.x-7, label.y+1, Icon, (tic_color_black)); + drawBitIcon(label.x-7, label.y, Icon, (tic_color_white)); } } } diff --git a/src/music.c b/src/music.c index 01cd67d..2cf74e5 100644 --- a/src/music.c +++ b/src/music.c @@ -93,7 +93,7 @@ static void drawEditbox(Music* music, s32 x, s32 y, s32 value, void(*set)(Music* set(music, -1, channel); } - drawBitIcon(rect.x, rect.y, LeftArrow, systemColor(over ? tic_color_light_blue : tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, LeftArrow, (over ? tic_color_light_blue : tic_color_dark_gray)); } { @@ -115,16 +115,16 @@ static void drawEditbox(Music* music, s32 x, s32 y, s32 value, void(*set)(Music* } } - music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_black)); + music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_black)); if(music->tracker.row == -1 && music->tracker.col / CHANNEL_COLS == channel) { - music->tic->api.rect(music->tic, x - 1 + music->tracker.patternCol * TIC_FONT_WIDTH, y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_red)); + music->tic->api.rect(music->tic, x - 1 + music->tracker.patternCol * TIC_FONT_WIDTH, y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, (tic_color_red)); } char val[] = "99"; sprintf(val, "%02i", value); - music->tic->api.fixed_text(music->tic, val, x, y, systemColor(tic_color_white)); + music->tic->api.fixed_text(music->tic, val, x, y, (tic_color_white)); } { @@ -142,7 +142,7 @@ static void drawEditbox(Music* music, s32 x, s32 y, s32 value, void(*set)(Music* set(music, +1, channel); } - drawBitIcon(rect.x, rect.y, RightArrow, systemColor(over ? tic_color_light_blue : tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, RightArrow, (over ? tic_color_light_blue : tic_color_dark_gray)); } } @@ -172,7 +172,7 @@ static void drawSwitch(Music* music, s32 x, s32 y, const char* label, s32 value, 0b00000000, }; - music->tic->api.text(music->tic, label, x, y, systemColor(tic_color_white)); + music->tic->api.text(music->tic, label, x, y, (tic_color_white)); { x += (s32)strlen(label)*TIC_FONT_WIDTH; @@ -187,13 +187,13 @@ static void drawSwitch(Music* music, s32 x, s32 y, const char* label, s32 value, set(music, -1, data); } - drawBitIcon(rect.x, rect.y, LeftArrow, systemColor(tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, LeftArrow, (tic_color_dark_gray)); } { char val[] = "999"; sprintf(val, "%02i", value); - music->tic->api.fixed_text(music->tic, val, x += TIC_FONT_WIDTH, y, systemColor(tic_color_white)); + music->tic->api.fixed_text(music->tic, val, x += TIC_FONT_WIDTH, y, (tic_color_white)); } { @@ -209,7 +209,7 @@ static void drawSwitch(Music* music, s32 x, s32 y, const char* label, s32 value, set(music, +1, data); } - drawBitIcon(rect.x, rect.y, RightArrow, systemColor(tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, RightArrow, (tic_color_dark_gray)); } } @@ -1112,7 +1112,7 @@ static void drawTrackerFrames(Music* music, s32 x, s32 y) } } - music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_black)); + music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_black)); } for (s32 i = 0; i < MUSIC_FRAMES; i++) @@ -1131,24 +1131,24 @@ static void drawTrackerFrames(Music* music, s32 x, s32 y) 0b00000000, }; - drawBitIcon(x - TIC_FONT_WIDTH, y - 1 + i*TIC_FONT_HEIGHT, Icon, systemColor(tic_color_white)); + drawBitIcon(x - TIC_FONT_WIDTH, y - 1 + i*TIC_FONT_HEIGHT, Icon, (tic_color_white)); } if (i == music->tracker.frame) { - music->tic->api.rect(music->tic, x - 1, y - 1 + i*TIC_FONT_HEIGHT, Width, TIC_FONT_HEIGHT + 1, systemColor(tic_color_white)); + music->tic->api.rect(music->tic, x - 1, y - 1 + i*TIC_FONT_HEIGHT, Width, TIC_FONT_HEIGHT + 1, (tic_color_white)); } char buf[] = "99"; sprintf(buf, "%02i", i); - music->tic->api.fixed_text(music->tic, buf, x, y + i*TIC_FONT_HEIGHT, systemColor(tic_color_dark_gray)); + music->tic->api.fixed_text(music->tic, buf, x, y + i*TIC_FONT_HEIGHT, (tic_color_dark_gray)); } if(music->tracker.row >= 0) { char buf[] = "99"; sprintf(buf, "%02i", music->tracker.row); - music->tic->api.fixed_text(music->tic, buf, x, y - 9, systemColor(tic_color_white)); + music->tic->api.fixed_text(music->tic, buf, x, y - 9, (tic_color_white)); } } @@ -1215,7 +1215,7 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) } } - music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_black)); + music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_black)); s32 start = music->tracker.scroll; s32 end = start + Rows; @@ -1229,7 +1229,7 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) if (i == music->tracker.row) { - music->tic->api.rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, systemColor(tic_color_dark_red)); + music->tic->api.rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, (tic_color_dark_red)); } // draw selection @@ -1239,13 +1239,13 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) if (rect.h > 1 && i >= rect.y && i < rect.y + rect.h) { s32 sx = x - 1; - tic->api.rect(tic, sx, rowy - 1, CHANNEL_COLS * TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_yellow)); + tic->api.rect(tic, sx, rowy - 1, CHANNEL_COLS * TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, (tic_color_yellow)); } } if (checkPlayRow(music, i)) { - music->tic->api.rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, systemColor(tic_color_white)); + music->tic->api.rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, (tic_color_white)); } char rowStr[] = "--------"; @@ -1268,8 +1268,8 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) if (note >= NoteStart) sprintf(rowStr, "%s%i%02i%01X--", Notes[note - NoteStart], octave + 1, sfx, volume & 0xf); - const u8 Colors[] = { systemColor(tic_color_light_green), systemColor(tic_color_orange), systemColor(tic_color_blue), systemColor(tic_color_gray) }; - const u8 DarkColors[] = { systemColor(tic_color_green), systemColor(tic_color_brown), systemColor(tic_color_dark_blue), systemColor(tic_color_dark_gray) }; + const u8 Colors[] = { (tic_color_light_green), (tic_color_orange), (tic_color_blue), (tic_color_gray) }; + const u8 DarkColors[] = { (tic_color_green), (tic_color_brown), (tic_color_dark_blue), (tic_color_dark_gray) }; static u8 ColorIndexes[] = { 0, 0, 0, 1, 1, 2, 3, 3 }; bool beetRow = i % NOTES_PER_BEET == 0; @@ -1283,7 +1283,7 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) } } } - else music->tic->api.fixed_text(music->tic, rowStr, x, rowy, systemColor(tic_color_dark_gray)); + else music->tic->api.fixed_text(music->tic, rowStr, x, rowy, (tic_color_dark_gray)); if (i == music->tracker.row) { @@ -1291,13 +1291,13 @@ static void drawTrackerChannel(Music* music, s32 x, s32 y, s32 channel) { s32 col = music->tracker.col % CHANNEL_COLS; s32 colx = x - 1 + col * TIC_FONT_WIDTH; - music->tic->api.rect(music->tic, colx, rowy - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, systemColor(tic_color_red)); - music->tic->api.draw_char(music->tic, rowStr[col], colx + 1, rowy, systemColor(tic_color_black)); + music->tic->api.rect(music->tic, colx, rowy - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, (tic_color_red)); + music->tic->api.draw_char(music->tic, rowStr[col], colx + 1, rowy, (tic_color_black)); } } if (i % NOTES_PER_BEET == 0) - music->tic->api.pixel(music->tic, x - 4, y + pos*TIC_FONT_HEIGHT + 2, systemColor(tic_color_dark_gray)); + music->tic->api.pixel(music->tic, x - 4, y + pos*TIC_FONT_HEIGHT + 2, (tic_color_dark_gray)); } } @@ -1418,9 +1418,9 @@ static void drawPlayButtons(Music* music) } if(i == 0 && music->tracker.follow) - drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? systemColor(tic_color_peach) : systemColor(tic_color_red)); + drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? (tic_color_peach) : (tic_color_red)); else - drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? (tic_color_dark_gray) : (tic_color_light_blue)); } } @@ -1470,15 +1470,15 @@ static void drawModeTabs(Music* music) } if (music->tab == Tabs[i]) - music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_gray)); + music->tic->api.rect(music->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_gray)); - drawBitIcon(rect.x, rect.y, Icons + i*Rows, music->tab == Tabs[i] ? systemColor(tic_color_white) : over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y, Icons + i*Rows, music->tab == Tabs[i] ? (tic_color_white) : over ? (tic_color_dark_gray) : (tic_color_light_blue)); } } static void drawMusicToolbar(Music* music) { - music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + music->tic->api.rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); drawPlayButtons(music); drawModeTabs(music); @@ -1489,10 +1489,10 @@ static void drawPianoLayout(Music* music) SDL_Event* event = NULL; while ((event = pollEvent())){} - music->tic->api.clear(music->tic, systemColor(tic_color_gray)); + music->tic->api.clear(music->tic, (tic_color_gray)); static const char Wip[] = "PIANO MODE - WORK IN PROGRESS..."; - music->tic->api.fixed_text(music->tic, Wip, (TIC80_WIDTH - (sizeof Wip - 1) * TIC_FONT_WIDTH) / 2, TIC80_HEIGHT / 2, systemColor(tic_color_white)); + music->tic->api.fixed_text(music->tic, Wip, (TIC80_WIDTH - (sizeof Wip - 1) * TIC_FONT_WIDTH) / 2, TIC80_HEIGHT / 2, (tic_color_white)); } static void scrollNotes(Music* music, s32 delta) @@ -1571,7 +1571,7 @@ static void drawTrackerLayout(Music* music) } } - music->tic->api.clear(music->tic, systemColor(tic_color_gray)); + music->tic->api.clear(music->tic, (tic_color_gray)); drawTopPanel(music, 6, TOOLBAR_SIZE + 3); drawTracker(music, 6, 35); @@ -1592,7 +1592,7 @@ static void tick(Music* music) } drawMusicToolbar(music); - drawToolbar(music->tic, systemColor(tic_color_gray), false); + drawToolbar(music->tic, (tic_color_gray), false); } static void onStudioEvent(Music* music, StudioEvent event) diff --git a/src/sfx.c b/src/sfx.c index 5c9c526..eb466d1 100644 --- a/src/sfx.c +++ b/src/sfx.c @@ -63,7 +63,7 @@ static void drawSwitch(Sfx* sfx, s32 x, s32 y, const char* label, s32 value, voi 0b00000000, }; - sfx->tic->api.text(sfx->tic, label, x, y, systemColor(tic_color_white)); + sfx->tic->api.text(sfx->tic, label, x, y, (tic_color_white)); { x += (s32)strlen(label)*TIC_FONT_WIDTH; @@ -78,13 +78,13 @@ static void drawSwitch(Sfx* sfx, s32 x, s32 y, const char* label, s32 value, voi set(sfx, -1); } - drawBitIcon(rect.x, rect.y, LeftArrow, systemColor(tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, LeftArrow, (tic_color_dark_gray)); } { char val[] = "99"; sprintf(val, "%02i", value); - sfx->tic->api.fixed_text(sfx->tic, val, x += TIC_FONT_WIDTH, y, systemColor(tic_color_white)); + sfx->tic->api.fixed_text(sfx->tic, val, x += TIC_FONT_WIDTH, y, (tic_color_white)); } { @@ -100,7 +100,7 @@ static void drawSwitch(Sfx* sfx, s32 x, s32 y, const char* label, s32 value, voi set(sfx, +1); } - drawBitIcon(rect.x, rect.y, RightArrow, systemColor(tic_color_dark_gray)); + drawBitIcon(rect.x, rect.y, RightArrow, (tic_color_dark_gray)); } } @@ -156,7 +156,7 @@ static void setLoopSize(Sfx* sfx, s32 delta) static void drawLoopPanel(Sfx* sfx, s32 x, s32 y) { - sfx->tic->api.text(sfx->tic, "LOOP:", x, y, systemColor(tic_color_dark_gray)); + sfx->tic->api.text(sfx->tic, "LOOP:", x, y, (tic_color_dark_gray)); enum {Gap = 2}; @@ -234,7 +234,7 @@ static void drawWaveButtons(Sfx* sfx, s32 x, s32 y) } sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, - active ? systemColor(tic_color_red) : over ? systemColor(tic_color_gray) : systemColor(tic_color_dark_gray)); + active ? (tic_color_red) : over ? (tic_color_gray) : (tic_color_dark_gray)); { enum{Size = 5}; @@ -254,7 +254,7 @@ static void drawWaveButtons(Sfx* sfx, s32 x, s32 y) } } - drawBitIcon(iconRect.x, iconRect.y, EmptyIcon, systemColor(over ? tic_color_gray : tic_color_dark_gray)); + drawBitIcon(iconRect.x, iconRect.y, EmptyIcon, (over ? tic_color_gray : tic_color_dark_gray)); } { @@ -263,7 +263,7 @@ static void drawWaveButtons(Sfx* sfx, s32 x, s32 y) for(s32 i = 0; i < ENVELOPE_VALUES/Scale; i++) { s32 value = tic_tool_peek4(wave->data, i*Scale)/Scale; - sfx->tic->api.pixel(sfx->tic, rect.x + i+1, rect.y + Height - value - 2, systemColor(tic_color_white)); + sfx->tic->api.pixel(sfx->tic, rect.x + i+1, rect.y + Height - value - 2, (tic_color_white)); } } } @@ -281,7 +281,7 @@ static void drawWaveButtons(Sfx* sfx, s32 x, s32 y) } if(full) - drawBitIcon(x+Width+HGap, y + (Count - start - 1)*(Height+Gap), FullIcon, systemColor(tic_color_white)); + drawBitIcon(x+Width+HGap, y + (Count - start - 1)*(Height+Gap), FullIcon, (tic_color_white)); } } @@ -293,7 +293,7 @@ static void drawCanvasTabs(Sfx* sfx, s32 x, s32 y) for(s32 i = 0, sy = y; i < COUNT_OF(Labels); sy += Height, i++) { - s32 size = sfx->tic->api.text(sfx->tic, Labels[i], 0, -TIC_FONT_HEIGHT, systemColor(tic_color_black)); + s32 size = sfx->tic->api.text(sfx->tic, Labels[i], 0, -TIC_FONT_HEIGHT, (tic_color_black)); SDL_Rect rect = {x - size, sy, size, TIC_FONT_HEIGHT}; @@ -307,7 +307,7 @@ static void drawCanvasTabs(Sfx* sfx, s32 x, s32 y) } } - sfx->tic->api.text(sfx->tic, Labels[i], rect.x, rect.y, i == sfx->canvasTab ? systemColor(tic_color_white) : systemColor(tic_color_dark_gray)); + sfx->tic->api.text(sfx->tic, Labels[i], rect.x, rect.y, i == sfx->canvasTab ? (tic_color_white) : (tic_color_dark_gray)); } tic_sound_effect* effect = getEffect(sfx); @@ -328,7 +328,7 @@ static void drawCanvasTabs(Sfx* sfx, s32 x, s32 y) effect->pitch16x++; } - sfx->tic->api.fixed_text(sfx->tic, Label, rect.x, rect.y, systemColor(effect->pitch16x ? tic_color_white : tic_color_dark_gray)); + sfx->tic->api.fixed_text(sfx->tic, Label, rect.x, rect.y, (effect->pitch16x ? tic_color_white : tic_color_dark_gray)); } break; case SFX_ARPEGGIO_TAB: @@ -345,7 +345,7 @@ static void drawCanvasTabs(Sfx* sfx, s32 x, s32 y) effect->reverse++; } - sfx->tic->api.text(sfx->tic, Label, rect.x, rect.y, systemColor(effect->reverse ? tic_color_white : tic_color_dark_gray)); + sfx->tic->api.text(sfx->tic, Label, rect.x, rect.y, (effect->reverse ? tic_color_white : tic_color_dark_gray)); } break; default: break; @@ -354,7 +354,7 @@ static void drawCanvasTabs(Sfx* sfx, s32 x, s32 y) static void drawCanvas(Sfx* sfx, s32 x, s32 y) { - sfx->tic->api.rect(sfx->tic, x, y, CANVAS_WIDTH, CANVAS_HEIGHT, systemColor(tic_color_dark_red)); + sfx->tic->api.rect(sfx->tic, x, y, CANVAS_WIDTH, CANVAS_HEIGHT, (tic_color_dark_red)); for(s32 i = 0; i < CANVAS_HEIGHT; i += CANVAS_SIZE) sfx->tic->api.line(sfx->tic, x, y + i, x + CANVAS_WIDTH, y + i, TIC_COLOR_BG); @@ -367,7 +367,7 @@ static void drawCanvas(Sfx* sfx, s32 x, s32 y) s32 tickIndex = *(pos.data + sfx->canvasTab); if(tickIndex >= 0) - sfx->tic->api.rect(sfx->tic, x + tickIndex * CANVAS_SIZE, y, CANVAS_SIZE + 1, CANVAS_HEIGHT + 1, systemColor(tic_color_white)); + sfx->tic->api.rect(sfx->tic, x + tickIndex * CANVAS_SIZE, y, CANVAS_SIZE + 1, CANVAS_HEIGHT + 1, (tic_color_white)); } SDL_Rect rect = {x, y, CANVAS_WIDTH, CANVAS_HEIGHT}; @@ -409,26 +409,26 @@ static void drawCanvas(Sfx* sfx, s32 x, s32 y) case SFX_VOLUME_TAB: { for(s32 j = 1, start = CANVAS_HEIGHT - CANVAS_SIZE; j <= CANVAS_ROWS - effect->data[i].volume; j++, start -= CANVAS_SIZE) - sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, y + 1 + start, CANVAS_SIZE-1, CANVAS_SIZE-1, systemColor(tic_color_red)); + sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, y + 1 + start, CANVAS_SIZE-1, CANVAS_SIZE-1, (tic_color_red)); } break; case SFX_ARPEGGIO_TAB: { sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, - y + 1 + (CANVAS_HEIGHT - (effect->data[i].arpeggio+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, systemColor(tic_color_red)); + y + 1 + (CANVAS_HEIGHT - (effect->data[i].arpeggio+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, (tic_color_red)); } break; case SFX_PITCH_TAB: { for(s32 j = SDL_min(0, effect->data[i].pitch); j <= SDL_max(0, effect->data[i].pitch); j++) sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, y + 1 + (CANVAS_HEIGHT/2 - (j+1)*CANVAS_SIZE), - CANVAS_SIZE-1, CANVAS_SIZE-1, systemColor(tic_color_red)); + CANVAS_SIZE-1, CANVAS_SIZE-1, (tic_color_red)); } break; case SFX_WAVE_TAB: { sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, - y + 1 + (CANVAS_HEIGHT - (effect->data[i].wave+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, systemColor(tic_color_red)); + y + 1 + (CANVAS_HEIGHT - (effect->data[i].wave+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, (tic_color_red)); } break; default: break; @@ -440,7 +440,7 @@ static void drawCanvas(Sfx* sfx, s32 x, s32 y) if(loop->start > 0 || loop->size > 0) { for(s32 i = 0; i < loop->size; i++) - sfx->tic->api.rect(sfx->tic, x + (loop->start+i) * CANVAS_SIZE+1, y + CANVAS_HEIGHT - 2, CANVAS_SIZE-1, 2, systemColor(tic_color_yellow)); + sfx->tic->api.rect(sfx->tic, x + (loop->start+i) * CANVAS_SIZE+1, y + CANVAS_HEIGHT - 2, CANVAS_SIZE-1, 2, (tic_color_yellow)); } } } @@ -508,7 +508,7 @@ static void drawPiano(Sfx* sfx, s32 x, s32 y) if(index >= 0) sfx->tic->api.rect(sfx->tic, rect->x, rect->y, rect->w - (white ? 1 : 0), rect->h, - systemColor(sfx->play.active && effect->note == index ? tic_color_red : white ? tic_color_white : tic_color_black)); + (sfx->play.active && effect->note == index ? tic_color_red : white ? tic_color_white : tic_color_black)); } } @@ -517,7 +517,7 @@ static void drawOctavePanel(Sfx* sfx, s32 x, s32 y) tic_sound_effect* effect = getEffect(sfx); static const char Label[] = "OCT"; - sfx->tic->api.text(sfx->tic, Label, x, y, systemColor(tic_color_white)); + sfx->tic->api.text(sfx->tic, Label, x, y, (tic_color_white)); x += sizeof(Label)*TIC_FONT_WIDTH; @@ -537,7 +537,7 @@ static void drawOctavePanel(Sfx* sfx, s32 x, s32 y) } } - sfx->tic->api.draw_char(sfx->tic, i + '1', rect.x, rect.y, systemColor(i == effect->octave ? tic_color_white : tic_color_dark_gray)); + sfx->tic->api.draw_char(sfx->tic, i + '1', rect.x, rect.y, (i == effect->octave ? tic_color_white : tic_color_dark_gray)); } } @@ -788,15 +788,15 @@ static void drawModeTabs(Sfx* sfx) } if (sfx->tab == Tabs[i]) - sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_black)); + sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_black)); - drawBitIcon(rect.x, rect.y, Icons + i*Rows, systemColor(sfx->tab == Tabs[i] ? tic_color_white : over ? tic_color_dark_gray : tic_color_light_blue)); + drawBitIcon(rect.x, rect.y, Icons + i*Rows, (sfx->tab == Tabs[i] ? tic_color_white : over ? tic_color_dark_gray : tic_color_light_blue)); } } static void drawSfxToolbar(Sfx* sfx) { - sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + sfx->tic->api.rect(sfx->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); enum{Width = 3 * TIC_FONT_WIDTH}; s32 x = TIC80_WIDTH - Width - TIC_SPRITESIZE*3; @@ -825,7 +825,7 @@ static void drawSfxToolbar(Sfx* sfx) char buf[] = "C#4"; sprintf(buf, "%s%i", Notes[effect->note], effect->octave+1); - sfx->tic->api.fixed_text(sfx->tic, buf, x, y, systemColor(over ? tic_color_dark_gray : tic_color_light_blue)); + sfx->tic->api.fixed_text(sfx->tic, buf, x, y, (over ? tic_color_dark_gray : tic_color_light_blue)); } drawModeTabs(sfx); @@ -898,10 +898,10 @@ static void drawWaveformBar(Sfx* sfx, s32 x, s32 y) active = true; } - sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, systemColor(active ? tic_color_red : tic_color_white)); + sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, (active ? tic_color_red : tic_color_white)); if(sfx->waveform.index == i) - sfx->tic->api.rect_border(sfx->tic, rect.x-2, rect.y-2, rect.w+4, rect.h+4, systemColor(tic_color_white)); + sfx->tic->api.rect_border(sfx->tic, rect.x-2, rect.y-2, rect.w+4, rect.h+4, (tic_color_white)); { tic_waveform* wave = getWaveformById(sfx, i); @@ -909,7 +909,7 @@ static void drawWaveformBar(Sfx* sfx, s32 x, s32 y) for(s32 i = 0; i < ENVELOPE_VALUES/Scale; i++) { s32 value = tic_tool_peek4(wave->data, i*Scale)/Scale; - sfx->tic->api.pixel(sfx->tic, rect.x + i+1, rect.y + Height - value - 2, systemColor(tic_color_black)); + sfx->tic->api.pixel(sfx->tic, rect.x + i+1, rect.y + Height - value - 2, (tic_color_black)); } } } @@ -921,7 +921,7 @@ static void drawWaveformCanvas(Sfx* sfx, s32 x, s32 y) SDL_Rect rect = {x, y, Width, Height}; - sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_dark_red)); + sfx->tic->api.rect(sfx->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_dark_red)); for(s32 i = 0; i < Height; i += CANVAS_SIZE) sfx->tic->api.line(sfx->tic, rect.x, rect.y + i, rect.x + Width, rect.y + i, TIC_COLOR_BG); @@ -958,7 +958,7 @@ static void drawWaveformCanvas(Sfx* sfx, s32 x, s32 y) { s32 value = tic_tool_peek4(wave->data, i); sfx->tic->api.rect(sfx->tic, x + i * CANVAS_SIZE + 1, - y + 1 + (Height - (value+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, systemColor(tic_color_red)); + y + 1 + (Height - (value+1)*CANVAS_SIZE), CANVAS_SIZE-1, CANVAS_SIZE-1, (tic_color_red)); } } diff --git a/src/sprite.c b/src/sprite.c index 6caaa9b..8494a3c 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -56,7 +56,7 @@ static s32 getIndexPosY(Sprite* sprite) static void drawSelection(Sprite* sprite, s32 x, s32 y, s32 w, s32 h) { enum{Step = 3}; - u8 color = systemColor(tic_color_white); + u8 color = (tic_color_white); s32 index = sprite->tickCounter / 10; for(s32 i = x; i < (x+w); i++) { sprite->tic->api.pixel(sprite->tic, i, y, index++ % Step ? color : 0);} index++; @@ -75,8 +75,8 @@ static SDL_Rect getSpriteRect(Sprite* sprite) static void drawCursorBorder(Sprite* sprite, s32 x, s32 y, s32 w, s32 h) { - sprite->tic->api.rect_border(sprite->tic, x, y, w, h, systemColor(tic_color_black)); - sprite->tic->api.rect_border(sprite->tic, x-1, y-1, w+2, h+2, systemColor(tic_color_white)); + sprite->tic->api.rect_border(sprite->tic, x, y, w, h, (tic_color_black)); + sprite->tic->api.rect_border(sprite->tic, x-1, y-1, w+2, h+2, (tic_color_white)); } static void processPickerCanvasMouse(Sprite* sprite, s32 x, s32 y, s32 sx, s32 sy) @@ -336,21 +336,21 @@ static void drawBrushSlider(Sprite* sprite, s32 x, s32 y) } } - sprite->tic->api.rect(sprite->tic, x+1, y, Size-2, Size*Count, systemColor(tic_color_black)); + sprite->tic->api.rect(sprite->tic, x+1, y, Size-2, Size*Count, (tic_color_black)); for(s32 i = 0; i < Count; i++) { s32 offset = y + i*(Size+1); - sprite->tic->api.rect(sprite->tic, x, offset, Size, Size, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, x + 6, offset + 2, Count - i, 1, systemColor(tic_color_black)); + sprite->tic->api.rect(sprite->tic, x, offset, Size, Size, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, x + 6, offset + 2, Count - i, 1, (tic_color_black)); } - sprite->tic->api.rect(sprite->tic, x+2, y+1, 1, Size*Count+1, systemColor(over ? tic_color_white : tic_color_gray)); + sprite->tic->api.rect(sprite->tic, x+2, y+1, 1, Size*Count+1, (over ? tic_color_white : tic_color_gray)); s32 offset = y + (Count - sprite->brushSize)*(Size+1); - sprite->tic->api.rect(sprite->tic, x, offset, Size, Size, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, x+1, offset+1, Size-2, Size-2, systemColor(over ? tic_color_white : tic_color_gray)); + sprite->tic->api.rect(sprite->tic, x, offset, Size, Size, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, x+1, offset+1, Size-2, Size-2, (over ? tic_color_white : tic_color_gray)); } static void drawCanvas(Sprite* sprite, s32 x, s32 y) @@ -362,13 +362,13 @@ static void drawCanvas(Sprite* sprite, s32 x, s32 y) s32 ix = x + (CANVAS_SIZE - 4*TIC_FONT_WIDTH)/2; s32 iy = TIC_SPRITESIZE + 2; - sprite->tic->api.text(sprite->tic, buf, ix, iy+1, systemColor(tic_color_black)); - sprite->tic->api.text(sprite->tic, buf, ix, iy, systemColor(tic_color_white)); + sprite->tic->api.text(sprite->tic, buf, ix, iy+1, (tic_color_black)); + sprite->tic->api.text(sprite->tic, buf, ix, iy, (tic_color_white)); } - sprite->tic->api.rect_border(sprite->tic, x-1, y-1, CANVAS_SIZE+2, CANVAS_SIZE+2, systemColor(tic_color_white)); - sprite->tic->api.rect(sprite->tic, x, y, CANVAS_SIZE, CANVAS_SIZE, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, x-1, y + CANVAS_SIZE+1, CANVAS_SIZE+2, 1, systemColor(tic_color_black)); + sprite->tic->api.rect_border(sprite->tic, x-1, y-1, CANVAS_SIZE+2, CANVAS_SIZE+2, (tic_color_white)); + sprite->tic->api.rect(sprite->tic, x, y, CANVAS_SIZE, CANVAS_SIZE, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, x-1, y + CANVAS_SIZE+1, CANVAS_SIZE+2, 1, (tic_color_black)); SDL_Rect rect = getSpriteRect(sprite); s32 r = rect.x + rect.w; @@ -506,9 +506,9 @@ static void drawMoveButtons(Sprite* sprite) Func[i](sprite); } - drawBitIcon(Rects[i].x, Rects[i].y+1, Icons + i*8, down ? systemColor(tic_color_white) : systemColor(tic_color_black)); + drawBitIcon(Rects[i].x, Rects[i].y+1, Icons + i*8, down ? (tic_color_white) : (tic_color_black)); - if(!down) drawBitIcon(Rects[i].x, Rects[i].y, Icons + i*8, systemColor(tic_color_white)); + if(!down) drawBitIcon(Rects[i].x, Rects[i].y, Icons + i*8, (tic_color_white)); } } } @@ -543,20 +543,20 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) } } - sprite->tic->api.rect(sprite->tic, x, y+1, Size, 1, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, x, y, Size, 1, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, x, y+1, Size, 1, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, x, y, Size, 1, (tic_color_white)); { s32 offset = x + *value * (Size-1) / Max - 1; - drawBitIcon(offset, y, Icon, systemColor(tic_color_black)); - drawBitIcon(offset, y-1, Icon, systemColor(tic_color_white)); + drawBitIcon(offset, y, Icon, (tic_color_black)); + drawBitIcon(offset, y-1, Icon, (tic_color_white)); sprite->tic->api.pixel(sprite->tic, offset+1, y, sprite->color); } { char buf[] = "FF"; sprintf(buf, "%02X", *value); - sprite->tic->api.text(sprite->tic, buf, x - 18, y - 2, systemColor(tic_color_dark_gray)); + sprite->tic->api.text(sprite->tic, buf, x - 18, y - 2, (tic_color_dark_gray)); } } @@ -589,12 +589,12 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) if(down) { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_white)); } else { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, rect.y, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x, rect.y, Icon, (tic_color_white)); } } @@ -627,12 +627,12 @@ static void drawRGBSlider(Sprite* sprite, s32 x, s32 y, u8* value) if(down) { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_white)); } else { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, rect.y, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x, rect.y, Icon, (tic_color_white)); } } } @@ -674,12 +674,12 @@ static void drawRGBTools(Sprite* sprite, s32 x, s32 y) if(down) { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_light_blue)); } else { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, rect.y, Icon, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_blue : tic_color_white)); } } @@ -720,12 +720,12 @@ static void drawRGBTools(Sprite* sprite, s32 x, s32 y) if(down) { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_light_blue)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_light_blue)); } else { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, rect.y, Icon, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_blue : tic_color_white)); } } } @@ -768,23 +768,23 @@ static void drawPalette(Sprite* sprite, s32 x, s32 y) } } - sprite->tic->api.rect(sprite->tic, rect.x-1, rect.y-1, rect.w+2, rect.h+2, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x-1, rect.y-1, rect.w+2, rect.h+2, (tic_color_white)); for(s32 row = 0, i = 0; row < PALETTE_ROWS; row++) for(s32 col = 0; col < PALETTE_COLS; col++) sprite->tic->api.rect(sprite->tic, x + col * PALETTE_CELL_SIZE, y + row * PALETTE_CELL_SIZE, PALETTE_CELL_SIZE-1, PALETTE_CELL_SIZE-1, i++); - sprite->tic->api.rect(sprite->tic, rect.x-1, rect.y+rect.h+1, PALETTE_WIDTH+1, 1, systemColor(tic_color_black)); + sprite->tic->api.rect(sprite->tic, rect.x-1, rect.y+rect.h+1, PALETTE_WIDTH+1, 1, (tic_color_black)); { s32 offsetX = x + (sprite->color % PALETTE_COLS) * PALETTE_CELL_SIZE; s32 offsetY = y + (sprite->color / PALETTE_COLS) * PALETTE_CELL_SIZE; sprite->tic->api.rect(sprite->tic, offsetX - 1, offsetY - 1, PALETTE_CELL_SIZE + 1, PALETTE_CELL_SIZE + 1, sprite->color); - sprite->tic->api.rect_border(sprite->tic, offsetX - 2, offsetY - 2, PALETTE_CELL_SIZE + 3, PALETTE_CELL_SIZE + 3, systemColor(tic_color_white)); + sprite->tic->api.rect_border(sprite->tic, offsetX - 2, offsetY - 2, PALETTE_CELL_SIZE + 3, PALETTE_CELL_SIZE + 3, (tic_color_white)); if(offsetY > y) - sprite->tic->api.rect(sprite->tic, offsetX - 2, rect.y + rect.h+2, PALETTE_CELL_SIZE+3, 1, systemColor(tic_color_black)); + sprite->tic->api.rect(sprite->tic, offsetX - 2, rect.y + rect.h+2, PALETTE_CELL_SIZE+3, 1, (tic_color_black)); } { @@ -803,7 +803,7 @@ static void drawPalette(Sprite* sprite, s32 x, s32 y) s32 offsetX = x + (sprite->color2 % PALETTE_COLS) * PALETTE_CELL_SIZE; s32 offsetY = y + (sprite->color2 / PALETTE_COLS) * PALETTE_CELL_SIZE; - drawBitIcon(offsetX, offsetY, Icon, sprite->color2 == systemColor(tic_color_white) ? systemColor(tic_color_black) : systemColor(tic_color_white)); + drawBitIcon(offsetX, offsetY, Icon, sprite->color2 == (tic_color_white) ? (tic_color_black) : (tic_color_white)); } { @@ -839,12 +839,12 @@ static void drawPalette(Sprite* sprite, s32 x, s32 y) if(sprite->editPalette || down) { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (over ? tic_color_light_blue : tic_color_white)); } else { - drawBitIcon(rect.x, rect.y+1, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, rect.y, Icon, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, rect.y+1, Icon, (tic_color_black)); + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_blue : tic_color_white)); } } } @@ -886,8 +886,8 @@ static void drawSheet(Sprite* sprite, s32 x, s32 y) { SDL_Rect rect = {x, y, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; - sprite->tic->api.rect_border(sprite->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, systemColor(tic_color_white)); - sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, systemColor(tic_color_black)); + sprite->tic->api.rect_border(sprite->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, (tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, (tic_color_black)); if(checkMousePos(&rect)) { @@ -907,7 +907,7 @@ static void drawSheet(Sprite* sprite, s32 x, s32 y) s32 bx = getIndexPosX(sprite) + x - 1; s32 by = getIndexPosY(sprite) + y - 1; - sprite->tic->api.rect_border(sprite->tic, bx, by, sprite->size + 2, sprite->size + 2, systemColor(tic_color_white)); + sprite->tic->api.rect_border(sprite->tic, bx, by, sprite->size + 2, sprite->size + 2, (tic_color_white)); } } @@ -1059,12 +1059,12 @@ static void drawSpriteTools(Sprite* sprite, s32 x, s32 y) if(pushed) { - drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_blue : tic_color_white)); } else { - drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, systemColor(tic_color_black)); - drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, (tic_color_black)); + drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_blue : tic_color_white)); } } } @@ -1150,15 +1150,15 @@ static void drawTools(Sprite* sprite, s32 x, s32 y) 0b00000000, }; - drawBitIcon(rect.x, y - 4, Icon, systemColor(tic_color_black)); - drawBitIcon(rect.x, y - 5, Icon, systemColor(tic_color_white)); + drawBitIcon(rect.x, y - 4, Icon, (tic_color_black)); + drawBitIcon(rect.x, y - 5, Icon, (tic_color_white)); - drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_blue : tic_color_white)); } else { - drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, systemColor(tic_color_black)); - drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, systemColor(over ? tic_color_light_blue : tic_color_white)); + drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, (tic_color_black)); + drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_blue : tic_color_white)); } } @@ -1334,7 +1334,7 @@ static void processKeydown(Sprite* sprite, SDL_Keycode keycode) static void drawSpriteToolbar(Sprite* sprite) { - sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); // draw sprite size control { @@ -1357,16 +1357,16 @@ static void drawSpriteToolbar(Sprite* sprite) } for(s32 i = 0; i < 4; i++) - sprite->tic->api.rect(sprite->tic, rect.x + i*6, 1, 5, 5, systemColor(tic_color_black)); + sprite->tic->api.rect(sprite->tic, rect.x + i*6, 1, 5, 5, (tic_color_black)); - sprite->tic->api.rect(sprite->tic, rect.x, 2, 23, 3, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, rect.x+1, 3, 21, 1, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x, 2, 23, 3, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, rect.x+1, 3, 21, 1, (tic_color_white)); s32 size = sprite->size / TIC_SPRITESIZE, val = 0; while(size >>= 1) val++; - sprite->tic->api.rect(sprite->tic, rect.x + val*6, 1, 5, 5, systemColor(tic_color_black)); - sprite->tic->api.rect(sprite->tic, rect.x+1 + val*6, 2, 3, 3, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x + val*6, 1, 5, 5, (tic_color_black)); + sprite->tic->api.rect(sprite->tic, rect.x+1 + val*6, 2, 3, 3, (tic_color_white)); } bool bg = sprite->index < TIC_BANK_SPRITES; @@ -1374,8 +1374,8 @@ static void drawSpriteToolbar(Sprite* sprite) { static const char Label[] = "BG"; SDL_Rect rect = {TIC80_WIDTH - 2 * TIC_FONT_WIDTH - 2, 0, 2 * TIC_FONT_WIDTH + 1, TIC_SPRITESIZE-1}; - sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, bg ? systemColor(tic_color_black) : systemColor(tic_color_gray)); - sprite->tic->api.fixed_text(sprite->tic, Label, rect.x+1, rect.y+1, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, bg ? (tic_color_black) : (tic_color_gray)); + sprite->tic->api.fixed_text(sprite->tic, Label, rect.x+1, rect.y+1, (tic_color_white)); if(checkMousePos(&rect)) { @@ -1394,8 +1394,8 @@ static void drawSpriteToolbar(Sprite* sprite) { static const char Label[] = "FG"; SDL_Rect rect = {TIC80_WIDTH - 4 * TIC_FONT_WIDTH - 4, 0, 2 * TIC_FONT_WIDTH + 1, TIC_SPRITESIZE-1}; - sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, bg ? systemColor(tic_color_gray) : systemColor(tic_color_black)); - sprite->tic->api.fixed_text(sprite->tic, Label, rect.x+1, rect.y+1, systemColor(tic_color_white)); + sprite->tic->api.rect(sprite->tic, rect.x, rect.y, rect.w, rect.h, bg ? (tic_color_gray) : (tic_color_black)); + sprite->tic->api.fixed_text(sprite->tic, Label, rect.x+1, rect.y+1, (tic_color_white)); if(checkMousePos(&rect)) { @@ -1440,7 +1440,7 @@ static void tick(Sprite* sprite) } } - sprite->tic->api.clear(sprite->tic, systemColor(tic_color_gray)); + sprite->tic->api.clear(sprite->tic, (tic_color_gray)); drawCanvas(sprite, 24, 20); drawMoveButtons(sprite); @@ -1453,7 +1453,7 @@ static void tick(Sprite* sprite) drawSheet(sprite, TIC80_WIDTH - TIC_SPRITESHEET_SIZE - 1, 7); drawSpriteToolbar(sprite); - drawToolbar(sprite->tic, systemColor(tic_color_gray), false); + drawToolbar(sprite->tic, (tic_color_gray), false); sprite->tickCounter++; } diff --git a/src/start.c b/src/start.c index d7ecad9..930a08b 100644 --- a/src/start.c +++ b/src/start.c @@ -26,7 +26,7 @@ static void reset(Start* start) { u8* tile = (u8*)start->tic->ram.gfx.tiles; - start->tic->api.clear(start->tic, systemColor(tic_color_black)); + start->tic->api.clear(start->tic, (tic_color_black)); static const u8 Reset[] = {0x00, 0x06, 0x96, 0x00}; u8 val = Reset[sizeof(Reset) * (start->ticks % TIC_FRAMERATE) / TIC_FRAMERATE]; @@ -38,9 +38,9 @@ static void reset(Start* start) static void drawHeader(Start* start) { - start->tic->api.fixed_text(start->tic, TIC_NAME_FULL, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, systemColor(tic_color_white)); - start->tic->api.fixed_text(start->tic, TIC_VERSION_LABEL, (sizeof(TIC_NAME_FULL) + 1) * STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, systemColor(tic_color_dark_gray)); - start->tic->api.fixed_text(start->tic, TIC_COPYRIGHT, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT*2, systemColor(tic_color_dark_gray)); + start->tic->api.fixed_text(start->tic, TIC_NAME_FULL, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, (tic_color_white)); + start->tic->api.fixed_text(start->tic, TIC_VERSION_LABEL, (sizeof(TIC_NAME_FULL) + 1) * STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, (tic_color_dark_gray)); + start->tic->api.fixed_text(start->tic, TIC_COPYRIGHT, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT*2, (tic_color_dark_gray)); } static void header(Start* start) diff --git a/src/studio.c b/src/studio.c index 8e6c78f..ef75d63 100644 --- a/src/studio.c +++ b/src/studio.c @@ -466,8 +466,8 @@ void drawExtrabar(tic_mem* tic) { SDL_Rect rect = {x + i*Size, y, Size, Size}; - u8 bgcolor = systemColor(tic_color_white); - u8 color = systemColor(tic_color_light_blue); + u8 bgcolor = (tic_color_white); + u8 color = (tic_color_light_blue); if(checkMousePos(&rect)) { @@ -479,7 +479,7 @@ void drawExtrabar(tic_mem* tic) if(checkMouseDown(&rect, SDL_BUTTON_LEFT)) { bgcolor = color; - color = systemColor(tic_color_white); + color = (tic_color_white); } else if(checkMouseClick(&rect, SDL_BUTTON_LEFT)) { @@ -497,15 +497,10 @@ const StudioConfig* getConfig() return &studio.config.data; } -u8 systemColor(u8 color) -{ - return getConfig()->theme.palmap.data[color]; -} - void drawToolbar(tic_mem* tic, u8 color, bool bg) { if(bg) - studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, systemColor(tic_color_white)); + studio.tic->api.rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, (tic_color_white)); static const u8 TabIcon[] = { @@ -596,7 +591,7 @@ void drawToolbar(tic_mem* tic, u8 color, bool bg) if(mode == i) drawBitIcon(i * Size, 0, TabIcon, color); - drawBitIcon(i * Size, 0, Icons + i * BITS_IN_BYTE, mode == i ? systemColor(tic_color_white) : (over ? systemColor(tic_color_dark_gray) : systemColor(tic_color_light_blue))); + drawBitIcon(i * Size, 0, Icons + i * BITS_IN_BYTE, mode == i ? (tic_color_white) : (over ? (tic_color_dark_gray) : (tic_color_light_blue))); } if(mode >= 0) drawExtrabar(tic); @@ -614,11 +609,11 @@ void drawToolbar(tic_mem* tic, u8 color, bool bg) { if(strlen(studio.tooltip.text)) { - studio.tic->api.text(tic, studio.tooltip.text, (COUNT_OF(Modes) + 1) * Size, 1, systemColor(tic_color_black)); + studio.tic->api.text(tic, studio.tooltip.text, (COUNT_OF(Modes) + 1) * Size, 1, (tic_color_black)); } else { - studio.tic->api.text(tic, Names[mode], (COUNT_OF(Modes) + 1) * Size, 1, systemColor(tic_color_dark_gray)); + studio.tic->api.text(tic, Names[mode], (COUNT_OF(Modes) + 1) * Size, 1, (tic_color_dark_gray)); } } } @@ -2070,9 +2065,9 @@ static void renderStudio() { studio.popup.counter--; - studio.tic->api.rect(studio.tic, 0, TIC80_HEIGHT - TIC_FONT_HEIGHT - 1, TIC80_WIDTH, TIC80_HEIGHT, systemColor(tic_color_red)); + studio.tic->api.rect(studio.tic, 0, TIC80_HEIGHT - TIC_FONT_HEIGHT - 1, TIC80_WIDTH, TIC80_HEIGHT, (tic_color_red)); studio.tic->api.text(studio.tic, studio.popup.message, (s32)(TIC80_WIDTH - strlen(studio.popup.message)*TIC_FONT_WIDTH)/2, - TIC80_HEIGHT - TIC_FONT_HEIGHT, systemColor(tic_color_white)); + TIC80_HEIGHT - TIC_FONT_HEIGHT, (tic_color_white)); } studio.tic->api.tick_end(studio.tic); diff --git a/src/studio.h b/src/studio.h index 0597730..eed87b7 100644 --- a/src/studio.h +++ b/src/studio.h @@ -49,7 +49,7 @@ #define STUDIO_TEXT_BUFFER_WIDTH (TIC80_WIDTH / STUDIO_TEXT_WIDTH) #define STUDIO_TEXT_BUFFER_HEIGHT (TIC80_HEIGHT / STUDIO_TEXT_HEIGHT) -#define TIC_COLOR_BG systemColor(tic_color_black) +#define TIC_COLOR_BG (tic_color_black) #define DEFAULT_CHMOD 0755 #define CONFIG_TIC "config " TIC_VERSION_LABEL ".tic" @@ -64,11 +64,6 @@ typedef struct { struct { - struct - { - u8 data[TIC_PALETTE_SIZE]; - } palmap; - struct { s32 sprite; @@ -179,8 +174,6 @@ void showTooltip(const char* text); SDL_Scancode* getKeymap(); -u8 systemColor(u8 color); - const StudioConfig* getConfig(); void setSpritePixel(tic_tile* tiles, s32 x, s32 y, u8 color); diff --git a/src/world.c b/src/world.c index 8a41a7d..bae1698 100644 --- a/src/world.c +++ b/src/world.c @@ -28,7 +28,7 @@ static void drawGrid(World* world) { Map* map = world->map; - u8 color = systemColor(tic_color_light_blue); + u8 color = (tic_color_light_blue); for(s32 c = 0; c < TIC80_WIDTH; c += TIC_MAP_SCREEN_WIDTH) world->tic->api.line(world->tic, c, 0, c, TIC80_HEIGHT, color); @@ -58,7 +58,7 @@ static void drawGrid(World* world) } world->tic->api.rect_border(world->tic, map->scroll.x / TIC_SPRITESIZE, map->scroll.y / TIC_SPRITESIZE, - TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, systemColor(tic_color_red)); + TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, (tic_color_red)); } static void processKeydown(World* world, SDL_Keycode keycode) From 3a1493942cb4bbbea106b8a1143f54fca980cd1c Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 10:39:47 +0300 Subject: [PATCH 7/9] no message --- bin/assets/config.tic.dat | 2 +- config.tic | Bin 10537 -> 10508 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/assets/config.tic.dat b/bin/assets/config.tic.dat index 4af687b..c7881d5 100644 --- a/bin/assets/config.tic.dat +++ b/bin/assets/config.tic.dat @@ -1 +1 @@ -0x78, 0xda, 0xed, 0x59, 0x4d, 0x6c, 0x1b, 0x45, 0x14, 0x1e, 0x37, 0x29, 0xd4, 0x6e, 0xc8, 0xc4, 0x12, 0xaa, 0xf8, 0x29, 0xd4, 0x32, 0x3d, 0xf4, 0x90, 0x8a, 0x34, 0x4e, 0x7f, 0x88, 0x64, 0x84, 0x1b, 0x6f, 0x13, 0xd3, 0xc4, 0xb6, 0x9c, 0xb8, 0xa5, 0xaa, 0xd4, 0x10, 0xda, 0x2c, 0x42, 0xa2, 0xb5, 0x68, 0x28, 0x1c, 0x50, 0xa4, 0xaa, 0x52, 0x25, 0x73, 0x0a, 0x87, 0x20, 0xe1, 0x93, 0x8b, 0x7a, 0x33, 0x17, 0x2e, 0xb9, 0xe0, 0x43, 0x04, 0xc7, 0x4a, 0x20, 0x54, 0x21, 0x0e, 0x08, 0x71, 0x41, 0x5c, 0x37, 0xef, 0x14, 0x11, 0x55, 0xea, 0x30, 0x33, 0x3b, 0x6b, 0xcf, 0xce, 0xbe, 0x71, 0x82, 0x54, 0x40, 0x42, 0x9e, 0xe9, 0xcb, 0xdb, 0x99, 0xb7, 0xef, 0xcd, 0xcf, 0xf7, 0xde, 0xcc, 0x3e, 0x37, 0x76, 0xef, 0x29, 0xf2, 0x98, 0xf1, 0x92, 0x4e, 0xa7, 0xd7, 0xea, 0xf5, 0xfa, 0x9a, 0xe0, 0xbc, 0xb9, 0xc6, 0xa0, 0x43, 0x8c, 0x6d, 0x79, 0xe9, 0x34, 0xf3, 0xea, 0x75, 0xf0, 0xd2, 0x77, 0xc0, 0x63, 0x6b, 0xc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2c, 0xf9, 0xd0, 0xd9, 0xc5, 0x8f, 0xbe, 0xf8, 0xe6, 0xd7, 0x87, 0xdb, 0xdf, 0x7f, 0xf5, 0xe9, 0x3b, 0xde, 0xf3, 0x7d, 0x51, 0x3b, 0xe2, 0x83, 0xa8, 0xf3, 0xc4, 0xe0, 0xf1, 0xfc, 0xc9, 0xf1, 0xb1, 0xf1, 0x6b, 0xc5, 0xd7, 0x8b, 0xb7, 0x67, 0xc7, 0xc6, 0x57, 0x4e, 0xfe, 0x78, 0x7e, 0xe6, 0xc6, 0xfb, 0xcb, 0x97, 0xd7, 0x7e, 0xb8, 0xbf, 0x36, 0x7a, 0xfb, 0xf3, 0x2f, 0xaf, 0x35, 0x47, 0xef, 0x37, 0xeb, 0xd7, 0xbe, 0xbb, 0xf7, 0xcb, 0x4f, 0x57, 0x7f, 0x0b, 0x7e, 0xfe, 0x0b, 0x10, 0x93, 0xbe, 0x4d, \ No newline at end of file diff --git a/config.tic b/config.tic index 91d2cd944bac5715af8763345deee9b5a416c140..b49ba34e9d9ec575da2b6fdfc6d4afb051ebfc14 100644 GIT binary patch delta 24 fcmZ1()DyI!U5z`Gks-vx)z{UQt9tW#wJIh6XIKZ( delta 53 zcmeAPS{byVT}`8iks-vx)z{UQtD1{5z|qIoF~C;Iz|hFp#MI2(!ZI-_IVCksNr!9m IB(*9g0G&Aw)c^nh From 99f1a912a62c6aef0587e1a166d53a2c518dd789 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 11:48:04 +0300 Subject: [PATCH 8/9] 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); } } From ca5f2a105cf49ebc945b73a1c97c3b6c7842e691 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Fri, 20 Oct 2017 12:25:05 +0300 Subject: [PATCH 9/9] no message --- src/studio.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/studio.c b/src/studio.c index d90ca7d..3274e93 100644 --- a/src/studio.c +++ b/src/studio.c @@ -766,9 +766,7 @@ void setStudioMode(EditorMode mode) EditorMode prev = studio.mode; if(prev == TIC_RUN_MODE) - { studio.tic->api.pause(studio.tic); - } if(mode != TIC_RUN_MODE) studio.tic->api.reset(studio.tic); @@ -1432,7 +1430,7 @@ static void blit(u32* out, u32* bgOut, s32 pitch, s32 bgPitch) if(scanline) { scanline(studio.tic, r); - pal = paletteBlit(); + pal = paletteBlit(); } if(bgOut) @@ -2042,9 +2040,6 @@ static void renderStudio() studio.tic->api.tick_start(studio.tic, src); } - if(studio.mode != TIC_RUN_MODE) - useSystemPalette(); - switch(studio.mode) { case TIC_START_MODE: studio.start.tick(&studio.start); break; @@ -2075,6 +2070,10 @@ static void renderStudio() studio.tic->api.tick_end(studio.tic); blitSound(); + + if(studio.mode != TIC_RUN_MODE) + useSystemPalette(); + blitTexture(); renderCursor();