Commit graph

1378 commits

Author SHA1 Message Date
ewasylishen
7665caeb85 in_sdl.c: improve error messages when opening joysticks
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1295 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-03 21:38:58 +00:00
ewasylishen
fa5f3b3b8a in_sdl.c: fix spurious "-1 mappings loaded from gamecontrollerdb.txt" message
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1294 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-02 00:04:25 +00:00
ewasylishen
cd20d45ce4 SDL2 Game Controller support
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-03-01 21:58:08 +00:00
ewasylishen
492c4deed8 gl_vidsdl.c: add vid_borderless cvar for getting a borderless window
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-26 20:18:27 +00:00
ewasylishen
0763e94fe3 R_UpdateWarpTextures: workaround osx 10.6 driver bug when using FSAA, reported by Barnak.
R_Clear only clears the warpimage part of the screen, leading to an unplayable
HOM effect on the rest of the screen.

The workaround is calling GL_SetCanvas(CANVAS_DEFAULT); at the end of
R_UpdateWarpTextures, it should be harmless enough on other systems, so not sure
if it's worth making this workaround conditional.

My guess is glClear in this implementation is wrongly using glViewport as the
area to clear.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-26 07:37:00 +00:00
ewasylishen
eb1763585c Contrast support with a "contrast" cvar, behaving the same as MarkV's.
It may be a useful alternative to the existing gamma control for laptops in a bright environment, etc.
(raising contrast gives less of a gray/washed out look than raising gamma, but as a disadvantage, colours near white get clipped to white.)

It's also implemented for both GLSL and SDL gamma ramps, but only if USE_GAMMA_RAMPS is set to 1.
Since USE_GAMMA_RAMPS  is 0, currently it only works with GLSL.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-12 23:26:36 +00:00
ewasylishen
88737f372d world.c: use DoublePrecisionDotProduct to fix items falling out of the world
on oms3.bsp on SSE builds.

Thanks to ParuBaru for reporting the issue.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1289 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-02-01 22:41:15 +00:00
sezero
d5297fb7aa docs: fixed version number in changelog. added empty 0.91.1 changelog section for new changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1288 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-31 09:33:26 +00:00
ewasylishen
39d78d026a Default gl_clear to 1, as described in "Common mistakes" https://www.opengl.org/wiki/Common_Mistakes#Swap_Buffers
"The buffers should always be cleared. On much older hardware, there was a technique to get away without clearing the scene, but on even semi-recent hardware, this will actually make things slower. So always do the clear."
Plus it's nice for map development / debugging.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1287 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 20:47:24 +00:00
ewasylishen
7f293e389b SV_SpawnServer: use malloc for sv.edicts, and only zero it as needed
Previously we were Hunk_Alloc'ing space for 8192 edicts (by default) which zeros all of that memory, this way we only use as much RAM as needed since the unuesd pages aren't dirtied

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 01:05:11 +00:00
ewasylishen
8b18c98720 Xcode project:
-adjust release builds to not require 10.6 SDK, and disable PPC since recent OSX SDK's don't support it
-don't strip symbols, to make testing in Instruments easier.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1285 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 00:31:27 +00:00
ewasylishen
3574d65077 GL_Init: log gl_vendor, gl_renderer, gl_version to the console.
Taken from RMQEngine. the idea is to ensure every -condebug log has the gfx driver version logged.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-28 06:07:07 +00:00
sezero
b75b073f65 bumped version to 0.91.1 for future development
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-18 07:28:03 +00:00
sezero
aba6d04d6d re-diff'ed extra patches under Misc/ so that they apply cleanly.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1281 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-16 19:28:04 +00:00
sezero
bb3268215a minor edit to readme.txt
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1280 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-15 09:37:09 +00:00
ewasylishen
2f9ca49658 Update docs with latest changes
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1279 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-15 09:18:21 +00:00
ewasylishen
6d060b864e max_edicts: raise to 8192 (from 2048) and make non-archived, to reduce the need for players to mess with it to get maps/mods to run.
Some measurements on the size of the sv.edicts hunk allocation, with this change, on various mods (it depends on the number of QC entity fields):
id1 7MB, quoth 11 MB, arcadim 21 MB, rrp 9MB,  ne_ruins 16MB.

Since this is a Hunk_Alloc, the whole 10-20MB is cleared to zero which will allocate that much physical ram.
We could probably change it to a malloc later, and not clear the memory, so physical ram is only allocated when the memory is cleared in ED_Alloc.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1278 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-10 23:03:06 +00:00
sezero
c6fe16452b oslibs: rebuild libopusfile from latest v0.7 release.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1277 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-10 09:30:31 +00:00
ewasylishen
7044f89008 Raise default heapsize to 256MB and zone to 4MB (matching Fitz MarkV)
N.B.: I verified with the OS X Instruments tool that unused space in the heap isn't dirtied (e.g. we never memset the entire heap, only the portions returned by Hunk_Alloc) so this should have no impact on RAM required.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1276 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-09 20:29:22 +00:00
ewasylishen
98f45470d6 zone.c: fix padding in memblock_t struct to works as intended. the previous layout was probably harmless but wasted a few bytes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1275 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-09 20:03:27 +00:00
ewasylishen
f6ea14fa76 TexMgr_RecalcWarpImageSize: removed early exit if (gl_warpimagesize == oldsize), fixes liquids sometimes turning to noise after a mode change.
after vid_restart TexMgr_ReloadImage reloads textures to tx->source_width/source_height, which might not match oldsize.
fixes: https://sourceforge.net/p/quakespasm/bugs/13/

steps to reproduce (fixed) bug:
-launch at 640x480, windowed, and with "r_oldwater 0"
-do "map start"
-change to 1024x768 windowed
-change to 1920x1080 windowed
-this last mode change makes liquid textures turn into random garbage.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1274 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-08 08:22:27 +00:00
sezero
a2714019ba rebuilt SDL2 from SDL2-2.04 release version.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1273 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-03 10:51:44 +00:00
ewasylishen
4c255fe1fc VID_Toggle: disable the fast path entirely because it was failing on SDL2/WinXP.
(640x480 fullscreen -> windowed would give a large 1280x768 window mostly filled with garbage).

Previously, we were only using the fast path on old systems (no VBO support) anyway.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1272 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-03 08:38:46 +00:00
ewasylishen
d9fb6e2632 Add Xcode project for debugging on Xcode 2.5 / OS X 10.4 / PPC
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1271 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-03 07:45:18 +00:00
sezero
fddc879665 SDL2 rebuild: forgot updating SDL_revision.h.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1270 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-28 10:15:04 +00:00
sezero
036706caf7 rebuilt SDL2 from SDL hg repo r9972 (2015-12-28) to catch a few small fixes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1269 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-28 10:11:42 +00:00
sezero
20ddaca6bf docs: s/inside3d/insideqc/ and some minor tidy-up.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1268 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-24 08:20:25 +00:00
sezero
c3c5acea3d oslibs: rebuilt opusfile from current xiph.org git to catch further recent fixes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1267 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-22 10:40:58 +00:00
ewasylishen
189459b10b snd_dma.c: raise MAX_SFX to 1024, for the upcoming arcadim mod.
Uses only 36k extra of hunk memory, less for 32-bit builds, so shouldn't have any negative effects.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1266 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-22 06:22:29 +00:00
ewasylishen
4603fb0e44 Minor changelog additions.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1265 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-13 20:41:55 +00:00
sezero
4f87b5c986 update docs for 0.91.0 changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1264 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-13 09:37:14 +00:00
ewasylishen
cfb7d1fdb2 GLSLGamma_GammaCorrect: clear the cached texture binding in GL_Bind properly, after the glBindTexture calls earlier in this function.
Fixes a obscure bug where:
 - a bsp with no textures (pink checkerboard displayed)
 - gamma != 1
 - nothing else on screen (sbar hidden, r_drawviewmodel 0)
would result in the screen turning to noise.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1263 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-13 07:23:04 +00:00
sezero
a3705a9750 oslibs: rebuilt opusfile library from current xiph.org to catch the
recent seek bug fixes. rebuilt SDL2 from current SDL mercurial repo
(2015-12-11, rev. 9959).


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1262 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-11 15:47:41 +00:00
stevenaaus
314144c363 Credit Eric as co-author.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1261 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-01 10:35:51 +00:00
stevenaaus
f755acf9f7 Touch readme time stamp.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-01 10:09:31 +00:00
ewasylishen
b63744399e Fog: move setting of GL_FOG_MODE to GL_EXP2 to a new Fog_SetupState() function and call it in VID_Restart.
Fixes bug where the fog mode was resetting to the default (GL_EXP) after a mode switch, causing fog to look different. This was only affecting SDL1 for me.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1259 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-11-26 09:06:42 +00:00
sezero
11913c0ded rebuilt SDL2 for windows and osx from SDL2 hg rev. 9915 (2015.11.14)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1258 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-11-14 14:05:34 +00:00
sezero
30168145d6 oslibs, codecs: rebuild libmikmod from latest sources.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1257 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-11-10 08:35:08 +00:00
ewasylishen
b7baae191f Sbar_DrawPicAlpha: change glColor3f call to glColor4f with explicit alpha of 1 to work around intel 855 bug, which also affected Fitzquake 0.85.
With "r_oldwater 0" and "scr_sbaralpha 0", warp textures wouldn't be rendered and instead you would see a copy of the screen tiled where water surfaces should be.
Thanks to graham for reporting.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1256 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-10-06 06:18:30 +00:00
ewasylishen
cf6d493154 PF_traceline: change Host_Error when a NaN is detected to a Con_Warning.
This only affects the case when the developer cvar is set, we already ignore NaN's here.

negke reports getting the nan error with this debug progs.dat: http://negke.fov120.com/files/progsbjp.zip (rename to pak0.pak + install as a mod)
and his sm133_neg!ke.bsp: https://www.quaddicted.com/reviews/sm133_pack.html (walk over the zombie to activate a lightning trap)

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1255 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-10-06 04:08:29 +00:00
ewasylishen
31b3c37cc3 Xcode project: build debug builds with all music codecs
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1254 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-22 06:11:12 +00:00
ewasylishen
a7abcdd0aa Alias model VBO renderer: restructure so each model is stored in a separate VBO and load them in Mod_LoadAliasModel, rather than R_NewMap.
Initially I thought that we would never need to draw an alias model that hadn't been precached when R_NewMap runs, but this assumption turned out to be incorrect. This fixes the issue where progs/bolt.mdl wasn't rendering in the Scourge Done Slick demos.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-20 20:10:49 +00:00
stevenaaus
5cf0eb9465 r_pos cvar: Dynamic position info, aka r_speeds + viewpos.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-12 03:29:41 +00:00
sezero
07b48e4392 rebuilt SDL2 for windows and macosx from SDL hg rev.9861
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-11 23:32:18 +00:00
sezero
cbedb792f7 oslibs, codecs: rebuilt flac decoder for windows and macosx with fixes from xiph.org git applied.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1250 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-11 18:35:13 +00:00
ewasylishen
0de318293e 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1249 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-07 20:36:43 +00:00
ewasylishen
a4f3ef53d9 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-07 20:36:39 +00:00
ewasylishen
442e6c9d77 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1247 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-09-04 09:22:33 +00:00
ewasylishen
914083b256 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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1246 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-31 18:36:38 +00:00
sezero
ee2f39fb69 prevent a possible buffer overflow in Cbuf_Execute (an old q1/q2 issue this was.)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1245 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-08-23 09:56:31 +00:00