Commit Graph

1234 Commits

Author SHA1 Message Date
Ozkan Sezer d26fdb9b37 rebuilt SDL2 for windows and macosx from SDL hg rev.9861
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-11 23:32:18 +00:00
Ozkan Sezer a56e0e6d4a oslibs, codecs: rebuilt flac decoder for windows and macosx with fixes from xiph.org git applied.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-11 18:35:13 +00:00
Eric Wasylishen 5b158a2807 VID_SetMode: for SDL2, move GL context creation to be after the window is shown.
This matches the order used in the SDL2 sample applications included with the library.

Seems to fix an issue on Windows 10 with DPI scaling 150%, launching QS 0.90.1 with  "-width 1920 -height 1080 -fullscreen", and you get a horrible black flicker every few frames.
see http://celephais.net/board/view_thread.php?id=60452&start=1587

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-07 20:36:43 +00:00
Eric Wasylishen 0e8f1f393b sys_sdl_win.c: fix calling conventions for SetProcessDpiAware[ness]. Was getting a runtime error about that when compiling with VS2015.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-07 20:36:39 +00:00
Eric Wasylishen 53a5fe5053 TexMgr_ReloadImages: attempt to fix random texture recoloring after mode change (http://sourceforge.net/p/quakespasm/bugs/10/)
This removes the Cache_Flush() call that was here, which was there to fix the jam3_tronyn / low heapsize bug, and instead adds a different workaround for that issue.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-04 09:22:33 +00:00
Eric Wasylishen 76909f07c2 r_alias.c, r_sprite.c: print the model name in the "no such skin" (r_alias.c) and "no such frame" (r_sprite.c) developer messages
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-31 18:36:38 +00:00
Ozkan Sezer 58831bf2ca prevent a possible buffer overflow in Cbuf_Execute (an old q1/q2 issue this was.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:56:31 +00:00
Ozkan Sezer 6e6d70213a gl_mesh.c: add missing casts so that C++ compilers won't fail
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1244 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:55:02 +00:00
Ozkan Sezer ec833cde0f r_alias.c: remove duplicated shadevector (was introduced in r1151)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1243 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:53:05 +00:00
Ozkan Sezer f857cd4669 constify arg_completion_type_t->command
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1242 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:51:35 +00:00
Ozkan Sezer 4a0b97c6ff recompiled some music decoders for osx and windows
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1241 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-15 15:15:23 +00:00
Ozkan Sezer d8704bc2d8 common.c (MSG_ReadString): replaced MSG_ReadChar with MSG_ReadByte
to avoid potentional vulnerability (icculus.org quake2 svn rev. 180.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1240 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-05 14:47:25 +00:00
Eric Wasylishen 2fdd3946bc r_alias.c: Add model name to "no such frame" warning
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1239 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-02 18:21:57 +00:00
Eric Wasylishen 01faf4e5b6 new cvars: r_lavaalpha, r_slimealpha, r_telealpha for fine-tuning specific liquid opacities (from DirectQ, RMQEngine)
new worldspawn keys: _wateralpha, _lavaalpha, _slimealpha, _telealpha, _skyfog (unique to Quakespasm)

The lava/slime/telealpha cvars are non-archived, and default to 0, which means to use the value of r_wateralpha, so they have no effect by default.

The worldspawn keys allow custom maps to set these values in a way that only applies while the map is loaded, and doesn't change the cvar value. (similar to the behaviour of the "fog" worldspawn key.) They are accepted with or without the underscore, like "fog".

see also:
http://forums.insideqc.com/viewtopic.php?f=3&t=5532
http://celephais.net/board/view_thread.php?id=60452&start=937

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1238 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-07-26 21:51:25 +00:00
Ozkan Sezer 89a966d3c7 recompile some cdoecs from latest sources
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1237 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-07-13 16:56:29 +00:00
Ozkan Sezer 97c00d9f43 snd_mp3.c: applied a patch to skip APEv2 tags
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1236 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-07-13 06:37:02 +00:00
Ozkan Sezer 56d1ab5f7a snd_mp3.c: return type tweak for mp3_tagsize()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1235 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-07-13 06:26:15 +00:00
Eric Wasylishen 271f05bf63 R_DrawEntitiesOnList: revert entity texture sorting added in r1151 as it introduces wrong alpha-sorting in contract revoked start.bsp
reported here: http://www.celephais.net/board/view_thread.php?id=60452&start=1515

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1234 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-24 18:22:56 +00:00
Eric Wasylishen 286ffcb95a "flush" command: Call a wrapper around Cache_Flush that also does GLMesh_LoadVertexBuffers.
"flush" command is used by modders to view modified mdl files. need to call GLMesh_LoadVertexBuffers to keep that use case working with GLSL renderer.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1233 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 22:52:29 +00:00
Eric Wasylishen b94df5a4cd SCR_TileClear: fix for GLSL gamma causing the tiled screen border to turn white, if you use "sizedown" to show the border.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1232 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 21:17:45 +00:00
Eric Wasylishen 56a7b45200 GLSLGamma_GammaCorrect: support this code path on old cards without the NPOT extension
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1231 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 21:17:39 +00:00
Ozkan Sezer 4c7ebfd20b bumped version to 0.91.0 for future development
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1230 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-15 08:21:14 +00:00
Eric Wasylishen 064753591f gl_model.c: Mod_LoadTextures: avoid crash on broken maps such as jam2_tronyn.bsp or kellbase1.bsp, where we try to read texture pixel data past the end of the texture lump (crashing because the textue lump is the last thing in the .bsp file buffer).
This would only hapen on OS X or Linux (perhaps just luck or windows is more leniant about reading ~40 bytes past the end of a malloc). Note this will only handle cases where the lump size is recorded as being too small, we will still crash if the bsp file itself is truncated since there are generally no checks against the whole .bsp file buffer size.

FYI, the corruption in jam2_tronyn.bsp was caused by a bug in tyrutils which is fixed now: http://disenchant.net/git/?p=tyrutils&a=commit&h=5111c5485c96918b937843715f9b8f51f263e40e
Not sure about kellbase1.bsp (quoth).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1228 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-12 02:26:10 +00:00
Ozkan Sezer f0fbddffc1 minor doc updates
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1227 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-04 17:05:39 +00:00
Ozkan Sezer 1399fe843e rebuilt SDL2 from SDL hg rev. 9702 to fix osx borkage
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1226 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-04 17:04:54 +00:00
Ozkan Sezer eea107800b docs: minor typo fix, update edit date, some hand-editing to txt version.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1225 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-03 14:56:11 +00:00
Eric Wasylishen 84bd3944b2 Modlist_Init: (win32) don't list "." as a mod.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1224 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-03 03:54:47 +00:00
Ozkan Sezer d1d57c3fc6 recompiled SDL2 for windows and osx from SDL hg 2015-06-01/rev.9699
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1223 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-02 20:00:29 +00:00
Eric Wasylishen 28679bd9a6 Quakespasm.{html,txt}: Update
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1222 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-01 05:17:00 +00:00
Eric Wasylishen 0bf6f183b4 docs: Quakespasm.sgml: add note that stdout.txt is no longer generated with sdl2
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1221 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-06-01 04:40:22 +00:00
Eric Wasylishen 2c312c486d docs: Update Quakespasm.sgml with latest changes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-31 21:16:57 +00:00
Eric Wasylishen 0ba423061b Add filename tab-completion for "playdemo" and "record" commands
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-30 02:28:58 +00:00
Eric Wasylishen 7bcea9a968 Host_Pause_f: Allow pausing demos even if cls.demonum != -1, i.e. we are in a demo loop.
The logic to prevent pausing the demo loop was preventing pausing in some valid cases, and there's no special reason not to allow pausing a demo loop.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1218 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-29 18:33:19 +00:00
Eric Wasylishen f6755c56b8 ExtraMaps_Add: merge with Modlist_Add into new FileList_Add
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1217 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-29 18:33:14 +00:00
Eric Wasylishen 11a5300247 Convert to Con_DWarning (developer 1 only) the remaining two "exceeded standard limit" warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-29 18:33:08 +00:00
Eric Wasylishen 524fe7cb60 xcode project: add indentation settings
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1215 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 19:55:58 +00:00
Eric Wasylishen 621fa18dd8 Move more spammy message from "developer 1" to "developer 2", continued:
- .ent, .lit not found in COM_FindFile (they will usually be missing, we print a message with "develoepr 1" when they are found)
- "trying to load" .ent file
- "bad chunk length"

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1214 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 18:38:37 +00:00
Eric Wasylishen b750698e93 Move more spammy message from "developer 1" to "developer 2":
- "meshing", "tri vert cmd"
- "PR_AlocStringSlots: realloc'ing"

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1213 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 03:39:05 +00:00
Eric Wasylishen ddefff6b9e COM_FindFile: in addition to .pcx, suppress "can't find" warning for .tga textures when developer.value < 2
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1212 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 02:00:06 +00:00
Eric Wasylishen 1f3c1a711a Make "exceeds standard limit of" messages only display when developer cvar is set, with a new Con_DWarning function.
Have heard these are confusing players and mappers/modders; people assume there is an error or a limit in QS is exceeded, but the messages are only about exceeding the limits in vanilla WinQuake/GLQuake.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 01:48:03 +00:00
Eric Wasylishen 95e0be7afe add r_noshadow_list cvar (from MarkV), removing hardcoded list of models to not have shadows
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1210 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-18 18:00:49 +00:00
Eric Wasylishen 2e2b110ecb r_shadows: Better stencil shadow rendering from MarkV.
Now an 8-bit stencil buffer is requested when using a 24-bit depth buffer (the default).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1209 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-18 06:11:56 +00:00
Eric Wasylishen 93a442003a cl_parse.c: fix viewmodel lerping on large maps (e.g. zendar, warpd)
cl.stats[STAT_WEAPON] was being used before the high 8 bits were filled in, which is done with the SU_WEAPON2 byte.
Moved the block which clears the viewmodel lerp state to be after handling SU_WEAPON2.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1208 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-16 22:15:15 +00:00
Eric Wasylishen 1f29972017 r_alias.c: GLSL: fix for fullbright pixels on alias models not respecting alpha.
e.g. fixes light_flame_small_yellow entity (progs/flame2.mdl) with alpha 0.5 showing up as solid (most of the pixels on flame2.mdl are fullbright)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1207 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-16 20:55:56 +00:00
Ozkan Sezer 6f65a888be oslibs, codecs: recompiled libmikmod and libmodplug for osx and win
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1206 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-05 05:11:09 +00:00
Eric Wasylishen 3806a5d2d5 r_alias.c: for out of range skin numbers, bring back the checkerboard texture wihch was removed in the last commit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1205 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-05 04:51:05 +00:00
Eric Wasylishen 825e5c8f4f r_alias.c: fix crash on out-of-range skin numbers. This bounds check was in WinQuake, but not FitzQuake.
Fixes crash in malice TC reported by NightFright: http://www.celephais.net/board/view_thread.php?id=60831&start=829

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-01 09:24:06 +00:00
Eric Wasylishen 665c81084f R_Clear: clear stencil buffer together with depth buffer if we have one.
mh suggest that not doing this may cause performance
issues: http://forums.inside3d.com/viewtopic.php?t=2408
It's also mentioned in a "Depth In-Depth" document from AMD.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1203 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-04-16 23:57:45 +00:00
Eric Wasylishen 44b7d3a4fc R_DrawParticles: exit early if there is nothing to draw, avoid a useless glBegin() glEnd() pair.
This fixes a weird bug on Windows/AMD, where under some conditions, the
world would be drawn totally corrupted. Conditions for the bug were:
- gl_clear 0
- gamma 1
- glsl alias code in use
- status bar hidden, or, scr_sbaralpha 1
- map e1m1, look around the start position

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1202 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-04-16 23:57:39 +00:00
Ozkan Sezer fe95edf20f fix windows linkage after r1200
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1201 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-04-14 18:15:09 +00:00