Difference between revisions of "Overworld Areas"
m (→The Light World and the Dark World) |
m |
||
Line 1: | Line 1: | ||
''See also: [[Standard Notation]]'' | ''See also: [[Standard Notation]]'' | ||
− | Outdoor areas (also known as the Overworld) come in two flavors: Normal and special. Normal outdoor areas (the Light world and the Dark world) are mirrored 8{{x}}8 grids of 512{{x}}512-pixel cells for a total of 64 cells and a 4096{{x}}4096-pixel area in size. Normal outdoor grid cells can be quadruple in size ( | + | Outdoor areas (also known as the Overworld) come in two flavors: Normal and special. Normal outdoor areas (the Light world and the Dark world) are mirrored 8{{x}}8 grids of 512{{x}}512-pixel cells for a total of 64 cells and a 4096{{x}}4096-pixel area in size. Normal outdoor grid cells can be quadruple in size (1024{{x}}1024 pixels), in which case their indices represent their top-left quadrants and the indices for the other three quadrants they occupy do not occur. Special outdoor areas (such as Zora's Domain) are separate individual mini-areas on their own. |
== Area Index == | == Area Index == | ||
Line 7: | Line 7: | ||
In WRAM, there is a byte which indicates whether or not the player is currently in an indoor or outdoor area, and when the player is in an outdoor area, there is a word which contains the index of the outdoor area the player is currently in. | In WRAM, there is a byte which indicates whether or not the player is currently in an indoor or outdoor area, and when the player is in an outdoor area, there is a word which contains the index of the outdoor area the player is currently in. | ||
− | ;$7E001B[$1] | + | ;{{$|7E001B}}[{{$|1}}] |
: 0 while player is outside | : 0 while player is outside | ||
: 1 while player is inside | : 1 while player is inside | ||
− | ;$7E008A[$2] | + | ;{{$|7E008A}}[{{$|2}}] |
: the current area index while player is outside | : the current area index while player is outside | ||
: invalid while player is inside | : invalid while player is inside | ||
Line 21: | Line 21: | ||
Let A be the current area index, (Px,Py) be the current absolute player coordinates, and (Lx,Ly) be the local coordinates of the player within the current area. | Let A be the current area index, (Px,Py) be the current absolute player coordinates, and (Lx,Ly) be the local coordinates of the player within the current area. | ||
− | When the player is in the Light world (area index $00..$3F), the player's coordinates originate at the top-left corner of area $00, and the coordinates can be calculated as follows. | + | When the player is in the Light world (area index {{$|00}}..{{$|3F}}), the player's coordinates originate at the top-left corner of area {{$|00}}, and the coordinates can be calculated as follows. |
<nowiki>Lx = Px - ( A % 8 ) * 512 | <nowiki>Lx = Px - ( A % 8 ) * 512 | ||
Ly = Py - ( A / 8 ) * 512</nowiki> | Ly = Py - ( A / 8 ) * 512</nowiki> | ||
− | When the player is in the Dark world (area index $40..$7F), the player's coordinates originate at the top-left corner of area $40, and the coordinates can be calculated as follows. | + | When the player is in the Dark world (area index {{$|40}}..{{$|7F}}), the player's coordinates originate at the top-left corner of area {{$|40}}, and the coordinates can be calculated as follows. |
<nowiki>Lx = Px - ( ( A - $40 ) % 8 ) * 512 | <nowiki>Lx = Px - ( ( A - $40 ) % 8 ) * 512 | ||
Ly = Py - ( ( A - $40 ) / 8 ) * 512</nowiki> | Ly = Py - ( ( A - $40 ) / 8 ) * 512</nowiki> | ||
− | When the player is in a special area (area index $80 and up), the player's coordinates originate at the top-left corner of the current special area. There are two special areas: $80 combines the Master Sword area and the area under the bridge east of the player's house, and $81 is Zora's Domain. Local coordinates within the Master Sword area and within Zora's Domain are equal to the absolute coordinates. The player is in the area under the bridge when their X coordinate is 256 or greater, and their local X coordinate is simply their absolute X coordinate minus 256. | + | When the player is in a special area (area index {{$|80}} and up), the player's coordinates originate at the top-left corner of the current special area. There are two special areas: {{$|80}} combines the Master Sword area and the area under the bridge east of the player's house, and {{$|81}} is Zora's Domain. Local coordinates within the Master Sword area and within Zora's Domain are equal to the absolute coordinates. The player is in the area under the bridge when their X coordinate is 256 or greater, and their local X coordinate is simply their absolute X coordinate minus 256. |
== The Light World and the Dark World == | == The Light World and the Dark World == | ||
− | The Light world and Dark world mirror each other: Any area index in the Light world refers to an area index in the Dark world of the same size and at the same location, except the Dark world index is increased by {{ | + | The Light world and Dark world mirror each other: Any area index in the Light world refers to an area index in the Dark world of the same size and at the same location, except the Dark world index is increased by {{$|40}}. The following table lists the areas of both worlds by their Light world name for simplicity. |
{| class="wikitable" | {| class="wikitable" | ||
Line 44: | Line 44: | ||
!Description (for Light World) | !Description (for Light World) | ||
|- | |- | ||
− | |$00 (0) | + | |{{$|00}} (0) |
− | |$40 (64) | + | |{{$|40}} (64) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Lost Woods | |Lost Woods | ||
|- | |- | ||
− | |$02 (2) | + | |{{$|02}} (2) |
− | |$42 (66) | + | |{{$|42}} (66) |
|512{{x}}512 | |512{{x}}512 | ||
|Lumberjacks | |Lumberjacks | ||
|- | |- | ||
− | |$03 (3) | + | |{{$|03}} (3) |
− | |$43 (67) | + | |{{$|43}} (67) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Western Death Mountain | |Western Death Mountain | ||
|- | |- | ||
− | |$05 (5) | + | |{{$|05}} (5) |
− | |$45 (69) | + | |{{$|45}} (69) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Eastern Death Mountain | |Eastern Death Mountain | ||
|- | |- | ||
− | |$07 (7) | + | |{{$|07}} (7) |
− | |$47 (71) | + | |{{$|47}} (71) |
|512{{x}}512 | |512{{x}}512 | ||
|Turtle Rock | |Turtle Rock | ||
|- | |- | ||
− | |$0A (10) | + | |{{$|0A}} (10) |
− | |$4A (74) | + | |{{$|4A}} (74) |
|512{{x}}512 | |512{{x}}512 | ||
|Entrance to Death Mountain | |Entrance to Death Mountain | ||
|- | |- | ||
− | |$0F (15) | + | |{{$|0F}} (15) |
− | |$4F (79) | + | |{{$|4F}} (79) |
|512{{x}}512 | |512{{x}}512 | ||
|Entrance to Zora's Domain | |Entrance to Zora's Domain | ||
|- | |- | ||
− | |$10 (16) | + | |{{$|10}} (16) |
− | |$50 (80) | + | |{{$|50}} (80) |
|512{{x}}512 | |512{{x}}512 | ||
|Path Between Kakariko Village and Lost Woods | |Path Between Kakariko Village and Lost Woods | ||
|- | |- | ||
− | |$11 (17) | + | |{{$|11}} (17) |
− | |$51 (81) | + | |{{$|51}} (81) |
|512{{x}}512 | |512{{x}}512 | ||
|Kakariko Village Fortune Teller | |Kakariko Village Fortune Teller | ||
|- | |- | ||
− | |$12 (18) | + | |{{$|12}} (18) |
− | |$52 (82) | + | |{{$|52}} (82) |
|512{{x}}512 | |512{{x}}512 | ||
|Pond Between Kakariko Village Fortune Teller and Sanctuary | |Pond Between Kakariko Village Fortune Teller and Sanctuary | ||
|- | |- | ||
− | |$13 (19) | + | |{{$|13}} (19) |
− | |$53 (83) | + | |{{$|53}} (83) |
|512{{x}}512 | |512{{x}}512 | ||
|Sanctuary | |Sanctuary | ||
|- | |- | ||
− | |$14 (20) | + | |{{$|14}} (20) |
− | |$54 (84) | + | |{{$|54}} (84) |
|512{{x}}512 | |512{{x}}512 | ||
|Graveyard | |Graveyard | ||
|- | |- | ||
− | |$15 (21) | + | |{{$|15}} (21) |
− | |$55 (85) | + | |{{$|55}} (85) |
|512{{x}}512 | |512{{x}}512 | ||
|River Between Graveyard and Witch's Hut | |River Between Graveyard and Witch's Hut | ||
|- | |- | ||
− | |$16 (22) | + | |{{$|16}} (22) |
− | |$56 (86) | + | |{{$|56}} (86) |
|512{{x}}512 | |512{{x}}512 | ||
|Witch's Hut | |Witch's Hut | ||
|- | |- | ||
− | |$17 (23) | + | |{{$|17}} (23) |
− | |$57 (87) | + | |{{$|57}} (87) |
|512{{x}}512 | |512{{x}}512 | ||
|East of Witch's Hut | |East of Witch's Hut | ||
|- | |- | ||
− | |$18 (24) | + | |{{$|18}} (24) |
− | |$58 (88) | + | |{{$|58}} (88) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Kakariko Village | |Kakariko Village | ||
|- | |- | ||
− | |$1A (26) | + | |{{$|1A}} (26) |
− | |$5A (90) | + | |{{$|5A}} (90) |
|512{{x}}512 | |512{{x}}512 | ||
|Forest Between Kakariko Village and Hyrule Castle | |Forest Between Kakariko Village and Hyrule Castle | ||
|- | |- | ||
− | |$1B (27) | + | |{{$|1B}} (27) |
− | |$5B (91) | + | |{{$|5B}} (91) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Hyrule Castle | |Hyrule Castle | ||
|- | |- | ||
− | |$1D (29) | + | |{{$|1D}} (29) |
− | |$5D (93) | + | |{{$|5D}} (93) |
|512{{x}}512 | |512{{x}}512 | ||
|Bridge Between Graveyard and Witch's Hut | |Bridge Between Graveyard and Witch's Hut | ||
|- | |- | ||
− | |$1E (30) | + | |{{$|1E}} (30) |
− | |$5E (94) | + | |{{$|5E}} (94) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Eastern Palace | |Eastern Palace | ||
|- | |- | ||
− | |$22 (34) | + | |{{$|22}} (34) |
− | |$62 (98) | + | |{{$|62}} (98) |
|512{{x}}512 | |512{{x}}512 | ||
|Smithy | |Smithy | ||
|- | |- | ||
− | |$25 (37) | + | |{{$|25}} (37) |
− | |$65 (101) | + | |{{$|65}} (101) |
|512{{x}}512 | |512{{x}}512 | ||
− | |Path Between Hyrule Castle and Eastern Palace (top) | + | |Path Between Hyrule Castle and Eastern Palace}} (top) |
|- | |- | ||
− | |$28 (40) | + | |{{$|28}} (40) |
− | |$68 (104) | + | |{{$|68}} (104) |
|512{{x}}512 | |512{{x}}512 | ||
|Kakariko Village Maze Race | |Kakariko Village Maze Race | ||
|- | |- | ||
− | |$29 (41) | + | |{{$|29}} (41) |
− | |$69 (105) | + | |{{$|69}} (105) |
|512{{x}}512 | |512{{x}}512 | ||
|Kakariko Village Library | |Kakariko Village Library | ||
|- | |- | ||
− | |$2A (42) | + | |{{$|2A}} (42) |
− | |$6A (106) | + | |{{$|6A}} (106) |
|512{{x}}512 | |512{{x}}512 | ||
|Haunted Grove | |Haunted Grove | ||
|- | |- | ||
− | |$2B (43) | + | |{{$|2B}} (43) |
− | |$6B (107) | + | |{{$|6B}} (107) |
|512{{x}}512 | |512{{x}}512 | ||
|Forest Between Haunted Grove and Link's House | |Forest Between Haunted Grove and Link's House | ||
|- | |- | ||
− | |$2C (44) | + | |{{$|2C}} (44) |
− | |$6C (108) | + | |{{$|6C}} (108) |
|512{{x}}512 | |512{{x}}512 | ||
|Link's House | |Link's House | ||
|- | |- | ||
− | |$2D (45) | + | |{{$|2D}} (45) |
− | |$6D (109) | + | |{{$|6D}} (109) |
|512{{x}}512 | |512{{x}}512 | ||
− | |Path Between Hyrule Castle and Eastern Palace (bottom) | + | |Path Between Hyrule Castle and Eastern Palace}} (bottom) |
|- | |- | ||
− | |$2E (46) | + | |{{$|2E}} (46) |
− | |$6E (110) | + | |{{$|6E}} (110) |
|512{{x}}512 | |512{{x}}512 | ||
|Caves South of Eastern Palace (left) | |Caves South of Eastern Palace (left) | ||
|- | |- | ||
− | |$2F (47) | + | |{{$|2F}} (47) |
− | |$6F (111) | + | |{{$|6F}} (111) |
|512{{x}}512 | |512{{x}}512 | ||
|Caves South of Eastern Palace (right) | |Caves South of Eastern Palace (right) | ||
|- | |- | ||
− | |$30 (48) | + | |{{$|30}} (48) |
− | |$70 (112) | + | |{{$|70}} (112) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Desert of Mystery | |Desert of Mystery | ||
|- | |- | ||
− | |$32 (50) | + | |{{$|32}} (50) |
− | |$72 (114) | + | |{{$|72}} (114) |
|512{{x}}512 | |512{{x}}512 | ||
|South of Haunted Grove | |South of Haunted Grove | ||
|- | |- | ||
− | |$33 (51) | + | |{{$|33}} (51) |
− | |$73 (115) | + | |{{$|73}} (115) |
|512{{x}}512 | |512{{x}}512 | ||
|Northwestern Great Swamp | |Northwestern Great Swamp | ||
|- | |- | ||
− | |$34 (52) | + | |{{$|34}} (52) |
− | |$74 (116) | + | |{{$|74}} (116) |
|512{{x}}512 | |512{{x}}512 | ||
|Northeastern Great Swamp | |Northeastern Great Swamp | ||
|- | |- | ||
− | |$35 (53) | + | |{{$|35}} (53) |
− | |$75 (117) | + | |{{$|75}} (117) |
|1024{{x}}1024 | |1024{{x}}1024 | ||
|Lake Hylia | |Lake Hylia | ||
|- | |- | ||
− | |$37 (55) | + | |{{$|37}} (55) |
− | |$77 (119) | + | |{{$|77}} (119) |
|512{{x}}512 | |512{{x}}512 | ||
|Ice Cave | |Ice Cave | ||
|- | |- | ||
− | |$3A (58) | + | |{{$|3A}} (58) |
− | |$7A (122) | + | |{{$|7A}} (122) |
|512{{x}}512 | |512{{x}}512 | ||
|Path Between Desert of Mystery and Great Swamp | |Path Between Desert of Mystery and Great Swamp | ||
|- | |- | ||
− | |$3B (59) | + | |{{$|3B}} (59) |
− | |$7B (123) | + | |{{$|7B}} (123) |
|512{{x}}512 | |512{{x}}512 | ||
|Southwestern Great Swamp | |Southwestern Great Swamp | ||
|- | |- | ||
− | |$3C (60) | + | |{{$|3C}} (60) |
− | |$7C (124) | + | |{{$|7C}} (124) |
|512{{x}}512 | |512{{x}}512 | ||
|Southeastern Great Swamp | |Southeastern Great Swamp | ||
|- | |- | ||
− | |$3F (63) | + | |{{$|3F}} (63) |
− | |$7F (127) | + | |{{$|7F}} (127) |
|512{{x}}512 | |512{{x}}512 | ||
|Path Between Lake Hylia and Ice Cave | |Path Between Lake Hylia and Ice Cave | ||
Line 247: | Line 247: | ||
== Special Areas == | == Special Areas == | ||
− | ;$80 | + | ;{{$|80}} ― 512{{x}}512 |
− | : Master Sword area | + | : Master Sword area ― (0,0) to (255,511) |
− | : Area under the bridge | + | : Area under the bridge ― (256,0) to (511,255) |
− | ;$81 | + | ;{{$|81}} ― 512{{x}}512 |
: Zora's Domain | : Zora's Domain |
Revision as of 01:08, 19 December 2016
See also: Standard Notation
Outdoor areas (also known as the Overworld) come in two flavors: Normal and special. Normal outdoor areas (the Light world and the Dark world) are mirrored 8×8 grids of 512×512-pixel cells for a total of 64 cells and a 4096×4096-pixel area in size. Normal outdoor grid cells can be quadruple in size (1024×1024 pixels), in which case their indices represent their top-left quadrants and the indices for the other three quadrants they occupy do not occur. Special outdoor areas (such as Zora's Domain) are separate individual mini-areas on their own.
Area Index
In WRAM, there is a byte which indicates whether or not the player is currently in an indoor or outdoor area, and when the player is in an outdoor area, there is a word which contains the index of the outdoor area the player is currently in.
- $7E001B[$1]
- 0 while player is outside
- 1 while player is inside
- $7E008A[$2]
- the current area index while player is outside
- invalid while player is inside
Player Coordinates
See also: Player Position
Let A be the current area index, (Px,Py) be the current absolute player coordinates, and (Lx,Ly) be the local coordinates of the player within the current area.
When the player is in the Light world (area index $00..$3F), the player's coordinates originate at the top-left corner of area $00, and the coordinates can be calculated as follows.
Lx = Px - ( A % 8 ) * 512 Ly = Py - ( A / 8 ) * 512
When the player is in the Dark world (area index $40..$7F), the player's coordinates originate at the top-left corner of area $40, and the coordinates can be calculated as follows.
Lx = Px - ( ( A - $40 ) % 8 ) * 512 Ly = Py - ( ( A - $40 ) / 8 ) * 512
When the player is in a special area (area index $80 and up), the player's coordinates originate at the top-left corner of the current special area. There are two special areas: $80 combines the Master Sword area and the area under the bridge east of the player's house, and $81 is Zora's Domain. Local coordinates within the Master Sword area and within Zora's Domain are equal to the absolute coordinates. The player is in the area under the bridge when their X coordinate is 256 or greater, and their local X coordinate is simply their absolute X coordinate minus 256.
The Light World and the Dark World
The Light world and Dark world mirror each other: Any area index in the Light world refers to an area index in the Dark world of the same size and at the same location, except the Dark world index is increased by $40. The following table lists the areas of both worlds by their Light world name for simplicity.
Index (Light World) | Index (Dark World) | Size | Description (for Light World) |
---|---|---|---|
$00 (0) | $40 (64) | 1024×1024 | Lost Woods |
$02 (2) | $42 (66) | 512×512 | Lumberjacks |
$03 (3) | $43 (67) | 1024×1024 | Western Death Mountain |
$05 (5) | $45 (69) | 1024×1024 | Eastern Death Mountain |
$07 (7) | $47 (71) | 512×512 | Turtle Rock |
$0A (10) | $4A (74) | 512×512 | Entrance to Death Mountain |
$0F (15) | $4F (79) | 512×512 | Entrance to Zora's Domain |
$10 (16) | $50 (80) | 512×512 | Path Between Kakariko Village and Lost Woods |
$11 (17) | $51 (81) | 512×512 | Kakariko Village Fortune Teller |
$12 (18) | $52 (82) | 512×512 | Pond Between Kakariko Village Fortune Teller and Sanctuary |
$13 (19) | $53 (83) | 512×512 | Sanctuary |
$14 (20) | $54 (84) | 512×512 | Graveyard |
$15 (21) | $55 (85) | 512×512 | River Between Graveyard and Witch's Hut |
$16 (22) | $56 (86) | 512×512 | Witch's Hut |
$17 (23) | $57 (87) | 512×512 | East of Witch's Hut |
$18 (24) | $58 (88) | 1024×1024 | Kakariko Village |
$1A (26) | $5A (90) | 512×512 | Forest Between Kakariko Village and Hyrule Castle |
$1B (27) | $5B (91) | 1024×1024 | Hyrule Castle |
$1D (29) | $5D (93) | 512×512 | Bridge Between Graveyard and Witch's Hut |
$1E (30) | $5E (94) | 1024×1024 | Eastern Palace |
$22 (34) | $62 (98) | 512×512 | Smithy |
$25 (37) | $65 (101) | 512×512 | Path Between Hyrule Castle and Eastern Palace}} (top) |
$28 (40) | $68 (104) | 512×512 | Kakariko Village Maze Race |
$29 (41) | $69 (105) | 512×512 | Kakariko Village Library |
$2A (42) | $6A (106) | 512×512 | Haunted Grove |
$2B (43) | $6B (107) | 512×512 | Forest Between Haunted Grove and Link's House |
$2C (44) | $6C (108) | 512×512 | Link's House |
$2D (45) | $6D (109) | 512×512 | Path Between Hyrule Castle and Eastern Palace}} (bottom) |
$2E (46) | $6E (110) | 512×512 | Caves South of Eastern Palace (left) |
$2F (47) | $6F (111) | 512×512 | Caves South of Eastern Palace (right) |
$30 (48) | $70 (112) | 1024×1024 | Desert of Mystery |
$32 (50) | $72 (114) | 512×512 | South of Haunted Grove |
$33 (51) | $73 (115) | 512×512 | Northwestern Great Swamp |
$34 (52) | $74 (116) | 512×512 | Northeastern Great Swamp |
$35 (53) | $75 (117) | 1024×1024 | Lake Hylia |
$37 (55) | $77 (119) | 512×512 | Ice Cave |
$3A (58) | $7A (122) | 512×512 | Path Between Desert of Mystery and Great Swamp |
$3B (59) | $7B (123) | 512×512 | Southwestern Great Swamp |
$3C (60) | $7C (124) | 512×512 | Southeastern Great Swamp |
$3F (63) | $7F (127) | 512×512 | Path Between Lake Hylia and Ice Cave |
Special Areas
- $80 ― 512×512
- Master Sword area ― (0,0) to (255,511)
- Area under the bridge ― (256,0) to (511,255)
- $81 ― 512×512
- Zora's Domain