From 7b08964f78ab56c50f3f6a3349861670d91e2f85 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sat, 4 Jun 2011 11:35:41 +0200 Subject: [PATCH] Don't force AltSounds on PC-Shareware content but still must bail out on missing sounds using a small hack. Still gives a better sound palette than AltSounds --- CHANGELOG.txt | 1 + main/digiobj.c | 4 ++++ main/piggy.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 17cb7c555..581855f85 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D2X-Rebirth Changelog 20110604 -------- main/lighting.c: Since set_dynamic_light() is not necessarily processed each frame, added own counter for delayed precession of vertex-clight calculation; Added possibility to page in a bitmap in case an object which has never been rendered before is supposed to cast light visible by the player +main/digiobj.c, main/piggy.c: Don't force AltSounds on PC-Shareware content but still must bail out on missing sounds using a small hack. Still gives a better sound palette than AltSounds 20110601 -------- diff --git a/main/digiobj.c b/main/digiobj.c index e29d947ca..28e4770b6 100644 --- a/main/digiobj.c +++ b/main/digiobj.c @@ -88,6 +88,10 @@ int digi_xlat_sound(int soundno) return -1; } + // HACK: Sound table in PC Shareware is incomplete. Instead of defining exceptions all over our code just bail out here and play no sound instead + if (is_SHAREWARE && Sounds[soundno] == 255) + return -1; + Assert(Sounds[soundno] != 255); //if hit this, probably using undefined sound return Sounds[soundno]; diff --git a/main/piggy.c b/main/piggy.c index 1b11670ab..586895aa8 100644 --- a/main/piggy.c +++ b/main/piggy.c @@ -792,7 +792,7 @@ int read_hamfile() { GameArg.GfxHiresGFXAvailable = 0; //GameArg.GfxHiresFNTAvailable = 0; // fonts are in the hog - GameArg.SysLowMem = 1; + //GameArg.SysLowMem = 1; } }