image.c: define LODEPNG_NO_COMPILE_CPP for lodepng.c.
image.c: define STB_IMAGE_WRITE_STATIC for stb_image_write.h
image.c: minor whitespace tidy-up.
stb_image_write.h: remove extern declaration for now non-existing
stbi_write_tga_with_rle (missed in commit r1468).
stb_image_write.h: comment out stbi_write_jpg_to_func() which quakespasm
doesn't use.
lodepng.c (lodepng_save_file): remove unneeded (char*) cast from buffer.
lodepng.c (lodepng_read32bitInt): make it static.
lodepng.c (lodepng_get_raw_size_lct): make it static, and move below to
the place it is actually used.
lodepng.c (lodepng_info_swap): remove (unused function).
lodepng.c (readChunk_zTXt,readChunk_iTXt,addChunk_zTXt, addChunk_iTXt):
add missing const to casts on const pointers in zlib_compress() calls.
(see: https://github.com/lvandeve/lodepng/pull/34).
lodepng.c (inflateHuffmanBlock): wrong error code if huffmanDecodeSymbol
fail. (see: https://github.com/lvandeve/lodepng/pull/52).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1471 af15c1b1-3010-417e-b628-4374ebc0bcbd
in quakespasm, and remove all others.
- image.c: disable decoder, ancillary chunks and error text support
by defining the relevant LODEPNG_NO_??? macros.
(Image_WritePNG): make use of upsidedown parameter for symmetry
with Image_WriteJPG(). print an error message in case of encoding
failure if error text support is enabled.
(Image_WriteSTB): rename to Image_WriteJPG, adjust for jpg writing
only. remove the old Image_WriteJPG wrapper.
(enum imageformat_t): remove.
(CopyFlipped): constify the data parameter.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1468 af15c1b1-3010-417e-b628-4374ebc0bcbd
~3x faster than stb_image_write and similar file size
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1467 af15c1b1-3010-417e-b628-4374ebc0bcbd
Add optional format and quality args to "screenshot" command,
can specify tga, png, jpg
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1465 af15c1b1-3010-417e-b628-4374ebc0bcbd
when entering fullscreen. Fix VID_GetDesktopFullscreen() which
was incorrectly returning "true" in regular fullscreen mode.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1459 af15c1b1-3010-417e-b628-4374ebc0bcbd
Previously, the cast was implicit since abs() takes an int,
so there is no change in behaviour.
Suppresses a clang warning that we might want fabs().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1451 af15c1b1-3010-417e-b628-4374ebc0bcbd
directly, but define proper macros for each attribute we do or may use.
also support MSC along the way for example with the noreturn attribute.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1440 af15c1b1-3010-417e-b628-4374ebc0bcbd
Previous value of 0.001 was probably too low, may have caused
"stuck" triggers:
http://celephais.net/board/view_thread.php?id=60452&start=2935
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1439 af15c1b1-3010-417e-b628-4374ebc0bcbd
QUAKESPASM_VER_STRING for it. revise the QS_STRINGIFY macros.
fixes "the not enough actual parameters for macro QS_STRINGIFY"
warnings from my VS2005.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1436 af15c1b1-3010-417e-b628-4374ebc0bcbd
4 buffers were: mod_novis, decompressed, checkpvs, and fatpvs.
Also fix fatbytes calculation in SV_FatPVS to match the other PVS
buffers, was (numleafs+31)>>3, changed to (numleafs+7)>>3.
I am assuming the previous was a bug/typo.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1434 af15c1b1-3010-417e-b628-4374ebc0bcbd
useful for capturing debug info e.g. "entities" command which prints
a lot.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1431 af15c1b1-3010-417e-b628-4374ebc0bcbd
Not convinced there are any issues with this, and it solves these
problems:
- change to new gamedir without execing quake.rc and exit: the
config.cfg in the new gamedir will be clobbered with the settings
from the previous gamedir.
- discrepancy between -game command line arg and "game" command.
Video mode is locked during the "exec quake.rc" to prevent the mode
from changing.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1417 af15c1b1-3010-417e-b628-4374ebc0bcbd
Consider any subdirectories of the com_basedir as mods, except for
.app bundles on posix systems. Previous code was too strict
as it required progs.dat or pak files, so it excluded map packs, etc.
(useful mods could contain almost anything, e.g. just a music directory,
just a config...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1416 af15c1b1-3010-417e-b628-4374ebc0bcbd
Refactor printing of QUAKESPASM_VERSION/QUAKESPASM_VER_PATCH to use a new
QUAKESPASM_VER_STRING macro.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1408 af15c1b1-3010-417e-b628-4374ebc0bcbd
This allows you to move the QS window to a different monitor and
then go fullscreen on that monitor. QS will still always start on
the primary monitor.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1407 af15c1b1-3010-417e-b628-4374ebc0bcbd
This is for emulating a low-resolution pixellated look,
or possibly as a performance boost on slow graphics cards.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1406 af15c1b1-3010-417e-b628-4374ebc0bcbd
on Windows, a regression introduced in the Host_Loadgame_f rewrite r1398
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1405 af15c1b1-3010-417e-b628-4374ebc0bcbd
(a macOS thing), because it blocks for a few seconds and then fails
(on my system anyway), so it's pointless.
Fixes an annoying startup pause on macOS, which was reported as
https://sourceforge.net/p/quakespasm/bugs/15/
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1403 af15c1b1-3010-417e-b628-4374ebc0bcbd
Prevents console spam on "developer 1" if a mod calls PF_VarString often (e.g. In the Shadows textbooks).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1402 af15c1b1-3010-417e-b628-4374ebc0bcbd