Commit graph

1055 commits

Author SHA1 Message Date
svdijk
4682c888f0 replace strncat calls by Q_strlcat calls 2013-05-11 13:24:13 +02:00
svdijk
a26892cb90 add Q_strlcpy and Q_strlcat 2013-05-11 13:19:52 +02:00
svdijk
392c04bc1d some sanity check commenting 2013-05-11 12:57:50 +02:00
svdijk
8869b0542d rename strlwr to Q_strlwr 2013-05-11 12:46:49 +02:00
svdijk
cd54f56b36 some more boundary checking 2013-05-08 20:16:23 +02:00
svdijk
3c62c2be5a ogg/cda: move defaults from yq2.cfg to engine 2013-05-08 20:06:53 +02:00
svdijk
1c431e14ac make the load/save statusbar a bit more informative 2013-05-08 20:01:44 +02:00
svdijk
9803652781 some strncpy/strncat fixes 2013-05-07 21:46:46 +02:00
svdijk
d4c5960f8f help/score updates: fix typo 2013-05-04 14:47:02 +02:00
Yamagi
b58b78714b Merge pull request #23 from alericoveri/osx-aluwf
AL_InitUnderwaterFilter wasn't being compiled conditionally
2013-04-28 08:46:42 -07:00
svdijk
27b3d27584 sdl: fix key repeat (SDL_EnableKeyRepeat was called too early) 2013-04-28 12:38:53 +02:00
svdijk
fa9548fcad M_Popup: some more tuning 2013-04-28 12:31:51 +02:00
Alejandro Ricoveri
1c84805c1f AL_InitUnderwaterFilter wasn't being compiled conditionallyi 2013-04-27 17:21:15 -04:30
svdijk
8e1bb70932 M_Popup: align the same as the old popups 2013-04-26 18:55:23 +02:00
svdijk
082c2d454f cinematics: minor rewriting of cin_force43 behaviour 2013-04-24 20:33:12 +02:00
svdijk
695e0a9a16 cinematics: fix video mode changing during cinematic playback 2013-04-22 20:51:59 +02:00
svdijk
3c6a57129e cinematics: force 4:3 aspect ratio (new cvar cin_force43) 2013-04-22 20:44:47 +02:00
svdijk
b9deabd86a videomenu: fix CUSTOM_MODE 2013-04-21 18:44:50 +02:00
Yamagi Burmeister
277c2b9567 Use the same default volume on all platforms again
Testing showed that after the last round of sound changes FreeBSD is the
only platform with distorted sound when s_volume is set too high. I'm
pretty sure that it's caused by a bug in the OSS backend of openal-soft.
I'll need to analyze this more and maybe write a problem report. Since
FreeBSD users should be experienced enough to lower the volume when
there are problem (there's a FAQ in our README!), use the same default
volume on all platforms.
2013-04-21 12:02:38 +02:00
Yamagi Burmeister
3ac88e1bda Rename snd_wav.c to wave.c to get in line with other files 2013-04-21 11:32:20 +02:00
Yamagi Burmeister
84020e4d8e Rename snd_vorbis.c to ogg.c. This name is more appropriate 2013-04-21 11:30:07 +02:00
Yamagi Burmeister
fb7b97d868 Minor cleanups to snd_vorbis.c
- Remove any forward declarations
- Tightens checks for SDL
2013-04-21 11:27:31 +02:00
Yamagi Burmeister
78ce1e491c Rename snd_al.c to openal.c 2013-04-21 11:19:01 +02:00
Yamagi Burmeister
1d6aaca68e Whitespace cleanup 2013-04-21 11:14:00 +02:00
Yamagi Burmeister
a1f5ccfcac Update header comment 2013-04-21 11:13:26 +02:00
Yamagi Burmeister
92be8c75e3 Rework volume handling 2013-04-21 11:06:18 +02:00
Yamagi Burmeister
b9e71913ae Restructure and refactor snd_al.c 2013-04-21 10:40:00 +02:00
Yamagi Burmeister
e5505f90d7 Rename snd_dma.c to sound.c. yq2 never used DMA. 2013-04-20 15:09:57 +02:00
Yamagi Burmeister
957e4d4735 Whitespace cleanup 2013-04-20 15:06:47 +02:00
Yamagi Burmeister
242a62384c Update header comment 2013-04-20 15:06:15 +02:00
Yamagi Burmeister
b9a62ff34b Cleanup snd_dma.c 2013-04-20 15:01:31 +02:00
Yamagi Burmeister
720db15de9 Cleanup local.h of the sound system 2013-04-20 14:20:58 +02:00
Yamagi Burmeister
d9cd053461 Whitespace cleanup 2013-04-20 13:48:21 +02:00
Yamagi Burmeister
910dc421c6 Update file header and comment 2013-04-20 13:47:15 +02:00
Yamagi Burmeister
ef7c85bbcd yq2 never had a dma based soundengine. Let's call it just "sound". 2013-04-20 13:40:54 +02:00
Yamagi Burmeister
b45876ffdd Refactor the SDL part of S_Update() into the backend 2013-04-20 13:32:58 +02:00
Yamagi Burmeister
d9643e8b76 Refactor the SDL part of S_RawSamples into the backend 2013-04-20 13:16:40 +02:00
Yamagi Burmeister
2c356d142e Refactor the SDL part of S_LoadSound into the SDL backend 2013-04-20 10:26:31 +02:00
Yamagi Burmeister
0c93ecbddb Print the number of OpenAL sources in the backend 2013-04-20 10:26:19 +02:00
Yamagi Burmeister
cbecc5b2dc Retire snd_mem.c and integrate it into snd_dma.c and the backends 2013-04-20 09:19:59 +02:00
Yamagi Burmeister
3989ff73b2 Retire snd_mix.c and incorporate it into the SDL backend 2013-04-20 09:03:47 +02:00
Yamagi Burmeister
35ba5b0de1 Move all generic function used only by the SDL backend into it
Additionally rename those function to SDL_ prefix and refactor
them a little.
2013-04-20 08:40:53 +02:00
Yamagi Burmeister
f1ce0c0c00 Move all SDL backend function to the SDL backend and use SDL_ as prefix 2013-04-20 08:02:13 +02:00
svdijk
20110faeed Some minor cleanup/tuning/commenting 2013-04-14 18:46:08 +02:00
svdijk
4465d7e045 menu: some style syncing between savegame/server listing 2013-04-14 16:17:00 +02:00
svdijk
d297b97c12 menu: Rework the save/load menu a bit using M_Popup (get rid of excessive green) 2013-04-14 16:13:58 +02:00
svdijk
f9cda84d6e menu: Use M_Popup for the server search message 2013-04-14 16:07:37 +02:00
svdijk
1d86145f7f menu: Use M_Popup for the sound system restart message 2013-04-14 16:03:59 +02:00
svdijk
5daee97e2a menu: Add a generic popup function M_Popup 2013-04-14 14:49:45 +02:00
svdijk
aae7de19c4 Use some safer offset values for gl_zfix, and default to 0
(Since it seems to cause unwanted artifacts with some drivers)
2013-04-07 19:07:16 +02:00
Yamagi Burmeister
9def7d908f Silence another 2 gcc48 warnings due to creative array usage
This is nearly the same case as in 1bee58840d and should be a no-op.
2013-04-07 13:54:24 +02:00
Yamagi Burmeister
1bee58840d Silence a gcc48 warning due to some "creative" array usage
To my understanding this code and the old code do exactly the same, this
one is just more readable. Therefor this change should be a no-op.
2013-04-07 13:43:17 +02:00
svdijk
41d89c7171 Whitespace 2013-03-24 18:12:14 +01:00
svdijk
346d9873f0 Fix double server entries in multiplayes menu.
Also display netadr in statusbar instead of in the list (lowres compatible).
2013-03-24 18:08:06 +01:00
svdijk
77c9cb7e05 Update savegame tables (forgot them in the previous commit) 2013-03-23 12:30:48 +01:00
svdijk
5ed89a0373 Move some functions to a better place 2013-03-23 11:40:54 +01:00
svdijk
6f6c9a1aae Fix help computer and inventory updates when already opened 2013-03-20 20:21:53 +01:00
svdijk
909e69462f Fix a typo in a function prototype in game.h 2013-03-19 21:42:48 +01:00
svdijk
d07735b831 Rewrite the Shift+Escape code a bit (somewhat cleaner) 2013-03-18 19:37:26 +01:00
svdijk
317355f7ca Minor rewriting. 2013-03-17 21:32:50 +01:00
svdijk
e49693bec4 Make cmdlist and cvarlist alphabetically ordered. 2013-03-17 18:16:02 +01:00
svdijk
8b28e3d0df Make Shift+Escape toggle the console. 2013-03-17 17:31:00 +01:00
svdijk
f36f708b24 Unbind default bindings before loading stored bindings (new cvar cfg_unbindall) 2013-03-16 22:49:48 +01:00
svdijk
7637d32f6f Work around the z-fighting on some baseq2 maps (new cvar gl_zfix) 2013-03-16 16:47:57 +01:00
Yamagi Burmeister
d9519cee61 Remove an unneccessary check.
This check involved an uninitialized pointer, so it never worked. It
could lead to crashes in some situations, especially when clients tried
to reconnect after a manual map change on the dedictated server.
2013-03-10 12:08:58 +01:00
Yamagi Burmeister
e1903dd925 Change some qglTexParameterf to qglTexParameteri
Scott S. pointed out that some the qglTexParameterf calls should be
qglTexParameteri. I don't know if all this changes are correct (I'm
an openGL noob) but they shouldn't make thinks worse and "works for me".
2013-03-10 10:20:42 +01:00
Citramonum
3e56938aa9 Update vid.c
Fix a typo in 1280x960 graphic mode parameters.
2013-03-09 21:06:06 +04:00
Yamagi
2300a547a8 Merge pull request #19 from JayWalker512/stupid-laptop-res
Added support for 1366x768 laptop resolution in video menu. This will break existing configs one again if a mode of 1440x900 or higher is used.
2013-01-20 03:08:00 -08:00
Yamagi Burmeister
56d920162e Reduce default volume to 0.3 on non-linux-platforms
If the volume is set too high the OpenAL backend preamplification leads
to overdriven sound samples. It's not quite understandable to me why
that only happen on platforms other than Linux (maybe a bug in OpenAL?)
and there's not much we can do against it besides reducing the volume.
As the side note: Simmilar behavior can be seen at least in ioQ3 and
dhewm3...
2013-01-20 12:01:10 +01:00
Yamagi Burmeister
bc5c308684 Add a cvar "s_openal_maxgain" to clamp AL_GAIN
This cvar is a last resort if all other measures to prevent overdriven
preamplifation fail. Setting it to lower value than 1.0 limits the
overall dynamic range, so sound quality is lost. This is especially
hearable when low volume samples are encountered, like the shotgun
combined with the silencer.
2013-01-20 12:01:10 +01:00
Yamagi Burmeister
1f5012aec3 Calculate the AL_GAIN by s_volume and don't set a global AL_GAIN 2013-01-20 12:01:10 +01:00
Yamagi Burmeister
548bbeb129 Pass raw "float" volume to OpenAL
The client uses float values between 0.0 and 1.0 to represent the volume
of sound samples. This is the range required by OpenAL. But the generic
part of the sound system multiplied the raw float value with 374 and
clamped it to a full integer. That worked by luck withth the OpenAL
backend but broke at least the silencer powerup. Solve this problem by
adding a new field "float oal_vol" to the channel_t struct and use it to
pass the raw float value to OpenAL.

This fixes issue #18
2013-01-20 12:00:29 +01:00
Brandon Foltz
d6feeeff8d Added support for 1366x768 laptop resolution in video menu. 2013-01-18 14:59:44 -05:00
Yamagi Burmeister
2890dafbda Divide effect volume by 3 when using the OpenAL backend
Since OpenAL 1.15 AL_GAIN has much more weight than before. That leeds
to overdriven effect samples unless the volume control is set to a very
low level. With this change volume can be set to a high level without
distorting. But there's one problem. A division by 2 is to low to rule
distortion out and by 3 the game is a little bit quieter than before. A
value of 2.5 would be optimal but is not applicable since the volume is
represented by an integer. I've choosen 3 to be aon the save side.

As a side note: This problem was very less worse on Linux than on
Windows and FreeBSD. Maybe Linux guys need to pump there volume up
to compensate this work-around.
2013-01-06 17:09:30 +01:00
Yamagi Burmeister
2ee5937fa3 Bump version number to 5.10 2012-12-30 17:46:22 +01:00
svdijk
0f985d3e45 Cleanup the keybindings menu code. 2012-12-29 18:21:46 +01:00
svdijk
4f5ba24003 Some more load/save menu tuning (better QMF_GRAYED use). 2012-12-29 17:18:30 +01:00
svdijk
83037ace88 Some load/save menu tuning. 2012-12-29 17:16:53 +01:00
svdijk
74f244801f Fix game saving on page 2(+).
Fixes issue #16.
2012-12-26 09:30:16 +01:00
svdijk
bcc6f62b61 Make the Load/Save menu multi-page (support low-res). 2012-12-09 17:57:00 +01:00
svdijk
e78a18c5ca Fix the "help computer" keybinding option; some whitespace cleanup. 2012-12-09 17:56:47 +01:00
Joshua Scoggins
7116d7e90a Fixed a bug in src/common/header/common.h with respect to ia64
I had written #elif define __ia64__ instead of #elif defined __ia64__

This has been fixed.
2012-11-30 20:34:35 -08:00
Joshua Scoggins
a578fff56a Extended the arch check in src/client/header/client.h to include ia64
For ia64 it's necessary to define int as long long instead of long int. I know
this for a fact because pointers that were encoded as long int in my LLVM and
CLIPS bridge would fail horribly when passed out of clips back into LLVM. long
long fixed it.
2012-11-30 20:30:28 -08:00
Joshua Scoggins
df4c4dd9dd Added ia64 to the ARCH define 2012-11-30 20:21:28 -08:00
Joshua Scoggins
dc0f2ec779 Added the ia64 cpustring 2012-11-30 20:20:44 -08:00
svdijk
0fe5d4f610 Make sure that the crashlog actually gets written. 2012-11-17 15:31:12 +01:00
svdijk
1dd083cd7d COM_Parse: Fix buffer overflow in long quoted strings. 2012-11-17 15:28:45 +01:00
svdijk
561add00a8 cl_main:CL_UpdateWindowedMouse() optimization. 2012-11-16 20:30:59 +01:00
Yamagi Burmeister
a76d7d5cfb The default video mode is 5 (640x480). Spotted by svdijk. 2012-11-14 21:12:21 +01:00
svdijk
247e2baa3a More mouse grab/release tuning. 2012-11-14 21:08:07 +01:00
Ilia Zhirov
46c77400e2 fixed build on pre ansi c89 compilers 2012-11-14 14:49:40 +06:00
svdijk
823753dec9 Some minor restructuring and cleanup. 2012-11-07 21:15:18 +01:00
svdijk
1c0934f462 Game cleanup. 2012-11-07 21:10:48 +01:00
svdijk
eb8a2d792f Minor console mouse release tweak. 2012-11-05 21:33:44 +01:00
svdijk
8c8fba7421 Refresher cleanup. 2012-11-05 21:33:35 +01:00
Yamagi Burmeister
82275f636e Merge branch 'master' of github.com:yquake2/yquake2 2012-11-04 18:52:27 +01:00
Yamagi Burmeister
d263e896cf Use an enum for "qboolean" on OS X
Defining "qboolean" to something other than an enum changes the size of
some structs. That in turn breaks compatiblity with mods that use the
enum define. With this change the addons (tested with xatrix and rogue)
are running on OS X. Many thanks to my sister for lending me her
Macbook.
2012-11-04 18:47:15 +01:00
Yamagi Burmeister
5c217771cb Use correct include path on OS X
This path matches the libjpeg.framework we'll use to build the
binary releases.
2012-11-04 09:23:25 +01:00
Yamagi Burmeister
86ca73754d Silence a compiler warning on OS X 2012-11-04 09:18:37 +01:00
svdijk
7be7f6831f backends/sdl/input.c: only call SDL_WM_GrabInput() when needed. 2012-10-30 20:36:29 +01:00
svdijk
64632bbc3b client/cl_main.c:UpdateWindowedMouse(): release mouse in menu. 2012-10-30 20:36:23 +01:00
svdijk
76e3480ccb Some rewriting of windowed_mouse setting, in preparation of releasing the mouse in the menu. 2012-10-30 20:36:15 +01:00
svdijk
a1adac8ba9 client/menu/menu.c: make ConsoleFunc() consistent with cl_console:Con_ToggleConsole_f(). 2012-10-30 20:36:10 +01:00
Ricardo Garcia
74beca0d11 Add "horplus" cvar to get Hor+ behavior with default FOV
If "horplus" is set, the "fov" cvar is interpreted as the horizontal FOV
in a 4:3 screen, and is adapted automatically to the current screen
aspect ratio accordingly. If not set, use the old Vert- approach.

In addition, "horplus" can also be set from the video menu by selecting
the "Auto" option for aspect ratio, which also resets the FOV value to the
standard 90 degrees.

Finally, add a 5:4 aspect ratio (1280x1024) and correct the 16:9 angle
slightly.
2012-10-28 10:20:46 +01:00
Yamagi Burmeister
a79b705c13 Make cl_maxfps persistent 2012-10-06 09:15:32 +02:00
Yamagi Burmeister
687ca61dfa Fix gl_swapinterval 2012-10-06 09:14:12 +02:00
Yamagi Burmeister
943c29804c Add the SDLMain SDL wrapper, needed for OS X 2012-09-14 11:46:22 +02:00
Yamagi Burmeister
e9c5c3ca8e Add savegame defines for OS X 2012-09-14 11:32:42 +02:00
Yamagi Burmeister
ba10009aa5 Add support for Mac OS X
These are the code changes and Makefile changes necessary to build and
run Yamagi Quake II on Max OS X. OS X 10.6 or higher is required, older
version may work but we cannot guarantee it. The documentation will be
added in another commit. This patch was contributed by W. Beser, I made
only some small cosmetical changes.
2012-09-14 11:21:02 +02:00
Yamagi Burmeister
dd6ed24104 Bump version number to 5.00 2012-09-03 14:34:51 +02:00
Sander van Dijk
1f2452e7a6 src/game/g_weapon.c: Some sanity check changes. 2012-08-28 17:05:31 +02:00
Yamagi Burmeister
7958767922 Blaster shots shall not explode at the skybox 2012-08-26 15:38:00 +02:00
Yamagi Burmeister
4a81e58128 Okay, do the last commit acutally right... damage can be NULL. 2012-08-26 14:57:28 +02:00
Yamagi Burmeister
8819ad1c9a Fix a too strict sanity check in void blaster_touch()
This sanity check caused a too early exit of the function if the player
stood directly in front of a wall and fires the blaster or hyper
blaster. Therefor the wall impact effect wasn't drawn. This commit
fixes issue #6. Many thanks to svdijk for narrowing this problem down to
somewhere between 3.00 and 4.00.
2012-08-26 10:24:55 +02:00
Yamagi Burmeister
ed22ca81c2 Silence a warning with the upcoming Clang 3.2 2012-08-22 14:25:32 +02:00
Jonathan Gray
1f9d6084b6 OpenBSD port 2012-08-18 09:53:03 +02:00
Jonathan Gray
22fa99b713 test SIN6_LEN not __FreeBSD__ for sin6_len 2012-08-12 13:40:43 +10:00
Sander van Dijk
f292c1e22d Fix custom resolution handling in the video menu. 2012-08-06 14:04:12 +02:00
Yamagi Burmeister
602dd1af6f Connect non-base OpenGL function by calling wglGetProcAddress() on Windows
This is necessary since non-base OpenGL functions can't be connected by
calling the standard GetProcAddress() on Windows. To archive this the
old qwglGetProcAdress() is renamed into GetProcAdressGL() and a new
function pointer qwglGetProcAdress is introduced. On unixoid System it's
NULL and on Windows connected to wglGetProcAddress(). If it's NULL the
system wide function is called, if not the function Pointer is used.
2012-08-03 15:14:45 +02:00
Yamagi Burmeister
739590e639 Do not hide library loading errors behind "developer" 2012-08-03 15:13:58 +02:00
Sander van Dijk
3d4bbe6c31 Fix aspect menu options. 2012-08-03 08:05:09 +02:00
Yamagi Burmeister
efd1ddb1c5 Initialze vid_gamma 2012-08-02 15:33:42 +02:00
Yamagi Burmeister
8141380030 Allow to set the aspect ratio via the menu 2012-08-02 15:18:58 +02:00
Yamagi Burmeister
de9dda7432 Restart the refresher when certain values are changed via the menu 2012-08-02 14:59:51 +02:00
Yamagi Burmeister
f1420ffe75 Use correct default mode 2012-08-02 14:47:18 +02:00
Yamagi Burmeister
3ab4e58df5 Cleanup the video menu, remove support for different refresher 2012-08-02 14:39:33 +02:00
Yamagi Burmeister
c6eaf5c876 Mobe LIBGL makro to common.h and replace all hardcoded libGL calls with it 2012-08-02 14:06:32 +02:00
Yamagi Burmeister
751d39fb50 Update the file header comments 2012-08-02 14:00:04 +02:00
Yamagi Burmeister
8d0dfd2c30 Merge vid.c into 1 generic file 2012-08-01 16:54:09 +02:00
Yamagi Burmeister
f89bb3265e Combine qgl.c glwindow.h into one generic file 2012-08-01 15:51:39 +02:00
Yamagi Burmeister
e5f70fcf40 Merge qal.c into one generic file for all platforms
To archive this, 3 new functions Sys_GetProcAddress(), Sys_LoadLibrary()
and Sys_FreeLibrary() were added to abstract the library loading code
into a platform independend API.
2012-08-01 14:54:18 +02:00
Yamagi Burmeister
399c581f06 Move src/windows to src/backends/windows 2012-08-01 14:12:05 +02:00
Yamagi Burmeister
3fb8492398 Move src/unix to src/backends/unix 2012-08-01 13:58:10 +02:00
Yamagi Burmeister
c5bf1e8c93 Move src/sdl to src/backends/sdl 2012-08-01 13:47:32 +02:00
Yamagi Burmeister
3918d3ba34 Change the VERSION number from float to string
Using a float number as version number is a bad idea. Correct this long
standing problem by changing it to a string. If we ever want to compare
version numbers, 2 integer constants "MAJOR_VERSION" and "MINOR_VERSION"
should be added.
2012-07-27 08:57:52 +02:00
Yamagi Burmeister
b52336850f Reformat the client 2012-07-22 15:34:45 +02:00
Yamagi Burmeister
7bbfa01a87 Fix a unlogical statement 2012-07-22 12:51:53 +02:00
Yamagi Burmeister
6f719f4c7b Reformat the refresher 2012-07-21 14:09:45 +02:00
Yamagi Burmeister
b1ddebf552 Update "unzip" to version 1.01h
This update brings some minor bugfixes, especially for big endian
platforms and LLP64 systems like 64 bit Windows. The support for
encrypted ZIP archives was removed. This is a no-op change, since
there was no way to pass the password to uncrypt. Without the
uncrypt code Yamagi Quake II can be distributed in some countries
with special laws for cryptographic software. The LICENSE was
updated to the most recent version of the INFO-ZIP license.
2012-07-21 12:02:39 +02:00
Yamagi Burmeister
9288513e86 Reformat and cleanup of the server 2012-07-21 10:06:07 +02:00
Yamagi Burmeister
dbed2fa053 Clear display buffer before shutting the refresher down 2012-07-10 15:02:42 +02:00
Yamagi Burmeister
de3da4ba70 Check for gamex86.dll if game.dll wasn't found
This change allows the usage of old mods without renaming their game
lib. This is applied to windows only because the few Linux mods out
there are broken since a long time due to incompatible changes in libc
and the kernel. Requested by Victor Sergeevich.
2012-07-09 15:54:20 +02:00
Yamagi Burmeister
7ac71db523 Merge branch 'cleanup'
Conflicts:
	src/common/header/common.h
	src/common/header/shared.h
	src/common/misc.c
	src/unix/main.c
	src/unix/system.c
2012-07-09 14:35:37 +02:00
Yamagi Burmeister
ae99562741 Seed the game PRNG at startup 2012-06-26 14:31:01 +02:00
Yamagi Burmeister
fd44d3078f Fix path length limitation (pointed out by Daniel) 2012-06-24 18:11:55 +02:00
Yamagi Burmeister
590baaa3e9 Remove some potential harmfull "long"
While the use of "long" was harmless in this case, it's unnecessary and
we try to keep Quake II free from longs.
2012-06-22 09:44:26 +02:00
Yamagi Burmeister
c80954a65e Remove support for qhost
qhost was a proprietery management application for Quake II dedicated
servers. Since we don't know if the code is still working and most
likely no one uses it anymore, remove it. This war requested by Daniel.
2012-06-22 09:06:27 +02:00
Yamagi Burmeister
0353f6fc42 Remove support for partitial installations
This was requested by Daniel. While partitional installations were
working, they are another distinction between Linux and Windows and
useless. Everyone should have the ~350MiB for a full installation.
And full installations are much faster.
2012-06-22 08:49:12 +02:00
Yamagi Burmeister
b96d247db3 Create homedir before redirecting stdout and stderr 2012-06-21 09:26:37 +02:00
Yamagi Burmeister
2df1f31683 Enable qconsole.log by default 2012-06-20 13:52:47 +02:00
Yamagi Burmeister
4fe877b5f6 Do not print the client build options when starting q2ded 2012-06-20 13:49:06 +02:00
Yamagi Burmeister
b3f09db95c Print build options at startup 2012-06-20 13:40:49 +02:00
Yamagi Burmeister
8558a6af11 DO not redirect the stdout and stderr when running as dedicated server 2012-06-20 13:40:49 +02:00
Yamagi Burmeister
847128cb76 Close stderr and stdout at shutdown 2012-06-20 13:40:49 +02:00
Yamagi Burmeister
5d85a66fed Print console messages and errors to stdout 2012-06-20 13:40:49 +02:00
Yamagi Burmeister
984badffa0 Remove unused function Sys_Warn() 2012-06-20 13:40:48 +02:00
Yamagi Burmeister
74e6993d6f Remove unused function Sys_Printf() 2012-06-20 13:40:29 +02:00
Yamagi Burmeister
1a748adaa5 Remove the "nostdout" cvar
The "nostdout" cvar was only existent on unixoid platform and
disfunctional. Since the stdout putput is very helpfull when
debugging things, just remove it.
2012-06-20 13:40:10 +02:00
Yamagi Burmeister
229e13e6f4 Redirect stdout and stderr into files 2012-06-20 13:39:18 +02:00
Yamagi Burmeister
c0e9a6f045 Make Quake II compatible with unicode directory names
This changes employs a horrible hack to connect the ASCII Quake II to
the UTF-16 WinAPI. The path to "My Documentes" is read in UTF-16, then
converted to a old "DOS style path" with 8.3 characters. This DOS path
has by convention no UTF-16 characters in it and can be converted into
a normal ASCII string. This ASCII string is the path used by Yamagi
Quake II. The conversion logic will fail if the "Windows to DOS
filename transistion" is deactivated in the registry (it's on by
default). In that case no homedir is used and the "Windows Roaming
Mechanism" kicks in.
2012-06-20 13:39:18 +02:00
Yamagi Burmeister
e1f338f59b Reformat the headers 2012-06-18 10:46:31 +02:00
Yamagi Burmeister
e3690bcaab Bump version number to 4.90
This is done to distinguish the upcoming "Yamagi Quake II - Windows Test I"
from the normal 4.21 version.
2012-06-18 09:51:59 +02:00
Yamagi Burmeister
63cdbff0e3 Merge branch 'windows' into cleanup 2012-06-14 12:30:52 +02:00
Yamagi Burmeister
7b54f3d668 Merge branch 'master' into windows
Conflicts:
	src/client/sound/snd_al.c
2012-06-14 12:27:09 +02:00
Yamagi Burmeister
61b10f12da Fix a crash when entering water with s_openal = 0 2012-06-14 12:24:29 +02:00
Yamagi Burmeister
341014eda0 Merge branch 'scanbuild' into windows 2012-06-14 12:18:15 +02:00
Yamagi Burmeister
73e6dc6307 Revert "Convert random() to randk() and crandom() to crandk()"
This reverts commit 12ce981d64.
2012-06-14 12:12:57 +02:00
Yamagi Burmeister
060235e7dd Merge branch 'windows' into cleanup
Conflicts:
	src/common/filesystem.c
	src/sdl/input.c
	src/sdl/refresh.c
	src/unix/system.c
2012-06-11 11:21:16 +02:00
Yamagi Burmeister
2c0148bab5 Enlargen MAX_OSPATH to 256 on Windows
This is necessary due to the extrem long homedir-pathes in some Windows
localizations. While it would be nice to have the same value on all
platform it would break existing savegames and don't think that it's
worth that.
2012-06-11 10:25:12 +02:00
Yamagi Burmeister
47707a728e Use Windows headers on Windows 2012-06-11 10:18:44 +02:00
Yamagi Burmeister
e70067ceba Refactor the "home"-path finding logic into own functions
With this change the homedir is no longer selected in the filesystem,
but in platform dependend functions. This allows us to use WINABI calls
for selection, resulting using the apropriate diretory on localized
versions of Windows XP.
2012-06-11 09:55:54 +02:00
Yamagi Burmeister
e8eea857e4 Fix another buffer overflow, this time when writing the config.cfg
This overflow is a problem on all platforms but manifested itself
especially on a german Windows XP due to it's long profile path.
2012-06-10 18:45:14 +02:00
Yamagi Burmeister
6c2f97927e Add a missing brace twisting the logic of the Windows XP check 2012-06-09 11:42:35 +02:00
Yamagi Burmeister
87e62a3724 Reformat 2012-06-08 13:01:56 +02:00
Yamagi Burmeister
26b15dbe07 Reformat 2012-06-08 12:23:01 +02:00
Yamagi Burmeister
9ad40b2a17 Cleanup and reformat. 2012-06-07 15:40:58 +02:00
Yamagi Burmeister
ac6748e7d2 Merge the collision model back into one file 2012-06-07 15:04:45 +02:00
Yamagi Burmeister
d12f0c642f Recombine the message handling back into one file 2012-06-07 14:33:09 +02:00
Yamagi Burmeister
e0faf784a6 Move stuff from common/common/ to common/ 2012-06-07 13:54:08 +02:00
Yamagi Burmeister
56aff1dc89 Recombine the command parser in one file
Spliting it into several files seemed logical but in retrospect it was
a bad idea, unnecessary complicating the code.
2012-06-07 13:35:33 +02:00
Yamagi Burmeister
16e57ede33 Fix some indention issues 2012-06-06 18:06:08 +02:00
Yamagi Burmeister
39677c1b0f Fix a potential buffer overflow 2012-06-06 17:55:37 +02:00
Yamagi Burmeister
d8e35b82c7 Reformat the sound system code
caedes and some other people will probably kill me for this, but I'm the
idiot who has to maintain the code. And that's much easier if it's in a
readable und writeable state.
2012-06-06 11:13:07 +02:00
Yamagi Burmeister
51cc3369b1 Provide an optimized case for mixing 16 bit / 2 chan sound
With sound quality "high" nearly all sound is provided as 16 bit PCM
with 2 channels. Since most players use this setting, provide an optimed
case for it. This should also solve the cracking due to overshot
soundbuffers, which was especially noticeable on Windows. This changes
only effects the old SDL soundbackend and not OpenAL.
2012-06-06 10:34:36 +02:00
Yamagi Burmeister
15400b2133 Use memset() instead of array magic 2012-06-06 10:02:55 +02:00
Yamagi Burmeister
272b897919 Reformat snd_mix.c 2012-06-06 09:58:06 +02:00
Yamagi Burmeister
f5233db0b2 Add IPv6 support for Windows
This is essentially a port of unix/network.c to windows.
2012-06-06 09:48:48 +02:00
Yamagi Burmeister
0c74a1af75 Create profile in Documents instead of AppData 2012-06-05 14:28:34 +02:00
Yamagi Burmeister
d17d996dc5 Import Sys_Mkdir() into the refresher 2012-06-05 14:19:29 +02:00
Yamagi Burmeister
7715592aaa Write config data in AppData
Under Windows all config data is written to %USERPROFILE%\AppData\
Local\YamagiQ2. To archive this code was added that translates Windows
pathes with backslashes into Unix pathes with normal slashes.
2012-06-05 12:52:44 +02:00
Yamagi Burmeister
0b9ec45eb7 Remove leftovers from the softrenderer 2012-06-05 10:54:47 +02:00
Yamagi Burmeister
de3e53069f Remove Alt-Tab handling. It's done by SDL 2012-06-05 10:50:24 +02:00
Yamagi Burmeister
a55d717a80 Replace atoi() with strtol() in Windows code 2012-06-05 10:46:15 +02:00
Yamagi Burmeister
af83f80dff Add header guards to new headers 2012-06-05 10:42:30 +02:00
Yamagi Burmeister
28be8cda8e Work around the missing _controlfp prototypes in MinGW 2012-06-05 10:29:20 +02:00
Yamagi Burmeister
58c3b22c8a Add platform defines for Windows 2012-06-05 10:17:01 +02:00
Yamagi Burmeister
ca18af254e Remove Sys_AppActivate()
This code is unnecessary because SDL handles all activation events,
brings the Window into foreground, etc.
2012-06-05 10:11:29 +02:00
Yamagi Burmeister
21ab0de692 Remove support for the Windows clipboard
This was just broken and rewriting it is not worth the efford
2012-06-05 10:09:24 +02:00
Yamagi Burmeister
d1008a564d Port OpenAL to Windows and enable it by default 2012-06-05 09:57:30 +02:00
Yamagi Burmeister
4021087a38 Make the SDL sounddriver selectable via s_sdldriver
This is necessary since the default "waveout" driver on windows is
incompatible to Quake II (due to too big output buffers) and "dsound"
can't be forced since it's not available on some installations. The
default driver is choosen by platform:

Windows -> dsound
FreeBSD -> dsp
Linux   -> alsa
2012-06-05 09:03:46 +02:00