Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

rewrite the loading screen to use ImGui

Open db48x opened this issue 1 year ago • 1 comments

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.

db48x avatar Aug 27 '24 16:08 db48x

Seriously? A comment on a namespace that is two whole lines long? That’s why it failed?

db48x avatar Aug 27 '24 20:08 db48x

image

Hey i just updated and i get this error i presume it's related to this, and i instantly crash to desktop afterwards.

zakhad avatar Sep 05 '24 18:09 zakhad

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?

db48x avatar Sep 05 '24 18:09 db48x

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

alef avatar Sep 05 '24 18:09 alef

cataclysm-tiles_Mh3p350FD9

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.

gitelitko avatar Sep 05 '24 18:09 gitelitko

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

Burnrate avatar Sep 05 '24 19:09 Burnrate

avif support is not in sdl2-image in vcpkg https://github.com/microsoft/vcpkg/blob/master/ports/sdl2-image/vcpkg.json

akrieger avatar Sep 05 '24 19:09 akrieger

Let's use PNG

ZhilkinSerg avatar Sep 05 '24 20:09 ZhilkinSerg

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

db48x avatar Sep 05 '24 22:09 db48x