this repo has no description
0
fork

Configure Feed

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

more undo

alice 27a7952a 19af980d

+10 -40
+9 -22
src/studio/editors/code.c
··· 113 113 { 114 114 enum {Height = TIC_FONT_HEIGHT + 1, StatusY = TIC80_HEIGHT - TIC_FONT_HEIGHT}; 115 115 116 - { 117 - tic_api_rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, code->status.color); 118 - tic_api_print(code->tic, code->status.line, 0, StatusY, getConfig(code->studio)->theme.code.BG, true, 1, false); 119 - tic_api_print(code->tic, code->status.size, TIC80_WIDTH - (s32)strlen(code->status.size) * TIC_FONT_WIDTH, 120 - StatusY, getConfig(code->studio)->theme.code.BG, true, 1, false); 121 - } 116 + 117 + tic_api_rect(code->tic, 0, TIC80_HEIGHT - Height, TIC80_WIDTH, Height, code->status.color); 118 + tic_api_print(code->tic, code->status.line, 0, StatusY, getConfig(code->studio)->theme.code.BG, true, 1, false); 119 + tic_api_print(code->tic, code->status.size, TIC80_WIDTH - (s32)strlen(code->status.size) * TIC_FONT_WIDTH, 120 + StatusY, getConfig(code->studio)->theme.code.BG, true, 1, false); 121 + 122 122 } 123 123 124 124 static char* getPosByLine(char* ptr, s32 line) ··· 374 374 } 375 375 } 376 376 377 - void codeGetPos(Code* code, s32* x, s32* y) 378 - { 379 - getCursorPosition(code, x, y); 380 - } 381 - 382 - static void setCursorPosition(Code* code, s32 x, s32 y); 383 - static void parseSyntaxColor(Code*); 384 - 385 - void codeSetPos(Code* code, s32 x, s32 y) 386 - { 387 - setCursorPosition(code, x, y); 388 - parseSyntaxColor(code); 389 - code->cursor.delay = 0; 390 - } 391 377 392 378 static s32 getLinesCount(Code* code) 393 379 { ··· 470 456 471 457 code->cursor.delay = TEXT_CURSOR_DELAY; 472 458 459 + sprintf(code->status.line, "line %i/%i col %i", line + 1, getLinesCount(code) + 1, column + 1); 460 + 473 461 { 474 - sprintf(code->status.line, "line %i/%i col %i", line + 1, getLinesCount(code) + 1, column + 1); 475 462 s32 codeLen = strlen(code->src); 476 - sprintf(code->status.size, "size %i/%i", codeLen, MAX_CODE); 463 + sprintf(code->status.size, "size %i/%zu", codeLen, MAX_CODE); 477 464 code->status.color = codeLen > MAX_CODE ? tic_color_red : tic_color_white; 478 465 } 479 466 }
-2
src/studio/editors/code.h
··· 140 140 141 141 void initCode(Code*, Studio* studio); 142 142 void freeCode(Code*); 143 - void codeGetPos(Code*, s32* x, s32* y); 144 - void codeSetPos(Code*, s32 x, s32 y); 145 143 146 144 void trimWhitespace(Code*);
-5
src/studio/screens/console.c
··· 4208 4208 } 4209 4209 else printBack(console, "\n loading cart..."); 4210 4210 } 4211 - 4212 4211 tic_api_cls(tic, TIC_COLOR_BG); 4213 4212 drawConsoleText(console); 4214 4213 ··· 4232 4231 { 4233 4232 if(console->cursor.delay) 4234 4233 console->cursor.delay--; 4235 - 4236 - console->tickCounter++; 4237 - 4238 - if (getStudioMode(console->studio) != TIC_CONSOLE_MODE) return; 4239 4234 4240 4235 drawCursor(console); 4241 4236
+1 -11
src/studio/studio.c
··· 1702 1702 } 1703 1703 #endif 1704 1704 1705 - static u32 getTime() 1706 - { 1707 - return tic_sys_counter_get() * 1000 / tic_sys_freq_get(); 1708 - } 1709 - 1710 - 1711 1705 #if defined(TIC80_PRO) 1712 1706 1713 1707 static void switchBank(Studio* studio, s32 bank) ··· 2380 2374 #endif 2381 2375 2382 2376 free(studio->fs); 2383 - 2384 2377 free(studio); 2385 2378 } 2386 2379 ··· 2611 2604 2612 2605 #if defined(BUILD_EDITORS) 2613 2606 if(args.skip) 2614 - { 2615 - studio->console->tick(studio->console); 2616 - gotoCode(studio); 2617 - } 2607 + setStudioMode(studio, TIC_CONSOLE_MODE); 2618 2608 #endif 2619 2609 2620 2610 return studio;