this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

#1213: color indexes renamed to names, default color for print/trace api is white

Nesbox 7d9ca33a df7e6525

+412 -411
+2 -2
src/api/js.c
··· 60 60 const char* text = duk_to_string(duk, 0); 61 61 s32 x = duk_opt_int(duk, 1, 0); 62 62 s32 y = duk_opt_int(duk, 2, 0); 63 - s32 color = duk_opt_int(duk, 3, TIC_PALETTE_SIZE - 1); 63 + s32 color = duk_opt_int(duk, 3, TIC_DEFAULT_COLOR); 64 64 bool fixed = duk_opt_boolean(duk, 4, false); 65 65 s32 scale = duk_opt_int(duk, 5, 1); 66 66 bool alt = duk_opt_boolean(duk, 6, false); ··· 547 547 tic_mem* tic = (tic_mem*)getDukCore(duk); 548 548 549 549 const char* text = duk_opt_string(duk, 0, ""); 550 - u8 color = duk_opt_int(duk, 1, tic_color_12); 550 + u8 color = duk_opt_int(duk, 1, TIC_DEFAULT_COLOR); 551 551 552 552 tic_api_trace(tic, text, color); 553 553
+2 -2
src/api/lua.c
··· 1026 1026 1027 1027 s32 x = 0; 1028 1028 s32 y = 0; 1029 - s32 color = TIC_PALETTE_SIZE-1; 1029 + s32 color = TIC_DEFAULT_COLOR; 1030 1030 bool fixed = false; 1031 1031 s32 scale = 1; 1032 1032 bool alt = false; ··· 1083 1083 if(top >= 1) 1084 1084 { 1085 1085 const char* text = printString(lua, 1); 1086 - u8 color = tic_color_12; 1086 + u8 color = TIC_DEFAULT_COLOR; 1087 1087 1088 1088 if(top >= 2) 1089 1089 {
+2 -2
src/api/squirrel.c
··· 1121 1121 1122 1122 s32 x = 0; 1123 1123 s32 y = 0; 1124 - s32 color = TIC_PALETTE_SIZE-1; 1124 + s32 color = TIC_DEFAULT_COLOR; 1125 1125 bool fixed = false; 1126 1126 bool alt = false; 1127 1127 s32 scale = 1; ··· 1182 1182 if(top >= 2) 1183 1183 { 1184 1184 const char* text = printString(vm, 2); 1185 - u8 color = tic_color_12; 1185 + u8 color = TIC_DEFAULT_COLOR; 1186 1186 1187 1187 if(top >= 3) 1188 1188 {
+1 -1
src/api/wren.c
··· 1347 1347 static void writeFn(WrenVM* vm, const char* text) 1348 1348 { 1349 1349 tic_core* core = getWrenCore(vm); 1350 - u8 color = tic_color_8; 1350 + u8 color = tic_color_dark_blue; 1351 1351 core->data->trace(core->data->data, text ? text : "null", color); 1352 1352 } 1353 1353
+1
src/core/core.h
··· 27 27 #include "blip_buf.h" 28 28 29 29 #define CLOCKRATE (255<<13) 30 + #define TIC_DEFAULT_COLOR tic_color_white 30 31 31 32 typedef struct 32 33 {
+25 -25
src/studio/editors/code.c
··· 60 60 { 61 61 enum {Height = TIC_FONT_HEIGHT + 1, StatusY = TIC80_HEIGHT - TIC_FONT_HEIGHT}; 62 62 63 - tic_api_rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, tic_color_12); 63 + tic_api_rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, tic_color_white); 64 64 tic_api_print(code->tic, code->statusLine, 0, StatusY, getConfig()->theme.code.bg, true, 1, false); 65 65 tic_api_print(code->tic, code->statusSize, TIC80_WIDTH - (s32)strlen(code->statusSize) * TIC_FONT_WIDTH, 66 66 StatusY, getConfig()->theme.code.bg, true, 1, false); ··· 128 128 0b00000000, 129 129 }; 130 130 131 - tic_api_rect(code->tic, rect.x, rect.y, rect.w, rect.h, tic_color_14); 131 + tic_api_rect(code->tic, rect.x, rect.y, rect.w, rect.h, tic_color_grey); 132 132 133 133 if(checkMousePos(&rect)) 134 134 { ··· 138 138 139 139 s32 line = (getMouseY() - rect.y) / STUDIO_TEXT_HEIGHT; 140 140 141 - drawBitIcon(rect.x, rect.y + line * STUDIO_TEXT_HEIGHT, Icon, tic_color_15); 141 + drawBitIcon(rect.x, rect.y + line * STUDIO_TEXT_HEIGHT, Icon, tic_color_dark_grey); 142 142 143 143 if(checkMouseClick(&rect, tic_mouse_left)) 144 144 toggleBookmark(code, getPosByLine(code->src, line + code->scroll.y)); ··· 152 152 { 153 153 if(syntaxPointer++->bookmark) 154 154 { 155 - drawBitIcon(rect.x, rect.y + y * STUDIO_TEXT_HEIGHT + 1, Icon, tic_color_0); 156 - drawBitIcon(rect.x, rect.y + y * STUDIO_TEXT_HEIGHT, Icon, tic_color_4); 155 + drawBitIcon(rect.x, rect.y + y * STUDIO_TEXT_HEIGHT + 1, Icon, tic_color_black); 156 + drawBitIcon(rect.x, rect.y + y * STUDIO_TEXT_HEIGHT, Icon, tic_color_yellow); 157 157 } 158 158 159 159 if(*pointer++ == '\n')y++; ··· 225 225 if(code->cursor.selection && pointer >= selection.start && pointer < selection.end) 226 226 { 227 227 if(code->shadowText) 228 - tic_api_rect(code->tic, x, y, getFontWidth(code)+1, TIC_FONT_HEIGHT+1, tic_color_0); 228 + tic_api_rect(code->tic, x, y, getFontWidth(code)+1, TIC_FONT_HEIGHT+1, tic_color_black); 229 229 230 230 tic_api_rect(code->tic, x-1, y-1, getFontWidth(code)+1, TIC_FONT_HEIGHT+1, selectColor); 231 - drawChar(code->tic, symbol, x, y, tic_color_15, code->altFont); 231 + drawChar(code->tic, symbol, x, y, tic_color_dark_grey, code->altFont); 232 232 } 233 233 else 234 234 { ··· 1215 1215 while(*orig) 1216 1216 { 1217 1217 bool match = tolower(*orig) == tolower(*filter); 1218 - u8 color = match ? tic_color_3 : tic_color_12; 1218 + u8 color = match ? tic_color_orange : tic_color_white; 1219 1219 1220 1220 if(code->shadowText) 1221 - drawChar(code->tic, *orig, x+1, y+1, tic_color_0, code->altFont); 1221 + drawChar(code->tic, *orig, x+1, y+1, tic_color_black, code->altFont); 1222 1222 1223 1223 drawChar(code->tic, *orig, x, y, color, code->altFont); 1224 1224 x += getFontWidth(code); ··· 1606 1606 { 1607 1607 enum {TextX = BOOKMARK_WIDTH, TextY = TOOLBAR_SIZE + 1}; 1608 1608 1609 - tic_api_rect(code->tic, 0, TOOLBAR_SIZE, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, tic_color_14); 1609 + tic_api_rect(code->tic, 0, TOOLBAR_SIZE, TIC80_WIDTH, TIC_FONT_HEIGHT + 1, tic_color_grey); 1610 1610 1611 1611 if(code->shadowText) 1612 - tic_api_print(code->tic, title, TextX+1, TextY+1, tic_color_0, true, 1, code->altFont); 1612 + tic_api_print(code->tic, title, TextX+1, TextY+1, tic_color_black, true, 1, code->altFont); 1613 1613 1614 - tic_api_print(code->tic, title, TextX, TextY, tic_color_12, true, 1, code->altFont); 1614 + tic_api_print(code->tic, title, TextX, TextY, tic_color_white, true, 1, code->altFont); 1615 1615 1616 1616 if(code->shadowText) 1617 - tic_api_print(code->tic, code->popup.text, TextX + (s32)strlen(title) * getFontWidth(code) + 1, TextY+1, tic_color_0, true, 1, code->altFont); 1617 + tic_api_print(code->tic, code->popup.text, TextX + (s32)strlen(title) * getFontWidth(code) + 1, TextY+1, tic_color_black, true, 1, code->altFont); 1618 1618 1619 - tic_api_print(code->tic, code->popup.text, TextX + (s32)strlen(title) * getFontWidth(code), TextY, tic_color_12, true, 1, code->altFont); 1619 + tic_api_print(code->tic, code->popup.text, TextX + (s32)strlen(title) * getFontWidth(code), TextY, tic_color_white, true, 1, code->altFont); 1620 1620 1621 1621 drawCursor(code, TextX+(s32)(strlen(title) + strlen(code->popup.text)) * getFontWidth(code), TextY, ' '); 1622 1622 } ··· 1789 1789 } 1790 1790 } 1791 1791 1792 - tic_api_rect(code->tic, rect.x-1, rect.y, rect.w+1, rect.h, tic_color_14); 1792 + tic_api_rect(code->tic, rect.x-1, rect.y, rect.w+1, rect.h, tic_color_grey); 1793 1793 1794 1794 y++; 1795 1795 ··· 1799 1799 if(code->outline.items) 1800 1800 { 1801 1801 tic_api_rect(code->tic, rect.x - 1, rect.y + code->outline.index*STUDIO_TEXT_HEIGHT, 1802 - rect.w + 1, TIC_FONT_HEIGHT + 2, tic_color_2); 1802 + rect.w + 1, TIC_FONT_HEIGHT + 2, tic_color_red); 1803 1803 1804 1804 for(s32 i = 0; i < code->outline.size; i++) 1805 1805 { ··· 1817 1817 else 1818 1818 { 1819 1819 if(code->shadowText) 1820 - tic_api_print(code->tic, "(empty)", x+1, y+1, tic_color_0, true, 1, code->altFont); 1820 + tic_api_print(code->tic, "(empty)", x+1, y+1, tic_color_black, true, 1, code->altFont); 1821 1821 1822 - tic_api_print(code->tic, "(empty)", x, y, tic_color_12, true, 1, code->altFont); 1822 + tic_api_print(code->tic, "(empty)", x, y, tic_color_white, true, 1, code->altFont); 1823 1823 } 1824 1824 } 1825 1825 ··· 1897 1897 } 1898 1898 } 1899 1899 1900 - drawChar(tic, 'F', x, y, over ? tic_color_14 : tic_color_13, code->altFont); 1900 + drawChar(tic, 'F', x, y, over ? tic_color_grey : tic_color_light_grey, code->altFont); 1901 1901 } 1902 1902 1903 1903 static void drawShadowButton(Code* code, s32 x, s32 y) ··· 1946 1946 0b00000000, 1947 1947 }; 1948 1948 1949 - drawBitIcon(x, y, Icon, over && !code->shadowText ? tic_color_14 : tic_color_13); 1949 + drawBitIcon(x, y, Icon, over && !code->shadowText ? tic_color_grey : tic_color_light_grey); 1950 1950 1951 1951 if(code->shadowText) 1952 - drawBitIcon(x, y, ShadowIcon, tic_color_0); 1952 + drawBitIcon(x, y, ShadowIcon, tic_color_black); 1953 1953 } 1954 1954 1955 1955 static void drawCodeToolbar(Code* code) 1956 1956 { 1957 - tic_api_rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_12); 1957 + tic_api_rect(code->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_white); 1958 1958 1959 1959 static const u8 Icons[] = 1960 1960 { ··· 2043 2043 bool active = i == code->mode - TEXT_EDIT_MODE && i != 0; 2044 2044 if (active) 2045 2045 { 2046 - tic_api_rect(code->tic, rect.x, rect.y, Size, Size, tic_color_14); 2047 - drawBitIcon(rect.x, rect.y + 1, Icons + i * BITS_IN_BYTE, tic_color_0); 2046 + tic_api_rect(code->tic, rect.x, rect.y, Size, Size, tic_color_grey); 2047 + drawBitIcon(rect.x, rect.y + 1, Icons + i * BITS_IN_BYTE, tic_color_black); 2048 2048 } 2049 - drawBitIcon(rect.x, rect.y, Icons + i*BITS_IN_BYTE, active ? tic_color_12 : (over ? tic_color_14 : tic_color_13)); 2049 + drawBitIcon(rect.x, rect.y, Icons + i*BITS_IN_BYTE, active ? tic_color_white : (over ? tic_color_grey : tic_color_light_grey)); 2050 2050 } 2051 2051 2052 2052 drawFontButton(code, TIC80_WIDTH - (Count+3) * Size, 1);
+15 -15
src/studio/editors/map.c
··· 99 99 setStudioMode(TIC_WORLD_MODE); 100 100 } 101 101 102 - drawBitIcon(x, y, WorldIcon, over ? tic_color_14 : tic_color_13); 102 + drawBitIcon(x, y, WorldIcon, over ? tic_color_grey : tic_color_light_grey); 103 103 104 104 return x; 105 105 ··· 137 137 map->canvas.grid = !map->canvas.grid; 138 138 } 139 139 140 - drawBitIcon(x, y, GridIcon, map->canvas.grid ? tic_color_0 : over ? tic_color_14 : tic_color_13); 140 + drawBitIcon(x, y, GridIcon, map->canvas.grid ? tic_color_black : over ? tic_color_grey : tic_color_light_grey); 141 141 142 142 return x; 143 143 } ··· 192 192 } 193 193 } 194 194 195 - drawBitIcon(rect.x, rect.y, sheetVisible(map) ? UpIcon : DownIcon, over ? tic_color_14 : tic_color_13); 195 + drawBitIcon(rect.x, rect.y, sheetVisible(map) ? UpIcon : DownIcon, over ? tic_color_grey : tic_color_light_grey); 196 196 197 197 return x; 198 198 } ··· 218 218 } 219 219 } 220 220 221 - drawBitIcon(rect.x, rect.y, Icon, map->mode == mode ? tic_color_0 : over ? tic_color_14 : tic_color_13); 221 + drawBitIcon(rect.x, rect.y, Icon, map->mode == mode ? tic_color_black : over ? tic_color_grey : tic_color_light_grey); 222 222 223 223 return x; 224 224 } ··· 330 330 { 331 331 char buf[] = "#999"; 332 332 sprintf(buf, "#%03i", index); 333 - tic_api_print(map->tic, buf, x, y, tic_color_13, true, 1, false); 333 + tic_api_print(map->tic, buf, x, y, tic_color_light_grey, true, 1, false); 334 334 } 335 335 } 336 336 337 337 static void drawMapToolbar(Map* map, s32 x, s32 y) 338 338 { 339 - tic_api_rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_12); 339 + tic_api_rect(map->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_white); 340 340 341 341 drawTileIndex(map, TIC80_WIDTH/2 - TIC_FONT_WIDTH, y); 342 342 ··· 356 356 357 357 tic_rect rect = {x, y, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; 358 358 359 - tic_api_rectb(map->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_12); 359 + tic_api_rectb(map->tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_white); 360 360 361 361 { 362 362 s32 bx = map->sheet.rect.x * TIC_SPRITESIZE - 1 + x; ··· 364 364 s32 bw = map->sheet.rect.w * TIC_SPRITESIZE + 2; 365 365 s32 bh = map->sheet.rect.h * TIC_SPRITESIZE + 2; 366 366 367 - tic_api_rectb(map->tic, bx, by, bw, bh, tic_color_12); 367 + tic_api_rectb(map->tic, bx, by, bw, bh, tic_color_white); 368 368 } 369 369 } 370 370 ··· 429 429 430 430 sprintf(pos, "%03i:%03i", tx, ty); 431 431 432 - s32 width = tic_api_print(map->tic, pos, TIC80_WIDTH, 0, tic_color_7, true, 1, false); 432 + s32 width = tic_api_print(map->tic, pos, TIC80_WIDTH, 0, tic_color_dark_green, true, 1, false); 433 433 434 434 s32 px = x + (TIC_SPRITESIZE + 3); 435 435 if(px + width >= TIC80_WIDTH) px = x - (width + 2); ··· 437 437 s32 py = y - (TIC_FONT_HEIGHT + 2); 438 438 if(py <= TOOLBAR_SIZE) py = y + (TIC_SPRITESIZE + 3); 439 439 440 - tic_api_rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, tic_color_12); 441 - tic_api_print(map->tic, pos, px, py, tic_color_13, true, 1, false); 440 + tic_api_rect(map->tic, px - 1, py - 1, width + 1, TIC_FONT_HEIGHT + 1, tic_color_white); 441 + tic_api_print(map->tic, pos, px, py, tic_color_light_grey, true, 1, false); 442 442 } 443 443 444 444 static inline void ram2map(const tic_ram* ram, tic_map* src) ··· 508 508 { 509 509 s32 width = map->sheet.rect.w * TIC_SPRITESIZE + 2; 510 510 s32 height = map->sheet.rect.h * TIC_SPRITESIZE + 2; 511 - tic_api_rectb(map->tic, pos.x - 1, pos.y - 1, width, height, tic_color_12); 511 + tic_api_rectb(map->tic, pos.x - 1, pos.y - 1, width, height, tic_color_white); 512 512 } 513 513 514 514 drawCursorPos(map, pos.x, pos.y); ··· 604 604 static void drawSelectionRect(Map* map, s32 x, s32 y, s32 w, s32 h) 605 605 { 606 606 enum{Step = 3}; 607 - u8 color = tic_color_12; 607 + u8 color = tic_color_white; 608 608 609 609 s32 index = map->tickCounter / 10; 610 610 for(s32 i = x; i < (x+w); i++) {tic_api_pix(map->tic, i, y, index++ % Step ? color : 0, false);} index++; ··· 1150 1150 s32 screenScrollX = map->scroll.x % TIC80_WIDTH; 1151 1151 s32 screenScrollY = map->scroll.y % TIC80_HEIGHT; 1152 1152 1153 - tic_api_line(tic, 0, TIC80_HEIGHT - screenScrollY, TIC80_WIDTH, TIC80_HEIGHT - screenScrollY, tic_color_14); 1154 - tic_api_line(tic, TIC80_WIDTH - screenScrollX, 0, TIC80_WIDTH - screenScrollX, TIC80_HEIGHT, tic_color_14); 1153 + tic_api_line(tic, 0, TIC80_HEIGHT - screenScrollY, TIC80_WIDTH, TIC80_HEIGHT - screenScrollY, tic_color_grey); 1154 + tic_api_line(tic, TIC80_WIDTH - screenScrollX, 0, TIC80_WIDTH - screenScrollX, TIC80_HEIGHT, tic_color_grey); 1155 1155 } 1156 1156 tic_api_clip(tic, 0, 0, TIC80_WIDTH, TIC80_HEIGHT); 1157 1157
+104 -104
src/studio/editors/music.c
··· 77 77 { 78 78 tic_mem* tic = music->tic; 79 79 80 - tic_api_rect(tic, x, y-1, w, 1, tic_color_15); 81 - tic_api_rect(tic, x-1, y, 1, h, tic_color_15); 82 - tic_api_rect(tic, x, y+h, w, 1, tic_color_13); 83 - tic_api_rect(tic, x+w, y, 1, h, tic_color_13); 80 + tic_api_rect(tic, x, y-1, w, 1, tic_color_dark_grey); 81 + tic_api_rect(tic, x-1, y, 1, h, tic_color_dark_grey); 82 + tic_api_rect(tic, x, y+h, w, 1, tic_color_light_grey); 83 + tic_api_rect(tic, x+w, y, 1, h, tic_color_light_grey); 84 84 85 - tic_api_rect(tic, x, y, w, h, tic_color_0); 85 + tic_api_rect(tic, x, y, w, h, tic_color_black); 86 86 } 87 87 88 88 static void drawEditbox(Music* music, s32 x, s32 y, s32 value, void(*set)(Music*, s32, s32 channel), s32 channel) ··· 128 128 set(music, -1, channel); 129 129 } 130 130 131 - drawBitIcon(rect.x, rect.y + (down ? 2 : 1), LeftArrow, tic_color_0); 132 - drawBitIcon(rect.x, rect.y + (down ? 1 : 0), LeftArrow, (over ? tic_color_13 : tic_color_15)); 131 + drawBitIcon(rect.x, rect.y + (down ? 2 : 1), LeftArrow, tic_color_black); 132 + drawBitIcon(rect.x, rect.y + (down ? 1 : 0), LeftArrow, (over ? tic_color_light_grey : tic_color_dark_grey)); 133 133 } 134 134 135 135 { ··· 157 157 158 158 if(music->tracker.edit.y == -1 && music->tracker.edit.x / CHANNEL_COLS == channel) 159 159 { 160 - tic_api_rect(music->tic, x - 1 + music->tracker.col * TIC_FONT_WIDTH, y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_2); 160 + tic_api_rect(music->tic, x - 1 + music->tracker.col * TIC_FONT_WIDTH, y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_red); 161 161 } 162 162 163 163 char val[] = "99"; 164 164 sprintf(val, "%02i", value); 165 - tic_api_print(music->tic, val, x, y, tic_color_12, true, 1, false); 165 + tic_api_print(music->tic, val, x, y, tic_color_white, true, 1, false); 166 166 } 167 167 168 168 { ··· 184 184 set(music, +1, channel); 185 185 } 186 186 187 - drawBitIcon(rect.x, rect.y + (down ? 2 : 1), RightArrow, tic_color_0); 188 - drawBitIcon(rect.x, rect.y + (down ? 1 : 0), RightArrow, (over ? tic_color_13 : tic_color_15)); 187 + drawBitIcon(rect.x, rect.y + (down ? 2 : 1), RightArrow, tic_color_black); 188 + drawBitIcon(rect.x, rect.y + (down ? 1 : 0), RightArrow, (over ? tic_color_light_grey : tic_color_dark_grey)); 189 189 } 190 190 } 191 191 ··· 217 217 218 218 enum {ArrowWidth = 5}; 219 219 220 - tic_api_print(music->tic, label, x, y+1, tic_color_0, true, 1, false); 221 - tic_api_print(music->tic, label, x, y, tic_color_12, true, 1, false); 220 + tic_api_print(music->tic, label, x, y+1, tic_color_black, true, 1, false); 221 + tic_api_print(music->tic, label, x, y, tic_color_white, true, 1, false); 222 222 223 223 { 224 224 x += (s32)strlen(label)*TIC_FONT_WIDTH; ··· 240 240 set(music, -1, data); 241 241 } 242 242 243 - drawBitIcon(rect.x, rect.y + (down ? 2 : 1), LeftArrow, tic_color_0); 244 - drawBitIcon(rect.x, rect.y + (down ? 1 : 0), LeftArrow, over ? tic_color_13 : tic_color_15); 243 + drawBitIcon(rect.x, rect.y + (down ? 2 : 1), LeftArrow, tic_color_black); 244 + drawBitIcon(rect.x, rect.y + (down ? 1 : 0), LeftArrow, over ? tic_color_light_grey : tic_color_dark_grey); 245 245 } 246 246 247 247 { 248 248 char val[] = "999"; 249 249 sprintf(val, "%02i", value); 250 - tic_api_print(music->tic, val, x + ArrowWidth, y+1, tic_color_0, true, 1, false); 251 - tic_api_print(music->tic, val, x += ArrowWidth, y, tic_color_4, true, 1, false); 250 + tic_api_print(music->tic, val, x + ArrowWidth, y+1, tic_color_black, true, 1, false); 251 + tic_api_print(music->tic, val, x += ArrowWidth, y, tic_color_yellow, true, 1, false); 252 252 } 253 253 254 254 { ··· 271 271 set(music, +1, data); 272 272 } 273 273 274 - drawBitIcon(rect.x, rect.y + (down ? 2 : 1), RightArrow, tic_color_0); 275 - drawBitIcon(rect.x, rect.y + (down ? 1 : 0), RightArrow, over ? tic_color_13 : tic_color_15); 274 + drawBitIcon(rect.x, rect.y + (down ? 2 : 1), RightArrow, tic_color_black); 275 + drawBitIcon(rect.x, rect.y + (down ? 1 : 0), RightArrow, over ? tic_color_light_grey : tic_color_dark_grey); 276 276 } 277 277 } 278 278 ··· 1524 1524 0b00000000, 1525 1525 }; 1526 1526 1527 - drawBitIcon(x - TIC_FONT_WIDTH-1, y + i*TIC_FONT_HEIGHT, Icon, tic_color_0); 1528 - drawBitIcon(x - TIC_FONT_WIDTH-1, y - 1 + i*TIC_FONT_HEIGHT, Icon, tic_color_12); 1527 + drawBitIcon(x - TIC_FONT_WIDTH-1, y + i*TIC_FONT_HEIGHT, Icon, tic_color_black); 1528 + drawBitIcon(x - TIC_FONT_WIDTH-1, y - 1 + i*TIC_FONT_HEIGHT, Icon, tic_color_white); 1529 1529 } 1530 1530 1531 1531 char buf[] = "99"; 1532 1532 sprintf(buf, "%02i", i); 1533 1533 1534 - tic_api_print(music->tic, buf, x, y + i*TIC_FONT_HEIGHT, i == music->frame ? tic_color_12 : tic_color_14, true, 1, false); 1534 + tic_api_print(music->tic, buf, x, y + i*TIC_FONT_HEIGHT, i == music->frame ? tic_color_white : tic_color_grey, true, 1, false); 1535 1535 } 1536 1536 1537 1537 if(music->tracker.edit.y >= 0) 1538 1538 { 1539 1539 char buf[] = "99"; 1540 1540 sprintf(buf, "%02i", music->tracker.edit.y); 1541 - tic_api_print(music->tic, buf, x, y - 10, tic_color_0, true, 1, false); 1542 - tic_api_print(music->tic, buf, x, y - 11, tic_color_12, true, 1, false); 1541 + tic_api_print(music->tic, buf, x, y - 10, tic_color_black, true, 1, false); 1542 + tic_api_print(music->tic, buf, x, y - 11, tic_color_white, true, 1, false); 1543 1543 } 1544 1544 } 1545 1545 ··· 1630 1630 1631 1631 if (i == music->tracker.edit.y) 1632 1632 { 1633 - tic_api_rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_15); 1633 + tic_api_rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_dark_grey); 1634 1634 } 1635 1635 1636 1636 // draw selection ··· 1640 1640 if (rect.h > 1 && i >= rect.y && i < rect.y + rect.h) 1641 1641 { 1642 1642 s32 sx = x - 1; 1643 - tic_api_rect(tic, sx, rowy - 1, CHANNEL_COLS * TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_14); 1643 + tic_api_rect(tic, sx, rowy - 1, CHANNEL_COLS * TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_grey); 1644 1644 } 1645 1645 } 1646 1646 1647 1647 if (checkPlayRow(music, i)) 1648 1648 { 1649 - tic_api_rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_12); 1649 + tic_api_rect(music->tic, x - 1, rowy - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_white); 1650 1650 } 1651 1651 1652 1652 char rowStr[] = "--------"; ··· 1669 1669 if(row->command > tic_music_cmd_empty) 1670 1670 sprintf(rowStr+5, "%c%01X%01X", MusicCommands[row->command], row->param1, row->param2); 1671 1671 1672 - const u8 Colors[] = { tic_color_5, tic_color_4, tic_color_10 }; 1673 - const u8 DarkColors[] = { tic_color_6, tic_color_3, tic_color_9 }; 1672 + const u8 Colors[] = { tic_color_light_green, tic_color_yellow, tic_color_light_blue }; 1673 + const u8 DarkColors[] = { tic_color_green, tic_color_orange, tic_color_blue }; 1674 1674 static u8 ColorIndexes[] = { 0, 0, 0, 1, 1, 2, 2, 2 }; 1675 1675 1676 1676 bool beetRow = noteBeat(music, i); ··· 1683 1683 drawChar(music->tic, sym, colx, rowy, colors[ColorIndexes[c]], false); 1684 1684 } 1685 1685 } 1686 - else tic_api_print(music->tic, rowStr, x, rowy, i == music->tracker.edit.y ? tic_color_0 : tic_color_15, true, 1, false); 1686 + else tic_api_print(music->tic, rowStr, x, rowy, i == music->tracker.edit.y ? tic_color_black : tic_color_dark_grey, true, 1, false); 1687 1687 1688 1688 if (i == music->tracker.edit.y) 1689 1689 { ··· 1691 1691 { 1692 1692 s32 col = music->tracker.edit.x % CHANNEL_COLS; 1693 1693 s32 colx = x - 1 + col * TIC_FONT_WIDTH; 1694 - tic_api_rect(music->tic, colx, rowy - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_2); 1695 - drawChar(music->tic, rowStr[col], colx + 1, rowy, tic_color_0, false); 1694 + tic_api_rect(music->tic, colx, rowy - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_red); 1695 + drawChar(music->tic, rowStr[col], colx + 1, rowy, tic_color_black, false); 1696 1696 } 1697 1697 } 1698 1698 1699 1699 if (noteBeat(music, i)) 1700 - tic_api_pix(music->tic, x - 4, y + pos*TIC_FONT_HEIGHT + 2, tic_color_0, false); 1700 + tic_api_pix(music->tic, x - 4, y + pos*TIC_FONT_HEIGHT + 2, tic_color_black, false); 1701 1701 } 1702 1702 } 1703 1703 ··· 1728 1728 1729 1729 drawEditPanel(music, x, y, Width, Height); 1730 1730 1731 - u8 color = tic_color_0; 1731 + u8 color = tic_color_black; 1732 1732 tiles2ram(&tic->ram, &getConfig()->cart->bank0.tiles); 1733 1733 tic_api_spr(tic, music->on[index] ? On : Off, x, y, 1, 1, &color, 1, 1, tic_no_flip, tic_no_rotate); 1734 1734 } ··· 1825 1825 } 1826 1826 1827 1827 if(i == 0 && music->follow) 1828 - drawBitIcon(rect.x, rect.y, Icons + i*Rows, tic_color_6); 1828 + drawBitIcon(rect.x, rect.y, Icons + i*Rows, tic_color_green); 1829 1829 else if(i == 1 && music->sustain) 1830 - drawBitIcon(rect.x, rect.y, Icons + i*Rows, tic_color_6); 1830 + drawBitIcon(rect.x, rect.y, Icons + i*Rows, tic_color_green); 1831 1831 else 1832 - drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? tic_color_14 : tic_color_13); 1832 + drawBitIcon(rect.x, rect.y, Icons + i*Rows, over ? tic_color_grey : tic_color_light_grey); 1833 1833 } 1834 1834 } 1835 1835 ··· 1881 1881 1882 1882 if (music->tab == Tabs[i]) 1883 1883 { 1884 - tic_api_rect(music->tic, rect.x, rect.y, rect.w, rect.h, tic_color_14); 1885 - drawBitIcon(rect.x, rect.y + 1, Icons + i*Rows, tic_color_0); 1884 + tic_api_rect(music->tic, rect.x, rect.y, rect.w, rect.h, tic_color_grey); 1885 + drawBitIcon(rect.x, rect.y + 1, Icons + i*Rows, tic_color_black); 1886 1886 } 1887 1887 1888 - drawBitIcon(rect.x, rect.y, Icons + i*Rows, music->tab == Tabs[i] ? tic_color_12 : over ? tic_color_14 : tic_color_13); 1888 + drawBitIcon(rect.x, rect.y, Icons + i*Rows, music->tab == Tabs[i] ? tic_color_white : over ? tic_color_grey : tic_color_light_grey); 1889 1889 } 1890 1890 } 1891 1891 1892 1892 static void drawMusicToolbar(Music* music) 1893 1893 { 1894 - tic_api_rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_12); 1894 + tic_api_rect(music->tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_white); 1895 1895 1896 1896 drawPlayButtons(music); 1897 1897 drawModeTabs(music); ··· 1903 1903 1904 1904 s32 subCol = music->piano.edit.x & 1; 1905 1905 tic_point pos = {x + subCol * TIC_FONT_WIDTH, y}; 1906 - tic_api_rect(tic, pos.x - 1, pos.y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_2); 1907 - tic_api_print(tic, (char[]){val[subCol], '\0'}, pos.x, pos.y, tic_color_0, true, 1, false); 1906 + tic_api_rect(tic, pos.x - 1, pos.y - 1, TIC_FONT_WIDTH + 1, TIC_FONT_HEIGHT + 1, tic_color_red); 1907 + tic_api_print(tic, (char[]){val[subCol], '\0'}, pos.x, pos.y, tic_color_black, true, 1, false); 1908 1908 } 1909 1909 1910 1910 static const char* getPatternLabel(Music* music, s32 frame, s32 channel) ··· 1929 1929 1930 1930 drawEditPanel(music, x, y, Width, Height); 1931 1931 1932 - tic_api_print(tic, "FRM", x + 1, y + 2, tic_color_14, true, 1, true); 1932 + tic_api_print(tic, "FRM", x + 1, y + 2, tic_color_grey, true, 1, true); 1933 1933 1934 1934 { 1935 1935 const tic_sound_state* pos = getMusicPos(music); ··· 1939 1939 for(s32 i = 0; i < MUSIC_FRAMES; i++) 1940 1940 { 1941 1941 sprintf(index, "%02i", i); 1942 - tic_api_print(tic, index, x + 1, y + Header + i * TIC_FONT_HEIGHT, playFrame == i ? tic_color_12 : music->frame == i? tic_color_14 : tic_color_15, true, 1, false); 1942 + tic_api_print(tic, index, x + 1, y + Header + i * TIC_FONT_HEIGHT, playFrame == i ? tic_color_white : music->frame == i? tic_color_grey : tic_color_dark_grey, true, 1, false); 1943 1943 } 1944 1944 1945 1945 if(playFrame >= 0) ··· 1956 1956 0b00000000, 1957 1957 }; 1958 1958 1959 - drawBitIcon(x - TIC_ALTFONT_WIDTH, y + playFrame * TIC_FONT_HEIGHT + Header, Icon, tic_color_0); 1960 - drawBitIcon(x - TIC_ALTFONT_WIDTH, y + playFrame * TIC_FONT_HEIGHT + (Header - 1), Icon, tic_color_12); 1959 + drawBitIcon(x - TIC_ALTFONT_WIDTH, y + playFrame * TIC_FONT_HEIGHT + Header, Icon, tic_color_black); 1960 + drawBitIcon(x - TIC_ALTFONT_WIDTH, y + playFrame * TIC_FONT_HEIGHT + (Header - 1), Icon, tic_color_white); 1961 1961 } 1962 1962 } 1963 1963 ··· 1993 1993 for(s32 c = 0; c < TIC_SOUND_CHANNELS; c++) 1994 1994 { 1995 1995 tic_api_rect(tic, x + c * ColWidth, y + 1, 1996 - ColWidth, MUSIC_FRAMES * TIC_FONT_HEIGHT + (Header - 1), c & 1 ? tic_color_0 : tic_color_15); 1996 + ColWidth, MUSIC_FRAMES * TIC_FONT_HEIGHT + (Header - 1), c & 1 ? tic_color_black : tic_color_dark_grey); 1997 1997 1998 1998 tic_api_print(tic, (char[]){'1' + c, '\0'}, x + (ColWidth - (TIC_ALTFONT_WIDTH - 1)) / 2 + c * ColWidth, y + 2, 1999 - tic_color_14, true, 1, true); 1999 + tic_color_grey, true, 1, true); 2000 2000 2001 2001 2002 2002 for(s32 i = 0; i < MUSIC_FRAMES; i++) ··· 2004 2004 const char* index = getPatternLabel(music, i, c); 2005 2005 2006 2006 tic_point pos = {x + 1 + c * ColWidth, y + Header + i * TIC_FONT_HEIGHT}; 2007 - tic_api_print(tic, index, pos.x, pos.y, c & 1 ? tic_color_15 : tic_color_14, true, 1, false); 2007 + tic_api_print(tic, index, pos.x, pos.y, c & 1 ? tic_color_dark_grey : tic_color_grey, true, 1, false); 2008 2008 } 2009 2009 2010 2010 drawTumbler(music, x + 3 + c * ColWidth, y + 110, c); ··· 2014 2014 const char* index = getPatternLabel(music, music->frame, music->piano.col); 2015 2015 2016 2016 tic_point pos = {x + 1 + music->piano.col * ColWidth, y + Header + music->frame * TIC_FONT_HEIGHT}; 2017 - tic_api_print(tic, index, pos.x, pos.y + 1, tic_color_0, true, 1, false); 2018 - tic_api_print(tic, index, pos.x, pos.y, tic_color_12, true, 1, false); 2017 + tic_api_print(tic, index, pos.x, pos.y + 1, tic_color_black, true, 1, false); 2018 + tic_api_print(tic, index, pos.x, pos.y, tic_color_white, true, 1, false); 2019 2019 2020 2020 } 2021 2021 ··· 2038 2038 tic_mem* tic = music->tic; 2039 2039 static u8 Colors[] = 2040 2040 { 2041 - tic_color_7, tic_color_6, tic_color_5, tic_color_5 2041 + tic_color_dark_green, tic_color_green, tic_color_light_green, tic_color_light_green 2042 2042 }; 2043 2043 2044 2044 for(s32 i = 0; i < COUNT_OF(Colors); i++) ··· 2077 2077 { 2078 2078 const struct Button* btn = &Buttons[i]; 2079 2079 tic_api_spr(tic, btn->note == music->piano.note[music->piano.col] ? btn->down : btn->up, 2080 - x + btn->offset, y, 1, 1, (u8[]){tic_color_3}, 1, 1, btn->flip, tic_no_rotate); 2080 + x + btn->offset, y, 1, 1, (u8[]){tic_color_orange}, 1, 1, btn->flip, tic_no_rotate); 2081 2081 } 2082 2082 } 2083 2083 ··· 2110 2110 else music->scroll.active = false; 2111 2111 } 2112 2112 2113 - tic_api_print(tic, "ROW", x + 1, y + 2, tic_color_14, true, 1, true); 2113 + tic_api_print(tic, "ROW", x + 1, y + 2, tic_color_grey, true, 1, true); 2114 2114 2115 2115 for(s32 r = 0; r < TRACKER_ROWS; r++) 2116 2116 { ··· 2118 2118 2119 2119 char label[sizeof "00"]; 2120 2120 sprintf(label, "%02i", index); 2121 - tic_api_print(tic, label, x + 1, y + Header + r * TIC_FONT_HEIGHT, pattern && noteBeat(music, index) ? tic_color_14 : tic_color_15, true, 1, false); 2121 + tic_api_print(tic, label, x + 1, y + Header + r * TIC_FONT_HEIGHT, pattern && noteBeat(music, index) ? tic_color_grey : tic_color_dark_grey, true, 1, false); 2122 2122 } 2123 2123 } 2124 2124 ··· 2134 2134 { 2135 2135 { 2136 2136 static const char Notes[] = "C D EF G A B"; 2137 - tic_api_print(tic, Notes, xpos, ypos, tic_color_15, true, 1, true); 2137 + tic_api_print(tic, Notes, xpos, ypos, tic_color_dark_grey, true, 1, true); 2138 2138 } 2139 2139 2140 2140 showTooltip("set note"); ··· 2143 2143 static const s32 Offsets[] = {0, 0, 2, 2, 4, 5, 5, 7, 7, 9, 9, 11}; 2144 2144 s32 note = (getMouseX() - rect.x) / NoteWidth; 2145 2145 2146 - tic_api_print(tic, Notes[note], xpos + Offsets[note] * NoteWidth, ypos, tic_color_4, true, 1, true); 2146 + tic_api_print(tic, Notes[note], xpos + Offsets[note] * NoteWidth, ypos, tic_color_yellow, true, 1, true); 2147 2147 2148 2148 music->piano.drawNumbers = false; 2149 2149 } ··· 2242 2242 if(row->note == NoteStop) 2243 2243 { 2244 2244 // draw stop note 2245 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_15); 2246 - tic_api_rect(tic, x + 1 + n * NoteWidth, y + r * NoteHeight + (Header + NoteHeight / 2 - 1), 1, 1, tic_color_2); 2245 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_dark_grey); 2246 + tic_api_rect(tic, x + 1 + n * NoteWidth, y + r * NoteHeight + (Header + NoteHeight / 2 - 1), 1, 1, tic_color_red); 2247 2247 } 2248 - else tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, over ? tic_color_14 : tic_color_15); 2248 + else tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, over ? tic_color_grey : tic_color_dark_grey); 2249 2249 } 2250 2250 2251 2251 if(noteBeat(music, index) && row->note != NoteStop) 2252 2252 { 2253 2253 static u8 Colors[NOTES] = 2254 2254 { 2255 - tic_color_14, tic_color_14, tic_color_13, 2256 - tic_color_13, tic_color_13, tic_color_12, 2257 - tic_color_12, tic_color_13, tic_color_13, 2258 - tic_color_13, tic_color_14, tic_color_14 2255 + tic_color_grey, tic_color_grey, tic_color_light_grey, 2256 + tic_color_light_grey, tic_color_light_grey, tic_color_white, 2257 + tic_color_white, tic_color_light_grey, tic_color_light_grey, 2258 + tic_color_light_grey, tic_color_grey, tic_color_grey 2259 2259 }; 2260 2260 2261 2261 for(s32 i = 0; i < COUNT_OF(Colors); i++) ··· 2263 2263 } 2264 2264 2265 2265 if (row->note >= NoteStart) 2266 - tic_api_rect(tic, x + (row->note - NoteStart) * NoteWidth, y + Header + r * NoteHeight, NoteWidth - 1, NoteHeight - 1, tic_color_5); 2266 + tic_api_rect(tic, x + (row->note - NoteStart) * NoteWidth, y + Header + r * NoteHeight, NoteWidth - 1, NoteHeight - 1, tic_color_light_green); 2267 2267 } 2268 2268 } 2269 2269 else 2270 2270 for(s32 r = 0; r < TRACKER_ROWS; r++) 2271 2271 for(s32 i = 0; i < NOTES; i++) 2272 - tic_api_rect(tic, x + i * NoteWidth, y + r * NoteHeight + (Header + NoteHeight / 2 - 1), NoteWidth - 1, 1, tic_color_15); 2272 + tic_api_rect(tic, x + i * NoteWidth, y + r * NoteHeight + (Header + NoteHeight / 2 - 1), NoteWidth - 1, 1, tic_color_dark_grey); 2273 2273 } 2274 2274 2275 2275 static void drawPianoOctaveStatus(Music* music, s32 x, s32 y, s32 xpos, s32 ypos) ··· 2292 2292 { 2293 2293 showTooltip("set octave"); 2294 2294 2295 - tic_api_print(tic, "12345678", xpos, ypos, tic_color_15, true, 1, true); 2296 - tic_api_print(tic, (char[]){octave + '1', '\0'}, xpos + octave * OctaveWidth, ypos, tic_color_4, true, 1, true); 2295 + tic_api_print(tic, "12345678", xpos, ypos, tic_color_dark_grey, true, 1, true); 2296 + tic_api_print(tic, (char[]){octave + '1', '\0'}, xpos + octave * OctaveWidth, ypos, tic_color_yellow, true, 1, true); 2297 2297 2298 2298 music->piano.drawNumbers = false; 2299 2299 } ··· 2306 2306 2307 2307 enum{Header = PIANO_PATTERN_HEADER, OctaveWidth = 4, OctaveHeight = TIC_FONT_HEIGHT}; 2308 2308 2309 - tic_api_print(tic, "OCTAVE", x + 4, y + 2, tic_color_14, true, 1, true); 2309 + tic_api_print(tic, "OCTAVE", x + 4, y + 2, tic_color_grey, true, 1, true); 2310 2310 drawStereoSeparator(music, x, y + 8); 2311 2311 2312 2312 tic_track_pattern* pattern = getFramePattern(music, music->piano.col, music->frame); ··· 2339 2339 } 2340 2340 } 2341 2341 2342 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, over ? tic_color_14 : tic_color_15); 2342 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, over ? tic_color_grey : tic_color_dark_grey); 2343 2343 } 2344 2344 } 2345 2345 else 2346 2346 for(s32 i = 0; i < OCTAVES; i++) 2347 - tic_api_rect(tic, x + i * OctaveWidth, y + r * OctaveHeight + (Header + OctaveHeight / 2 - 1), OctaveWidth - 1, 1, tic_color_15); 2347 + tic_api_rect(tic, x + i * OctaveWidth, y + r * OctaveHeight + (Header + OctaveHeight / 2 - 1), OctaveWidth - 1, 1, tic_color_dark_grey); 2348 2348 2349 2349 if(noteBeat(music, index)) 2350 2350 { 2351 2351 static u8 Colors[OCTAVES] = 2352 2352 { 2353 - tic_color_14, tic_color_14, tic_color_13, tic_color_12, 2354 - tic_color_12, tic_color_13, tic_color_14, tic_color_14 2353 + tic_color_grey, tic_color_grey, tic_color_light_grey, tic_color_white, 2354 + tic_color_white, tic_color_light_grey, tic_color_grey, tic_color_grey 2355 2355 }; 2356 2356 2357 2357 for(s32 i = 0; i < COUNT_OF(Colors); i++) ··· 2359 2359 } 2360 2360 2361 2361 if(row->note >= NoteStart) 2362 - tic_api_rect(tic, x + row->octave * OctaveWidth, y + Header + r * OctaveHeight, OctaveWidth - 1, OctaveHeight - 1, tic_color_3); 2362 + tic_api_rect(tic, x + row->octave * OctaveWidth, y + Header + r * OctaveHeight, OctaveWidth - 1, OctaveHeight - 1, tic_color_orange); 2363 2363 } 2364 2364 } 2365 2365 else 2366 2366 for(s32 r = 0; r < TRACKER_ROWS; r++) 2367 2367 for(s32 i = 0; i < OCTAVES; i++) 2368 - tic_api_rect(tic, x + i * OctaveWidth, y + r * OctaveHeight + (Header + OctaveHeight / 2 - 1), OctaveWidth - 1, 1, tic_color_15); 2368 + tic_api_rect(tic, x + i * OctaveWidth, y + r * OctaveHeight + (Header + OctaveHeight / 2 - 1), OctaveWidth - 1, 1, tic_color_dark_grey); 2369 2369 } 2370 2370 2371 2371 static void drawPianoSfxColumn(Music* music, s32 x, s32 y) ··· 2391 2391 } 2392 2392 } 2393 2393 2394 - tic_api_rect(tic, x, y + 1, TIC_FONT_WIDTH*2 + 1, Header + TRACKER_ROWS * TIC_FONT_HEIGHT - 1, tic_color_15); 2395 - tic_api_print(tic, "SFX", x + 1, y + 2, tic_color_14, true, 1, true); 2394 + tic_api_rect(tic, x, y + 1, TIC_FONT_WIDTH*2 + 1, Header + TRACKER_ROWS * TIC_FONT_HEIGHT - 1, tic_color_dark_grey); 2395 + tic_api_print(tic, "SFX", x + 1, y + 2, tic_color_grey, true, 1, true); 2396 2396 2397 2397 const tic_track_pattern* pattern = getFramePattern(music, music->piano.col, music->frame); 2398 2398 if(pattern) ··· 2408 2408 2409 2409 char sfx[sizeof "00"]; 2410 2410 sprintf(sfx, "%02i", tic_tool_get_track_row_sfx(row)); 2411 - tic_api_print(tic, sfx, rect.x + 1, rect.y + 2, tic_color_0, true, 1, false); 2412 - tic_api_print(tic, sfx, rect.x + 1, rect.y + 1, tic_color_4, true, 1, false); 2411 + tic_api_print(tic, sfx, rect.x + 1, rect.y + 2, tic_color_black, true, 1, false); 2412 + tic_api_print(tic, sfx, rect.x + 1, rect.y + 1, tic_color_yellow, true, 1, false); 2413 2413 } 2414 2414 else 2415 2415 tic_api_print(tic, "--", 2416 2416 x + 1, y + Header + r * TIC_FONT_HEIGHT, 2417 - noteBeat(music, index) ? tic_color_13 : tic_color_14, true, 1, false); 2417 + noteBeat(music, index) ? tic_color_light_grey : tic_color_grey, true, 1, false); 2418 2418 } 2419 2419 } 2420 2420 else 2421 2421 for(s32 r = 0; r < TRACKER_ROWS; r++) 2422 - tic_api_print(tic, "--", x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_14, true, 1, false); 2422 + tic_api_print(tic, "--", x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_grey, true, 1, false); 2423 2423 2424 2424 if(music->piano.edit.x / 2 == PianoSfxColumn) 2425 2425 { ··· 2461 2461 } 2462 2462 } 2463 2463 2464 - tic_api_print(tic, buf, rect.x, rect.y, i == val ? tic_color_12 : over ? tic_color_13 : tic_color_15, true, 1, false); 2464 + tic_api_print(tic, buf, rect.x, rect.y, i == val ? tic_color_white : over ? tic_color_light_grey : tic_color_dark_grey, true, 1, false); 2465 2465 } 2466 2466 } 2467 2467 ··· 2496 2496 }; 2497 2497 #undef MUSIC_CMD_HINT 2498 2498 2499 - tic_api_print(tic, Hints[command], 73, 129, tic_color_4, false, 1, true); 2499 + tic_api_print(tic, Hints[command], 73, 129, tic_color_yellow, false, 1, true); 2500 2500 music->piano.drawNumbers = false; 2501 2501 } 2502 2502 ··· 2516 2516 } 2517 2517 } 2518 2518 2519 - tic_api_print(tic, "COMMAND", x + 8, y + 2, tic_color_14, true, 1, true); 2519 + tic_api_print(tic, "COMMAND", x + 8, y + 2, tic_color_grey, true, 1, true); 2520 2520 drawStereoSeparator(music, x + 6, y + 8); 2521 2521 2522 2522 if(pattern) ··· 2528 2528 2529 2529 tic_api_print(tic, MusicCommands + 1, 2530 2530 x + 1, y + Header + r * TIC_FONT_HEIGHT, 2531 - noteBeat(music, index) ? tic_color_14 : tic_color_15, true, 1, false); 2531 + noteBeat(music, index) ? tic_color_grey : tic_color_dark_grey, true, 1, false); 2532 2532 2533 2533 if(overRow == r && command > tic_music_cmd_empty) 2534 2534 tic_api_print(tic, (char[]){MusicCommands[command], '\0'}, 2535 2535 x + 1 + (command - 1) * TIC_FONT_WIDTH, y + Header + r * TIC_FONT_HEIGHT, 2536 - noteBeat(music, index) ? tic_color_13 : tic_color_14, true, 1, false); 2536 + noteBeat(music, index) ? tic_color_light_grey : tic_color_grey, true, 1, false); 2537 2537 2538 2538 if(row->command > tic_music_cmd_empty) 2539 2539 tic_api_print(tic, (char[]){MusicCommands[row->command], '\0'}, 2540 2540 x + 1 + (row->command - 1) * TIC_FONT_WIDTH, y + Header + r * TIC_FONT_HEIGHT, 2541 - tic_color_10, true, 1, false); 2541 + tic_color_light_blue, true, 1, false); 2542 2542 } 2543 2543 } 2544 2544 else 2545 2545 for(s32 r = 0; r < TRACKER_ROWS; r++) 2546 2546 tic_api_print(tic, MusicCommands + 1, 2547 2547 x + 1, y + Header + r * TIC_FONT_HEIGHT, 2548 - tic_color_15, true, 1, false); 2548 + tic_color_dark_grey, true, 1, false); 2549 2549 } 2550 2550 2551 2551 static void drawPianoXYColumn(Music* music, s32 x, s32 y) ··· 2572 2572 { 2573 2573 char val[sizeof "XY=000"]; 2574 2574 sprintf(val, "XY=%03i", (row->param1 << 4) | row->param2); 2575 - tic_api_print(tic, val, 213, 129, tic_color_4, false, 1, true); 2575 + tic_api_print(tic, val, 213, 129, tic_color_yellow, false, 1, true); 2576 2576 music->piano.drawNumbers = false; 2577 2577 } 2578 2578 } ··· 2585 2585 } 2586 2586 } 2587 2587 2588 - tic_api_rect(tic, x, y + 1, TIC_FONT_WIDTH*2 + 1, Header + TRACKER_ROWS * TIC_FONT_HEIGHT - 1, tic_color_15); 2589 - tic_api_print(tic, "X", x + 2, y + 2, tic_color_14, true, 1, true); 2590 - tic_api_print(tic, "Y", x + 8, y + 2, tic_color_14, true, 1, true); 2588 + tic_api_rect(tic, x, y + 1, TIC_FONT_WIDTH*2 + 1, Header + TRACKER_ROWS * TIC_FONT_HEIGHT - 1, tic_color_dark_grey); 2589 + tic_api_print(tic, "X", x + 2, y + 2, tic_color_grey, true, 1, true); 2590 + tic_api_print(tic, "Y", x + 8, y + 2, tic_color_grey, true, 1, true); 2591 2591 2592 2592 if(pattern) 2593 2593 { ··· 2602 2602 if(row->command > tic_music_cmd_empty) 2603 2603 { 2604 2604 char xy[sizeof "00"]; 2605 - tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_15, true, 1, false); 2605 + tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_dark_grey, true, 1, false); 2606 2606 sprintf(xy, "%01X%01X", row->param1, row->param2); 2607 - tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT + 1, tic_color_0, true, 1, false); 2608 - tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_10, true, 1, false); 2607 + tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT + 1, tic_color_black, true, 1, false); 2608 + tic_api_print(tic, xy, x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_light_blue, true, 1, false); 2609 2609 } 2610 2610 else 2611 2611 tic_api_print(tic, "--", 2612 2612 x + 1, y + Header + r * TIC_FONT_HEIGHT, 2613 - noteBeat(music, index) ? tic_color_13 : tic_color_14, true, 1, false); 2613 + noteBeat(music, index) ? tic_color_light_grey : tic_color_grey, true, 1, false); 2614 2614 } 2615 2615 } 2616 2616 else 2617 2617 for(s32 r = 0; r < TRACKER_ROWS; r++) 2618 - tic_api_print(tic, "--", x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_14, true, 1, false); 2618 + tic_api_print(tic, "--", x + 1, y + Header + r * TIC_FONT_HEIGHT, tic_color_grey, true, 1, false); 2619 2619 2620 2620 if(music->piano.edit.x / 2 == PianoXYColumn) 2621 2621 { ··· 2644 2644 s32 index = pos->music.row - music->scroll.pos; 2645 2645 2646 2646 if(index >= 0 && index < TRACKER_ROWS) 2647 - tic_api_rect(tic, x, y + PIANO_PATTERN_HEADER + index * TIC_FONT_HEIGHT - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_13); 2647 + tic_api_rect(tic, x, y + PIANO_PATTERN_HEADER + index * TIC_FONT_HEIGHT - 1, Width, TIC_FONT_HEIGHT + 1, tic_color_light_grey); 2648 2648 } 2649 2649 2650 2650 drawPianoRowColumn(music, x, y); ··· 2680 2680 music->beat34 = !music->beat34; 2681 2681 } 2682 2682 2683 - tic_api_print(tic, music->beat34 ? Label34 : Label44, x, y + 1, tic_color_0, true, 1, true); 2684 - tic_api_print(tic, music->beat34 ? Label34 : Label44, x, y + (down ? 1 : 0), tic_color_12, true, 1, true); 2683 + tic_api_print(tic, music->beat34 ? Label34 : Label44, x, y + 1, tic_color_black, true, 1, true); 2684 + tic_api_print(tic, music->beat34 ? Label34 : Label44, x, y + (down ? 1 : 0), tic_color_white, true, 1, true); 2685 2685 } 2686 2686 2687 2687 static void drawPianoLayout(Music* music) ··· 2753 2753 lamp /= WAVE_MAX_VALUE * WAVE_MAX_VALUE; 2754 2754 ramp /= WAVE_MAX_VALUE * WAVE_MAX_VALUE; 2755 2755 2756 - tic_api_rect(tic, x + i, y + (Height-1) - ramp * Height / WaveRows, 1, 1, tic_color_4); 2757 - tic_api_rect(tic, x + i, y + (Height-1) - lamp * Height / WaveRows, 1, 1, tic_color_5); 2756 + tic_api_rect(tic, x + i, y + (Height-1) - ramp * Height / WaveRows, 1, 1, tic_color_yellow); 2757 + tic_api_rect(tic, x + i, y + (Height-1) - lamp * Height / WaveRows, 1, 1, tic_color_light_green); 2758 2758 } 2759 2759 } 2760 2760 } ··· 2836 2836 2837 2837 updatePianoRollState(music); 2838 2838 2839 - tic_api_cls(music->tic, tic_color_14); 2839 + tic_api_cls(music->tic, tic_color_grey); 2840 2840 drawTopPanel(music, 2, TOOLBAR_SIZE + 3); 2841 2841 drawWaveform(music, 205, 9); 2842 2842
+60 -60
src/studio/editors/sfx.c
··· 47 47 { 48 48 tic_api_rect(tic, x, y, w, h, color); 49 49 50 - tic_api_rect(tic, x, y-1, w, 1, tic_color_15); 51 - tic_api_rect(tic, x-1, y, 1, h, tic_color_15); 52 - tic_api_rect(tic, x, y+h, w, 1, tic_color_13); 53 - tic_api_rect(tic, x+w, y, 1, h, tic_color_13); 50 + tic_api_rect(tic, x, y-1, w, 1, tic_color_dark_grey); 51 + tic_api_rect(tic, x-1, y, 1, h, tic_color_dark_grey); 52 + tic_api_rect(tic, x, y+h, w, 1, tic_color_light_grey); 53 + tic_api_rect(tic, x+w, y, 1, h, tic_color_light_grey); 54 54 } 55 55 56 56 static void drawCanvasLeds(Sfx* sfx, s32 x, s32 y, s32 canvasTab) ··· 65 65 Height = LedHeight * Rows + Gap 66 66 }; 67 67 68 - tic_api_rect(tic, x, y, Width, Height, tic_color_15); 68 + tic_api_rect(tic, x, y, Width, Height, tic_color_dark_grey); 69 69 70 70 for(s32 i = 0; i < Height; i += LedHeight) 71 - tic_api_rect(tic, x, y + i, Width, Gap, tic_color_0); 71 + tic_api_rect(tic, x, y + i, Width, Gap, tic_color_black); 72 72 73 73 for(s32 i = 0; i < Width; i += LedWidth) 74 - tic_api_rect(tic, x + i, y, Gap, Height, tic_color_0); 74 + tic_api_rect(tic, x + i, y, Gap, Height, tic_color_black); 75 75 76 76 { 77 77 const tic_sfx_pos* pos = &tic->ram.sfxpos[DEFAULT_CHANNEL]; 78 78 s32 tickIndex = *(pos->data + canvasTab); 79 79 80 80 if(tickIndex >= 0) 81 - tic_api_rect(tic, x + tickIndex * LedWidth, y, LedWidth + 1, Height, tic_color_12); 81 + tic_api_rect(tic, x + tickIndex * LedWidth, y, LedWidth + 1, Height, tic_color_white); 82 82 } 83 83 84 84 tic_rect rect = {x, y, Width - Gap, Height - Gap}; ··· 128 128 { 129 129 case SFX_WAVE_PANEL: 130 130 for(s32 j = 1, start = Height - LedHeight, value = effect->data[i].wave + 1; j <= value; j++, start -= LedHeight) 131 - tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_2 : tic_color_3); 131 + tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_red : tic_color_orange); 132 132 break; 133 133 134 134 case SFX_VOLUME_PANEL: 135 135 for(s32 j = 1, start = Height - LedHeight, value = Rows - effect->data[i].volume; j <= value; j++, start -= LedHeight) 136 - tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_9 : tic_color_10); 136 + tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_blue : tic_color_light_blue); 137 137 break; 138 138 139 139 case SFX_CHORD_PANEL: 140 140 for(s32 j = 1, start = Height - LedHeight, value = effect->data[i].chord + 1; j <= value; j++, start -= LedHeight) 141 - tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_6 : tic_color_5); 141 + tic_api_rect(tic, x + i * LedWidth + Gap, y + start, LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_green : tic_color_light_green); 142 142 break; 143 143 144 144 case SFX_PITCH_PANEL: 145 145 for(s32 value = effect->data[i].pitch, j = MIN(0, value); j <= MAX(0, value); j++) 146 146 tic_api_rect(tic, x + i * LedWidth + Gap, y + (Height / 2 - (j + 1) * LedHeight + Gap), 147 - LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_3 : tic_color_4); 147 + LedWidth-Gap, LedHeight-Gap, j == value ? tic_color_orange : tic_color_yellow); 148 148 break; 149 149 } 150 150 } ··· 154 154 if(loop->size > 0) 155 155 for(s32 r = 0; r < Rows; r++) 156 156 { 157 - tic_api_rect(tic, x + loop->start * LedWidth + 2, y + Gap + r * LedHeight, 1, 1, tic_color_12); 158 - tic_api_rect(tic, x + (loop->start + loop->size-1) * LedWidth + 2, y + Gap + r * LedHeight, 1, 1, tic_color_12); 157 + tic_api_rect(tic, x + loop->start * LedWidth + 2, y + Gap + r * LedHeight, 1, 1, tic_color_white); 158 + tic_api_rect(tic, x + (loop->start + loop->size-1) * LedWidth + 2, y + Gap + r * LedHeight, 1, 1, tic_color_white); 159 159 } 160 160 } 161 161 162 162 if(border.x >= 0) 163 - tic_api_rectb(tic, border.x, border.y, border.w, border.h, tic_color_12); 163 + tic_api_rectb(tic, border.x, border.y, border.w, border.h, tic_color_white); 164 164 } 165 165 166 166 static void drawVolumeStereo(Sfx* sfx, s32 x, s32 y) ··· 186 186 effect->stereo_left = ~effect->stereo_left; 187 187 } 188 188 189 - tic_api_print(tic, "L", rect.x, rect.y, effect->stereo_left ? hover ? tic_color_14 : tic_color_15 : tic_color_5, true, 1, true); 189 + tic_api_print(tic, "L", rect.x, rect.y, effect->stereo_left ? hover ? tic_color_grey : tic_color_dark_grey : tic_color_light_green, true, 1, true); 190 190 } 191 191 192 192 { ··· 204 204 effect->stereo_right = ~effect->stereo_right; 205 205 } 206 206 207 - tic_api_print(tic, "R", rect.x, rect.y, effect->stereo_right ? hover ? tic_color_14 : tic_color_15 : tic_color_5, true, 1, true); 207 + tic_api_print(tic, "R", rect.x, rect.y, effect->stereo_right ? hover ? tic_color_grey : tic_color_dark_grey : tic_color_light_green, true, 1, true); 208 208 } 209 209 } 210 210 ··· 233 233 effect->reverse = ~effect->reverse; 234 234 } 235 235 236 - tic_api_print(tic, Label, rect.x, rect.y, effect->reverse ? tic_color_5 : hover ? tic_color_14 : tic_color_15, true, 1, true); 236 + tic_api_print(tic, Label, rect.x, rect.y, effect->reverse ? tic_color_light_green : hover ? tic_color_grey : tic_color_dark_grey, true, 1, true); 237 237 } 238 238 } 239 239 ··· 262 262 effect->pitch16x = ~effect->pitch16x; 263 263 } 264 264 265 - tic_api_print(tic, Label, rect.x, rect.y, effect->pitch16x ? tic_color_5 : hover ? tic_color_14 : tic_color_15, true, 1, true); 265 + tic_api_print(tic, Label, rect.x, rect.y, effect->pitch16x ? tic_color_light_green : hover ? tic_color_grey : tic_color_dark_grey, true, 1, true); 266 266 } 267 267 } 268 268 ··· 297 297 sfx->volwave = item->panel; 298 298 } 299 299 300 - tic_api_print(tic, item->label, x + item->rect.x, y + item->rect.y, item->panel == sfx->volwave ? tic_color_5 : hover ? tic_color_14 : tic_color_15, true, 1, true); 300 + tic_api_print(tic, item->label, x + item->rect.x, y + item->rect.y, item->panel == sfx->volwave ? tic_color_light_green : hover ? tic_color_grey : tic_color_dark_grey, true, 1, true); 301 301 } 302 302 } 303 303 ··· 310 310 Width = 147, Height = 33 311 311 }; 312 312 313 - drawPanelBorder(tic, x, y, Width, Height, tic_color_0); 313 + drawPanelBorder(tic, x, y, Width, Height, tic_color_black); 314 314 315 315 static const char* Labels[] = {"", "", "ARPEGG", "PITCH"}; 316 - tic_api_print(tic, Labels[canvasTab], x + 2, y + 2, tic_color_15, true, 1, true); 316 + tic_api_print(tic, Labels[canvasTab], x + 2, y + 2, tic_color_dark_grey, true, 1, true); 317 317 318 318 switch(canvasTab) 319 319 { ··· 334 334 break; 335 335 } 336 336 337 - tic_api_print(tic, "LOOP:", x + 2, y + 20, tic_color_15, true, 1, true); 337 + tic_api_print(tic, "LOOP:", x + 2, y + 20, tic_color_dark_grey, true, 1, true); 338 338 339 339 static const u8 LeftArrow[] = 340 340 { ··· 387 387 } 388 388 } 389 389 390 - drawBitIcon(rect.x, rect.y, LeftArrow, hover ? tic_color_14 : tic_color_15); 390 + drawBitIcon(rect.x, rect.y, LeftArrow, hover ? tic_color_grey : tic_color_dark_grey); 391 391 } 392 392 393 393 { ··· 408 408 } 409 409 } 410 410 411 - drawBitIcon(rect.x, rect.y, RightArrow, hover ? tic_color_14 : tic_color_15); 411 + drawBitIcon(rect.x, rect.y, RightArrow, hover ? tic_color_grey : tic_color_dark_grey); 412 412 } 413 413 414 414 { 415 415 char buf[] = "0"; 416 416 sprintf(buf, "%X", effect->loops[canvasTab].start); 417 - tic_api_print(tic, buf, x + 6, y + 27, tic_color_14, true, 1, true); 417 + tic_api_print(tic, buf, x + 6, y + 27, tic_color_grey, true, 1, true); 418 418 } 419 419 420 420 { ··· 434 434 } 435 435 } 436 436 437 - drawBitIcon(rect.x, rect.y, LeftArrow, hover ? tic_color_14 : tic_color_15); 437 + drawBitIcon(rect.x, rect.y, LeftArrow, hover ? tic_color_grey : tic_color_dark_grey); 438 438 } 439 439 440 440 { ··· 454 454 } 455 455 } 456 456 457 - drawBitIcon(rect.x, rect.y, RightArrow, hover ? tic_color_14 : tic_color_15); 457 + drawBitIcon(rect.x, rect.y, RightArrow, hover ? tic_color_grey : tic_color_dark_grey); 458 458 } 459 459 460 460 { 461 461 char buf[] = "0"; 462 462 sprintf(buf, "%X", effect->loops[canvasTab].size); 463 - tic_api_print(tic, buf, x + 18, y + 27, tic_color_14, true, 1, true); 463 + tic_api_print(tic, buf, x + 18, y + 27, tic_color_grey, true, 1, true); 464 464 } 465 465 466 466 drawCanvasLeds(sfx, x + 26, y, canvasTab); ··· 635 635 const tic_sfx_pos* pos = &tic->ram.sfxpos[DEFAULT_CHANNEL]; 636 636 bool active = *pos->data < 0 ? sfx->hoverWave == i : i == effect->data[*pos->data].wave; 637 637 638 - drawPanelBorder(tic, rect.x, rect.y, rect.w, rect.h, active ? tic_color_3 : sel ? tic_color_5 : tic_color_0); 638 + drawPanelBorder(tic, rect.x, rect.y, rect.w, rect.h, active ? tic_color_orange : sel ? tic_color_light_green : tic_color_black); 639 639 640 640 // draw tiny wave previews 641 641 { ··· 644 644 for(s32 i = 0; i < WAVE_VALUES/Scale; i++) 645 645 { 646 646 s32 value = tic_tool_peek4(wave->data, i*Scale)/Scale; 647 - tic_api_pix(tic, rect.x + i+1, rect.y + Height - value - 2, active ? tic_color_2 : sel ? tic_color_7 : hover ? tic_color_13 : tic_color_12, false); 647 + tic_api_pix(tic, rect.x + i+1, rect.y + Height - value - 2, active ? tic_color_red : sel ? tic_color_dark_green : hover ? tic_color_light_grey : tic_color_white, false); 648 648 } 649 649 650 650 // draw flare 651 651 if(sel || active) 652 652 { 653 - tic_api_rect(tic, rect.x + rect.w - 2, rect.y, 2, 1, tic_color_12); 654 - tic_api_pix(tic, rect.x + rect.w - 1, rect.y + 1, tic_color_12, false); 653 + tic_api_rect(tic, rect.x + rect.w - 2, rect.y, 2, 1, tic_color_white); 654 + tic_api_pix(tic, rect.x + rect.w - 1, rect.y + 1, tic_color_white, false); 655 655 } 656 656 } 657 657 ··· 667 667 typedef struct {s32 x; s32 y; s32 x1; s32 y1; tic_color color;} Edge; 668 668 static const Edge Edges[] = 669 669 { 670 - {Width, Round, Width, Height - Round, tic_color_15}, 671 - {Round, Height, Width - Round, Height, tic_color_15}, 672 - {Width - Round, Height, Width, Height - Round, tic_color_15}, 673 - {Width - Round, 0, Width, Round, tic_color_15}, 674 - {0, Height - Round, Round, Height, tic_color_15}, 675 - {Round, 0, Width - Round, 0, tic_color_13}, 676 - {0, Round, 0, Height - Round, tic_color_13}, 677 - {0, Round, Round, 0, tic_color_12}, 670 + {Width, Round, Width, Height - Round, tic_color_dark_grey}, 671 + {Round, Height, Width - Round, Height, tic_color_dark_grey}, 672 + {Width - Round, Height, Width, Height - Round, tic_color_dark_grey}, 673 + {Width - Round, 0, Width, Round, tic_color_dark_grey}, 674 + {0, Height - Round, Round, Height, tic_color_dark_grey}, 675 + {Round, 0, Width - Round, 0, tic_color_light_grey}, 676 + {0, Round, 0, Height - Round, tic_color_light_grey}, 677 + {0, Round, Round, 0, tic_color_white}, 678 678 }; 679 679 680 680 for(const Edge* edge = Edges; edge < Edges + COUNT_OF(Edges); edge++) ··· 688 688 tic_sample* effect = getEffect(sfx); 689 689 tic_waveform* wave = getWaveformById(sfx, effect->data[0].wave); 690 690 691 - drawPanelBorder(tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_5); 691 + drawPanelBorder(tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_light_green); 692 692 693 693 if(sfx->play.active) 694 694 { 695 695 for(s32 i = 0; i < WAVE_VALUES; i++) 696 696 { 697 697 s32 amp = calcWaveAnimation(tic, i + sfx->play.tick, 0) / WAVE_MAX_VALUE; 698 - tic_api_rect(tic, rect.x + i*Scale, rect.y + (MaxValue - amp) * Scale, Scale, Scale, tic_color_7); 698 + tic_api_rect(tic, rect.x + i*Scale, rect.y + (MaxValue - amp) * Scale, Scale, Scale, tic_color_dark_green); 699 699 } 700 700 } 701 701 else ··· 711 711 712 712 enum {Border = 1}; 713 713 tic_api_rectb(tic, rect.x + cx*Scale - Border, 714 - rect.y + (MaxValue - cy) * Scale - Border, Scale + Border*2, Scale + Border*2, tic_color_7); 714 + rect.y + (MaxValue - cy) * Scale - Border, Scale + Border*2, Scale + Border*2, tic_color_dark_green); 715 715 716 716 if(checkMouseDown(&rect, tic_mouse_left)) 717 717 { ··· 726 726 for(s32 i = 0; i < WAVE_VALUES; i++) 727 727 { 728 728 s32 value = tic_tool_peek4(wave->data, i); 729 - tic_api_rect(tic, rect.x + i*Scale, rect.y + (MaxValue - value) * Scale, Scale, Scale, tic_color_7); 729 + tic_api_rect(tic, rect.x + i*Scale, rect.y + (MaxValue - value) * Scale, Scale, Scale, tic_color_dark_green); 730 730 } 731 731 } 732 732 733 733 // draw flare 734 734 { 735 - tic_api_rect(tic, rect.x + 59, rect.y + 2, 4, 1, tic_color_12); 736 - tic_api_rect(tic, rect.x + 62, rect.y + 2, 1, 3, tic_color_12); 735 + tic_api_rect(tic, rect.x + 59, rect.y + 2, 4, 1, tic_color_white); 736 + tic_api_rect(tic, rect.x + 62, rect.y + 2, 1, 3, tic_color_white); 737 737 } 738 738 } 739 739 ··· 814 814 815 815 bool active = sfx->play.active && effect->octave == octave; 816 816 817 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_15); 817 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_dark_grey); 818 818 819 819 for(s32 i = 0; i < COUNT_OF(Buttons); i++) 820 820 { 821 821 const PianoBtn* btn = Buttons + i; 822 822 const tic_rect* rect = &btn->rect; 823 823 tic_api_rect(tic, x + rect->x, y + rect->y, rect->w, rect->h, 824 - active && effect->note == btn->note ? tic_color_2 : 824 + active && effect->note == btn->note ? tic_color_red : 825 825 btn->white 826 - ? hover == btn->note ? tic_color_13 : tic_color_12 827 - : hover == btn->note ? tic_color_15 : tic_color_0); 826 + ? hover == btn->note ? tic_color_light_grey : tic_color_white 827 + : hover == btn->note ? tic_color_dark_grey : tic_color_black); 828 828 829 829 if(btn->white) 830 - tic_api_rect(tic, x + rect->x, y + (WhiteHeight - WhiteShadow), WhiteWidth, WhiteShadow, tic_color_0); 830 + tic_api_rect(tic, x + rect->x, y + (WhiteHeight - WhiteShadow), WhiteWidth, WhiteShadow, tic_color_black); 831 831 832 832 // draw current note marker 833 833 if(effect->octave == octave && effect->note == btn->note) 834 - tic_api_rect(tic, x + rect->x + 1, y + rect->y + rect->h - 3, 1, 1, tic_color_2); 834 + tic_api_rect(tic, x + rect->x + 1, y + rect->y + rect->h - 3, 1, 1, tic_color_red); 835 835 } 836 836 } 837 837 ··· 878 878 } 879 879 } 880 880 881 - tic_api_print(tic, "SPD", x, y, tic_color_15, true, 1, true); 881 + tic_api_print(tic, "SPD", x, y, tic_color_dark_grey, true, 1, true); 882 882 883 883 for(s32 i = 0; i < Count; i++) 884 - tic_api_rect(tic, rect.x + i * ColWidthGap, rect.y, ColWidth, rect.h, i - MaxSpeed <= effect->speed ? tic_color_5 : hover == i ? tic_color_14 : tic_color_15); 884 + tic_api_rect(tic, rect.x + i * ColWidthGap, rect.y, ColWidth, rect.h, i - MaxSpeed <= effect->speed ? tic_color_light_green : hover == i ? tic_color_grey : tic_color_dark_grey); 885 885 } 886 886 887 887 static void drawSelectorPanel(Sfx* sfx, s32 x, s32 y) ··· 929 929 bool empty = memcmp(sfx->src->samples.data + i, EmptyEffect, sizeof EmptyEffect) == 0; 930 930 931 931 tic_api_rect(tic, x + c * SizeGap + g * (GroupWidth + GroupGap), y + r * SizeGap, Size, Size, 932 - sfx->index == i ? tic_color_5 : hover == i ? tic_color_14 : empty ? tic_color_15 : tic_color_13); 932 + sfx->index == i ? tic_color_light_green : hover == i ? tic_color_grey : empty ? tic_color_dark_grey : tic_color_light_grey); 933 933 } 934 934 } 935 935 ··· 939 939 940 940 enum {Width = 70, Height = 25}; 941 941 942 - drawPanelBorder(tic, x, y, Width, Height, tic_color_0); 942 + drawPanelBorder(tic, x, y, Width, Height, tic_color_black); 943 943 944 944 { 945 945 char buf[] = "00"; 946 946 sprintf(buf, "%02i", sfx->index); 947 - tic_api_print(tic, buf, x + 20, y + 2, tic_color_5, true, 1, true); 948 - tic_api_print(tic, "IDX", x + 6, y + 2, tic_color_15, true, 1, true); 947 + tic_api_print(tic, buf, x + 20, y + 2, tic_color_light_green, true, 1, true); 948 + tic_api_print(tic, "IDX", x + 6, y + 2, tic_color_dark_grey, true, 1, true); 949 949 } 950 950 951 951 drawSpeedPanel(sfx, x + 40, y + 2); ··· 962 962 processKeyboard(sfx); 963 963 processEnvelopesKeyboard(sfx); 964 964 965 - tic_api_cls(tic, tic_color_14); 965 + tic_api_cls(tic, tic_color_grey); 966 966 967 967 drawCanvas(sfx, 88, 12, sfx->volwave); 968 968 drawCanvas(sfx, 88, 51, SFX_CHORD_PANEL);
+84 -84
src/studio/editors/sprite.c
··· 42 42 // !TODO: move it to helpers place 43 43 static void drawPanelBorder(tic_mem* tic, s32 x, s32 y, s32 w, s32 h) 44 44 { 45 - tic_api_rect(tic, x, y-1, w, 1, tic_color_15); 46 - tic_api_rect(tic, x-1, y, 1, h, tic_color_15); 47 - tic_api_rect(tic, x, y+h, w, 1, tic_color_13); 48 - tic_api_rect(tic, x+w, y, 1, h, tic_color_13); 45 + tic_api_rect(tic, x, y-1, w, 1, tic_color_dark_grey); 46 + tic_api_rect(tic, x-1, y, 1, h, tic_color_dark_grey); 47 + tic_api_rect(tic, x, y+h, w, 1, tic_color_light_grey); 48 + tic_api_rect(tic, x+w, y, 1, h, tic_color_light_grey); 49 49 } 50 50 51 51 static void clearCanvasSelection(Sprite* sprite) ··· 118 118 tic_mem* tic = sprite->tic; 119 119 120 120 enum{Step = 3}; 121 - u8 color = tic_color_12; 121 + u8 color = tic_color_white; 122 122 123 123 s32 index = sprite->tickCounter / 10; 124 124 for(s32 i = x; i < (x+w); i++) { tic_api_pix(tic, i, y, index++ % Step ? color : 0, false);} index++; ··· 139 139 { 140 140 tic_mem* tic = sprite->tic; 141 141 142 - tic_api_rectb(tic, x, y, w, h, tic_color_0); 143 - tic_api_rectb(tic, x-1, y-1, w+2, h+2, tic_color_12); 142 + tic_api_rectb(tic, x, y, w, h, tic_color_black); 143 + tic_api_rectb(tic, x-1, y-1, w+2, h+2, tic_color_white); 144 144 } 145 145 146 146 static void processPickerCanvasMouse(Sprite* sprite, s32 x, s32 y, s32 sx, s32 sy) ··· 409 409 } 410 410 } 411 411 412 - tic_api_rect(tic, x+1, y, Size-2, Size*Count, tic_color_0); 412 + tic_api_rect(tic, x+1, y, Size-2, Size*Count, tic_color_black); 413 413 414 414 for(s32 i = 0; i < Count; i++) 415 415 { 416 416 s32 offset = y + i*(Size+1); 417 417 418 - tic_api_rect(tic, x, offset, Size, Size, tic_color_0); 419 - tic_api_rect(tic, x + 6, offset + 2, Count - i, 1, tic_color_0); 418 + tic_api_rect(tic, x, offset, Size, Size, tic_color_black); 419 + tic_api_rect(tic, x + 6, offset + 2, Count - i, 1, tic_color_black); 420 420 } 421 421 422 - tic_api_rect(tic, x+2, y+1, 1, Size*Count+1, (over ? tic_color_12 : tic_color_14)); 422 + tic_api_rect(tic, x+2, y+1, 1, Size*Count+1, (over ? tic_color_white : tic_color_grey)); 423 423 424 424 s32 offset = y + (Count - sprite->brushSize)*(Size+1); 425 - tic_api_rect(tic, x, offset, Size, Size, tic_color_0); 426 - tic_api_rect(tic, x+1, offset+1, Size-2, Size-2, (over ? tic_color_12 : tic_color_14)); 425 + tic_api_rect(tic, x, offset, Size, Size, tic_color_black); 426 + tic_api_rect(tic, x+1, offset+1, Size-2, Size-2, (over ? tic_color_white : tic_color_grey)); 427 427 } 428 428 429 429 static void drawCanvasOvr(Sprite* sprite, s32 x, s32 y) ··· 442 442 } 443 443 444 444 drawPanelBorder(tic, canvasRect.x - 1, canvasRect.y - 1, canvasRect.w + 2, canvasRect.h + 2); 445 - tic_api_rectb(tic, canvasRect.x - 1, canvasRect.y - 1, canvasRect.w + 2, canvasRect.h + 2, tic_color_0); 445 + tic_api_rectb(tic, canvasRect.x - 1, canvasRect.y - 1, canvasRect.w + 2, canvasRect.h + 2, tic_color_black); 446 446 447 447 if(!sprite->palette.edit) 448 448 { ··· 469 469 470 470 s32 ix = x + (CANVAS_SIZE - 5*TIC_FONT_WIDTH)/2; 471 471 s32 iy = TIC_SPRITESIZE + 2; 472 - tic_api_print(tic, buf, ix, iy+1, tic_color_0, true, 1, false); 473 - tic_api_print(tic, buf, ix, iy, tic_color_12, true, 1, false); 472 + tic_api_print(tic, buf, ix, iy+1, tic_color_black, true, 1, false); 473 + tic_api_print(tic, buf, ix, iy, tic_color_white, true, 1, false); 474 474 } 475 475 } 476 476 ··· 709 709 } 710 710 } 711 711 712 - tic_api_rect(tic, rect.x, rect.y, Size, Size, tic_color_0); 712 + tic_api_rect(tic, rect.x, rect.y, Size, Size, tic_color_black); 713 713 714 714 u8 flagColor = i + 2; 715 715 ··· 721 721 if(and & mask) 722 722 { 723 723 tic_api_rect(tic, rect.x + 1, rect.y + 1, Size - 2, Size - 2, flagColor); 724 - tic_api_pix(tic, rect.x + 3, rect.y + 1, tic_color_12, false); 724 + tic_api_pix(tic, rect.x + 3, rect.y + 1, tic_color_white, false); 725 725 } 726 726 727 - tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x + (Size+2), rect.y, tic_color_13, false, 1, true); 727 + tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x + (Size+2), rect.y, tic_color_light_grey, false, 1, true); 728 728 } 729 729 } 730 730 ··· 742 742 static void drawBitMode(Sprite* sprite, s32 x, s32 y, s32 w, s32 h) 743 743 { 744 744 tic_mem* tic = sprite->tic; 745 - s32 label_w = tic_api_print(tic, "BPP :", x+2, y, tic_color_15, false, 1, true); 745 + s32 label_w = tic_api_print(tic, "BPP :", x+2, y, tic_color_dark_grey, false, 1, true); 746 746 x += label_w+4; 747 747 w -= label_w+4; 748 748 ··· 774 774 } 775 775 } 776 776 777 - u8 label_color = current ? tic_color_12 : tic_color_15; 777 + u8 label_color = current ? tic_color_white : tic_color_dark_grey; 778 778 779 - tic_api_rect(tic, rect.x, rect.y, SizeX, SizeY, tic_color_15); 779 + tic_api_rect(tic, rect.x, rect.y, SizeX, SizeY, tic_color_dark_grey); 780 780 if (current) { 781 - tic_api_rect(tic, rect.x+1, rect.y+1, SizeX-2, SizeY-2, tic_color_4-i); 782 - tic_api_pix(tic, rect.x+3, rect.y+1,tic_color_12, false); 781 + tic_api_rect(tic, rect.x+1, rect.y+1, SizeX-2, SizeY-2, tic_color_yellow-i); 782 + tic_api_pix(tic, rect.x+3, rect.y+1,tic_color_white, false); 783 783 } 784 784 else if (over) 785 - tic_api_rect(tic, rect.x+1, rect.y+1, SizeX-2, SizeY-2, tic_color_13); 785 + tic_api_rect(tic, rect.x+1, rect.y+1, SizeX-2, SizeY-2, tic_color_light_grey); 786 786 787 787 tic_api_print(tic, (char[]){'0' + mode, '\0'}, rect.x - 4, rect.y, label_color, false, 1, true); 788 788 } ··· 859 859 Func[i](sprite); 860 860 } 861 861 862 - drawBitIcon(Rects[i].x, Rects[i].y+1, Icons + i*8, down ? tic_color_12 : tic_color_0); 862 + drawBitIcon(Rects[i].x, Rects[i].y+1, Icons + i*8, down ? tic_color_white : tic_color_black); 863 863 864 - if(!down) drawBitIcon(Rects[i].x, Rects[i].y, Icons + i*8, tic_color_12); 864 + if(!down) drawBitIcon(Rects[i].x, Rects[i].y, Icons + i*8, tic_color_white); 865 865 } 866 866 } 867 867 } ··· 898 898 } 899 899 } 900 900 901 - tic_api_rect(tic, x, y+1, Size, 1, tic_color_0); 902 - tic_api_rect(tic, x, y, Size, 1, tic_color_12); 901 + tic_api_rect(tic, x, y+1, Size, 1, tic_color_black); 902 + tic_api_rect(tic, x, y, Size, 1, tic_color_white); 903 903 904 904 { 905 905 s32 offset = x + *value * (Size-1) / Max - 1; 906 - drawBitIcon(offset, y, Icon, tic_color_0); 907 - drawBitIcon(offset, y-1, Icon, tic_color_12); 906 + drawBitIcon(offset, y, Icon, tic_color_black); 907 + drawBitIcon(offset, y-1, Icon, tic_color_white); 908 908 } 909 909 910 910 { 911 911 char buf[] = "FF"; 912 912 sprintf(buf, "%02X", *value); 913 - tic_api_print(tic, buf, x - 18, y - 2, tic_color_13, true, 1, false); 913 + tic_api_print(tic, buf, x - 18, y - 2, tic_color_light_grey, true, 1, false); 914 914 } 915 915 } 916 916 ··· 943 943 944 944 if(down) 945 945 { 946 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_12); 946 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_white); 947 947 } 948 948 else 949 949 { 950 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_0); 951 - drawBitIcon(rect.x, rect.y, Icon, tic_color_12); 950 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_black); 951 + drawBitIcon(rect.x, rect.y, Icon, tic_color_white); 952 952 } 953 953 } 954 954 ··· 981 981 982 982 if(down) 983 983 { 984 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_12); 984 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_white); 985 985 } 986 986 else 987 987 { 988 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_0); 989 - drawBitIcon(rect.x, rect.y, Icon, tic_color_12); 988 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_black); 989 + drawBitIcon(rect.x, rect.y, Icon, tic_color_white); 990 990 } 991 991 } 992 992 } ··· 1035 1035 1036 1036 if(down) 1037 1037 { 1038 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_13); 1038 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_light_grey); 1039 1039 } 1040 1040 else 1041 1041 { 1042 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_0); 1043 - drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_13 : tic_color_12)); 1042 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_black); 1043 + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_grey : tic_color_white)); 1044 1044 } 1045 1045 } 1046 1046 ··· 1080 1080 1081 1081 if(down) 1082 1082 { 1083 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_13); 1083 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_light_grey); 1084 1084 } 1085 1085 else 1086 1086 { 1087 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_0); 1088 - drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_13 : tic_color_12)); 1087 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_black); 1088 + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_grey : tic_color_white)); 1089 1089 } 1090 1090 } 1091 1091 } ··· 1154 1154 for(s32 col = 0; col < palette.cols; col++) 1155 1155 { 1156 1156 tic_api_rectb(tic, x + col * palette.cell_w - Gap, y + row * palette.cell_h - Gap, 1157 - palette.cell_w + Gap, palette.cell_h + Gap, tic_color_0); 1157 + palette.cell_w + Gap, palette.cell_h + Gap, tic_color_black); 1158 1158 } 1159 1159 1160 1160 { 1161 1161 s32 offsetX = x + (sprite->color % PALETTE_COLS) * palette.cell_w; 1162 1162 s32 offsetY = y + (sprite->color / PALETTE_COLS) * palette.cell_h; 1163 - tic_api_rectb(tic, offsetX - 1, offsetY - 1, palette.cell_w + 1, palette.cell_h + 1, tic_color_12); 1163 + tic_api_rectb(tic, offsetX - 1, offsetY - 1, palette.cell_w + 1, palette.cell_h + 1, tic_color_white); 1164 1164 } 1165 1165 1166 1166 { ··· 1168 1168 s32 offsetY = y + (sprite->color2 / PALETTE_COLS) * palette.cell_h; 1169 1169 1170 1170 for(u8 i=0; i<palette.cell_w+1;i+=2) { 1171 - tic_api_pix(tic, offsetX+i-1, offsetY-1, tic_color_12, false); 1172 - tic_api_pix(tic, offsetX+i-1, offsetY + palette.cell_h-1, tic_color_12, false); 1171 + tic_api_pix(tic, offsetX+i-1, offsetY-1, tic_color_white, false); 1172 + tic_api_pix(tic, offsetX+i-1, offsetY + palette.cell_h-1, tic_color_white, false); 1173 1173 } 1174 1174 1175 1175 for(u8 i=0; i<palette.cell_h+1;i+=2) { 1176 - tic_api_pix(tic, offsetX-1, offsetY+i-1, tic_color_12, false); 1177 - tic_api_pix(tic, offsetX+palette.cell_w-1, offsetY + i-1, tic_color_12, false); 1176 + tic_api_pix(tic, offsetX-1, offsetY+i-1, tic_color_white, false); 1177 + tic_api_pix(tic, offsetX+palette.cell_w-1, offsetY + i-1, tic_color_white, false); 1178 1178 } 1179 1179 } 1180 1180 ··· 1201 1201 { 1202 1202 static const char* Label = "SCN"; 1203 1203 if(!sprite->palette.ovr) 1204 - tic_api_print(tic, Label, rect.x, rect.y + 1, tic_color_0, false, 1, true); 1204 + tic_api_print(tic, Label, rect.x, rect.y + 1, tic_color_black, false, 1, true); 1205 1205 1206 - tic_api_print(tic, Label, rect.x, rect.y, sprite->palette.ovr ? tic_color_15 : tic_color_12, false, 1, true); 1206 + tic_api_print(tic, Label, rect.x, rect.y, sprite->palette.ovr ? tic_color_dark_grey : tic_color_white, false, 1, true); 1207 1207 } 1208 1208 } 1209 1209 ··· 1230 1230 { 1231 1231 static const char* Label = "OVR"; 1232 1232 if(sprite->palette.ovr) 1233 - tic_api_print(tic, Label, rect.x, rect.y + 1, tic_color_0, false, 1, true); 1233 + tic_api_print(tic, Label, rect.x, rect.y + 1, tic_color_black, false, 1, true); 1234 1234 1235 - tic_api_print(tic, Label, rect.x, rect.y, sprite->palette.ovr ? tic_color_12 : tic_color_15, false, 1, true); 1235 + tic_api_print(tic, Label, rect.x, rect.y, sprite->palette.ovr ? tic_color_white : tic_color_dark_grey, false, 1, true); 1236 1236 } 1237 1237 } 1238 1238 ··· 1270 1270 1271 1271 if(sprite->palette.edit || down) 1272 1272 { 1273 - drawBitIcon(rect.x, rect.y+1, Icon, (over ? tic_color_13 : tic_color_12)); 1273 + drawBitIcon(rect.x, rect.y+1, Icon, (over ? tic_color_light_grey : tic_color_white)); 1274 1274 } 1275 1275 else 1276 1276 { 1277 - drawBitIcon(rect.x, rect.y+1, Icon, tic_color_0); 1278 - drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_13 : tic_color_12)); 1277 + drawBitIcon(rect.x, rect.y+1, Icon, tic_color_black); 1278 + drawBitIcon(rect.x, rect.y, Icon, (over ? tic_color_light_grey : tic_color_white)); 1279 1279 } 1280 1280 } 1281 1281 } ··· 1319 1319 1320 1320 tic_rect rect = {x, y, TIC_SPRITESHEET_SIZE, TIC_SPRITESHEET_SIZE}; 1321 1321 1322 - tic_api_rectb(tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_12); 1322 + tic_api_rectb(tic, rect.x - 1, rect.y - 1, rect.w + 2, rect.h + 2, tic_color_white); 1323 1323 1324 1324 for(s32 i=1; i<rect.h; i+=4) { 1325 1325 if (sprite->page > 0) { 1326 - tic_api_pix(tic, rect.x-1, rect.y + i, tic_color_0, false); 1327 - tic_api_pix(tic, rect.x-1, rect.y + i + 1, tic_color_0, false); 1326 + tic_api_pix(tic, rect.x-1, rect.y + i, tic_color_black, false); 1327 + tic_api_pix(tic, rect.x-1, rect.y + i + 1, tic_color_black, false); 1328 1328 } 1329 1329 if (sprite->page < sprite->nbPages-1) { 1330 - tic_api_pix(tic, rect.x+rect.w, rect.y + i, tic_color_0, false); 1331 - tic_api_pix(tic, rect.x+rect.w, rect.y + i + 1, tic_color_0, false); 1330 + tic_api_pix(tic, rect.x+rect.w, rect.y + i, tic_color_black, false); 1331 + tic_api_pix(tic, rect.x+rect.w, rect.y + i + 1, tic_color_black, false); 1332 1332 } 1333 1333 } 1334 1334 ··· 1346 1346 s32 bx = sprite->x*TIC_SPRITESIZE + x - 1; 1347 1347 s32 by = sprite->y*TIC_SPRITESIZE + y - 1; 1348 1348 1349 - tic_api_rectb(tic, bx, by, sprite->size + 2, sprite->size + 2, tic_color_12); 1349 + tic_api_rectb(tic, bx, by, sprite->size + 2, sprite->size + 2, tic_color_white); 1350 1350 } 1351 1351 1352 1352 static void drawSheet(Sprite* sprite, s32 x, s32 y) ··· 1514 1514 1515 1515 if(pushed) 1516 1516 { 1517 - drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_13 : tic_color_12)); 1517 + drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_grey : tic_color_white)); 1518 1518 } 1519 1519 else 1520 1520 { 1521 - drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, tic_color_0); 1522 - drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_13 : tic_color_12)); 1521 + drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, tic_color_black); 1522 + drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_grey : tic_color_white)); 1523 1523 } 1524 1524 } 1525 1525 } ··· 1605 1605 0b00000000, 1606 1606 }; 1607 1607 1608 - drawBitIcon(rect.x, y - 4, Icon, tic_color_0); 1609 - drawBitIcon(rect.x, y - 5, Icon, tic_color_12); 1608 + drawBitIcon(rect.x, y - 4, Icon, tic_color_black); 1609 + drawBitIcon(rect.x, y - 5, Icon, tic_color_white); 1610 1610 1611 - drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_13 : tic_color_12)); 1611 + drawBitIcon(rect.x, y + 1, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_grey : tic_color_white)); 1612 1612 } 1613 1613 else 1614 1614 { 1615 - drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, tic_color_0); 1616 - drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_13 : tic_color_12)); 1615 + drawBitIcon(rect.x, y+1, Icons + i*BITS_IN_BYTE, tic_color_black); 1616 + drawBitIcon(rect.x, y, Icons + i*BITS_IN_BYTE, (over ? tic_color_light_grey : tic_color_white)); 1617 1617 } 1618 1618 } 1619 1619 ··· 1720 1720 1721 1721 static void drawTab(tic_mem* tic, s32 x, s32 y, s32 w, s32 h, char* label, bool small_font, bool active, bool over) 1722 1722 { 1723 - u8 tab_color = active ? tic_color_12 : over ? tic_color_13 : tic_color_15; 1724 - u8 label_color = active ? tic_color_0 : tic_color_14; 1723 + u8 tab_color = active ? tic_color_white : over ? tic_color_light_grey : tic_color_dark_grey; 1724 + u8 label_color = active ? tic_color_black : tic_color_grey; 1725 1725 1726 1726 tic_api_rect(tic, x+1, y, w-1, h, tab_color); 1727 1727 tic_api_line(tic, x, y+1, x, y+h-2, tab_color); ··· 1846 1846 { 1847 1847 tic_mem* tic = sprite->tic; 1848 1848 1849 - tic_api_rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_12); 1849 + tic_api_rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_white); 1850 1850 1851 1851 // draw sprite size control 1852 1852 { ··· 1871 1871 } 1872 1872 1873 1873 for(s32 i = 0; i < 4; i++) 1874 - tic_api_rect(tic, rect.x + i*6, 1, 5, 5, tic_color_0); 1874 + tic_api_rect(tic, rect.x + i*6, 1, 5, 5, tic_color_black); 1875 1875 1876 - tic_api_rect(tic, rect.x, 2, 23, 3, tic_color_0); 1877 - tic_api_rect(tic, rect.x+1, 3, 21, 1, tic_color_12); 1876 + tic_api_rect(tic, rect.x, 2, 23, 3, tic_color_black); 1877 + tic_api_rect(tic, rect.x+1, 3, 21, 1, tic_color_white); 1878 1878 1879 1879 s32 size = sprite->size / TIC_SPRITESIZE, val = 0; 1880 1880 while(size >>= 1) val++; 1881 1881 1882 - tic_api_rect(tic, rect.x + val*6, 1, 5, 5, tic_color_0); 1883 - tic_api_rect(tic, rect.x+1 + val*6, 2, 3, 3, tic_color_12); 1882 + tic_api_rect(tic, rect.x + val*6, 1, 5, 5, tic_color_black); 1883 + tic_api_rect(tic, rect.x+1 + val*6, 2, 3, 3, tic_color_white); 1884 1884 } 1885 1885 1886 1886 { ··· 1909 1909 } 1910 1910 } 1911 1911 1912 - if (active) tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_0); 1913 - tic_api_print(tic, (char[]){'0' + page, '\0'}, rect.x+2, rect.y+1, active ? tic_color_12 : tic_color_14, false, 1, true); 1912 + if (active) tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_black); 1913 + tic_api_print(tic, (char[]){'0' + page, '\0'}, rect.x+2, rect.y+1, active ? tic_color_white : tic_color_grey, false, 1, true); 1914 1914 } 1915 1915 } 1916 1916 } ··· 1990 1990 1991 1991 enum {Size = 3, Gap = 1}; 1992 1992 1993 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_0); 1994 - tic_api_rect(tic, rect.x + Gap + (sprite->advanced ? Size : 0), rect.y + Gap, Size, Size, over ? tic_color_13 : tic_color_14); 1993 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_black); 1994 + tic_api_rect(tic, rect.x + Gap + (sprite->advanced ? Size : 0), rect.y + Gap, Size, Size, over ? tic_color_light_grey : tic_color_grey); 1995 1995 } 1996 1996 1997 1997 static void overline(tic_mem* tic, void* data) ··· 2013 2013 Sprite* sprite = (Sprite*)data; 2014 2014 2015 2015 for(const tic_rect* r = bg; r < bg + COUNT_OF(bg); r++) 2016 - tic_api_rect(tic, r->x, r->y, r->w, r->h, tic_color_14); 2016 + tic_api_rect(tic, r->x, r->y, r->w, r->h, tic_color_grey); 2017 2017 2018 2018 drawCanvasOvr(sprite, 24, 20); 2019 2019 drawMoveButtons(sprite);
+5 -5
src/studio/editors/world.c
··· 28 28 static void drawGrid(World* world) 29 29 { 30 30 Map* map = world->map; 31 - u8 color = tic_color_14; 31 + u8 color = tic_color_grey; 32 32 33 33 for(s32 c = 0; c < TIC80_WIDTH; c += TIC_MAP_SCREEN_WIDTH) 34 34 tic_api_line(world->tic, c, 0, c, TIC80_HEIGHT, color); ··· 64 64 s32 x = map->scroll.x / TIC_SPRITESIZE; 65 65 s32 y = map->scroll.y / TIC_SPRITESIZE; 66 66 67 - tic_api_rectb(world->tic, x, y, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_2); 67 + tic_api_rectb(world->tic, x, y, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_red); 68 68 69 69 if(x >= TIC_MAP_WIDTH - TIC_MAP_SCREEN_WIDTH) 70 - tic_api_rectb(world->tic, x - TIC_MAP_WIDTH, y, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_2); 70 + tic_api_rectb(world->tic, x - TIC_MAP_WIDTH, y, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_red); 71 71 72 72 if(y >= TIC_MAP_HEIGHT - TIC_MAP_SCREEN_HEIGHT) 73 - tic_api_rectb(world->tic, x, y - TIC_MAP_HEIGHT, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_2); 73 + tic_api_rectb(world->tic, x, y - TIC_MAP_HEIGHT, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_red); 74 74 75 75 if(x >= TIC_MAP_WIDTH - TIC_MAP_SCREEN_WIDTH && y >= TIC_MAP_HEIGHT - TIC_MAP_SCREEN_HEIGHT) 76 - tic_api_rectb(world->tic, x - TIC_MAP_WIDTH, y - TIC_MAP_HEIGHT, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_2); 76 + tic_api_rectb(world->tic, x - TIC_MAP_WIDTH, y - TIC_MAP_HEIGHT, TIC_MAP_SCREEN_WIDTH+1, TIC_MAP_SCREEN_HEIGHT+1, tic_color_red); 77 77 } 78 78 79 79 static void tick(World* world)
+5 -5
src/studio/screens/console.c
··· 42 42 #include <emscripten.h> 43 43 #endif 44 44 45 - #define CONSOLE_CURSOR_COLOR tic_color_2 46 - #define CONSOLE_BACK_TEXT_COLOR tic_color_14 47 - #define CONSOLE_FRONT_TEXT_COLOR tic_color_12 48 - #define CONSOLE_ERROR_TEXT_COLOR tic_color_2 45 + #define CONSOLE_CURSOR_COLOR tic_color_red 46 + #define CONSOLE_BACK_TEXT_COLOR tic_color_grey 47 + #define CONSOLE_FRONT_TEXT_COLOR tic_color_white 48 + #define CONSOLE_ERROR_TEXT_COLOR tic_color_red 49 49 #define CONSOLE_CURSOR_BLINK_PERIOD TIC80_FRAMERATE 50 50 #define CONSOLE_CURSOR_DELAY (TIC80_FRAMERATE / 2) 51 51 #define CONSOLE_BUFFER_WIDTH (STUDIO_TEXT_BUFFER_WIDTH) ··· 2704 2704 enum{Offset = (2 * STUDIO_TEXT_BUFFER_WIDTH)}; 2705 2705 2706 2706 memcpy(console->buffer + Offset, msg, strlen(msg)); 2707 - memset(console->colorBuffer + Offset, tic_color_2, STUDIO_TEXT_BUFFER_WIDTH); 2707 + memset(console->colorBuffer + Offset, tic_color_red, STUDIO_TEXT_BUFFER_WIDTH); 2708 2708 } 2709 2709 } 2710 2710 break;
+15 -15
src/studio/screens/dialog.c
··· 49 49 50 50 if(down) 51 51 { 52 - tic_api_rect(tic, rect.x, rect.y+1, rect.w, rect.h, tic_color_12); 52 + tic_api_rect(tic, rect.x, rect.y+1, rect.w, rect.h, tic_color_white); 53 53 } 54 54 else 55 55 { 56 - tic_api_rect(tic, rect.x, rect.y+1, rect.w, rect.h, tic_color_0); 57 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_12); 56 + tic_api_rect(tic, rect.x, rect.y+1, rect.w, rect.h, tic_color_black); 57 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_white); 58 58 } 59 59 60 60 s32 size = tic_api_print(tic, label, 0, -TIC_FONT_HEIGHT, 0, false, 1, false); ··· 74 74 0b00000000, 75 75 }; 76 76 77 - drawBitIcon(rect.x-5, rect.y+3, Icon, tic_color_0); 78 - drawBitIcon(rect.x-5, rect.y+2, Icon, tic_color_12); 77 + drawBitIcon(rect.x-5, rect.y+3, Icon, tic_color_black); 78 + drawBitIcon(rect.x-5, rect.y+2, Icon, tic_color_white); 79 79 } 80 80 } 81 81 ··· 154 154 dlg->drag.active = false; 155 155 } 156 156 157 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_15); 158 - tic_api_rectb(tic, rect.x, rect.y, rect.w, rect.h, tic_color_12); 159 - tic_api_line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, tic_color_0); 160 - tic_api_rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, tic_color_12); 161 - tic_api_line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-1), tic_color_12); 157 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_dark_grey); 158 + tic_api_rectb(tic, rect.x, rect.y, rect.w, rect.h, tic_color_white); 159 + tic_api_line(tic, rect.x, rect.y+Height, rect.x+Width-1, rect.y+Height, tic_color_black); 160 + tic_api_rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, tic_color_white); 161 + tic_api_line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+Width-2, rect.y-(TOOLBAR_SIZE-1), tic_color_white); 162 162 163 163 { 164 164 static const char Label[] = "WARNING!"; 165 165 s32 size = tic_api_print(tic, Label, 0, -TIC_FONT_HEIGHT, 0, false, 1, false); 166 - tic_api_print(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-2), tic_color_15, false, 1, false); 166 + tic_api_print(tic, Label, rect.x + (Width - size)/2, rect.y-(TOOLBAR_SIZE-2), tic_color_dark_grey, false, 1, false); 167 167 } 168 168 169 169 { ··· 179 179 180 180 s32 x = rect.x + (Width - size)/2; 181 181 s32 y = rect.y + (TIC_FONT_HEIGHT+1)*(i+1); 182 - tic_api_print(tic, dlg->text[i], x, y+1, tic_color_0, false, 1, false); 183 - tic_api_print(tic, dlg->text[i], x, y, tic_color_12, false, 1, false); 182 + tic_api_print(tic, dlg->text[i], x, y+1, tic_color_black, false, 1, false); 183 + tic_api_print(tic, dlg->text[i], x, y, tic_color_white, false, 1, false); 184 184 } 185 185 } 186 186 187 - drawButton(dlg, "YES", rect.x + (Width/2 - 26), rect.y + 45, tic_color_2, onYes, 0); 188 - drawButton(dlg, "NO", rect.x + (Width/2 + 6), rect.y + 45, tic_color_6, onNo, 1); 187 + drawButton(dlg, "YES", rect.x + (Width/2 - 26), rect.y + 45, tic_color_red, onYes, 0); 188 + drawButton(dlg, "NO", rect.x + (Width/2 + 6), rect.y + 45, tic_color_green, onNo, 1); 189 189 } 190 190 191 191 static void tick(Dialog* dlg)
+32 -32
src/studio/screens/menu.c
··· 116 116 117 117 rect = getRect(menu); 118 118 119 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_15); 120 - tic_api_rectb(tic, rect.x, rect.y, rect.w, rect.h, tic_color_12); 121 - tic_api_line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, tic_color_0); 122 - tic_api_rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, tic_color_12); 123 - tic_api_line(tic, rect.x+1, rect.y-(TOOLBAR_SIZE-1), rect.x+DIALOG_WIDTH-2, rect.y-(TOOLBAR_SIZE-1), tic_color_12); 119 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_dark_grey); 120 + tic_api_rectb(tic, rect.x, rect.y, rect.w, rect.h, tic_color_white); 121 + tic_api_line(tic, rect.x, rect.y+DIALOG_HEIGHT, rect.x+DIALOG_WIDTH-1, rect.y+DIALOG_HEIGHT, tic_color_black); 122 + tic_api_rect(tic, rect.x, rect.y-(TOOLBAR_SIZE-2), rect.w, TOOLBAR_SIZE-2, tic_color_white); 123 + 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); 124 124 125 125 { 126 126 static const char Label[] = "GAME MENU"; 127 127 s32 size = tic_api_print(tic, Label, 0, -TIC_FONT_HEIGHT, 0, false, 1, false); 128 - tic_api_print(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-2), tic_color_15, false, 1, false); 128 + tic_api_print(tic, Label, rect.x + (DIALOG_WIDTH - size)/2, rect.y-(TOOLBAR_SIZE-2), tic_color_dark_grey, false, 1, false); 129 129 } 130 130 131 131 { ··· 156 156 } 157 157 } 158 158 159 - tic_api_rect(tic, x, y-1, Width, Height+1, tic_color_14); 160 - tic_api_pix(tic, x, y+Height-1, tic_color_15, false); 161 - tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_15, false); 159 + tic_api_rect(tic, x, y-1, Width, Height+1, tic_color_grey); 160 + tic_api_pix(tic, x, y+Height-1, tic_color_dark_grey, false); 161 + tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_dark_grey, false); 162 162 163 163 { 164 164 char buf[] = "#1"; 165 165 sprintf(buf, "#%i", id+1); 166 - tic_api_print(tic, buf, x+2, y, (over ? tic_color_12 : tic_color_13), false, 1, false); 166 + tic_api_print(tic, buf, x+2, y, (over ? tic_color_white : tic_color_light_grey), false, 1, false); 167 167 } 168 168 } 169 169 ··· 172 172 enum{Width = 15, Height = 7}; 173 173 tic_mem* tic = menu->tic; 174 174 175 - tic_api_rect(tic, x, y-2, Width, Height+2, tic_color_12); 176 - tic_api_pix(tic, x, y+Height-1, tic_color_0, false); 177 - tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_0, false); 178 - tic_api_rect(tic, x+1, y+Height, Width-2 , 1, tic_color_0); 175 + tic_api_rect(tic, x, y-2, Width, Height+2, tic_color_white); 176 + tic_api_pix(tic, x, y+Height-1, tic_color_black, false); 177 + tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_black, false); 178 + tic_api_rect(tic, x+1, y+Height, Width-2 , 1, tic_color_black); 179 179 180 180 { 181 181 char buf[] = "#1"; 182 182 sprintf(buf, "#%i", id+1); 183 - tic_api_print(tic, buf, x+2, y, tic_color_15, false, 1, false); 183 + tic_api_print(tic, buf, x+2, y, tic_color_dark_grey, false, 1, false); 184 184 } 185 185 } 186 186 ··· 227 227 if(strlen(label) > MaxChars) 228 228 label[MaxChars] = '\0'; 229 229 230 - tic_api_print(tic, label, rect.x+10, rect.y+2, (over ? tic_color_14 : tic_color_15), false, 1, false); 230 + tic_api_print(tic, label, rect.x+10, rect.y+2, (over ? tic_color_grey : tic_color_dark_grey), false, 1, false); 231 231 } 232 232 } 233 233 ··· 236 236 enum{Width = 90, Height = 41, Tabs = TIC_GAMEPADS, TabWidth = 16}; 237 237 tic_mem* tic = menu->tic; 238 238 239 - tic_api_rect(tic, x, y, Width, Height, tic_color_12); 240 - tic_api_pix(tic, x, y, tic_color_8, false); 241 - tic_api_pix(tic, x+Width-1, y, tic_color_8, false); 242 - tic_api_pix(tic, x, y+Height-1, tic_color_0, false); 243 - tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_0, false); 244 - tic_api_rect(tic, x+1, y+Height, Width-2 , 1, tic_color_0); 239 + tic_api_rect(tic, x, y, Width, Height, tic_color_white); 240 + tic_api_pix(tic, x, y, tic_color_dark_blue, false); 241 + tic_api_pix(tic, x+Width-1, y, tic_color_dark_blue, false); 242 + tic_api_pix(tic, x, y+Height-1, tic_color_black, false); 243 + tic_api_pix(tic, x+Width-1, y+Height-1, tic_color_black, false); 244 + tic_api_rect(tic, x+1, y+Height, Width-2 , 1, tic_color_black); 245 245 246 246 for(s32 i = 0; i < Tabs; i++) 247 247 (menu->gamepad.tab == i ? drawTab : drawTabDisabled)(menu, x + 73 - i*TabWidth, y + 43, i); ··· 289 289 290 290 if(down) 291 291 { 292 - tic_api_print(tic, Label, rect.x, rect.y+1, tic_color_13, false, 1, false); 292 + tic_api_print(tic, Label, rect.x, rect.y+1, tic_color_light_grey, false, 1, false); 293 293 } 294 294 else 295 295 { 296 - tic_api_print(tic, Label, rect.x, rect.y+1, tic_color_0, false, 1, false); 297 - tic_api_print(tic, Label, rect.x, rect.y, (over ? tic_color_13 : tic_color_12), false, 1, false); 296 + tic_api_print(tic, Label, rect.x, rect.y+1, tic_color_black, false, 1, false); 297 + tic_api_print(tic, Label, rect.x, rect.y, (over ? tic_color_light_grey : tic_color_white), false, 1, false); 298 298 } 299 299 300 300 { ··· 310 310 0b00000000, 311 311 }; 312 312 313 - drawBitIcon(rect.x-7, rect.y+1, Icon, tic_color_0); 314 - drawBitIcon(rect.x-7, rect.y, Icon, tic_color_12); 313 + drawBitIcon(rect.x-7, rect.y+1, Icon, tic_color_black); 314 + drawBitIcon(rect.x-7, rect.y, Icon, tic_color_white); 315 315 } 316 316 317 317 drawGamepadSetupTabs(menu, dlgRect.x+25, dlgRect.y+4); ··· 358 358 359 359 if(down) 360 360 { 361 - tic_api_print(tic, Rows[i], label.x, label.y+1, tic_color_13, false, 1, false); 361 + tic_api_print(tic, Rows[i], label.x, label.y+1, tic_color_light_grey, false, 1, false); 362 362 } 363 363 else 364 364 { 365 - tic_api_print(tic, Rows[i], label.x, label.y+1, tic_color_0, false, 1, false); 366 - tic_api_print(tic, Rows[i], label.x, label.y, (over ? tic_color_13 : tic_color_12), false, 1, false); 365 + tic_api_print(tic, Rows[i], label.x, label.y+1, tic_color_black, false, 1, false); 366 + tic_api_print(tic, Rows[i], label.x, label.y, (over ? tic_color_light_grey : tic_color_white), false, 1, false); 367 367 } 368 368 369 369 if(i == menu->main.focus) ··· 380 380 0b00000000, 381 381 }; 382 382 383 - drawBitIcon(label.x-7, label.y+1, Icon, tic_color_0); 384 - drawBitIcon(label.x-7, label.y, Icon, tic_color_12); 383 + drawBitIcon(label.x-7, label.y+1, Icon, tic_color_black); 384 + drawBitIcon(label.x-7, label.y, Icon, tic_color_white); 385 385 } 386 386 } 387 387 }
+4 -4
src/studio/screens/start.c
··· 26 26 { 27 27 u8* tile = (u8*)start->tic->ram.tiles.data; 28 28 29 - tic_api_cls(start->tic, tic_color_0); 29 + tic_api_cls(start->tic, tic_color_black); 30 30 31 31 static const u8 Reset[] = {0x0, 0x2, 0x42, 0x00}; 32 32 u8 val = Reset[sizeof(Reset) * (start->ticks % TIC80_FRAMERATE) / TIC80_FRAMERATE]; ··· 38 38 39 39 static void drawHeader(Start* start) 40 40 { 41 - tic_api_print(start->tic, TIC_NAME_FULL, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, tic_color_12, true, 1, false); 42 - tic_api_print(start->tic, TIC_VERSION_LABEL, (sizeof(TIC_NAME_FULL) + 1) * STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, tic_color_14, true, 1, false); 43 - tic_api_print(start->tic, TIC_COPYRIGHT, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT*2, tic_color_14, true, 1, false); 41 + tic_api_print(start->tic, TIC_NAME_FULL, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, tic_color_white, true, 1, false); 42 + tic_api_print(start->tic, TIC_VERSION_LABEL, (sizeof(TIC_NAME_FULL) + 1) * STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT, tic_color_grey, true, 1, false); 43 + tic_api_print(start->tic, TIC_COPYRIGHT, STUDIO_TEXT_WIDTH, STUDIO_TEXT_HEIGHT*2, tic_color_grey, true, 1, false); 44 44 } 45 45 46 46 static void header(Start* start)
+19 -19
src/studio/screens/surf.c
··· 187 187 188 188 enum{Height = MENU_HEIGHT}; 189 189 190 - tic_api_rect(tic, x, y, TIC80_WIDTH, Height, tic_color_14); 191 - tic_api_rect(tic, x, y + Height, TIC80_WIDTH, 1, tic_color_0); 190 + tic_api_rect(tic, x, y, TIC80_WIDTH, Height, tic_color_grey); 191 + tic_api_rect(tic, x, y + Height, TIC80_WIDTH, 1, tic_color_black); 192 192 193 193 { 194 194 static const char Label[] = "TIC-80 SURF"; 195 195 s32 xl = x + MAIN_OFFSET; 196 196 s32 yl = y + (Height - TIC_FONT_HEIGHT)/2; 197 - tic_api_print(tic, Label, xl, yl+1, tic_color_0, true, 1, false); 198 - tic_api_print(tic, Label, xl, yl, tic_color_12, true, 1, false); 197 + tic_api_print(tic, Label, xl, yl+1, tic_color_black, true, 1, false); 198 + tic_api_print(tic, Label, xl, yl, tic_color_white, true, 1, false); 199 199 } 200 200 201 201 enum{Gap = 10, TipX = 150, SelectWidth = 54}; ··· 205 205 tic_api_spr(tic, 12, TipX, y+1, 1, 1, &colorkey, 1, 1, tic_no_flip, tic_no_rotate); 206 206 { 207 207 static const char Label[] = "SELECT"; 208 - tic_api_print(tic, Label, TipX + Gap, y+3, tic_color_0, true, 1, false); 209 - tic_api_print(tic, Label, TipX + Gap, y+2, tic_color_12, true, 1, false); 208 + tic_api_print(tic, Label, TipX + Gap, y+3, tic_color_black, true, 1, false); 209 + tic_api_print(tic, Label, TipX + Gap, y+2, tic_color_white, true, 1, false); 210 210 } 211 211 212 212 tic_api_spr(tic, 13, TipX + SelectWidth, y + 1, 1, 1, &colorkey, 1, 1, tic_no_flip, tic_no_rotate);//&getConfig()->cart->bank0.tiles, 213 213 { 214 214 static const char Label[] = "BACK"; 215 - tic_api_print(tic, Label, TipX + Gap + SelectWidth, y +3, tic_color_0, true, 1, false); 216 - tic_api_print(tic, Label, TipX + Gap + SelectWidth, y +2, tic_color_12, true, 1, false); 215 + tic_api_print(tic, Label, TipX + Gap + SelectWidth, y +3, tic_color_black, true, 1, false); 216 + tic_api_print(tic, Label, TipX + Gap + SelectWidth, y +2, tic_color_white, true, 1, false); 217 217 } 218 218 } 219 219 ··· 223 223 224 224 enum{Height = MENU_HEIGHT}; 225 225 226 - tic_api_rect(tic, x, y, TIC80_WIDTH, Height, tic_color_14); 227 - tic_api_rect(tic, x, y + Height, TIC80_WIDTH, 1, tic_color_0); 226 + tic_api_rect(tic, x, y, TIC80_WIDTH, Height, tic_color_grey); 227 + tic_api_rect(tic, x, y + Height, TIC80_WIDTH, 1, tic_color_black); 228 228 { 229 229 char label[TICNAME_MAX + 1]; 230 230 char dir[TICNAME_MAX]; ··· 233 233 sprintf(label, "/%s", dir); 234 234 s32 xl = x + MAIN_OFFSET; 235 235 s32 yl = y + (Height - TIC_FONT_HEIGHT)/2; 236 - tic_api_print(tic, label, xl, yl+1, tic_color_0, true, 1, false); 237 - tic_api_print(tic, label, xl, yl, tic_color_12, true, 1, false); 236 + tic_api_print(tic, label, xl, yl+1, tic_color_black, true, 1, false); 237 + tic_api_print(tic, label, xl, yl, tic_color_white, true, 1, false); 238 238 } 239 239 240 240 #ifdef CAN_OPEN_URL ··· 249 249 tic_api_spr(tic, 15, TipX + SelectWidth, y + 1, 1, 1, &colorkey, 1, 1, tic_no_flip, tic_no_rotate); 250 250 { 251 251 static const char Label[] = "WEBSITE"; 252 - tic_api_print(tic, Label, TipX + Gap + SelectWidth, y + 3, tic_color_0, true, 1, false); 253 - tic_api_print(tic, Label, TipX + Gap + SelectWidth, y + 2, tic_color_12, true, 1, false); 252 + tic_api_print(tic, Label, TipX + Gap + SelectWidth, y + 3, tic_color_black, true, 1, false); 253 + tic_api_print(tic, Label, TipX + Gap + SelectWidth, y + 2, tic_color_white, true, 1, false); 254 254 } 255 255 } 256 256 #endif ··· 281 281 282 282 enum {Height = MENU_HEIGHT}; 283 283 284 - tic_api_rect(tic, 0, y + (MENU_HEIGHT - AnimVar.menuHeight)/2, TIC80_WIDTH, AnimVar.menuHeight, tic_color_2); 284 + tic_api_rect(tic, 0, y + (MENU_HEIGHT - AnimVar.menuHeight)/2, TIC80_WIDTH, AnimVar.menuHeight, tic_color_red); 285 285 286 286 for(s32 i = 0; i < surf->menu.count; i++) 287 287 { ··· 290 290 s32 ym = Height * i + y - surf->menu.pos*MENU_HEIGHT - (surf->menu.anim * surf->menu.anim_target) + (MENU_HEIGHT - TIC_FONT_HEIGHT)/2; 291 291 292 292 if (ym > (-(TIC_FONT_HEIGHT + 1)) && ym <= TIC80_HEIGHT) { 293 - tic_api_print(tic, name, x + MAIN_OFFSET, ym + 1, tic_color_0, false, 1, false); 294 - tic_api_print(tic, name, x + MAIN_OFFSET, ym, tic_color_12, false, 1, false); 293 + tic_api_print(tic, name, x + MAIN_OFFSET, ym + 1, tic_color_black, false, 1, false); 294 + tic_api_print(tic, name, x + MAIN_OFFSET, ym, tic_color_white, false, 1, false); 295 295 } 296 296 } 297 297 } ··· 838 838 else 839 839 { 840 840 static const char Label[] = "You don't have any files..."; 841 - s32 size = tic_api_print(tic, Label, 0, -TIC_FONT_HEIGHT, tic_color_12, true, 1, false); 842 - tic_api_print(tic, Label, (TIC80_WIDTH - size) / 2, (TIC80_HEIGHT - TIC_FONT_HEIGHT)/2, tic_color_12, true, 1, false); 841 + s32 size = tic_api_print(tic, Label, 0, -TIC_FONT_HEIGHT, tic_color_white, true, 1, false); 842 + tic_api_print(tic, Label, (TIC80_WIDTH - size) / 2, (TIC80_HEIGHT - TIC_FONT_HEIGHT)/2, tic_color_white, true, 1, false); 843 843 } 844 844 } 845 845
+19 -19
src/studio/studio.c
··· 60 60 #endif 61 61 62 62 #define MD5_HASHSIZE 16 63 - #define BG_ANIMATION_COLOR tic_color_15 63 + #define BG_ANIMATION_COLOR tic_color_dark_grey 64 64 65 65 typedef struct 66 66 { ··· 665 665 { 666 666 tic_rect rect = {x + i*Size, y, Size, Size}; 667 667 668 - u8 bgcolor = tic_color_12; 669 - u8 color = tic_color_13; 668 + u8 bgcolor = tic_color_white; 669 + u8 color = tic_color_light_grey; 670 670 671 671 if(checkMousePos(&rect)) 672 672 { 673 673 setCursor(tic_cursor_hand); 674 674 675 - color = tic_color_2 + i; 675 + color = tic_color_red + i; 676 676 showTooltip(Tips[i]); 677 677 678 678 if(checkMouseDown(&rect, tic_mouse_left)) 679 679 { 680 680 bgcolor = color; 681 - color = tic_color_12; 681 + color = tic_color_white; 682 682 } 683 683 else if(checkMouseClick(&rect, tic_mouse_left)) 684 684 { ··· 740 740 741 741 if(impl.bank.show) 742 742 { 743 - drawBitIcon(x, y, Icon, tic_color_2); 743 + drawBitIcon(x, y, Icon, tic_color_red); 744 744 745 745 enum{Size = TOOLBAR_SIZE}; 746 746 ··· 763 763 } 764 764 765 765 if(i == impl.bank.indexes[mode]) 766 - tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_2); 766 + tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_red); 767 767 768 - tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x+1, rect.y+1, i == impl.bank.indexes[mode] ? tic_color_12 : over ? tic_color_2 : tic_color_13, false, 1, false); 768 + tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x+1, rect.y+1, i == impl.bank.indexes[mode] ? tic_color_white : over ? tic_color_red : tic_color_light_grey, false, 1, false); 769 769 770 770 } 771 771 ··· 801 801 } 802 802 } 803 803 804 - drawBitIcon(rect.x, rect.y, PinIcon, impl.bank.chained ? tic_color_2 : over ? tic_color_14 : tic_color_13); 804 + drawBitIcon(rect.x, rect.y, PinIcon, impl.bank.chained ? tic_color_red : over ? tic_color_grey : tic_color_light_grey); 805 805 } 806 806 } 807 807 else 808 808 { 809 - drawBitIcon(x, y, Icon, over ? tic_color_2 : tic_color_13); 809 + drawBitIcon(x, y, Icon, over ? tic_color_red : tic_color_light_grey); 810 810 } 811 811 } 812 812 ··· 815 815 void drawToolbar(tic_mem* tic, bool bg) 816 816 { 817 817 if(bg) 818 - tic_api_rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_12); 818 + tic_api_rect(tic, 0, 0, TIC80_WIDTH, TOOLBAR_SIZE, tic_color_white); 819 819 820 820 static const u8 TabIcon[] = 821 821 { ··· 905 905 906 906 if (mode == i) 907 907 { 908 - drawBitIcon(i * Size, 0, TabIcon, tic_color_14); 909 - drawBitIcon(i * Size, 1, Icons + i * BITS_IN_BYTE, tic_color_0); 908 + drawBitIcon(i * Size, 0, TabIcon, tic_color_grey); 909 + drawBitIcon(i * Size, 1, Icons + i * BITS_IN_BYTE, tic_color_black); 910 910 } 911 911 912 - drawBitIcon(i * Size, 0, Icons + i * BITS_IN_BYTE, mode == i ? tic_color_12 : (over ? tic_color_14 : tic_color_13)); 912 + drawBitIcon(i * Size, 0, Icons + i * BITS_IN_BYTE, mode == i ? tic_color_white : (over ? tic_color_grey : tic_color_light_grey)); 913 913 } 914 914 915 915 if(mode >= 0) drawExtrabar(tic); ··· 935 935 { 936 936 if(strlen(impl.tooltip.text)) 937 937 { 938 - tic_api_print(tic, impl.tooltip.text, TextOffset, 1, tic_color_15, false, 1, false); 938 + tic_api_print(tic, impl.tooltip.text, TextOffset, 1, tic_color_dark_grey, false, 1, false); 939 939 } 940 940 else 941 941 { 942 - tic_api_print(tic, Names[mode], TextOffset, 1, tic_color_14, false, 1, false); 942 + tic_api_print(tic, Names[mode], TextOffset, 1, tic_color_grey, false, 1, false); 943 943 } 944 944 } 945 945 } ··· 1669 1669 if(impl.video.frame % TIC80_FRAMERATE < TIC80_FRAMERATE / 2) 1670 1670 { 1671 1671 const u32* pal = tic_tool_palette_blit(&impl.config->cart.bank0.palette.scn, TIC80_PIXEL_COLOR_RGBA8888); 1672 - drawRecordLabel(pixels, TIC80_WIDTH-24, 8, &pal[tic_color_2]); 1672 + drawRecordLabel(pixels, TIC80_WIDTH-24, 8, &pal[tic_color_red]); 1673 1673 } 1674 1674 1675 1675 impl.video.frame++; ··· 1697 1697 else if(impl.popup.counter >= (POPUP_DUR - Dur)) 1698 1698 anim = (((POPUP_DUR - Dur) - impl.popup.counter) * (TIC_FONT_HEIGHT+1) / Dur); 1699 1699 1700 - tic_api_rect(impl.studio.tic, 0, anim, TIC80_WIDTH, TIC_FONT_HEIGHT+1, tic_color_2); 1700 + tic_api_rect(impl.studio.tic, 0, anim, TIC80_WIDTH, TIC_FONT_HEIGHT+1, tic_color_red); 1701 1701 tic_api_print(impl.studio.tic, impl.popup.message, 1702 1702 (s32)(TIC80_WIDTH - strlen(impl.popup.message)*TIC_FONT_WIDTH)/2, 1703 - anim + 1, tic_color_12, true, 1, false); 1703 + anim + 1, tic_color_white, true, 1, false); 1704 1704 } 1705 1705 } 1706 1706
+1 -1
src/studio/studio.h
··· 45 45 #define STUDIO_TEXT_BUFFER_WIDTH (TIC80_WIDTH / STUDIO_TEXT_WIDTH) 46 46 #define STUDIO_TEXT_BUFFER_HEIGHT (TIC80_HEIGHT / STUDIO_TEXT_HEIGHT) 47 47 48 - #define TIC_COLOR_BG tic_color_0 48 + #define TIC_COLOR_BG tic_color_black 49 49 #define DEFAULT_CHMOD 0755 50 50 51 51 #define CONFIG_TIC "config.tic"
+16 -16
src/tic.h
··· 110 110 111 111 typedef enum 112 112 { 113 - tic_color_0, 114 - tic_color_1, 115 - tic_color_2, 116 - tic_color_3, 117 - tic_color_4, 118 - tic_color_5, 119 - tic_color_6, 120 - tic_color_7, 121 - tic_color_8, 122 - tic_color_9, 123 - tic_color_10, 124 - tic_color_11, 125 - tic_color_12, 126 - tic_color_13, 127 - tic_color_14, 128 - tic_color_15, 113 + tic_color_black, 114 + tic_color_purple, 115 + tic_color_red, 116 + tic_color_orange, 117 + tic_color_yellow, 118 + tic_color_light_green, 119 + tic_color_green, 120 + tic_color_dark_green, 121 + tic_color_dark_blue, 122 + tic_color_blue, 123 + tic_color_light_blue, 124 + tic_color_cyan, 125 + tic_color_white, 126 + tic_color_light_grey, 127 + tic_color_grey, 128 + tic_color_dark_grey, 129 129 } tic_color; 130 130 131 131 typedef enum