From 17778092380dc01eddc325040d2124e073d20afd Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Mon, 26 Feb 2018 09:58:02 +0300 Subject: [PATCH] SDL replaced with SDL GPU --- bin/assets/config.tic.dat | 2 +- config.tic | Bin 10869 -> 10805 bytes src/config.c | 11 - src/system.c | 489 +++++++++++++------------------------- src/system.h | 1 - 5 files changed, 162 insertions(+), 341 deletions(-) diff --git a/bin/assets/config.tic.dat b/bin/assets/config.tic.dat index 6d9a994..28079fa 100644 --- a/bin/assets/config.tic.dat +++ b/bin/assets/config.tic.dat @@ -1 +1 @@ -0x78, 0xda, 0xed, 0x59, 0x5d, 0x68, 0x5b, 0xc9, 0x15, 0x1e, 0xe7, 0x67, 0xbb, 0xba, 0x71, 0x33, 0x16, 0x94, 0xa5, 0x3f, 0xdb, 0xe6, 0xa2, 0xee, 0x83, 0x03, 0x36, 0x51, 0x2c, 0x37, 0x2d, 0x06, 0x95, 0x2a, 0xd2, 0x8d, 0xa5, 0xae, 0x2d, 0x19, 0xfd, 0xc4, 0x0d, 0x81, 0x75, 0xb5, 0x8e, 0x6e, 0x22, 0xb0, 0xa5, 0xad, 0x64, 0x6f, 0xd8, 0x14, 0xc3, 0x12, 0x58, 0x50, 0x9f, 0xdc, 0x87, 0x14, 0xaa, 0x27, 0x6d, 0xc9, 0x9b, 0xfb, 0xd2, 0x17, 0xbf, 0x54, 0x50, 0xd3, 0x3e, 0x2e, 0xb4, 0x94, 0xa5, 0xf4, 0xa1, 0x94, 0xbe, 0x94, 0xbe, 0x5e, 0xcf, 0x53, 0x68, 0x58, 0xc8, 0xf4, 0xcc, 0xdc, 0xb9, 0xd2, 0xdc, 0xb9, 0x33, 0xb2, 0x0b, 0xdb, 0x16, 0x8a, 0xe6, 0xe6, 0xf8, 0xcc, 0xcc, 0xb9, 0xe7, 0xcc, 0xcf, 0x77, 0xce, 0xcc, 0x3d, 0xca, 0xcc, 0xc7, 0xaf, 0xa1, 0x57, 0x14, 0x4a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 0xd7, 0xec, 0xc2, 0x62, 0x7a, 0x5e, 0xbc, 0x78, 0xfd, 0xc6, 0x8d, 0x85, 0xb9, 0xd9, 0x9b, 0x99, 0x5b, 0xf0, 0x0a, 0x54, 0xaf, 0xc7, 0x5b, 0xbb, 0xf7, 0x63, 0x7f, 0x20, 0xe4, 0xb2, 0x7c, 0x68, 0x4c, 0x3c, 0x57, 0xe4, 0x23, 0xeb, 0xe4, 0x3c, 0xcf, 0x05, 0xe9, 0xe0, 0x17, 0xc5, 0x73, 0x09, 0x9e, 0x2f, 0xc0, 0x33, 0x7d, 0x71, 0x3a, 0x46, 0xc2, 0xcf, 0xb4, 0xf1, 0xe8, 0x16, 0x2e, 0x82, 0x89, 0xf7, 0xc8, 0x55, 0x72, 0x75, 0xea, 0xea, 0xd4, 0xf9, 0xc6, 0x34, 0x9f, 0x4b, 0xf1, 0x74, 0x70, 0x79, 0xfa, 0x9f, 0x2f, 0x82, 0xcf, 0x2c, 0xd4, 0x7f, 0xf2, 0xeb, 0xdf, 0x7f, 0xf2, 0xf2, 0xf4, 0x8f, 0xbf, 0xfd, 0xc5, 0x03, 0xe7, 0x9b, 0x53, 0x41, 0x3b, 0xe0, 0xd3, 0xa0, 0xf3, 0xa5, 0xe9, 0xd7, 0x0b, 0x6f, 0x2c, 0xa6, 0x17, 0x77, 0xca, 0xdf, 0x2f, 0xbf, 0xbf, 0x92, 0x5e, 0x6c, 0xbd, 0xf1, 0xe7, 0x3b, 0xc5, 0x47, 0x3f, 0x6e, 0xde, 0x3d, 0xf8, 0xd3, 0xc7, 0x07, 0x73, 0xef, 0xff, 0xea, 0x37, 0x3b, 0x47, 0x73, 0x1f, 0x1f, 0xf5, 0x76, 0x3e, 0xfc, 0xe8, 0x6f, 0x7f, 0x79, 0xfb, 0x53, 0xef, 0xaf, 0xff, 0x02, 0x45, 0xb0, 0x13, 0xb5, \ No newline at end of file diff --git a/config.tic b/config.tic index 184f60d7bdfac817f260b5a2049971ef52e7520e..f9a84cf5064af4ca40206bad9c7474824139fea5 100644 GIT binary patch delta 19 acmewwvNdEwyBcHN<_@(9jGH4gWSIb21P5~f delta 79 zcmdlQ@-<{byBg!Z%^hkJ7_Cc-Qx(Eei%K$+6LS=TEAx^wit_U^s}f5x^YgfLbrmwx j6cWo4GZT|?Qn^BdUE{-oBmJCh(-L!vQ#T81C@}#5)`=XT diff --git a/src/config.c b/src/config.c index 7e0af5e..236ef08 100644 --- a/src/config.c +++ b/src/config.c @@ -76,16 +76,6 @@ static void readConfigShowSync(Config* config, lua_State* lua) lua_pop(lua, 1); } -static void readConfigUseVsync(Config* config, lua_State* lua) -{ - lua_getglobal(lua, "USE_VSYNC"); - - if(lua_isboolean(lua, -1)) - config->data.useVsync = lua_toboolean(lua, -1); - - lua_pop(lua, 1); -} - static void readCursorTheme(Config* config, lua_State* lua) { lua_getfield(lua, -1, "CURSOR"); @@ -232,7 +222,6 @@ static void readConfig(Config* config) readConfigCheckNewVersion(config, lua); readConfigNoSound(config, lua); readConfigShowSync(config, lua); - readConfigUseVsync(config, lua); readTheme(config, lua); } diff --git a/src/system.c b/src/system.c index 4355562..56f25ed 100644 --- a/src/system.c +++ b/src/system.c @@ -5,7 +5,6 @@ #include #include #include -#include #include @@ -23,10 +22,7 @@ static struct { Studio* studio; - SDL_Window* window; - SDL_Renderer* renderer; - SDL_Texture* texture; struct { @@ -39,7 +35,7 @@ static struct struct { SDL_Joystick* ports[TIC_GAMEPADS]; - SDL_Texture* texture; + GPU_Image* texture; tic80_gamepads touch; tic80_gamepads joystick; @@ -61,7 +57,7 @@ static struct struct { - SDL_Texture* texture; + GPU_Image* texture; const u8* src; } mouse; @@ -162,56 +158,56 @@ static void updateGamepadParts() platform.gamepad.part.y = (SDL_Point){rect.w - 2*tileSize, 0*tileSize + offset}; } -static void transparentBlit(u32* out, s32 pitch) -{ - const u8* in = platform.studio->tic->ram.vram.screen.data; - const u8* end = in + sizeof(platform.studio->tic->ram.vram.screen); - const u32* pal = tic_palette_blit(&platform.studio->tic->config.palette); - const u32 Delta = (pitch/sizeof *out - TIC80_WIDTH); +// static void transparentBlit(u32* out, s32 pitch) +// { +// const u8* in = platform.studio->tic->ram.vram.screen.data; +// const u8* end = in + sizeof(platform.studio->tic->ram.vram.screen); +// const u32* pal = tic_palette_blit(&platform.studio->tic->config.palette); +// const u32 Delta = (pitch/sizeof *out - TIC80_WIDTH); - s32 col = 0; +// s32 col = 0; - while(in != end) - { - u8 low = *in & 0x0f; - u8 hi = (*in & 0xf0) >> TIC_PALETTE_BPP; - *out++ = low ? (*(pal + low) | 0xff000000) : 0; - *out++ = hi ? (*(pal + hi) | 0xff000000) : 0; - in++; +// while(in != end) +// { +// u8 low = *in & 0x0f; +// u8 hi = (*in & 0xf0) >> TIC_PALETTE_BPP; +// *out++ = low ? (*(pal + low) | 0xff000000) : 0; +// *out++ = hi ? (*(pal + hi) | 0xff000000) : 0; +// in++; - col += BITS_IN_BYTE / TIC_PALETTE_BPP; +// col += BITS_IN_BYTE / TIC_PALETTE_BPP; - if (col == TIC80_WIDTH) - { - col = 0; - out += Delta; - } - } -} +// if (col == TIC80_WIDTH) +// { +// col = 0; +// out += Delta; +// } +// } +// } static void initTouchGamepad() { - if (!platform.renderer) + if (!platform.gpu.screen) return; - platform.studio->tic->api.map(platform.studio->tic, &platform.studio->tic->config.bank0.map, &platform.studio->tic->config.bank0.tiles, 0, 0, TIC_MAP_SCREEN_WIDTH, TIC_MAP_SCREEN_HEIGHT, 0, 0, -1, 1); + // platform.studio->tic->api.map(platform.studio->tic, &platform.studio->tic->config.bank0.map, &platform.studio->tic->config.bank0.tiles, 0, 0, TIC_MAP_SCREEN_WIDTH, TIC_MAP_SCREEN_HEIGHT, 0, 0, -1, 1); - if(!platform.gamepad.texture) - { - platform.gamepad.texture = SDL_CreateTexture(platform.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TEXTURE_SIZE, TEXTURE_SIZE); - SDL_SetTextureBlendMode(platform.gamepad.texture, SDL_BLENDMODE_BLEND); - } + // if(!platform.gamepad.texture) + // { + // platform.gamepad.texture = SDL_CreateTexture(platform.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TEXTURE_SIZE, TEXTURE_SIZE); + // SDL_SetTextureBlendMode(platform.gamepad.texture, SDL_BLENDMODE_BLEND); + // } - { - void* pixels = NULL; - s32 pitch = 0; + // { + // void* pixels = NULL; + // s32 pitch = 0; - SDL_LockTexture(platform.gamepad.texture, NULL, &pixels, &pitch); - transparentBlit(pixels, pitch); - SDL_UnlockTexture(platform.gamepad.texture); - } + // SDL_LockTexture(platform.gamepad.texture, NULL, &pixels, &pitch); + // transparentBlit(pixels, pitch); + // SDL_UnlockTexture(platform.gamepad.texture); + // } - updateGamepadParts(); + // updateGamepadParts(); } static void calcTextureRect(SDL_Rect* rect) @@ -325,49 +321,49 @@ static void processKeyboard() static bool checkTouch(const SDL_Rect* rect, s32* x, s32* y) { - s32 devices = SDL_GetNumTouchDevices(); - s32 width = 0, height = 0; - SDL_GetWindowSize(platform.window, &width, &height); + // s32 devices = SDL_GetNumTouchDevices(); + // s32 width = 0, height = 0; + // SDL_GetWindowSize(platform.window, &width, &height); - for (s32 i = 0; i < devices; i++) - { - SDL_TouchID id = SDL_GetTouchDevice(i); + // for (s32 i = 0; i < devices; i++) + // { + // SDL_TouchID id = SDL_GetTouchDevice(i); - // very strange, but on Android id always == 0 - //if (id) - { - s32 fingers = SDL_GetNumTouchFingers(id); + // // very strange, but on Android id always == 0 + // //if (id) + // { + // s32 fingers = SDL_GetNumTouchFingers(id); - if(fingers) - { - platform.gamepad.counter = 0; + // if(fingers) + // { + // platform.gamepad.counter = 0; - if (!platform.gamepad.show) - { - platform.gamepad.alpha = platform.studio->config()->theme.gamepad.touch.alpha; - SDL_SetTextureAlphaMod(platform.gamepad.texture, platform.gamepad.alpha); - platform.gamepad.show = true; - return false; - } - } + // if (!platform.gamepad.show) + // { + // platform.gamepad.alpha = platform.studio->config()->theme.gamepad.touch.alpha; + // SDL_SetTextureAlphaMod(platform.gamepad.texture, platform.gamepad.alpha); + // platform.gamepad.show = true; + // return false; + // } + // } - for (s32 f = 0; f < fingers; f++) - { - SDL_Finger* finger = SDL_GetTouchFinger(id, f); + // for (s32 f = 0; f < fingers; f++) + // { + // SDL_Finger* finger = SDL_GetTouchFinger(id, f); - if (finger && finger->pressure > 0.0f) - { - SDL_Point point = { (s32)(finger->x * width), (s32)(finger->y * height) }; - if (SDL_PointInRect(&point, rect)) - { - *x = point.x; - *y = point.y; - return true; - } - } - } - } - } + // if (finger && finger->pressure > 0.0f) + // { + // SDL_Point point = { (s32)(finger->x * width), (s32)(finger->y * height) }; + // if (SDL_PointInRect(&point, rect)) + // { + // *x = point.x; + // *y = point.y; + // return true; + // } + // } + // } + // } + // } return false; } @@ -627,63 +623,6 @@ static void pollEvent() processGamepad(); } -static void blitTexture() -{ - tic_mem* tic = platform.studio->tic; - - SDL_Rect rect = {0, 0, 0, 0}; - calcTextureRect(&rect); - - void* pixels = NULL; - s32 pitch = 0; - SDL_LockTexture(platform.texture, NULL, &pixels, &pitch); - - platform.studio->tick(); - - memcpy(pixels, tic->screen, sizeof tic->screen); - - SDL_UnlockTexture(platform.texture); - - { - enum {Header = OFFSET_TOP}; - SDL_Rect srcRect = {0, 0, TIC80_FULLWIDTH, Header}; - SDL_Rect dstRect = {0}; - SDL_GetWindowSize(platform.window, &dstRect.w, &dstRect.h); - dstRect.h = rect.y; - SDL_RenderCopy(platform.renderer, platform.texture, &srcRect, &dstRect); - } - - { - enum {Header = OFFSET_TOP}; - SDL_Rect srcRect = {0, TIC80_FULLHEIGHT - Header, TIC80_FULLWIDTH, Header}; - SDL_Rect dstRect = {0}; - SDL_GetWindowSize(platform.window, &dstRect.w, &dstRect.h); - dstRect.y = rect.y + rect.h; - dstRect.h = rect.y; - SDL_RenderCopy(platform.renderer, platform.texture, &srcRect, &dstRect); - } - - { - enum {Header = OFFSET_TOP}; - enum {Left = OFFSET_LEFT}; - SDL_Rect srcRect = {0, Header, Left, TIC80_HEIGHT}; - SDL_Rect dstRect = {0}; - SDL_GetWindowSize(platform.window, &dstRect.w, &dstRect.h); - dstRect.y = rect.y; - dstRect.h = rect.h; - SDL_RenderCopy(platform.renderer, platform.texture, &srcRect, &dstRect); - } - - { - enum {Top = OFFSET_TOP}; - enum {Left = OFFSET_LEFT}; - - SDL_Rect srcRect = {Left, Top, TIC80_WIDTH, TIC80_HEIGHT}; - - SDL_RenderCopy(platform.renderer, platform.texture, &srcRect, &rect); - } -} - static void blitGpuTexture(GPU_Target* screen, GPU_Image* texture) { SDL_Rect rect = {0, 0, 0, 0}; @@ -736,110 +675,104 @@ static void blitSound() static void renderGamepad() { - // TODO: uncomment this - return; + // if(platform.gamepad.show || platform.gamepad.alpha); else return; - if(platform.gamepad.show || platform.gamepad.alpha); else return; + // const s32 tileSize = platform.gamepad.part.size; + // const SDL_Point axis = platform.gamepad.part.axis; + // typedef struct { bool press; s32 x; s32 y;} Tile; + // const Tile Tiles[] = + // { + // {platform.studio->tic->ram.input.gamepads.first.up, axis.x + 1*tileSize, axis.y + 0*tileSize}, + // {platform.studio->tic->ram.input.gamepads.first.down, axis.x + 1*tileSize, axis.y + 2*tileSize}, + // {platform.studio->tic->ram.input.gamepads.first.left, axis.x + 0*tileSize, axis.y + 1*tileSize}, + // {platform.studio->tic->ram.input.gamepads.first.right, axis.x + 2*tileSize, axis.y + 1*tileSize}, - const s32 tileSize = platform.gamepad.part.size; - const SDL_Point axis = platform.gamepad.part.axis; - typedef struct { bool press; s32 x; s32 y;} Tile; - const Tile Tiles[] = - { - {platform.studio->tic->ram.input.gamepads.first.up, axis.x + 1*tileSize, axis.y + 0*tileSize}, - {platform.studio->tic->ram.input.gamepads.first.down, axis.x + 1*tileSize, axis.y + 2*tileSize}, - {platform.studio->tic->ram.input.gamepads.first.left, axis.x + 0*tileSize, axis.y + 1*tileSize}, - {platform.studio->tic->ram.input.gamepads.first.right, axis.x + 2*tileSize, axis.y + 1*tileSize}, + // {platform.studio->tic->ram.input.gamepads.first.a, platform.gamepad.part.a.x, platform.gamepad.part.a.y}, + // {platform.studio->tic->ram.input.gamepads.first.b, platform.gamepad.part.b.x, platform.gamepad.part.b.y}, + // {platform.studio->tic->ram.input.gamepads.first.x, platform.gamepad.part.x.x, platform.gamepad.part.x.y}, + // {platform.studio->tic->ram.input.gamepads.first.y, platform.gamepad.part.y.x, platform.gamepad.part.y.y}, + // }; - {platform.studio->tic->ram.input.gamepads.first.a, platform.gamepad.part.a.x, platform.gamepad.part.a.y}, - {platform.studio->tic->ram.input.gamepads.first.b, platform.gamepad.part.b.x, platform.gamepad.part.b.y}, - {platform.studio->tic->ram.input.gamepads.first.x, platform.gamepad.part.x.x, platform.gamepad.part.x.y}, - {platform.studio->tic->ram.input.gamepads.first.y, platform.gamepad.part.y.x, platform.gamepad.part.y.y}, - }; + // enum {ButtonsCount = 8}; - enum {ButtonsCount = 8}; + // for(s32 i = 0; i < COUNT_OF(Tiles); i++) + // { + // const Tile* tile = Tiles + i; + // SDL_Rect src = {(tile->press ? ButtonsCount + i : i) * TIC_SPRITESIZE, 0, TIC_SPRITESIZE, TIC_SPRITESIZE}; + // SDL_Rect dest = {tile->x, tile->y, tileSize, tileSize}; - for(s32 i = 0; i < COUNT_OF(Tiles); i++) - { - const Tile* tile = Tiles + i; - SDL_Rect src = {(tile->press ? ButtonsCount + i : i) * TIC_SPRITESIZE, 0, TIC_SPRITESIZE, TIC_SPRITESIZE}; - SDL_Rect dest = {tile->x, tile->y, tileSize, tileSize}; + // SDL_RenderCopy(platform.renderer, platform.gamepad.texture, &src, &dest); + // } - SDL_RenderCopy(platform.renderer, platform.gamepad.texture, &src, &dest); - } + // if(!platform.gamepad.show && platform.gamepad.alpha) + // { + // enum {Step = 3}; - if(!platform.gamepad.show && platform.gamepad.alpha) - { - enum {Step = 3}; + // if(platform.gamepad.alpha - Step >= 0) platform.gamepad.alpha -= Step; + // else platform.gamepad.alpha = 0; - if(platform.gamepad.alpha - Step >= 0) platform.gamepad.alpha -= Step; - else platform.gamepad.alpha = 0; + // SDL_SetTextureAlphaMod(platform.gamepad.texture, platform.gamepad.alpha); + // } - SDL_SetTextureAlphaMod(platform.gamepad.texture, platform.gamepad.alpha); - } + // platform.gamepad.counter = platform.gamepad.touch.data ? 0 : platform.gamepad.counter+1; - platform.gamepad.counter = platform.gamepad.touch.data ? 0 : platform.gamepad.counter+1; - - // wait 5 seconds and hide touch gamepad - if(platform.gamepad.counter >= 5 * TIC_FRAMERATE) - platform.gamepad.show = false; + // // wait 5 seconds and hide touch gamepad + // if(platform.gamepad.counter >= 5 * TIC_FRAMERATE) + // platform.gamepad.show = false; } static void blitCursor(const u8* in) { - if(!platform.mouse.texture) - { - // TODO: uncomment this - return; + // if(!platform.mouse.texture) + // { + // platform.mouse.texture = SDL_CreateTexture(platform.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TIC_SPRITESIZE, TIC_SPRITESIZE); + // SDL_SetTextureBlendMode(platform.mouse.texture, SDL_BLENDMODE_BLEND); + // } - platform.mouse.texture = SDL_CreateTexture(platform.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TIC_SPRITESIZE, TIC_SPRITESIZE); - SDL_SetTextureBlendMode(platform.mouse.texture, SDL_BLENDMODE_BLEND); - } + // if(platform.mouse.src != in) + // { + // platform.mouse.src = in; - if(platform.mouse.src != in) - { - platform.mouse.src = in; + // void* pixels = NULL; + // s32 pitch = 0; + // SDL_LockTexture(platform.mouse.texture, NULL, &pixels, &pitch); - void* pixels = NULL; - s32 pitch = 0; - SDL_LockTexture(platform.mouse.texture, NULL, &pixels, &pitch); + // { + // const u8* end = in + sizeof(tic_tile); + // const u32* pal = tic_palette_blit(&platform.studio->tic->ram.vram.palette); + // u32* out = pixels; - { - const u8* end = in + sizeof(tic_tile); - const u32* pal = tic_palette_blit(&platform.studio->tic->ram.vram.palette); - u32* out = pixels; + // while(in != end) + // { + // u8 low = *in & 0x0f; + // u8 hi = (*in & 0xf0) >> TIC_PALETTE_BPP; + // *out++ = low ? (*(pal + low) | 0xff000000) : 0; + // *out++ = hi ? (*(pal + hi) | 0xff000000) : 0; - while(in != end) - { - u8 low = *in & 0x0f; - u8 hi = (*in & 0xf0) >> TIC_PALETTE_BPP; - *out++ = low ? (*(pal + low) | 0xff000000) : 0; - *out++ = hi ? (*(pal + hi) | 0xff000000) : 0; + // in++; + // } + // } - in++; - } - } + // SDL_UnlockTexture(platform.mouse.texture); + // } - SDL_UnlockTexture(platform.mouse.texture); - } + // SDL_Rect rect = {0, 0, 0, 0}; + // calcTextureRect(&rect); + // s32 scale = rect.w / TIC80_WIDTH; - SDL_Rect rect = {0, 0, 0, 0}; - calcTextureRect(&rect); - s32 scale = rect.w / TIC80_WIDTH; + // SDL_Rect src = {0, 0, TIC_SPRITESIZE, TIC_SPRITESIZE}; + // SDL_Rect dst = {0, 0, TIC_SPRITESIZE * scale, TIC_SPRITESIZE * scale}; - SDL_Rect src = {0, 0, TIC_SPRITESIZE, TIC_SPRITESIZE}; - SDL_Rect dst = {0, 0, TIC_SPRITESIZE * scale, TIC_SPRITESIZE * scale}; + // SDL_GetMouseState(&dst.x, &dst.y); - SDL_GetMouseState(&dst.x, &dst.y); + // if(platform.studio->config()->theme.cursor.pixelPerfect) + // { + // dst.x -= (dst.x - rect.x) % scale; + // dst.y -= (dst.y - rect.y) % scale; + // } - if(platform.studio->config()->theme.cursor.pixelPerfect) - { - dst.x -= (dst.x - rect.x) % scale; - dst.y -= (dst.y - rect.y) % scale; - } - - if(SDL_GetWindowFlags(platform.window) & SDL_WINDOW_MOUSE_FOCUS) - SDL_RenderCopy(platform.renderer, platform.mouse.texture, &src, &dst); + // if(SDL_GetWindowFlags(platform.window) & SDL_WINDOW_MOUSE_FOCUS) + // SDL_RenderCopy(platform.renderer, platform.mouse.texture, &src, &dst); } static void renderCursor() @@ -904,29 +837,6 @@ static void renderCursor() // } } -static void tick() -{ - pollEvent(); - - if(platform.studio->quit) - { -#if defined __EMSCRIPTEN__ - emscripten_cancel_main_loop(); -#endif - return; - } - - SDL_RenderClear(platform.renderer); - - blitTexture(); - renderCursor(); - renderGamepad(); - - SDL_RenderPresent(platform.renderer); - - blitSound(); -} - static const char* getAppFolder() { static char appFolder[FILENAME_MAX]; @@ -1072,6 +982,14 @@ static void gpuTick() pollEvent(); + if(platform.studio->quit) + { +#if defined __EMSCRIPTEN__ + emscripten_cancel_main_loop(); +#endif + return; + } + GPU_Clear(platform.gpu.screen); { @@ -1201,8 +1119,6 @@ u32 load_shader_program() } } -#include - static s32 start(s32 argc, char **argv, const char* folder) { SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK); @@ -1275,97 +1191,14 @@ static s32 start(s32 argc, char **argv, const char* folder) GPU_FreeShaderProgram(platform.gpu.crt_shader); GPU_FreeImage(platform.gpu.texture); - GPU_Quit(); - return 0; -} - -static s32 start2(s32 argc, char **argv, const char* folder) -{ - SDL_SetHint(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, "1"); - SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); - - SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK); - - initSound(); - - platform.net = createNet(); - - platform.window = SDL_CreateWindow( TIC_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - (TIC80_FULLWIDTH) * STUDIO_UI_SCALE, - (TIC80_FULLHEIGHT) * STUDIO_UI_SCALE, - SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE -#if defined(__CHIP__) - | SDL_WINDOW_FULLSCREEN_DESKTOP -#endif - ); - - platform.studio = studioInit(argc, argv, platform.audio.spec.freq, folder, &systemInterface); - - // set the window icon before renderer is created (issues on Linux) - setWindowIcon(); - - platform.renderer = SDL_CreateRenderer(platform.window, -1, -#if defined(__CHIP__) - SDL_RENDERER_SOFTWARE -#else - SDL_RENDERER_ACCELERATED | (platform.studio->config()->useVsync ? SDL_RENDERER_PRESENTVSYNC : 0) -#endif - ); - - platform.texture = SDL_CreateTexture(platform.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TEXTURE_SIZE, TEXTURE_SIZE); - - initTouchGamepad(); - -#if defined(__EMSCRIPTEN__) - - emscripten_set_main_loop(platform.studio->config()->useVsync ? tick : emstick, 0, 1); - -#else - { - u64 nextTick = SDL_GetPerformanceCounter(); - const u64 Delta = SDL_GetPerformanceFrequency() / TIC_FRAMERATE; - - while (!platform.studio->quit) - { - platform.missedFrame = false; - - nextTick += Delta; - - tick(); - - { - s64 delay = nextTick - SDL_GetPerformanceCounter(); - - if(delay < 0) - { - nextTick -= delay; - platform.missedFrame = true; - } - else SDL_Delay((u32)(delay * 1000 / SDL_GetPerformanceFrequency())); - } - } - } - -#endif - - platform.studio->close(); - - closeNet(platform.net); - - if(platform.audio.cvt.buf) - SDL_free(platform.audio.cvt.buf); + if(platform.gamepad.texture) + GPU_FreeImage(platform.gamepad.texture); if(platform.mouse.texture) - SDL_DestroyTexture(platform.mouse.texture); + GPU_FreeImage(platform.mouse.texture); - SDL_DestroyTexture(platform.gamepad.texture); - - SDL_DestroyTexture(platform.texture); - SDL_DestroyRenderer(platform.renderer); - SDL_DestroyWindow(platform.window); - - SDL_CloseAudioDevice(platform.audio.device); + GPU_Quit(); return 0; } diff --git a/src/system.h b/src/system.h index 2e4c837..6e56ad7 100644 --- a/src/system.h +++ b/src/system.h @@ -66,7 +66,6 @@ typedef struct bool checkNewVersion; bool noSound; - bool useVsync; bool showSync; } StudioConfig;