Commit Graph

17 Commits

Author SHA1 Message Date
Shpoike 9058a4fadb Accept type 1 tgas (paletted) 2021-08-31 04:59:11 +01:00
Spike d76ca606bf All changes present in QSS-R7, plus
md3 support
quoth/etc bug fix
strzone bug fix
png/jpg replacement wall textures
rewrote mdl rendering to always use arrays, relaxing vertex+tri limits.
removed static ents limit
fixed ambient_level not working at high framerates.
2021-08-31 04:59:11 +01:00
Ozkan Sezer 92758e8591 update lodepng to 20190814 version from mainstream.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1619 af15c1b1-3010-417e-b628-4374ebc0bcbd
2019-08-15 12:01:54 +00:00
Ozkan Sezer daf5ebec2f "W007: '&array' may not produce intended result" Watcom warning fixes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1504 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-17 08:00:32 +00:00
Ozkan Sezer b08e7b1168 Some more image.c / lodepng / stb_image_write clean-ups:
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
2017-08-09 20:00:08 +00:00
Ozkan Sezer 1e728fa2ad - stb_image_write.h: keep only the jpg writer, the only thing we use
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
2017-08-09 11:33:44 +00:00
Eric Wasylishen f364c9864c Image_WritePNG: switch to lodepng, configure for fast compression
~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
2017-08-09 06:23:42 +00:00
Eric Wasylishen 4a02827fe6 SCR_ScreenShot_f: change default format to png, using stb_image_write
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
2017-08-08 05:07:56 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer 5b9140cb06 restore compilability with g++. some whitespace tidy-ups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@986 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-02 05:40:41 +00:00
Eric Wasylishen a0f475ebcd Image_LoadImage: read pixel data in 1K chunks instead of calling getc in a loop
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@957 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 20:41:47 +00:00
Ozkan Sezer 983af887bf changed many sprintf() calls into q_snprintf().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@557 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:50:42 +00:00
Ozkan Sezer 42de3830cd constified the name arguments of Image_LoadImage() and Image_WriteTGA()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@510 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 12:56:57 +00:00
Ozkan Sezer c583b5b541 common.c (searchpath_t): Added new member `path_id', an unsigned
int identifier assigned to the game directory. Remember that main
<install_dir>/game1 and the unix <userdir>/game1 have the same id.
The id starts as 1 for the first data1 directory. For every new
directory, the value is the left-shifted version of the previous
one.  Made COM_FindFile() to accept a path_id pointer argument
and storing the id in it if it isn't NULL. Made COM_OpenFile(),
COM_FOpenFile() and all COM_Load* functions to accept a path_id
pointer argument similarly. Adjusted callers accordingly.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@370 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 21:45:16 +00:00
Ozkan Sezer 3281636a96 fixed rest of the strict-aliasing and uninitialized use warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@367 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-01 14:05:20 +00:00
Ozkan Sezer c24d592580 host_cmd.c, console.c, gl_draw.c, image.c, gl_model.c, r_sprite.c, cl_parse.c,
gl_warp.c, host.c, gl_mesh.c, gl_sky.c, gl_texmgr.c, cvar.c, sv_main.c, cvar.h,
gl_screen.c, r_brush.c, gl_vidsdl.c, zone.c, cl_main.c, cmd.c, snd_dma.c,
snd_mem.c, common.c, sv_phys.c: Added explicit casts to eliminate -Wc++-compat
warnings.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00