When set to 1 mouse look key stops mouse looking
Signed-off-by: svdijk <svdijk@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
We allow for a "stride" parameter so that sub-pics can be used and a
simple boolean to indicate if alpha is enabled or not for palette
index 255.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
A lot of the churn is just re-ordering functions in the NQ file so that
the NQ specific menus are grouped together at the end of the file.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Mostly this is just being pedantic, but there were also some -1 vs.
K_UNKNOWN issues in the key bindings menu.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Create a new structure "brushmodel_t" which contains all the brush
model specific parts of model_t and shrink model_t down to size.
This makes the alias cache nice and small, so we can afford to have
lots of slots by default. I expect I'll do something similar for
separating alias and sprite model data too, but (hopefully!) the
changes will be far less wide ranging.
Lightly tested on a few maps, but there could still be bugs lurking...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Well, the only caching that is actually done is for the alias models.
Sprites and BSP models get forgotten as soon as the next map loads.
So allocate some space (currently hard coded to 512) for alias model
caching below host_hunkelevel and put bsp and sprite model structs
onto the hunk with the rest of the level data.
This structure still needs some work, but at least we should no longer
run out of space for models as long has we have some space on the
hunk.
The alias model overflow thing is probably a bit of overkill or the
wrong way to handle it - we should be doing some kind of LRU and
throwing away things we no longer need as well.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Pass an input and output buffer in (can be the same pointer) and
ensure that no more is written to the output buffer than will fit.
COM_DefaultExtension now returns an error if it ran out of space
adding the extension.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Fixes a kind-of-hard-to-trigger problem with SCR_UpdateScreen. Good
explanation from Baker here:
http://forums.inside3d.com/viewtopic.php?t=4944
Thanks Ozkan for pointing this one out for me.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Also fixed a bug where we were picking the wrong PHS leaf (off by one)
for multicast client messages.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Instead of single global variables to access the one currently loaded wad,
pass in a wad_t to access a specific wad. Currently this is only gfx.wad,
so the global for this is held by NQ/host.c and QW/client/cl_main.c.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Call V_StartPitchDrift only if lookspring has been turned on, then make
sure to call V_StopPitchDrift if mlook is on and the mouse is moved.
From Jacques Krige's tutorial, see http://www.quake-1.com/docs/quakesrc.org/1.html
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Fix the missing info in winquake.rc which I commented out long ago when I
didn't understand the build failures. Rip out all the extra "APSTUDIO"
generated stuff (is that an old Visual Studio?) and use the readable names
instead of numbers wherever possible.
For reasons I don't understand yet, this also fixed the audio problems
with the windows sound driver as well... may some graphic resource needs
to be loaded before init of sound?
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Replace the current video mode menu with one modelled after the FitzQuake
video options menu. This changeset is far larger than I usually would
like, but I'll try to summarise the main points below:
* The recent hack for command line mode setting got replaced
* The video driver now dumps all modes into modelist and calls a sort
function when completed. Modes are sorted by height, width, bpp and
refresh rate (in that order).
* vid mode 0 is now the only windowed mode and we update the width/height
when a different resolution is requested.
* vmode_t replaced with qvidmode_t and re-thought. Drivers can stuff a
small amount of data, currently only used by the SDL driver to save the
pixel format for each mode.
* Some old command line options removed: -allow360, -noforcevga,
-noadjustaspect.
While everything currently compiles, unfortunately some features are
currently broken. Here is a bit of a TODO list:
* Mode testing is currently broken (was broken on SDL previously)
* Command line mode setting is inconsistent and somewhat broken
* Sound gets messed up on vid_win.c and vid_wgl.c. The workaround in
vid_win.c seems effective there, but not in wgl, so it's probably not
the right fix in the end.
* x11 drivers only have compatiblity glue around the new menus
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Various local variable renames, re-arranging code with overly long
lines and getting rid of references to the global host_client and
sv_player pointers.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Change the spec of user command functions to always take a pointer to
the client struct of the executing client. Gets rid of *lots* of
references to the global host_client pointer.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Make the callers pass in the client id number and for now get them to
also set the global host_client and sv_player variables.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Make the playermove onground member a pointer to the physent - the
server wants to know which entity (edict) the player is standing
on. Make the onground member of the player_state_t a boolean, since
nobody cares what you're standing on, only if you are air/water bourne
or not (view.c).
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The usercmd is not modified, so just make it a const pointer
instead. Probably should be passed as a separate argument instead...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Get rid of global state and track using playermove_t. Software NQ gets
a little fix by reading the onground state from the view_message
(player_state_t) rather than the global onground value.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>