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.
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.
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".
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...
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The "nostdout" cvar was only existent on unixoid platform and
disfunctional. Since the stdout putput is very helpfull when
debugging things, just remove it.
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.
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.
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.
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.
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.
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.
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