ezquake-source
ezquake-source copied to clipboard
REQ: Allow for the Quake re-release sound files to pass f_modified checks
Please ensure that your request is predominantly client-based, and not better suited to being logged with the server or mod aspects of QuakeWorld (e.g. mvdsv or ktx)
Is your feature request related to a problem? Please describe. Through the history of Quake, there have been projects to keep the game modern. One example of this is through higher quality textures via the Quake Revitalization Project. One gap we've always had has been related to sound. It simply is not as viable to recreate the sound files in the same way the community has with the textures.
With the re-release of Quake, it appears as though we have been provided a bit of a gift. There are 44khz sound files (in the install directory, they are contained within the $QUAKEDIR/rerelease/id1/pak0.pak
, within the /sound
directory.) These files can be extracted and repackaged by a user for them to play with ezQuake
Describe the solution you'd like
Currently f_modified
will report the modified sound files. I would like for the criteria that determines whether these sound files have been modified to also allow for the new re-release sounds to pass. This would essentially allow for two valid "originals" as they are not truly custom.
Describe alternatives you've considered Not an alternative solution, but a possible increased scope option would be to add measures for ezQuake to incorporate the re-release pak0.pak file if it is present. This would eliminate the need for users to unpak and move the files locally. It would also limit the risk of the files being redistributed, as some users may not be familiar with unpak and pak tools.
Additional context
Impact on server or mods
f_modified reports the following modified sound files: armor1.wav damage3.wav health1.wav inv1.wav inv2.wav inv3.wav itembk2.wav land.wav land2.wav water1.wav water2.wav menu1.wav menu2.wav menu3.wav talk.wav basekey.wav runeuse.wav
I tested using the quake rerelease on steam on OpenBSD ezquake 3.2.3. f_modified passes. Tests are welcome on the 3.6 alpha version.
- unpack rerelease/id1/pak0.pak using qpakman.
- unpack original pak0.pak
- use the sound/ from rerelease instead inside the extracted original
- pack pak0.pak
- f_modified should output all models ok
I generated SHA1 checksums using this script. I kept adding checksums until f_modified stopped complaining. SHA1 checksums are stored in little-endian order.
It converts from this:
$ sha1 armor1.wav
SHA1 (armor1.wav) = c58fde1b3f5479c97bf5c78f7b36c1e22fc7ca62
to this:
armor1.wav: {0x1bde8fc5, 0xc979543f, 0x8fc7f57b, 0xe2c1367b, 0x62cac72f}
#!/bin/sh
# ezquake fmod.c stores SHA1 checksums in little-endian
#
# usage:
# $ for f in *.wav; do sha1_quake $f; done
# armor1.wav: {0x44488db0, 0xef0b0a1d, 0x3acda8b4, 0x3d87b467, 0xe4dd4fcc}
little_endian() {
echo $1 | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/'
}
HASH=$(sha1 $1 | awk '{ print $4 }')
NUM1=$(echo $HASH | sed 's/\(........\).*/\1/')
NUM2=$(echo $HASH | sed 's/........\(........\).*/\1/')
NUM3=$(echo $HASH | sed 's/................\(........\).*/\1/')
NUM4=$(echo $HASH | sed 's/........................\(........\).*/\1/')
NUM5=$(echo $HASH | sed 's/................................\(........\).*/\1/')
NUM1=$(little_endian $NUM1)
NUM2=$(little_endian $NUM2)
NUM3=$(little_endian $NUM3)
NUM4=$(little_endian $NUM4)
NUM5=$(little_endian $NUM5)
echo "$1: {0x$NUM1, 0x$NUM2, 0x$NUM3, 0x$NUM4, 0x$NUM5}"
While here, I fixed the sound category for plyrjmp8. (sound_weapons_mindgrid_plyrjmp8 --> sound_player_mindgrid_plyrjmp8)
Here is a comparison of armor1.wav. Original is on the left and re-release is on the right. (I am not sure why I cannot zoom out on the left.) There is a shelf at 11 kHz. I am not sure of the need for 44100 Hz. Nonetheless, the new sounds sound nice in comparison to the original.
https://github.com/namtsui/imagedump/blob/main/armor1.jpg
PR #632 fixing this. Closing.