diff --git a/TODO.txt b/TODO.txt index 1445830..bed7bba 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,6 +2,8 @@ fuck issue trackers :D =========== GENERAL ============== +- stop playing engine sound when replay finishes +- LCR_SETTING_TEXTURE_SUBSAMPLE = 0 should turn off texturing completely - maybe address the jerky rotations? or not? - add (digital) controller support to SDL and CSFML? - frontends: @@ -15,6 +17,7 @@ fuck issue trackers :D - linux framebuffer? - make some kinda repo for world record runs? how will they submit it? - final tests: + - check every single setting individually - very long replay DID 1x - absence of music file - different resolutions KINDA DID 1x @@ -39,6 +42,8 @@ fuck issue trackers :D =========== BUGS ================= +- camera follow speed depends on FPS, it's slower with low FPS, but this is no + big deal, it's only noticable with extremely high/low FPS -- fix or not? - replay loading BUG! somehow map2 replay was saves with hash 05ef0ab1 instead of correct 3c5ba5dd once, WTF, check where hash gets modified diff --git a/frontend_sdl.c b/frontend_sdl.c index 6469449..5c415f4 100644 --- a/frontend_sdl.c +++ b/frontend_sdl.c @@ -35,6 +35,7 @@ SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *texture; SDL_Surface *screenSurface; +SDL_GameController *sdlController; uint8_t running = 1, fullscreen = 1; @@ -184,6 +185,10 @@ int main(int argc, char *argv[]) puts("initializing SDL"); SDL_Init(SDL_INIT_AUDIO); + sdlController = SDL_GameControllerOpen(0); + + puts(sdlController ? "found a controller" : "no controller found"); + puts("initializing audio"); SDL_AudioSpec audioSpec; SDL_memset(&audioSpec,0,sizeof(audioSpec)); @@ -264,9 +269,9 @@ int main(int argc, char *argv[]) closeDataFile(); + SDL_GameControllerClose(sdlController); SDL_PauseAudio(1); SDL_CloseAudio(); - SDL_DestroyTexture(texture); SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); diff --git a/game.h b/game.h index f270cee..ffc9d8c 100644 --- a/game.h +++ b/game.h @@ -1671,10 +1671,12 @@ void LCR_gameHandleInput(void) if (mapIndex < -1) { LCR_LOG1("couldn't load replay"); + LCR_gamePopupMessage(LCR_texts[LCR_TEXTS_FAIL]); } else if (mapIndex == -1) { LCR_LOG1("couldn't load replay map"); + LCR_gamePopupMessage(LCR_texts[LCR_TEXTS_FAIL]); } else LCR_gameSetState(LCR_GAME_STATE_LOADING); diff --git a/general.h b/general.h index c999bf1..1b4e058 100644 --- a/general.h +++ b/general.h @@ -14,6 +14,10 @@ #include #include "settings.h" +#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__APPLE__) + #warning "Your OS sucks, go fuck yourself." +#endif + #define LCR_EFFECTIVE_RESOLUTION_X \ (LCR_SETTING_RESOLUTION_X / LCR_SETTING_RESOLUTION_SUBDIVIDE) diff --git a/settings.h b/settings.h index 31cb258..cdeaa3b 100644 --- a/settings.h +++ b/settings.h @@ -61,7 +61,7 @@ #ifndef LCR_SETTING_SKY_SIZE /** Size of sky texture pixel, 0 turns off sky rendering. */ - #define LCR_SETTING_SKY_SIZE 4 + #define LCR_SETTING_SKY_SIZE 2 #endif #ifndef LCR_SETTING_MAP_MAX_BLOCKS