[Parity][map][S2][H] 自动地图视口几何与原版不一致:mini 地图位置、左置坐标、全屏高度/中心、开面板时的偏移量 #625
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源审计项:
map#5— [S2][H] 自动地图视口几何与原版不一致:mini 地图位置、左置坐标、全屏高度/中心、开面板时的偏移量位置:
src/client/ui/minimap.ts:188-223(computeAutomapViewport)代码:
原版(V-bin): 下面的 W、H 是屏幕宽高:
各项对比:
add eax,0xfffffee7→ left = W−281,mov ecx,0x39→ top = 57,宽 0x117 = 279,高 0xE1 = 225。((edx==2)−1 & 0x60) − 0x15,即 75([0x6fbcc284]==2 时为 −21)。vpH = H−48,centerY = (H−48)/2。600 高时为 276,原版为 280(另有 +0x0F 常量,见待确认第 3 条)。cdq; and edx,3; add eax,edx; sar 2,右面板时neg),800 宽时为 ±200。mov [0x6fbcc240],1)。影响:
建议: 按上面的常量重写
computeAutomapViewport:全屏偏移用W>>2,中心 Y 用(H−40)/2;mini 地图右置为 (W−281, 57),左置为 (0, 75)。已有 issue: —(#542/#557 讲的是 >800×600 时面板/提示的坐标偏移,不包含自动地图视口常量)