- Reverted the addition of the interpret_shift param to Key_Event
- Now, SDL_KEYUP/SDL_KEYDOWN are converted from SDL scancodes to quake keys, and passed directly to Key_Event with no extra conditions / logic
- When SDL2 is used, Key_Console/Key_Message no longer convert keys to characters to insert in the typing buffer, but all other functionality is unchanged
- SDL_TEXTINPUT calls a new function, Char_Event. This calls either Char_Console/Char_Message depending on the keydest. These just insert the typed text into the buffer
This is cleaner than before because it maintains a clear separation between key presses and characters, whereas the old code was converting characters from SDL_TEXTINPUT back into fake keys and then feeding those into Key_Event. This also fixes Ctrl+C / Ctrl+V not working in the console
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1020 af15c1b1-3010-417e-b628-4374ebc0bcbd
This seems to help fps a fair bit on maps with a lot of world polys like jam2_tronyn. Tried on a few computers with intel and nvidia gpus, windows, mac os, linux, and there's always at least some fps improvement. Best case was 70fps -> 96fps on jam2_tronyn, on OS X + nvidia 650gt.
Interested to hear how this works for amd gpu's, just do a timedemo with and without "-novbo".
Only downside is I had to disable the fast path in Vid_Toggle_f() because at least with SDL1, the vbo no longer works after a toggle. So as a result, fullscreen toggles with alt-enter are slightly slower.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1018 af15c1b1-3010-417e-b628-4374ebc0bcbd
interpret -missionpack and [-]game missionpack as the same as a new
QuakeSpasm extension. besides, do not let loading of the mission pack
directory twice.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1011 af15c1b1-3010-417e-b628-4374ebc0bcbd
* make 'game' command to strip all mission pack support
* make 'game' command to accept an optional second mission pack argument,
i.e. -hipnotic, -rogue or -quoth.
* so the new behavior does:
game id1 --> really returns to bare id1 game, doesn't accept any mission pack arguments
game xxx -hipnotic --> strip down to id1 game, load hipnotic and load xxx on top of them
game xxx --> strip down to id1 game and load xxx on top of it
* additionally, some extravaganza:
game xxx --> if the game is already xxx, but the engine was started with -hiptonic
or -rogue or -quoth, strip down to id1 and reload xxx on top of bare id1
game xxx -hipnotic --> if the game is already xxx, but the engine was started without
-hiptonic, strip down to id1, load hipnotic and reload xxx on top of them
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1010 af15c1b1-3010-417e-b628-4374ebc0bcbd
Also surround the SDL version by "#if defined(USE_SDL2)" and "#endif", this
suppresses an unused function warning when building for SDL1. (Building for
SDL2 still gives an unused variable "modstate" warning though.)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1002 af15c1b1-3010-417e-b628-4374ebc0bcbd
Not totally sure about this but i think it's a decent idea. I'm using 800x600 as a reference screen size (arbitrary choice but it's the default QS resolution). So if your resolution is 600 pixels tall this will make no difference. On higher resolutions this will make the console a bit faster than before.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@992 af15c1b1-3010-417e-b628-4374ebc0bcbd
PF_VarString is only called on the server, in:
- PF_error, PF_objerror, PF_dprint to print error / debugging messages
- PF_bprint, which calls SV_BroadcastPrintf which copies the string into a 1024-byte buffer, then sends that to clients in a svc_print message
- PF_sprint, which sends the string in a svc_print message using MSG_WriteString (without copying into an intermediate buffer)
- PF_centerprint, which sends the return value of PF_VarString in a svc_centerprint message (without copying into an intermediate buffer)
On the client:
- svc_print reads the payload string with MSG_ReadString (2048-byte buffer), then Con_Printf is called (4096-byte buffer)
- svc_centerprint uses MSG_ReadString then calls SCR_CenterPrint (1024-byte buffer)
I also checked the original quake source and the client-side buffers for MSG_ReadString, Con_Printf, and SCR_CenterPrint are all the same sizes as in QS.
Admittedly I want to support sock's ITS mod, but as far as I can see, it's a totally safe to increase this to 1024.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@985 af15c1b1-3010-417e-b628-4374ebc0bcbd
It caused a dramatic slowdown on my machine on windows (50% slower)
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@983 af15c1b1-3010-417e-b628-4374ebc0bcbd
The glBegin(GL_POLYGON), for() loop with GL_MTexCoord2fFunc()/glVertex3fv() calls, and glEnd () per polygon is replaced by a memcpy() and a glDrawArrays() call per poly.
My guess is this only saves function call overhead, but it gives a decent ~20% speedup (36 -> 42fps) on my machine on orl’s map.
Note: glDrawArrays() is in OpenGL 1.1, but the glClientActiveTextureARB function is part of the GL_ARB_multitexture extension but not GL_SGIS_multitexture. Instead of splitting into two code paths, I just dropped support for GL_SGIS_multitexture.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@981 af15c1b1-3010-417e-b628-4374ebc0bcbd
To make this work with the drawing order we use in gl_rmain (world excluding water, opaque ents, world water, transparent ents), I made each texture_t have two texture chains, one for world and one for bmodels. This way they can be cleared during entity drawing without having to regenerate the world ones.
Other than this the changes are mostly minor adjustments to the R_DrawTextureChains_* functions so they can work for things other than the world.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@979 af15c1b1-3010-417e-b628-4374ebc0bcbd
With that alone, the console would come down and slide up when the map changes in a demo.
I added a SCR_BeginLoadingPlaque() call in CL_ParseServerInfo, only done during demo playback, which shows the loading plaque and prevents the console from appearing and sliding up.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@976 af15c1b1-3010-417e-b628-4374ebc0bcbd
for a test case, play a demo from: http://www.quaketastic.com/upload/files/demos/otp_honey100.zip
for the honey map pack: http://www.quaketastic.com/upload/files/single_player/maps/honey.zip
on a slow pc that gets signifigantly less than 72fps, or with host_maxfps lowered (e.g. set to 33).
with QS 0.85.9, the demo will play in slow-motion; with QS 0.85.6 (without the cross-map demo support) it plays normally.
admittedly this is a fringe scenario, but it's imo a legitimate bug in the Pa3PyX cross-map demo playback code.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@974 af15c1b1-3010-417e-b628-4374ebc0bcbd