Commit graph

2353 commits

Author SHA1 Message Date
Pan7
2a38bca931 SDL_Init zero check 2015-07-24 22:56:00 +02:00
Tim Angus
61a49ba1db Merge pull request #129 from smcv/generic-platform
Implement Linux architecture support generically
2015-07-15 13:37:51 +00:00
Simon McVittie
2a71948f21 build: define ARCH_STRING in Makefile on Linux and other GNU platforms
GNU platforms (Linux, kFreeBSD, Hurd) have endian.h to determine
endianness, so all architectures except x86_64 are in fact treated
identically, except that their ARCH_STRING is different.
The ARCH_STRING must always be identical to the ARCH from the Makefile,
otherwise the engine will not find its cgame, game and ui plugins
under their expected names and startup will fail. If we pass it in
from the Makefile, then an identical value is guaranteed, and we can
get rid of an increasingly long list of defined(__some_cpu__) tests.

The one remaining quirk is that we test __x86_64__ to determine
whether to define idx64; I've kept that, but separated it from
the ARCH_STRING.

On non-Linux platforms we only support a few architectures anyway,
so keeping the list up to date is less of a burden; *BSD porters
could probably use the same technique to get support for lots of
architectures with little effort, but I have not done that here,
because I cannot test it.

Windows must continue to support preprocessor-based architecture tests
in any case, so that the MSVC solutions (which do not use the Makefile)
can continue to work. However, Windows only runs on a few CPU families,
so this shouldn't be a significant burden in practice.

When cross-compiling, the tools are compiled for the build architecture
(COMPILE_PLATFORM, COMPILE_ARCH) rather than the host architecture
(PLATFORM, ARCH), so define ARCH_STRING to COMPILE_ARCH on a GNU
COMPILE_PLATFORM.
2015-07-14 22:51:57 +01:00
Zack Middleton
c91fe0bcfe Fix handling too many teams in Team Arena UI 2015-07-13 00:09:22 -05:00
Zack Middleton
b4b68b8e80 Remove logically dead code from CL_GetServerStatus
Found by Coverity.
2015-07-12 21:14:04 -05:00
Zack Middleton
604b63f00f Fix cgs.teamVoteString buffer overflow in CG_ConfigStringModified
Found by Coverity.
2015-07-12 21:08:16 -05:00
Zack Middleton
a5fbc1bfc4 Fix alloc size for default skin and single shader skin
Found by Coverity.
2015-07-12 20:41:47 -05:00
Zack Middleton
4473924636 Remove logically dead code in R_CheckFBO
Found by Coverity.
2015-07-12 20:35:22 -05:00
Zack Middleton
c7500bb28e Don't segfault in FS_CreatePath when there are no path seperators 2015-07-12 20:06:24 -05:00
Zack Middleton
2e904141ff Make more vm_x86 macros use braces so they work with if blah run macro
MASK_REG in EmitMovEDXStack would incorrectly emit asm if 'andit' was 0.
'andit' would never be 0 though so it wasn't causing issues.

Found by Coverity.
2015-07-12 19:11:13 -05:00
Zack Middleton
ee2541efee Fix range checks for numBorders in CM_AddFacetBevels
Found by Coverity.
2015-07-12 18:39:54 -05:00
Zack Middleton
9f57fea0ee Backport ignoring values outside lightgrid to OpenGL1
Fixes possibly of reading memory past end of lightGridData or reading
wrong light grid data (wrapping around to next row).
2015-07-12 18:17:57 -05:00
Zack Middleton
1bb2bc370d Fix OpenGL2 ignoring last light grid point on each axis
Also change light grid bounds clamping to make it more clear what invalid
values are.
2015-07-09 22:42:01 -05:00
Zack Middleton
5768e2316a Remove unused fpucw from snapvector.asm
It's usage was removed in commit 8a500d71.
2015-07-09 18:35:45 -05:00
Zack Middleton
993b838f27 Fix Windows file list extension check
Windows' Sys_ListFiles would add files that contain the extension anywhere,
not only at the end of the file name.

Example: "word.pk3omghacks" use to be loaded as a pk3 file.
2015-07-04 20:46:03 -05:00
Zack Middleton
b152cf1423 Don't fog 3D crosshair sprite 2015-07-04 19:33:28 -05:00
Zack Middleton
5e575ae82e Apply greyscaling to fog blocks 2015-07-04 19:17:58 -05:00
Zack Middleton
386a00fc2b Fix CGame CG_WaterLevel() comparisons
My last commit made it so that CGame "waterlevel 1" is feet in water,
but before it was erroneously about waist deep in water. The places
where it is checked it is suppose to be view position underwater.

Change comparisons to use correct value for view position underwater.
2015-07-04 05:53:29 -05:00
Zack Middleton
08ac364cd6 Fix CG_WaterLevel() checks for waterlevel 2 and 3
CG_WaterLevel() added lerpOrigin to itself instead of adding view height
when checking for waterlevel 2 and 3. This did not cause issues because
ioq3 only compared the calculated waterlevel to more or equal to 1.
2015-07-04 03:40:05 -05:00
Zack Middleton
6a03817a9c Merge pull request #4 from smcv/hurd
Add support for the GNU/Hurd architecture
2015-06-30 19:02:46 -05:00
Martin Michlmayr
ebb69f699c Add support for Aarch64 (ARM64)
Add support for Aarch64, the 64-bit ARM architecture.
2015-06-30 14:22:49 -04:00
Zack Middleton
6d62dc3646 Fix abs() being used for float in cl_input.c 2015-06-28 18:27:09 -05:00
Zack Middleton
1d09a7d578 Fix abs() being used for long int in l_precomp.c 2015-06-28 18:13:06 -05:00
Zack Middleton
70eb1fa79e Make cinematic times be int like CL_ScaledMilliseconds
Cinematic's startTime and lastTime are always set from CL_ScaledMilliseconds
which returns int and are converted back and forth to int and unsigned int.

This fixes a warning that abs() is used on an unsigned int.
2015-06-28 18:02:51 -05:00
Zack Middleton
b27e0fbf95 Remove unused function WRITE_1BYTES from cl_avi.c 2015-06-28 17:55:51 -05:00
Zack Middleton
f0c4c185fc Remove check for cg_recordSPDemoName.string array address
It will always be true.
2015-06-28 17:55:25 -05:00
Zack Middleton
da8a74d734 Fix variable declaration for C89 compilers 2015-06-28 16:29:10 -05:00
Tim Angus
61825d8e5f Check SDL_GetNumDisplayModes return value for errors 2015-06-28 18:01:03 +01:00
/dev/humancontroller
c52e35bcd8 fix a stupid use of strcpy()
strcpy() arguments may not overlap !
2015-06-18 17:24:50 -05:00
Zack Middleton
5d7612ec84 Merge pull request #109 from Pan7/SIGABRT
SIGABRT is in ANSI and POSIX.1, and SIGIOT isn't.
2015-06-18 13:20:54 -05:00
Zack Middleton
9e03e606cd Merge pull request #108 from Pan7/memmove
No unix memmove for MSVC
2015-06-18 13:13:25 -05:00
Zack Middleton
e857ed7273 Merge pull request #118 from jkent/master
fix buffer overflow in CL_CheckForResend
2015-06-18 13:09:58 -05:00
Zack Middleton
f110f668bf Move image load function prototypes to tr_common.h
The functions themselves are in code/renderercommon/tr_image_*.c
2015-06-12 14:22:37 -05:00
Zack Middleton
e5af084211 Remove erroneous new line from error message 2015-06-12 13:08:10 -05:00
Tim Angus
77ad75887f Merge pull request #105 from smcv/sdl-modes
Don't crash if more than 128 modes are available
2015-06-12 16:29:38 +01:00
Tim Angus
68dbb8a1bb Commit newly generated gram.c 2015-06-06 23:06:19 +01:00
Tim Angus
01275693a6 Fix cppcheck warning 2015-06-06 22:56:45 +01:00
Zack Middleton
5082548bf5 Horizontal scroll should not cause K_MWHEELDOWN key press 2015-05-29 16:38:43 -05:00
Zack Middleton
2292bf5bb2 Save bot accompany distance across map change or restart
If a bot is accompanying someone before map change or restart, the bot would
continue accompanying them but press up against them and orbit around them.
This is caused by the bot's formation distance being 0.

Save the formation distance so they maintain proper distance and do not
orbit around the player.
2015-04-30 17:19:00 -05:00
Jeff Kent
63e6c82f4b fix buffer overflow in CL_CheckForResend 2015-04-18 22:43:47 -05:00
Zack Middleton
8265af84be Let's not ifdef MISSIONPACK inside of ifdef MISSIONPACK 2015-04-12 20:00:08 -05:00
Zack Middleton
10c5f0b5a9 Merge pull request #116 from smcv/system-minizip
Enhancements for system libraries
2015-04-12 19:56:37 -05:00
SmileTheory
3ebc230b28 OpenGL2: Use signed value in case value goes below 0. 2015-04-06 03:05:28 -07:00
Zack Middleton
c755d75a5e Fix MDR surface indexes overflow check
Also, use the check overflow macro like everywhere else.
2015-03-25 15:41:03 -05:00
Zack Middleton
1a7628126a OpenGL2: Fix shadow cubemap segfault
Changed image size to 512, but 'data' buffer is only 16x16 resulting
in libGL segfault. Use NULL instead like other dynamic images.
2015-03-24 03:39:53 -05:00
Zack Middleton
f47d148b72 Add a comment about non-functional bot code 2015-03-23 20:36:27 -05:00
/dev/humancontroller
1ce8ba0cdb Fix return values in nested system calls from QVMs
When the engine is compiled with Clang it appears that the return value
is being written to the WRONG address, either due to the vm_ variables being
changed (unexpectedly) elsewhere, or as a result of bad assembly assumptions;
having a stack variable pointing to where to write the return value seems
to do the trick.

This fixes the case where, for a trap_Register()-like call, weird numbers
are being returned when, during the process, an error message is printed
(which in Tremulous results in a QVM call and (nested) system call).
2015-03-23 20:17:07 -05:00
Author: Xycaleth
33efe82de9 OpenGL2: Fix shadow cubemap size 2015-03-23 20:05:35 -05:00
Zack Middleton
7a39f4a30c Fix attacker icon being default image if attacker left
With cg_draw3dicons 0 if attacker is kicked or disconnects, the
attacker icon becomes the default image.
2015-03-23 19:54:26 -05:00
Zack Middleton
1897afbd3a Fix crosshair drawing not clearing color
The renderer color is set to health color when drawing crosshair. After
drawing the crosshair, the renderer color was not cleared and could affect
other things. With cg_draw3dicons 0 and cg_drawCrosshairNames 0 it affected
the attacker icon.
2015-03-23 19:33:56 -05:00
Zack Middleton
5fb49acda8 Clean up CG_DrawProxWarning design
Hopefully fixes the following warning
cg_draw.c:2315 assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
2015-03-20 21:21:47 -05:00
/dev/humancontroller
c4a2836269 Fix Com_RandomBytes weak-random case
255 is valid for unsigned char too.
2015-03-20 18:50:58 -05:00
Simon McVittie
caf08fdb7b unzip: comment why there is no USE_INTERNAL_MINIZIP boolean option
Bug: https://github.com/ioquake/ioq3/pull/116
2015-03-18 17:38:10 +00:00
SmileTheory
40cfbc9a82 OpenGL2: Fix culling again. 2015-03-12 21:44:06 -07:00
Zack Middleton
148603c951 Don't run vid_restart when "resized" to current size 2015-02-28 18:35:41 -06:00
Zack Middleton
c4f5176af4 Set bsp_trace_t::surface.flags to surfaceFlags in server and game
Revert last commit so that grapple sky check is compatible with BSPC
BotImport_Trace in (removed from repo) code/bspc/be_aas_bspq3.c.

Set bsp_trace_t::surface.flags instead of surface.value to trace_t::surfaceFlags.
surface.flags is only used for the sky check for grapple AAS reachability.
surface.value is not used at all.

bsp_trace_t is not part of the game VM API, so this does not affect VM compatibility.
BotAI_Trace in game was changed to match server. surface.value/flags are not used in game.
2015-02-18 15:17:57 -06:00
Zack Middleton
dbd6f6d8b1 Fix AAS_Reachability_Grapple's sky surface check
Surface flags are stored in bsptrace.surface.value not flags.
2015-02-18 13:39:59 -06:00
Zack Middleton
99b74fc5bf OpenGL2: Remove unused function prototype from tr_fbo.c 2015-02-07 18:52:03 -06:00
Zack Middleton
4fb053b8e7 Fix incorrect strncpy in S_AL_StartBackgroundTrack
Error is loop argument is NULL.
Ensure that s_backgroundTrack is a null terminated string.
2015-02-05 04:37:26 -06:00
Ensiform
43c7f1e734 Inform how many shader stages the max is in the warning message 2015-01-26 02:39:59 -06:00
Xycaleth
2742dfad26 Add arrow key support for win32 console 2015-01-26 02:39:59 -06:00
Ensiform
b9e97b3857 Move Event processor call down below the mouse checks.
Only send mouse events if both values are non-zero.

Hopefully this helps with the event overflow spam that can sometimes
happen on loads or laggy situations.
2015-01-26 02:39:58 -06:00
vloup
d7f00e2b65 Fix Team Arena tauntGauntlet command 2015-01-26 02:39:58 -06:00
Pan7
9c52d6c2bf SIGABRT is in ANSI and POSIX.1, and SIGIOT isn't. 2015-01-18 18:41:06 +01:00
Pan7
16c67b96c2 No unix memmove for msvc 2015-01-17 18:15:03 +01:00
Zack Middleton
10e2caad46 Fix crash in MSVC x64 qsnapvectorsse, bug #5905
Make MASM x64 qsnapvectorsse the same as the inline version.
Remove leftover OP code, see commit 8a500d71da.
2015-01-14 15:29:45 -06:00
Zack Middleton
af8acbd7a9 Make barrel/flash model name buffer safe 2015-01-12 22:35:20 -06:00
Zack Middleton
af617bc0e6 Fix possible levelPicNames buffer overflow in q3_ui 2015-01-12 21:28:03 -06:00
Zack Middleton
daa604ae9b Fix parsing bots in arena info with trailing spaces
q3_ui would shown bot at index of number of bots in list.
game would send empty name to addbot command and command would think skill
(i.e., 2.000000) was the bot name.
2015-01-12 21:28:03 -06:00
Zack Middleton
9c4b75c499 Remove logically dead code from UI_GetServerStatusInfo 2015-01-12 21:28:03 -06:00
Zack Middleton
78e7656900 Make Window_Paint check if w is NULL before dereference 2015-01-12 21:28:03 -06:00
Zack Middleton
84e792f453 Fix (unused) "orders" menu script logic
"orders" menu script is not used by Team Arena.

The same C format string was given an int or string argument depending on if
ordering a single person or everyone. Make it always use int.
2015-01-12 21:28:03 -06:00
Zack Middleton
f74479afe8 Fix handling too many characters or aliases in Team Arena UI 2015-01-12 21:28:02 -06:00
Zack Middleton
07eb0f6dc9 Fix possible string buffer overflows in Team Arena UI 2015-01-12 21:28:02 -06:00
Zack Middleton
5020361be4 Fix off-by-one range checks in Team Arena UI 2015-01-12 18:31:39 -06:00
Zack Middleton
d62dfd87f9 Set float rounding mode on non-Windows platforms
Sys_SetFloatEnv in sys_unix.c existed but was not called. It sets the
rounding mode to "to nearest" which is the default on Linux. Might be
required on other platforms, I don't know.
2015-01-12 17:03:13 -06:00
Zack Middleton
1ff28f2389 Merge pull request #22 from zturtleman/cvar_modified
Add cvar_modified command
2015-01-07 19:48:16 -06:00
Zack Middleton
e7c7ca1309 Merge pull request #100 from Pan7/q3lcc
q3lcc option -lcppdir and -lrccdir.

Enabled using `q3lcc -Wo-lrccdir=/path/to/dir -Wo-cppdir=/path/to/dir`.
2015-01-07 19:45:12 -06:00
Zack Middleton
bd2af6e4ea Use MSVC mode marcos for creat in q3cpp on Windows
Using unix mode 0666 for creat was causing crashes when compiled with MSVC.
So use the marcos recommended by MSDN. MinGW also has the marcos, so apply
to Windows builds in general.
2015-01-07 19:27:59 -06:00
Zack Middleton
aa1aad928e Merge pull request #98 from Pan7/lcc
Windows header files for q3lcc
2015-01-07 19:31:51 -06:00
Zack Middleton
010821384c Merge pull request #97 from Pan7/outp
Renaming outp to outbufp because outp() is an existing function
2015-01-07 19:27:53 -06:00
Simon McVittie
df7dab721f Don't crash if more than 128 modes are available 2015-01-07 23:39:12 +00:00
Simon McVittie
ff7ff32b0e Ensure that mbstowcs does not overflow its buffer
Similar to one of the changes by Tim Angus in fd986da: mbstowcs' third
argument is the number of wchar_t available in dest, not the number
of bytes.

This does not appear to be exploitable, because ioquake3 does
not actually call mumble_set_identity() or mumble_set_description()
anywhere, but it might be relevant to derivatives.

Spotted via compiler warnings.
2015-01-07 23:37:11 +00:00
Michael Rieder
7c5feef6a2 Have custom intro cinematics for standalone game 2015-01-07 23:47:18 +01:00
Jun Woong
8469c40c2b Stop LCC from warning about null pointer conversion to function pointer
Fixed LCC to correctly diagnose expressions with NPC. It no longer reports messages such as

    warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
2015-01-06 23:43:04 -06:00
Pan7
c4f851668b q3lcc option -lcppdir and -lrccdir 2015-01-07 03:43:18 +01:00
Tim Angus
dd82b9d1a8 Fix case where interval overflows (thanks jackeri)
[17:58] <Jacker> hey, you might be interested in checking out this
4da5a397b5 (diff-acaedc9d8b492f9af8966ae68597392cR615)
[17:58] <Jacker> its related to the ddos protection code you wrote
[17:59] <Jacker> in continuation to:
ab9b08e584
[17:59] <Jacker> in a case if the client has in the past connected to
the server days/weeks earlier and time wraps the client wont be able to
connect
[18:00] <Jacker> since in that case if the bucket of that clients ip
still exists it wont get checked correctly
2014-12-29 19:08:42 +00:00
Zack Middleton
7de09c3490 Include stdint.h instead of inttypes.h in libmumblelink.c
MSVC 2010 has stdint.h but not inttypes.h.
Debian (GCC, MinGW) and OS X (Clang) can compile using stdint.h.
2014-12-28 15:08:02 -06:00
Zack Middleton
3cc16d6b92 Merge pull request #94 from wombat23/asmfix
Fix compile error with ml64 assembler
2014-12-28 15:06:29 -06:00
Tim Angus
a2bbb74cae Unfix warning 2014-12-28 15:47:40 +00:00
Tim Angus
4756826521 Fix warning 2014-12-28 12:44:59 +00:00
Zack Middleton
70e3d61006 Fix cg.intermissionStarted only being enabled at first intermission
Game sets CS_INTERMISSION to 1 at intermission, but does not clear it at
map_restart so it's only sent the first time. CG_MapRestart manually clears
cg.intermissionStarted (which is set to value of CS_INTERMISSION when it's
modified). So subsequent intermissions do not have cg.intermissionStarted
enabled.

Now CS_INTERMISSION is cleared and sent each time intermission is started
and cg.intermissionStarted is enabled each time.

This makes subsequent intermissions not play sounds in CG_CheckLocalSounds
during the 1 second between intermission starting and switching to scoreboard
(PM_INTERMISSION) and makes Team Arena voice chats not play.
2014-12-27 18:32:49 -06:00
Pan7
a82fb6d1b1 Windows header files for q3lcc 2014-12-26 23:33:52 +01:00
Pan7
6de3f51c23 Renaming outp to outbufp because outp() is an existing function 2014-12-26 12:52:10 +01:00
Zack Middleton
4463af85fb When player stops following a player, keep view angles
Now player keeps looking the same direction instead of facing somewhere else
which is slightly disorienting.
2014-12-19 22:09:26 -06:00
Zack Middleton
5cf45c5937 Don't use dead view angles after stop following a dead player
If ps.stats[STAT_HEALTH] is less or equal to 0, cgame uses fixed view angles.
When stop following a player, make sure health isn't less or equal to 0.
2014-12-19 22:08:06 -06:00
Zack Middleton
a700b76722 Fix reading 4 byte UTF-8 text input 2014-12-19 21:56:54 -06:00
Zack Middleton
65121c62c9 Add weapon barrel to gauntlet/mg/bfg items in baseq3 too 2014-12-10 19:29:36 -06:00
Zack Middleton
b0561e5fb4 Fix weapon barrel angle on Gauntlet and BFG items in Team Arena
The barrels were rotated 90 degrees from what they should be.
Used barrel code from CG_AddPlayerWeapon to fix them.
2014-12-10 19:23:35 -06:00
Michael Rieder
55c15e4466 Fix compile error with ml64 assembler 2014-12-07 03:40:52 +01:00
Zack Middleton
424122c366 Fix bot's teamleader name field being too short
Players using names with 32 to 35 characters could not be recognized as
the team leader.

Reported by Razor.
2014-12-04 16:50:28 -06:00
Zack Middleton
b21a59af8c Fix negative glyph index in Team Arena text functions
Team Arena's text functions cast signed char values to int and use as an array index.
This works fine for values 0 to 127, but not for -128 to -1 which are a negative array index.
Instead use "character & 255" like client and original Q3 ui/cgame string drawing code.
2014-12-01 22:14:58 -06:00
Zack Middleton
08ddb99732 Fix saving/loading glyph 255 in RegisterFont
The glyph for character 255 (lower case y with two dots above it) was
rendered, but it's glyph information was not stored in fontInfo_t and
not saved into .dat file (including the ones in Team Arena).

Attempting to load it from existing .dat font files is fine because
shader name is "" and gets 0 handle. The handle was already 0 anyway.
2014-12-01 22:04:40 -06:00
SmileTheory
8c7fedb1fe OpenGL2: Fix face culling. 2014-11-30 21:50:33 -08:00
SmileTheory
fd23249357 OpenGL2: Ensure tess VAO is bound before using it. 2014-11-21 16:12:53 -08:00
Zack Middleton
c787cf3aef Fix stencil shadows not drawing if has 500 or more vertexes
Stencil shadow is not drawn if a mesh, or multiple meshes with the same
entity and shader, have more than 500 vertexes. The issue is caused by storing
the projected positions in the tess vertex buffer. Use a new array instead.
2014-11-16 21:21:30 -06:00
Zack Middleton
d06deb41c8 Don't set fog image border color
GL1's R_CreateImage sets GL texture to 0 before it ends, so border color is not
applied to the fog image. GL_CLAMP is not used for fog image (in either renderer),
so it would presumably not be used even if applied to the fog image.
2014-11-16 14:59:09 -06:00
Zack Middleton
60d28722ef Remove unfinished OpenGL display list code
It seems unlikely anyone is going to do anything with this aside from stub
it out in OpenGLES ports.
2014-11-16 14:57:13 -06:00
Zack Middleton
22bcda018b Correct a few OpenGL variable types
Affectly no change for desktop OpenGL.
Use correct types for OpenGLES support.
2014-11-16 14:56:43 -06:00
SmileTheory
89b719ec8d OpenGL2: Bit more parallax optimization. 2014-11-14 01:12:41 -08:00
SmileTheory
d9e2184c1a OpenGL2: Add support for parallax occlusion mapping. 2014-11-10 22:11:36 -08:00
SmileTheory
b1821e303d OpenGL2: remove lightmap support from generic glsl shader.
This path was barely used and doing this compiles fewer shaders.
2014-11-10 21:59:37 -08:00
Zack Middleton
1d016e6ff5 Clear window buffer when it's created
When starting the game in windowed mode, the window buffer used whatever
was on the screen before running the game. Kind of like you could see
through the window, but it doesn't update what happens behind it.

It makes it look like something is broken or non-responsive.

So clear the window opengl buffer to black.

Credit to theinvsblman for the code.
2014-11-07 21:50:00 -06:00
SmileTheory
1ad2b413ef Remove accidentally added increment. 2014-11-03 22:18:17 -08:00
SmileTheory
943259f6b4 OpenGL2: Support half floats for texcoords and vertex colors. 2014-11-03 19:10:35 -08:00
Zack Middleton
1ba9e7a45e Always use GL_Cull to change cull state
Manually changing cull state can cause later GL_Cull calls to not change
the cull state.
2014-10-29 01:32:50 -05:00
Zack Middleton
39cf21bf54 Fix pid file ignoring user set fs_homepath
Create pid file in fs_homepath instead of (always) default homepath.
If not manually set, fs_homepath is set to Sys_DefaultHomePath().
2014-10-29 00:03:49 -05:00
Zack Middleton
3273df14af Add missing EV_USE_ITEM15 cases
Add EV_USE_ITEM15 to cg_event.c and ai_dmq3.c for consistency.
2014-10-29 00:03:49 -05:00
SmileTheory
e488663e31 OpenGL2: Change normal/tangent vertex encoding. 2014-10-28 18:15:13 -07:00
SmileTheory
7e808f92d6 OpenGL2: Speed up tonemap shader. 2014-10-27 06:37:57 -07:00
Pan7
50038a7d26 qcurl_multi_add_handle error check 2014-10-26 17:10:41 +01:00
SmileTheory
3765652778 OpenGL2: Fix corrupt models. 2014-10-23 16:51:10 -07:00
SmileTheory
4f5ebf8349 OpenGL2: Bit of multidraw optimization. 2014-10-16 00:32:20 -07:00
SmileTheory
03ac9649ea Fix a bug in previous commit. 2014-10-15 20:28:26 -07:00
SmileTheory
e34972b110 OpenGL2: Fix missing surfaces with r_mergeMultidraws 2. 2014-10-15 20:00:54 -07:00
SmileTheory
541d3a40c2 OpenGL2: Interleave vertex data for static MD3s. 2014-10-15 03:42:29 -07:00
SmileTheory
05e07311ba OpenGL2: Fix invalid texture parameter. 2014-10-15 03:40:16 -07:00
SmileTheory
0578b70f38 OpenGL2: Reduce redundant GL calls. 2014-10-14 06:15:06 -07:00
SmileTheory
84206c8598 OpenGL2: Vertex array object support. 2014-10-14 01:50:44 -07:00
SmileTheory
873a02bd3c OpenGL2: VBO cleanup. 2014-10-13 21:57:06 -07:00
SmileTheory
a90c17ac1b OpenGL2: Better BSP surface merging. 2014-10-07 04:17:01 -07:00
Zack Middleton
918eed9295 OpenGL2: Don't segfault if r_ext_multitexture is disabled 2014-09-29 01:02:13 -05:00
Zack Middleton
a955d975b7 Add function for clearing global shader instead of duplicating the code 2014-09-27 01:35:35 -05:00
Tim Angus
f83334d81b Add facility to describe cvars 2014-09-26 14:29:51 +01:00
Tim Angus
f9c202f83e Use correct type for thinktime 2014-09-26 14:29:11 +01:00
Zack Middleton
24923615b7 Don't add duplicate resolutions to r_availableModes
SDL can give the same resolution with different refresh rates.
The refresh rate isn't used, so only add resolution to mode list once.
2014-09-20 19:23:33 -05:00
Zack Middleton
9fbbf4214d Fix Windows key bind name on non-Mac using SDL2
SDL 1.2 sends SDKL_*META (command) and SDLK_*SUPER (windows key).
SDL2 sends SDLK_*GUI for both.
2014-09-11 20:04:28 -05:00
Zack Middleton
878cda6a20 Fix binding 'context menu' key using SDL2
SDL 1.2 converted Windows' VK_APPS and X11 XK_Hyper_R to SDLK_MENU.
SDL2 has it as a separate SDLK_APPLICATION key, so convert it to K_MENU too.
2014-09-11 20:03:54 -05:00
Zack Middleton
4529f124d6 Merge pull request #29 from inolen/shader_tidying
misc shader fixes
2014-09-09 19:18:59 -05:00
Zack Middleton
a5d641b3d0 Merge pull request #84 from MAN-AT-ARMS/openal_speedsound
Change default value for s_alDopplerSpeed
2014-09-09 18:05:08 -05:00
Zack Middleton
d5ddb72502 Merge pull request #85 from MAN-AT-ARMS/curl_fixes
Fix building with curl on Linux PPC and Sparc
2014-09-09 18:03:36 -05:00
MAN-AT-ARMS
dd69576dc1 Fix building with curl on Linux PPC and Sparc 2014-09-09 13:18:28 -04:00
MAN-AT-ARMS
a3653e475e Change default value for s_alDopplerSpeed 2014-09-09 13:03:29 -04:00
MAN-AT-ARMS
dd83cbdc25 Fix possible division by zero in S_PaintChannelFrom16_altivec 2014-09-09 11:30:23 -04:00
Tim Angus
43b21055b8 Actually, that's not suppressing, that's changing behaviour 2014-09-01 13:07:08 +01:00
Tim Angus
7277d8d6e7 Fix more warnings 2014-09-01 13:03:06 +01:00
Tim Angus
6665ea4a49 Fix renderergl2 warnings 2014-09-01 11:35:49 +01:00
Tim Angus
d38039f975 Fix renderergl1 warnings 2014-09-01 11:31:39 +01:00
Tim Angus
eeaf0227f7 Suppress warning of (deliberate) null pointer deference 2014-09-01 11:19:57 +01:00
Tim Angus
4f3c95c589 Fix client warnings 2014-09-01 11:13:47 +01:00
Tim Angus
fbdb3e0875 Fix game warnings 2014-09-01 11:09:11 +01:00
Tim Angus
b55809b925 Fix ui warnings 2014-09-01 11:05:46 +01:00
Tim Angus
4444202a41 Fix cgame warnings 2014-09-01 10:47:15 +01:00
Tim Angus
621a72e698 Fix a few warnings 2014-08-30 17:29:23 +01:00
Zack Middleton
c621589157 Fix 6155: OpenGL2: some shader stages remains visible through fog volumes
Fix CalcFog in generic_vp.glsl to fog fogged surfaces.
Now it's the same as CalcFog in fogpass_vp.glsl.

Fixes shaders that use adjustColorsForFog. Impact wallmarks, blood sprites, flame textures and so on.
2014-08-29 02:50:02 -05:00
Zack Middleton
de3062623a Use ColorIndexForNumber in Con_DrawSolidConsole 2014-08-29 01:55:47 -05:00
Zack Middleton
e742952db8 Port COM_ParseExt fixes to CommaParse 2014-08-28 20:34:05 -05:00
Zack Middleton
1d95ef210e SDL 2 scroll/caps/num lock keys send KEYUP event when key is released 2014-08-28 20:09:37 -05:00
Pan7
18e08125dd Add ColorIndexForNumber macro replacing '& 0x07'
Makes it easier to add more colors.
2014-08-28 20:09:37 -05:00
Zack Middleton
eeef7cbae7 Don't scale cinematic time by timescale twice
Reported by Ensiform.
2014-08-28 20:09:37 -05:00
Zack Middleton
f17f58705c Remove a numIboIndexes=0 that is not read from GL2 tr_bsp.c
numIboIndexes is set to 0 inside the loop for each surface. Does not need to be set before loop.
2014-08-27 20:47:45 -05:00
Zack Middleton
e5f54c584a Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
2014-08-27 20:35:16 -05:00
Zack Middleton
0853c85e19 Fix incorrect strncat usage in CL_ServerInfoPacket 2014-08-27 20:35:16 -05:00
Zack Middleton
b0596248ff Remove unused functions from null_main.c and null_input.c
Sys_mkdir is suppose to have a capital M, which is also in null_main.c.
2014-08-27 20:35:16 -05:00
Tim Angus
86b75ba936 There have been 0 days since the last compiler warning 2014-08-27 12:40:45 +01:00
Tim Angus
0c0019a2d1 Fix some warnings 2014-08-27 11:24:25 +01:00
Zack Middleton
137ddb9dc6 Get clipboard data from SDL
This makes pasting in client console and UI edit fields work on X11 and OS X.

Sys_GetClipboardData is only used by client, so returning NULL in dedicated is fine.
2014-08-27 04:32:05 -05:00
Zack Middleton
077f6bd068 Fix binding KP_NUMLOCK
Restore mapping SDL numlock to quake3 numlock.
2014-08-26 23:01:18 -05:00
Tim Angus
cf7004ffb2 Fix OSX build 2014-08-25 12:03:10 -04:00
Tim Angus
2a3368481d Merge branch 'master' into sdl2
Conflicts:
	Makefile
	code/renderergl2/tr_image.c
2014-08-25 15:00:48 +01:00
Tim Angus
7d026177ad Fix assorted warnings 2014-08-25 14:48:49 +01:00
SmileTheory
ca9eebb125 OpenGL2: Fix a glsl compile error on old hardware with r_shadowFilter 0. 2014-08-02 00:02:46 -07:00
SmileTheory
ff1f093a0b OpenGL2: Remove R_MipMap() and R_MipMap2(), and fix gamma conversion in R_MipMapsRGB() 2014-08-01 23:57:26 -07:00
SmileTheory
2b2d696f12 OpenGL2: Add fourth cascade for sun shadows, and adjust sun shadow cvar defaults. 2014-07-31 21:01:57 -07:00
/dev/humancontroller
7b866ae96d guard against out-of-bounds jump table targets 2014-07-31 03:56:29 -05:00
Zack Middleton
75cce50a9c Don't load external GLSL files by default
External GLSL should probably only be used for development testing,
not released products. The GLSL files are tied to the code, and the
code changes some what often.

Fixes using OpenArena 0.8.8 which has incompatible GLSL files in a pk3.
2014-07-25 23:57:53 -05:00
SmileTheory
3d01543e2c OpenGL2: Replace R_MipMapsRGB() with faster version. 2014-07-22 11:43:19 -07:00
Pan7
f62d4c7f1c sayto cmd with player name completion 2014-07-18 00:15:05 +02:00
Zack Middleton
0fe2e8d224 Restore drawing a cut off client console line in 1920x1080
The text lines don't meet at top of the sceen in 1920x1080, restore
drawing a cut off line across the top. In 640x480 this line isn't seen
at all. This is still better then trying to draw twice as many lines
than are actually seen (the way it was before the last commit).
2014-07-13 02:07:45 -05:00
Zack Middleton
b9e0398244 Don't draw client console buffer past top of screen
Thanks @Pan7.
2014-07-12 21:57:03 -05:00
Zack Middleton
d9309ac6db Fix overstrike/insert logic being reversed in q3_ui 2014-07-03 21:06:05 -05:00
Zack Middleton
1d664a3a10 Remove unused cvar in_joystickDebug 2014-07-03 20:59:54 -05:00
Zack Middleton
5994564537 Remove unused array joy_pressed 2014-06-19 20:48:54 -05:00
Zack Middleton
5c1091b414 Fix SkipRestOfLine going past end of string
If string data starts with a 0 (string terminator), don't skip over it at p++.

Not causing any problems in ioq3 as far as I know.
2014-06-17 21:31:29 -05:00
Zack Middleton
95b241b8ba OpenGL2 don't try to dlight surfaces that had all dlights culled
In the renderers, dlightbits are never cleared from world surfaces.
The dlight image does not repeat, so if it draws on extra surfaces it's
not visible.

However if using a repeating image (tr.defaultImage instead of tr.dlightImage);

  * In OpenGL1 image is only drawn on surfaces close to dlight origin.
  * In OpenGL2 image is draw on surfaces clearly outside the dlight radius, including past non-dlighted surfaces.

It seems there was a similar issue with pshadowBits. So update surface
dlightBits even if 0, like already done for pshadowBits. This causes
only surfaces close to origin to be affected. (Though it is a little
farther than in OpenGL1.)

I have no idea why this isn't a problem in OpenGL1.
2014-06-10 21:34:31 -05:00
Zack Middleton
107cae63d6 Merge branch 'master' into sdl2
Conflicts:
	.travis.yml
2014-06-03 00:52:49 -05:00
Zack Middleton
b12a9acf4d Merge branch 'master' (early part 2) into sdl2 2014-06-03 00:50:50 -05:00
Ensiform
af79d2cb38 Fix an invalid null deref check in the slider code. 2014-05-29 22:27:00 -05:00
SmileTheory
9efaf819dc OpenGL2: Really obvious optimization to previous commit. 2014-05-27 20:52:36 -07:00
SmileTheory
318d45cff5 OpenGL2: Reimplement MD3 tangent space calculation. 2014-05-27 18:20:12 -07:00
Zack Middleton
347b429fdb Fix potential OOB in Windows Dedicated TTY CON_Show
Found by Coverity.
2014-05-26 23:11:56 -05:00
Zack Middleton
077ab4cbd1 Fix OOB access in CM_EdgePlaneNum without erroring in CM_GridPlane
I changed warning to error in 9d74227559,
which broke JA's mp/ctf4 map and probably others.
2014-05-25 23:03:42 -05:00
Zack Middleton
eeeaf3f125 Fix potential buffer overflow caused by long tcMod args
Found by Coverity.
2014-05-25 18:44:17 -05:00
Zack Middleton
9c99cf29db Have OpenGL2 "map $lightmap" check for NULL tr.lightmaps too
Zero length lightmap lump will have NULL tr.lightmaps.

OpenGL1 already has this check, because r_vertexLight 1
would crash Team Arena. OpenGL2 does not disable loading lightmaps
when r_vertexLight is 1 though, so it does not have that issue.
2014-05-25 18:41:57 -05:00
Zack Middleton
7a4ef47476 Fix max bans range check in SV_AddBanToList
Adding too many bans would write out of bounds. Found by Coverity.
2014-05-25 18:41:51 -05:00
Zack Middleton
eea9fbdb61 Fix unchecked buffer size issues in l_script.c and l_precomp.c
Found by Coverity.
2014-05-25 18:41:24 -05:00
Zack Middleton
078d004dc2 Fix potential buffer overflow in PS_ReadPrimitive
Found by Coverity.
2014-05-25 16:28:38 -05:00
Zack Middleton
e21ff01946 Don't use memset with non-zero value to fill ints
Coverity reported using value -2 as a bad memset. Really doesn't make sense when filling ints and not bytes too.
2014-05-25 16:10:01 -05:00
Zack Middleton
9d74227559 Fix potential out of bounds access caused by CM_GridPlane
Coverity doesn't care if there is a warning, out of bounds access is bad.
2014-05-25 15:59:09 -05:00
Zack Middleton
6a33a69795 Disable key repeat if key catcher is 0
SDL1.2 branch disables key repeat when key catcher is 0.
Presumably to prevent binds from executing multiple times.

SDL2 replaced being able to disabled key repeat using SDL_EnableKeyRepeat
with a non-zero repeat value in the key event.
2014-05-19 03:45:44 -05:00