Compare commits

...

2 Commits

Author SHA1 Message Date
Misa fad3bab2d0 Initialize bcol and bcol2 in Graphics::drawbackground()
While compiling in release mode, GCC warns about these two potentially
being used uninitialized further down. The only way this could happen is
if the case-switches below didn't match up with a case, which would
require the game to be in an invalid state (and have invalid values for
rcol and spcol), but it's better to be safe than sorry.
2021-01-13 22:47:12 -05:00
Misa 2a781083e9 Disable unneeded LodePNG features
The only thing we need LodePNG for is to decode a PNG that we've already
loaded into memory. We handle the filesystem part ourselves, so we don't
need LodePNG's filesystem functions; we don't encode images, and we
don't use the zlib functions. So disable all of those.
2021-01-13 22:44:52 -05:00
2 changed files with 7 additions and 2 deletions

View File

@ -233,7 +233,12 @@ ADD_LIBRARY(tinyxml2-static STATIC ${XML2_SRC})
ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})
ADD_LIBRARY(lodepng-static STATIC ${PNG_SRC})
TARGET_COMPILE_DEFINITIONS(lodepng-static PRIVATE -DLODEPNG_NO_COMPILE_ALLOCATORS)
TARGET_COMPILE_DEFINITIONS(lodepng-static PRIVATE
-DLODEPNG_NO_COMPILE_ALLOCATORS
-DLODEPNG_NO_COMPILE_DISK
-DLODEPNG_NO_COMPILE_ENCODER
-DLODEPNG_NO_COMPILE_ZLIB
)
# Static Dependencies
TARGET_LINK_LIBRARIES(VVVVVV physfs-static tinyxml2-static lodepng-static)

View File

@ -1932,7 +1932,7 @@ void Graphics::drawbackground( int t )
break;
case 2:
{
int bcol, bcol2;
int bcol = 0, bcol2 = 0;
//Lab
switch(rcol)