rewrite the loading screen to use ImGui
Summary
Interface "rewrite the loading screen to use ImGui"
Purpose of change
We ought to put something on the screen while we load things, lest the users think it crashed.
Describe the solution
Did the simplest possible thing.
Describe alternatives you've considered
I considered starting a thread and having it run a loop at 60fps so that the game always responds to events during the loading, even when one step takes a long time. But that’s a lot of work for a Tuesday.
I thought about animations.
I considered writing an homage to Homestuck by making it look like the sburb loading screen.
Testing
Ran the game. It looked ok.
Seriously? A comment on a namespace that is two whole lines long? That’s why it failed?
Hey i just updated and i get this error i presume it's related to this, and i instantly crash to desktop afterwards.
Oh, that’s fun. I didn't consider that we might have inconsistent support for image formats across platforms. What version of SDL_Image did you build with?
Hey i just updated and i get this error i presume it's related to this, and i instantly crash to desktop afterwards.
Same here. Built with CMake windows-tiles-sounds-x64-msvc profile.
Edit: From my out\build\windows-tiles-sounds-x64-msvc\vcpkg_installed\x64-windows-static\include\SDL2 I read in SDL_image.h
#define SDL_IMAGE_MAJOR_VERSION 2
#define SDL_IMAGE_MINOR_VERSION 6
#define SDL_IMAGE_PATCHLEVEL 3
cdda-windows-tiles-x64-2024-09-05-1725 (downloaded from releases, not self built)
Windows 10 Pro 22H2 (not sure if it matters)
If I try to continue with space or ignore with I it just crashes.
I get this as well on windows 10 when trying to start a new character
DEBUG : Error: Could not load image "gfx\cdda.avif": Unsupported image format
FUNCTION : bool main_menu::new_character_tab() FILE : src/main_menu.cpp LINE : 1062 VERSION : cdda-experimental-2024-09-05-1725 858f8bc
avif support is not in sdl2-image in vcpkg https://github.com/microsoft/vcpkg/blob/master/ports/sdl2-image/vcpkg.json
Let's use PNG
Yea, sorry about that folks. I did convert it to a PNG in the end, since AVIF support is so spotty. It doubled the size of the image though.
See https://github.com/CleverRaven/Cataclysm-DDA/issues/76226