Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Teleport to Map-Relative Coordinates for Shadow of the Erdtree. #128

Merged
merged 2 commits into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
]])
]])
Loading