Commit Graph

911 Commits

Author SHA1 Message Date
Ozkan Sezer 3e1eae3e47 Makefile.darwin (SDL_FRAMEWORK_PATH): seems like older OSX ld does not
treat '-F dir' the same as '-Fdir' and fails, so directly use -Fdir as
LDFLAGS, instead of -Wl,-F,dir .


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1182 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-03-02 22:03:18 +00:00
Ozkan Sezer 00846e545d fix the cross-build scripts after r1180.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1181 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-03-02 22:01:12 +00:00
Eric Wasylishen b737b8a29f Update makefiles to use local SDL/SDL2 copies. Add sdl[2]-config. Patch from szo.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1180 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-03-02 21:43:04 +00:00
Eric Wasylishen 96f7d2004f gl_vidsdl.c: remove AMD driver special case which disabled GLSL mdl renderer, as the latest drivers fixed the bug that was working around
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-03-02 03:13:58 +00:00
Ozkan Sezer b6570041e3 snd_sdl.c: remove superfluous SDL_PauseAudio() and SDL_LockAudio() calls from the Shutdown() proc.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1173 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-27 14:01:23 +00:00
Ozkan Sezer 1eb675b5b3 Mod_LoadAllSkins(): change name[] size from 32 to 64 (MAX_QPATH) -- consistent with fbr_mask_name[]
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1172 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-27 14:00:49 +00:00
Eric Wasylishen 91196a618f Disable GLSL alias model renderer on Win32+ATI/AMD until szo's bug with models drawing black can be fixed.
Replace GLAlias_SupportsShaders() with gl_glsl_alias_able variable.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1171 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-20 00:24:05 +00:00
Eric Wasylishen 39bd217f6c gl_rmisc.c: allow glsl gamma to be used in combination with -novbo
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-20 00:23:44 +00:00
Ozkan Sezer 6ddd983eb8 snd_flac.c, snd_mpg123.c: fix incorrect usage of decoder function
return value in RewindStream procedures.
bgmusic.c (BGM_UpdateStream): print msg if stream rewinding fails.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-19 08:37:13 +00:00
Eric Wasylishen ea65ff0c6d gl_texmgr.c: fix GL_DeleteTexture not clearing deleted textures out of our currently-bound-texture cache for all TMU's
Fixes a bug where if you do "map e1m6" then "kill", the fullbright part of the key texture is missing (drawn in black) - this bug was introduced in 0.90.0.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1168 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-19 00:50:54 +00:00
Ozkan Sezer 1c26cc3c9d add some extra safety checks to pak loading
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1165 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-08 08:00:56 +00:00
Eric Wasylishen 4c4ef48fcd gl_vidsdl.c: Experimental support for SDL2's new SDL_WINDOW_FULLSCREEN_DESKTOP mode.
When cvar vid_desktopfullscreen is set to 1, fullscreen mode ignores vid_width/vid_height and uses the desktop resolution. SDL docs recommend using this, it's supposed to offer better OS integration.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1164 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-07 00:05:06 +00:00
Eric Wasylishen 4618546e6c TexMgr_SafeTextureSize: take advantage of NPOT textures for mdl skins, 2d graphics, etc. Uses about 35% less texture memory on start.bsp.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1163 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-06 06:46:08 +00:00
Eric Wasylishen 7be39c651e TexMgr_ReloadImages: put in a workaround for the bug reported by Steven where fullscreen toggle on jam3_tronyn.bsp with -heapsize 65536 causes corrupted textures
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1162 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-06 05:21:39 +00:00
Ozkan Sezer bc89fbea05 build_cross_win[32|64]-sdl2.sh: new scripts for me to cross-build on my linux.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1161 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-04 10:00:13 +00:00
Eric Wasylishen 603d2a6f76 sbar.c: don't skip redrawing the status bar if we're doing glsl gamma, since it would get gamma correction applied multiple times.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1160 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-04 03:57:06 +00:00
Eric Wasylishen a568c712c1 tab completion: lower size of filelist_item_t name buffer from MAX_OSPATH to 32 to avoid filling up the zone memory (this limits the length of maps / games you can tab-complete).
Prior to r1153 it was 32 for maps and MAX_OSPATH for mods.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1158 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 23:35:55 +00:00
Eric Wasylishen 1311398e80 New gamma correction implementation using glsl. Enabled by default on OpenGL2. Disable with -noglslgamma.
Avoids general bugginess of hardware gamma, doesn't affect the whole screen in windowed mode like HW gamma. Should fix http://sourceforge.net/p/quakespasm/bugs/5/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1157 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 20:18:45 +00:00
Eric Wasylishen 1a5c428100 VID_Restart: delete all GL textures before calling VID_SetMode. SDL2 reuses the gl context when changing modes, so the TexMgr_ReloadImages call after the mode change was leaking textures.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1156 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 20:18:39 +00:00
Eric Wasylishen 3b1c8a97ff RecursiveLightPoint: add casts to double to force 64-bit precision, fixes zombie at the start of jam3_ericw.bsp from incorrectly being lit up in SSE builds.
See also: http://forums.inside3d.com/viewtopic.php?f=3&t=5620

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1155 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-26 06:46:53 +00:00
Eric Wasylishen 6970b01052 GLAlias_GetUniformLocation: refactor to GL_GetUniformLocation, take program as an argument
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-25 20:29:30 +00:00
Eric Wasylishen c31fb37b20 Refactor argument completion for "game" and "map" so all of the code is shared.
TODO: currently using a char[MAX_OSPATH] buffer to store map/mod names in the completion list which is probably unnecessairly large

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1153 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-24 08:26:14 +00:00
Eric Wasylishen f0778c45b5 Autocompletion of mod names for the "game" command.
Copied from the "map" autocompletion code, now I should probably refactor because most of the code could be shared.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1152 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-24 07:02:47 +00:00
Eric Wasylishen 112c8b68b8 Alias model rendering fast-path using OpenGL 2.
In GL_MakeAliasModelDisplayLists, after saving the standerd triangle strips and fans onto the hunk, if the system is GL2 capable, we also save a second version of the mdl on the hunk designed to be loaded into a VBO (GL_MakeAliasModelDisplayLists_VBO). In R_NewMap, and on video mode changes, we call GLMesh_LoadVertexBuffers which loops over all precached mdl's and loads the data into a pair of VBO's (vertices and vertex indices).

Finally, in R_DrawAliasModel, assuming no rendering options are disabling the fast-path (r_drawflat 1, r_lightmap 1, or r_fullbright 1 would disable it), we call GL_DrawAliasFrame_GLSL, which sets up all of the bindings and draws the (possibly lerped) mdl in one glDrawElements call.

Special thanks to MH for some of the code from RMQEngine and the general concept.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1151 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-20 18:59:15 +00:00
Eric Wasylishen f4768566a1 r_oldwater: change default to 0 (which means use the higher quality fitzquake render-to-texture water by default, instead of the lower quality glquake water).
Reasoning is, we default to the higher-quality settings for everything else except this.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1150 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-01-17 00:54:09 +00:00
Eric Wasylishen 171b08cf39 Support pausing demo playback.
This is done by adding an extra 'demopaused' flag to client_static_t, separate from cl.paused because we don't want a svc_setpause inside the demo (caused by the player pausing during recording) to actually pause demo playback. The only potential failure case is, if the demo contains a svc_stufftext of the command "pause", the demo will pause itself when being played.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:36 +00:00
Eric Wasylishen e26923ec8a Host_Startdemos_f: set cls.demonum to -1 in the default case where we skip the demo loop.
Fixes a bug where if you launched QS and immediately did "playdemo [something]", after the demo finished, demo1.dem would start to play instead of returning to the console.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1146 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:30 +00:00
Eric Wasylishen 6afd1e5286 Host_Loadgame_f: don't break when there are } characters in quoted strings. Fixes issue loading savegames from retrojam1_skacky
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1145 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:21 +00:00
Eric Wasylishen 4a2e29f1c1 R_SetupGL: remove some dead code (glGet call that stores GL_MODELVIEW_MATRIX into r_world_matrix, which is not used anywhere.) The glGet calls was stalling the OpenGL pipeline.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1141 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-11 23:27:12 +00:00
Eric Wasylishen 1d7a9903e3 Fog_ParseWorldspawn: before reading the worldspawn value, clear the fog rgb color back to the default value (0.3).
This fixes a bug seen in jam3_tronyn.bsp (which only has a density value in the worldspawn), where the fog color of the last map played would carry over.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1140 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 21:27:27 +00:00
Ozkan Sezer 6b57f04f57 make sure we have more than one CPUs before enabling multi-threaded OpenGL
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1139 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 09:20:23 +00:00
Ozkan Sezer a4b30a4eed add new numcpus field to the quakeparms structure and detect it during Sys_Init time
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1138 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-03 09:10:18 +00:00
Eric Wasylishen 2870be2bee GL_Init: on OS X, enable multi-threaded OpenGL mode.
This moves some of the OpenGL implementation to a background thread, and makes draw calls block for a shorter amount of time. AFAIK, this is the default mode on most other OS'es, not sure why you have to explicitly ask for it on OS X.

N.B. the kCGLCEMPEngine constant is available on 10.4+ so I don't bother checking the OS X version.
More info: https://developer.apple.com/library/mac/technotes/tn2085/_index.html

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1137 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 23:01:20 +00:00
Sander van Dijk fce0215843 quakespasm.pak: Another z-fighting workaround.
This fixes:

e2m3:
- The wallpiece that blocks the way out of the Well of Wishes (when open).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1136 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 20:06:35 +00:00
Sander van Dijk 996d692db0 quakespasm.pak: More z-fighting workarounds.
This fixes:

e2m3:
- The floorpiece (when down) and wallpiece (when open) by the crates opposite the normal exit.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1135 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 19:36:39 +00:00
Sander van Dijk e4d99195bf quakespasm.pak: More z-fighting workarounds.
This fixes:

e1m4:
- The secret doors in the room with the five quake-logo buttons on the floor (when open).

e2m2:
- The platform in the water behind the gold key door (when down).
- The wallpiece that pushes the player into the gold key room (when "closed").


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1134 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-11-02 19:16:35 +00:00
Ozkan Sezer 50a277c1f7 a few more minor stuff from uhexen2 svn
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1133 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-31 13:03:20 +00:00
Ozkan Sezer ed0eeb149f sync a few minor stuff with uhexen2 svn
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1132 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-30 18:00:06 +00:00
Ozkan Sezer 472bd01fce bump version to 0.90.1
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1131 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 20:05:08 +00:00
Eric Wasylishen b694b513ec Tweak the MH dynamic lighting speedup to be more correct: upload the lightmaps from the current frame instead of the previous frame.
It was possible, but unlikely, to see artifacts from the previous code in some circumstances, e.g. "host_maxfps 10" and spin around quickly near a flashing light e1m1, you may see a surface drawn with an out-of-date lightmap for one frame.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1130 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-21 19:27:42 +00:00
Ozkan Sezer 25b8df20a7 minor tidy-ups
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1128 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 17:00:34 +00:00
Sander van Dijk bc30c6278c sdl: Make our error checking for SDL_Init(SubSystem) consistent with the SDL wiki/test programs.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1126 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 16:33:01 +00:00
Ozkan Sezer ce78a2ea51 run SDL_Quit() at exit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1125 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-18 11:20:14 +00:00
Eric Wasylishen 53288141e7 sys_sdl_win: Sys_SetDPIAware: only call GetProcAddress on a non-NULL library handle
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1121 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-17 00:15:49 +00:00
Eric Wasylishen f244f82c64 sys_sdl_win.c: Sys_SetDPIAware: call SetProcessDPIAwareness / SetProcessDPIAware
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1119 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-16 23:01:43 +00:00
Sander van Dijk 5438f83b08 keys.c: Add keynames BACKQUOTE and TILDE, to facilitate (un)binding them from the console.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1118 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 17:32:40 +00:00
Sander van Dijk e06f197879 keys: K_ALT is not a consolekey (it was accidentally added in r1112).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:18:29 +00:00
Sander van Dijk 25d630c1b8 console.c: When toggling the fullscreen console off, clear the current line.
This is consistent with toggling the in-game console off, and fixes stray '`' or '~' (or '^' or '\' or ..., depending on the keyboard layout) characters.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1116 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 06:06:18 +00:00
Sander van Dijk b2222b0a62 keys.c: Ignore control characters in Char_Event(), to prevent text input when pressing ctrl-c/ctrl-v.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1115 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-15 05:58:54 +00:00
Eric Wasylishen f607f1b4eb in_sdl: change DBEUG_INPUT preprocessor check to an "in_debugkeys" cvar to make it easier to debug unusual keyboards
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1114 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 18:31:49 +00:00