Skip to content

Commit

Permalink
Fix Teleport to Map-Relative Coordinates for Shadow of the Erdtree. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
inuNorii authored Jan 1, 2025
2 parents aa19e0c + 2ec4e5b commit 684a6bb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ end
function getAbsoluteCoords(mapRelPos)
local minfo = getMapInfo(mapRelPos.map)
-- 3C = open world map, divided in 256x256 chunks.
if (minfo.id == 0x3C) then
if (minfo.id == 0x3C or minfo.id == 0x3D) then
return {
x = mapRelPos.x + 256 * minfo.gridXNo,
y = mapRelPos.y,
Expand All @@ -73,7 +73,7 @@ function getAbsoluteCoords(mapRelPos)
for id, addr in pairs(worldMapLegacyConv) do
local mapConv = readWorldMapLegacyConvParam(addr)
if (mapConv.srcAreaNo == minfo.id and
mapConv.dstAreaNo == 0x3C and
(mapConv.dstAreaNo == 0x3C or mapConv.dstAreaNo == 0x3D) and
mapConv.srcGridXNo == minfo.gridXNo and -- These aren't really grid coords, more like dungeon number for the same type
mapConv.srcGridZNo == minfo.gridZNo) then
-- Perform conversion to open world coords by rebasing to open world map origin
Expand Down Expand Up @@ -124,4 +124,4 @@ registersymbol(TargetCoords)
autoAssemble([[
dealloc(TargetCoords)
unregistersymbol(TargetCoords)
]])
]])

0 comments on commit 684a6bb

Please sign in to comment.