From 08ac61347b12fc0709f6ed6fbdf95bd043c7c98c Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Sat, 26 Aug 2023 09:04:43 +0200 Subject: [PATCH] Update --- TODO.txt | 8 ++++++++ main_sdl.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/TODO.txt b/TODO.txt index a6aec3d..f75bff6 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,4 +1,10 @@ - track size: 64x64x64 +- block materials: + - concrete, normal + - dirt, a bit slidy, decreases speed a bit? + - ice? super slidy (like in the old TM) + - accelerator, probably: auto-accelerates, plus increases accel. + - decelerator? decreases speed a lot? - EFFICINT MAP DRAWING: - map will be subdivided into subblocks (probably 16x16x16 or 8x8x8), only nearest subblocks (and possibly only those in viewing direction will be @@ -27,6 +33,8 @@ - background textures: 128x128 with image-specific 256 color palette, pixel access shouldn't be as time critical here - other textures 64x64 with direct 565 values stored + - hmm or possibly 256x256 backgrounds with 16 color image specific palette + and dithering? check out how that would look - Rendering: two pass: 1st pass renders the scaled down background (possibly not rendering floor, can be just pure green for "grass") to prevent overflows, second pass renders the tracks (or the nearest part of it). diff --git a/main_sdl.c b/main_sdl.c index a00dd50..6da7ff6 100644 --- a/main_sdl.c +++ b/main_sdl.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) screenSurface = SDL_GetWindowSurface(window); - //SDL_ShowCursor(0); + SDL_ShowCursor(0); SDL_PumpEvents(); sdlKeyboardState = SDL_GetKeyboardState(NULL); @@ -41,6 +41,10 @@ int main(int argc, char *argv[]) SDL_PumpEvents(); sdlKeyboardState = SDL_GetKeyboardState(NULL); running = !sdlKeyboardState[SDL_SCANCODE_Q]; + + SDL_RenderClear(renderer); + SDL_RenderCopy(renderer,texture,NULL,NULL); + SDL_RenderPresent(renderer); } SDL_DestroyTexture(texture);