Commit graph

1462 commits

Author SHA1 Message Date
svdijk
ec9657134f Windows: icon.rc is a source file, so move it to the source directory. 2015-11-04 21:05:30 +01:00
svdijk
00768dff9e CMake: Partial revert of b0479ce.
Because setting both a default target directory and a configuration specific target directory wouldn't work as intended with multi-configuration generators.
2015-11-04 20:44:12 +01:00
svdijk
b0479ce200 CMake: Fix output dir for DLLs, also default to Release dir for non-debug builds 2015-11-03 22:57:18 +01:00
svdijk
60232425bb CMake: Support YQUAKE2LIBS also for cross compiling 2015-11-03 22:12:46 +01:00
Daniel Gibson
4cbe5f25e0 Fix volume of looped sounds in OpenAL backend, fixes #111
AL_PlayChannel() is only called by AL_AddLoopSounds() and
S_IssuePlaysound() - but only the latter set a volume there.
Because of that, loopsounds weren't hearable anymore after the last
commit which removed adding s_volume to all volumes in AL_PlayChannel().
This is fixed by setting the volume for looped sounds in
AL_AddLoopSounds() as well.
Looped sounds don't seem to have a customizable volume and are always
played at full volume (the volume is only changed by distance, but
OpenAL does that automatically).
2015-11-02 01:48:52 +01:00
Daniel Gibson
4e13e3ee69 Uncouple s_volume from raw samples (Ogg playback and cinematics) 2015-11-01 18:02:22 +01:00
Daniel Gibson
fd31e0060d Remove CD music enable box and introduce OGG volume slider in menu
The CD music enable / disable box wasn't used by many users for two
reasons: CD music playback needs a CDROM drive with analog output.
Such drives aren't available for at least 10 years. And CD music is
unsupported with SDL2. A OGG volume slider is much more usefull.
2015-11-01 17:45:09 +01:00
Daniel Gibson
12604bebe9 Change version to 5.33pre, changes for arbitrary length version strings
Con_DrawConsole() assumed that the version string was always 21chars
long, we changed it to allow longer strings with other lenghts.
In Unix main() we changed the code for underlining
"Yamagi Quake II $version" with === so the underlining is as long
as the underlined string.
2015-11-01 17:15:10 +01:00
Yamagi Burmeister
92d48735f5 Bump version number to 5.32 2015-10-31 16:54:04 +01:00
Yamagi Burmeister
eeccfc41ab Update CHANGELOG 2015-10-31 16:53:25 +01:00
Yamagi Burmeister
93540d4a63 Don't bind ESCAPE in yq2.cfg
This is unnecessary and since 5232088 a warning is printed.
2015-10-28 17:54:39 +01:00
Yamagi Burmeister
4b7b29c339 Don't stop the filesearch if the first try fails.
It was a wrong (and maybe stupid) assumption, that the config dir
(~/.yq2) is always the first element of the search path. When there's
at least one pak file in the config dir, it's added at a random
location. Work around this by probing all directories. This fixes
issue #107.
2015-10-28 07:41:58 +01:00
Yamagi Burmeister
7058052aea It's 'filename', not 'name'.
Pointyhead to: Yamagi
2015-10-28 07:31:06 +01:00
Yamagi Burmeister
1d709e5e27 Move file name check to prevent spurious "refusing to download messages
Moving the check under the "do we have the file localy" check prevents
spurious "Refusing to download a path with .." messages with some game
data. The tank commander skin is one example. This change has no
security impact since FS_LoadFile() just opens and closes the file.

While at it tighten the condition to prevent pathes with colons (this
condition is added at the server side, too) and pathes starting with
slashes and dots.
2015-10-27 17:38:28 +01:00
Daniel Gibson
17e791e528 shut up GCC warning about memset with 0bytes in Con_CenteredPrint()
yeah, if l<0 memset would have be called with length 0, which does not
really matter but was easily to prevent by only doing it if l>0.
2015-10-25 22:39:06 +01:00
Daniel Gibson
951fc2ffb7 Prettier Windowicon when using SDL2
for some reason this doesn't work properly with SDL1.2, so we keep
the old code for that.
2015-10-25 17:55:41 +01:00
Daniel Gibson
5ee1136ab5 Fix duplicate input through an activated keypad.
When the keypad was activated key presses were processed twice.
Once as a normal char event and once as a key event (not marked
as special). The key event to console character translation
function turned the key event into a second character...
2015-10-25 17:34:28 +01:00
Yamagi Burmeister
7456daf65f Do not display baseq2 savegames in mods / addons
The savegame list is generated by calling FS_FOpenFile() for each
possible savegame name. When a file handle is returned the savegame
exists, otherwise the savegame slot is empty. But FS_FOpenFile()
searches in every directory known to the VFS. If a savegame file
isn't found in $moddir but in baseq2, the file in baseq2 is opened
and a baseq2 savegame is displayed in the mods / addons savegame menu.

The fix is compromise between a clean solution and invasiveness:

- Refactor FS_FOpenFile() to include FS_FOpenFileRead(). FS_FOpenFile()
  was used only to open read only files, limit its's possibilities to
  do exactly that.
- Introduce a new flag "gamedir_only" to FS_FOpenFile(). When true
  only the gamedir directories are searched and not other directories
  like baseq2.
- Change all callers to FS_FOpenFile()s new signature.
- Use the new gamedir_only flag to limit the searchpath for savegames
  to the gamedir.
2015-10-25 16:44:22 +01:00
Yamagi Burmeister
2e82fe85fd Remove a bunch of unused VFS functions. 2015-10-25 08:48:19 +01:00
Yamagi Burmeister
f125a4887f Add a new icon with much higher resoultion (suitable for Win 10).
This icon was supplied by Ryan as SVG. I've converted the raw SVG in a
PNG with size 512x512 (for Linux / Unix desktops) and an ICO (for
Windows). The ICO contains the levels 16x16 to 512x512 and should be
usable on high DPI screens.

The ImageMagick command to generate the ICO was:

convert quake2.png -bordercolor white -border 0  \
    \( -clone 0 -resize 16x16 \) \
    \( -clone 0 -resize 32x32 \) \
    \( -clone 0 -resize 48x48 \) \
    \( -clone 0 -resize 64x64 \) \
    \( -clone 0 -resize 96x96 \) \
    \( -clone 0 -resize 128x128 \) \
    \( -clone 0 -resize 256x256 \) \
    \( -clone 0 -resize 512x512 \) \
    -delete 0 quake2.ico

This closes issue #106.
2015-10-25 06:55:01 +01:00
Yamagi Burmeister
efe138cad2 A small grammar fix
Noticed by Manuel-K
2015-10-24 13:09:36 +02:00
Simon McVittie
c20dbc7dac If SYSTEMWIDE, override the default basedir instead of adding a path
This makes it behave a little more like -basedir in Quake 1 and
fs_basepath in ioquake3.

This lets "+set basedir" take precedence over the SYSTEMDIR,
which is useful if you have the demo and full-game data installed
in different base directories to be able to test the demo for
regressions.
2015-10-23 19:30:42 +02:00
Yamagi Burmeister
de5849caf5 Reset gibsthisframe and lastgibframe at map change
Without this change the conditionals at g_misc.c:199 and 381 wouldn't
trigger until level.framenum reach it's previous value, resulting in
much to few debris or gibs being thrown. This fixes #104.

Many thanks to maraakate for the analysis and the idea how to fix it.
2015-10-23 19:24:52 +02:00
Yamagi
3c71ac6a08 Merge pull request #103 from mackron/brightness_fix
Apply gl_overbrightbits to regular meshes.
2015-10-23 15:06:38 +02:00
David Reid
3e0773fee4 Don't apply gl_overbrightbits to regular meshes when it's set to 0.
This should now be consistent with walls.
2015-10-23 09:39:54 +10:00
Yamagi
05dfaf0412 Merge pull request #105 from mackron/ui_scaling_fix
UI scaling fixes.
2015-10-22 18:23:39 +02:00
David Reid
33ad02b0d0 A couple more fixes to menu scaling.
Relates to issue #87. This should be the last commit for the menu scaling.
2015-10-22 22:06:48 +10:00
David Reid
dc53635f46 Fix alignment in the Multiplayer -> Player Setup menu.
Relates to issue #87.
2015-10-22 21:41:58 +10:00
David Reid
585e7dbfda Fix alignment in Multiplayer -> Join Network Server -> Address Book menu.
Relates to issue #87.
2015-10-22 21:04:45 +10:00
David Reid
490c5c15a3 Fix alignment in the key bindings menu.
Relates to issue #87.
2015-10-22 20:52:41 +10:00
David Reid
c623d5639c A bunch of alignment fixes to menus.
So far, fixed menus include:
 - Multiplayer
 - Multiplayer -> Start Network Server
 - Multiplayer -> Start Network Server -> Deathmatch Flags
 - Options
 - Video Options

Related to issue #87.
2015-10-22 20:36:41 +10:00
David Reid
fc33d5df64 Fix incorrect positioning of centered strings when scaling is applied.
This partially address issue #87.
2015-10-22 18:08:46 +10:00
David Reid
a856002772 Apply gl_overbrightbits to regular meshes.
This addresses issue #54. This commit also removes a couple of redundant OpenGL calls.
2015-10-22 16:26:44 +10:00
sdfdfhgh
0a8d332da2 Update README to fix wording and clarify instructions 2015-10-19 18:21:20 +02:00
Daniel Gibson
1977570b17 Make sure not all OpenAL sources are relative, fix #100
OpenAL sources are reused in Quake2, so if a source has once been used
for a sound coming from the view entity, it'd stay relative, unless
told not to.

So now I set source's AL_SOURCE_RELATIVE to AL_TRUE or AL_FALSE in
AL_PlayChannel(), depending on the source coming from the player or not.

Thanks a lot to Tommi Teistelä for identifying the problem and pushing
me in the right direction!
2015-10-19 18:20:47 +02:00
Yamagi Burmeister
87ed67fd3d Revert "Cleanup vector math"
This reverts commit 123e409a2e.

This commit breaks several float calculations in subtiles ways. For
example grenates drift to the left. In fact, it's another example why
I'm so hesitant to merge anything that's not a fix for a clearly
reproducable bug. This fixes #99.
2015-10-19 18:20:47 +02:00
Daniel Gibson
5232088b02 Don't allow binding the "console keys" (^, ~, `) or Escape
should hopefully fix #93, which seemed to be caused by ^ and ` being
bound to toggleconsole in default.cfg (as shipped with Q2) *and*
in code, so it'd be called twice and cancel each other out.

It even warns if someone tries to bind those keys and includes an ugly
hack to *not* warn when it's done in default.cfg, to minimize confusion.
2015-10-19 18:20:47 +02:00
Sean Dwyer
159a3b8607 Add a cvar to switch behavior when misc track 0 is requested
OGG_OpenName(): add ogg_ignoretrack0 cvar to set whether we respect
default playback behaviour when track 0 is requested to be played via
standard cd audio playback.

Submitted by: ewe2
2015-10-19 18:18:44 +02:00
Yamagi Burmeister
123e409a2e Cleanup vector math
This work was submitted by Dmitry Antipov. We stick to macros instead of
inline functions since they're in line with the rest of the code base.
This patch removes several unused functions and tranfers most of the
rest into macros.
2015-10-01 15:47:37 +02:00
Yamagi Burmeister
432fdc271b Send view entity sounds from (0,0,0) and mark them AL_SOURCE_RELATIVE.
This was suggested by kcat at https://github.com/kcat/openal-soft/issues/19
This may fix #88.
2015-09-24 19:02:35 +02:00
Yamagi Burmeister
eba4ce95d4 Rename SCR_GetScale() to SCR_GetDefaultScale() 2015-09-14 19:23:44 +02:00
Yamagi Burmeister
f2e53e657b Fix crosshair_scale
The crosshair_scale cvar was broken a long time ago at Icculus Q2 or
even back at it. The fix is easy... This is part of issue #87.
2015-09-14 19:05:08 +02:00
Yamagi Burmeister
72a22b8915 Remove unreachable code 2015-09-09 08:23:23 +02:00
Yamagi Burmeister
9e4d26399e Switch Windows to dynamic binaries 2015-09-08 18:09:56 +02:00
Yamagi Burmeister
0eb660609b Bump the version number to 5.31 2015-09-08 17:08:08 +02:00
Yamagi Burmeister
05c7709f13 Update CHANGELOG 2015-09-07 17:14:09 +02:00
Yamagi Burmeister
8da7a40142 FS_SetGamedir: reject "." as game directory. also reject empty string.
Submitted by: Ozkan Sezer
2015-09-03 20:35:09 +02:00
Yamagi Burmeister
8e61ccecca Remove unneed GetGameAPI() prototype.
Based upon a patch submitted by: Ozkan Sezer
2015-08-24 18:04:24 +02:00
Yamagi Burmeister
bd025ae5c5 Fix an off-by-one in memmove() call in SV_Map()
Submitted by: Ozkan Sezer
2015-08-24 18:02:08 +02:00
Yamagi Burmeister
c0fac70763 Cbuf_Execute: do not change 'i' if it overflowed sizeof line.
Submitted by: Ozkan Sezer
2015-08-24 18:00:57 +02:00