diff options
author | camthesaxman <cameronghall@cox.net> | 2017-07-15 01:45:56 -0500 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-07-15 01:45:56 -0500 |
commit | 563d7591e46475e5429ef594b6058de7451f9ed4 (patch) | |
tree | ab67e36c41c6a5bbe4718fd437ae447c5892d786 | |
parent | 9013ffe84a12a8d81d32fb8125687988bd2ba8ca (diff) |
decompile sub_80FB170 - sub_80FB32C
-rw-r--r-- | asm/region_map.s | 603 | ||||
-rw-r--r-- | data-de/region_map_locations.inc | 327 | ||||
-rw-r--r-- | data/region_map.s | 5 | ||||
-rw-r--r-- | data/region_map_locations.inc | 327 | ||||
-rw-r--r-- | data/region_map_sections.inc | 16 | ||||
-rw-r--r-- | src/data/region_map_names_de.h | 79 | ||||
-rw-r--r-- | src/data/region_map_names_en.h | 79 | ||||
-rw-r--r-- | src/region_map.c | 330 |
8 files changed, 484 insertions, 1282 deletions
diff --git a/asm/region_map.s b/asm/region_map.s index ade656aa0..e4d4ad34c 100644 --- a/asm/region_map.s +++ b/asm/region_map.s @@ -6,609 +6,6 @@ .text - thumb_func_start sub_80FB170 -sub_80FB170: @ 80FB170 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r4, [sp, 0x24] - ldr r7, [sp, 0x28] - ldr r5, [sp, 0x2C] - lsls r4, 16 - lsrs r4, 16 - mov r8, r4 - lsls r7, 16 - adds r4, r7, 0 - lsrs r4, 16 - mov r9, r4 - lsls r5, 24 - lsrs r5, 24 - ldr r4, _080FB230 @ =gUnknown_020388CC - ldr r6, [r4] - ldr r7, _080FB234 @ =gSineTable - mov r12, r7 - adds r4, r5, 0 - adds r4, 0x40 - lsls r4, 1 - add r4, r12 - movs r7, 0 - ldrsh r4, [r4, r7] - str r4, [sp] - mov r7, r8 - muls r7, r4 - adds r4, r7, 0 - asrs r4, 8 - mov r10, r4 - str r4, [r6, 0x2C] - lsls r5, 1 - add r5, r12 - movs r7, 0 - ldrsh r5, [r5, r7] - negs r4, r5 - mov r7, r8 - muls r7, r4 - adds r4, r7, 0 - asrs r4, 8 - mov r12, r4 - str r4, [r6, 0x30] - mov r7, r9 - muls r7, r5 - adds r5, r7, 0 - asrs r5, 8 - str r5, [r6, 0x34] - ldr r7, [sp] - mov r4, r9 - muls r4, r7 - asrs r4, 8 - mov r8, r4 - str r4, [r6, 0x38] - lsls r0, 16 - asrs r0, 8 - lsls r2, 16 - asrs r2, 16 - lsls r4, r2, 8 - adds r0, r4 - lsls r3, 16 - asrs r3, 16 - adds r4, r3, 0 - muls r4, r5 - mov r5, r10 - muls r5, r2 - adds r4, r5 - subs r0, r4 - str r0, [r6, 0x24] - lsls r1, 16 - asrs r1, 8 - lsls r0, r3, 8 - adds r1, r0 - mov r0, r8 - muls r0, r3 - mov r3, r12 - muls r3, r2 - adds r2, r3, 0 - adds r0, r2 - subs r1, r0 - str r1, [r6, 0x28] - adds r6, 0x7D - movs r0, 0x1 - strb r0, [r6] - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080FB230: .4byte gUnknown_020388CC -_080FB234: .4byte gSineTable - thumb_func_end sub_80FB170 - - thumb_func_start sub_80FB238 -sub_80FB238: @ 80FB238 - ldr r2, _080FB25C @ =gUnknown_020388CC - ldr r2, [r2] - lsls r0, 16 - asrs r0, 8 - movs r3, 0xE0 - lsls r3, 5 - adds r0, r3 - str r0, [r2, 0x24] - lsls r1, 16 - asrs r1, 8 - movs r0, 0x90 - lsls r0, 6 - adds r1, r0 - str r1, [r2, 0x28] - adds r2, 0x7D - movs r0, 0x1 - strb r0, [r2] - bx lr - .align 2, 0 -_080FB25C: .4byte gUnknown_020388CC - thumb_func_end sub_80FB238 - - thumb_func_start sub_80FB260 -sub_80FB260: @ 80FB260 - push {lr} - ldr r0, _080FB29C @ =gUnknown_020388CC - ldr r2, [r0] - adds r3, r2, 0 - adds r3, 0x7D - ldrb r0, [r3] - cmp r0, 0 - beq _080FB298 - ldr r1, _080FB2A0 @ =REG_BG2PA - ldr r0, [r2, 0x2C] - strh r0, [r1] - adds r1, 0x2 - ldr r0, [r2, 0x34] - strh r0, [r1] - adds r1, 0x2 - ldr r0, [r2, 0x30] - strh r0, [r1] - adds r1, 0x2 - ldr r0, [r2, 0x38] - strh r0, [r1] - adds r1, 0x2 - ldr r0, [r2, 0x24] - str r0, [r1] - adds r1, 0x4 - ldr r0, [r2, 0x28] - str r0, [r1] - movs r0, 0 - strb r0, [r3] -_080FB298: - pop {r0} - bx r0 - .align 2, 0 -_080FB29C: .4byte gUnknown_020388CC -_080FB2A0: .4byte REG_BG2PA - thumb_func_end sub_80FB260 - - thumb_func_start sub_80FB2A4 -sub_80FB2A4: @ 80FB2A4 - push {r4,r5,lr} - sub sp, 0xC - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r5, r1, 16 - movs r0, 0x80 - lsls r0, 1 - str r0, [sp] - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x38 - movs r3, 0x48 - bl sub_80FB170 - bl sub_80FB260 - ldr r0, _080FB2E8 @ =gUnknown_020388CC - ldr r2, [r0] - ldr r1, [r2, 0x20] - cmp r1, 0 - beq _080FB2E0 - negs r0, r4 - strh r0, [r1, 0x24] - ldr r1, [r2, 0x20] - negs r0, r5 - strh r0, [r1, 0x26] -_080FB2E0: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080FB2E8: .4byte gUnknown_020388CC - thumb_func_end sub_80FB2A4 - - thumb_func_start GetRegionMapSectionAt -GetRegionMapSectionAt: @ 80FB2EC - push {lr} - lsls r0, 16 - lsrs r3, r0, 16 - lsls r1, 16 - ldr r0, _080FB30C @ =0xfffe0000 - adds r1, r0 - lsrs r2, r1, 16 - cmp r2, 0xE - bhi _080FB306 - cmp r3, 0 - beq _080FB306 - cmp r3, 0x1C - bls _080FB310 -_080FB306: - movs r0, 0x58 - b _080FB324 - .align 2, 0 -_080FB30C: .4byte 0xfffe0000 -_080FB310: - subs r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - ldr r1, _080FB328 @ =gRegionMapSections - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r3, r0 - adds r0, r1 - ldrb r0, [r0] -_080FB324: - pop {r1} - bx r1 - .align 2, 0 -_080FB328: .4byte gRegionMapSections - thumb_func_end GetRegionMapSectionAt - - thumb_func_start sub_80FB32C -sub_80FB32C: @ 80FB32C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r0, _080FB358 @ =gSaveBlock1 - movs r1, 0x4 - ldrsb r1, [r0, r1] - adds r2, r0, 0 - cmp r1, 0x19 - bne _080FB35C - ldrb r0, [r2, 0x5] - subs r0, 0x29 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bhi _080FB35C - bl sub_80FB600 - b _080FB5E8 - .align 2, 0 -_080FB358: .4byte gSaveBlock1 -_080FB35C: - movs r0, 0x4 - ldrsb r0, [r2, r0] - movs r1, 0x5 - ldrsb r1, [r2, r1] - bl get_map_light_level_by_bank_and_number - lsls r0, 24 - lsrs r0, 24 - subs r0, 0x1 - cmp r0, 0x8 - bhi _080FB3A4 - lsls r0, 2 - ldr r1, _080FB37C @ =_080FB380 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_080FB37C: .4byte _080FB380 - .align 2, 0 -_080FB380: - .4byte _080FB3A4 - .4byte _080FB3A4 - .4byte _080FB3A4 - .4byte _080FB3E0 - .4byte _080FB3A4 - .4byte _080FB3A4 - .4byte _080FB3E0 - .4byte _080FB464 - .4byte _080FB428 -_080FB3A4: - ldr r4, _080FB3D4 @ =gUnknown_020388CC - ldr r0, [r4] - ldr r3, _080FB3D8 @ =gMapHeader - ldrb r1, [r3, 0x14] - movs r2, 0 - strh r1, [r0, 0x14] - adds r0, 0x7F - strb r2, [r0] - ldr r0, [r3] - ldrh r2, [r0] - ldrh r0, [r0, 0x4] - mov r8, r0 - ldr r0, _080FB3DC @ =gSaveBlock1 - ldrh r6, [r0] - ldrh r3, [r0, 0x2] - ldr r1, [r4] - ldrh r0, [r1, 0x14] - cmp r0, 0x45 - beq _080FB3CC - b _080FB4CC -_080FB3CC: - adds r1, 0x7F - movs r0, 0x1 - strb r0, [r1] - b _080FB4CC - .align 2, 0 -_080FB3D4: .4byte gUnknown_020388CC -_080FB3D8: .4byte gMapHeader -_080FB3DC: .4byte gSaveBlock1 -_080FB3E0: - ldr r4, _080FB420 @ =gSaveBlock1 - adds r0, r4, 0 - adds r0, 0x24 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - lsls r0, 16 - lsrs r0, 16 - adds r1, r4, 0 - adds r1, 0x25 - ldrb r1, [r1] - lsls r1, 24 - asrs r1, 24 - lsls r1, 16 - lsrs r1, 16 - bl get_mapheader_by_bank_and_number - adds r2, r0, 0 - ldr r0, _080FB424 @ =gUnknown_020388CC - ldr r0, [r0] - ldrb r1, [r2, 0x14] - strh r1, [r0, 0x14] - adds r0, 0x7F - movs r1, 0x1 - strb r1, [r0] - ldr r0, [r2] - ldrh r2, [r0] - ldrh r0, [r0, 0x4] - mov r8, r0 - ldrh r6, [r4, 0x28] - ldrh r3, [r4, 0x2A] - b _080FB4CC - .align 2, 0 -_080FB420: .4byte gSaveBlock1 -_080FB424: .4byte gUnknown_020388CC -_080FB428: - ldr r4, _080FB45C @ =gSaveBlock1 - movs r0, 0x14 - ldrsb r0, [r4, r0] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x15 - ldrsb r1, [r4, r1] - lsls r1, 16 - lsrs r1, 16 - bl get_mapheader_by_bank_and_number - adds r2, r0, 0 - ldr r0, _080FB460 @ =gUnknown_020388CC - ldr r0, [r0] - ldrb r1, [r2, 0x14] - strh r1, [r0, 0x14] - adds r0, 0x7F - movs r1, 0x1 - strb r1, [r0] - ldr r0, [r2] - ldrh r2, [r0] - ldrh r0, [r0, 0x4] - mov r8, r0 - ldrh r6, [r4, 0x18] - ldrh r3, [r4, 0x1A] - b _080FB4CC - .align 2, 0 -_080FB45C: .4byte gSaveBlock1 -_080FB460: .4byte gUnknown_020388CC -_080FB464: - ldr r5, _080FB48C @ =gUnknown_020388CC - ldr r0, [r5] - ldr r1, _080FB490 @ =gMapHeader - ldrb r1, [r1, 0x14] - strh r1, [r0, 0x14] - cmp r1, 0x57 - beq _080FB498 - ldr r4, _080FB494 @ =gSaveBlock1 + 0x24 - movs r0, 0 - ldrsb r0, [r4, r0] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ldrsb r1, [r4, r1] - lsls r1, 16 - lsrs r1, 16 - bl get_mapheader_by_bank_and_number - adds r2, r0, 0 - b _080FB4B6 - .align 2, 0 -_080FB48C: .4byte gUnknown_020388CC -_080FB490: .4byte gMapHeader -_080FB494: .4byte gSaveBlock1 + 0x24 -_080FB498: - ldr r4, _080FB548 @ =gSaveBlock1 + 0x14 - movs r0, 0 - ldrsb r0, [r4, r0] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ldrsb r1, [r4, r1] - lsls r1, 16 - lsrs r1, 16 - bl get_mapheader_by_bank_and_number - adds r2, r0, 0 - ldr r1, [r5] - ldrb r0, [r2, 0x14] - strh r0, [r1, 0x14] -_080FB4B6: - ldr r0, _080FB54C @ =gUnknown_020388CC - ldr r0, [r0] - adds r0, 0x7F - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - ldrh r2, [r0] - ldrh r0, [r0, 0x4] - mov r8, r0 - ldrh r6, [r4, 0x4] - ldrh r3, [r4, 0x6] -_080FB4CC: - mov r9, r6 - ldr r4, _080FB54C @ =gUnknown_020388CC - ldr r0, [r4] - ldrh r5, [r0, 0x14] - lsls r0, r5, 3 - ldr r1, _080FB550 @ =gRegionMapLocations - adds r0, r1 - mov r10, r0 - ldrb r7, [r0, 0x2] - adds r0, r2, 0 - adds r1, r7, 0 - str r3, [sp] - bl __divsi3 - lsls r0, 16 - lsrs r1, r0, 16 - ldr r3, [sp] - cmp r1, 0 - bne _080FB4F4 - movs r1, 0x1 -_080FB4F4: - adds r0, r6, 0 - str r3, [sp] - bl __udivsi3 - lsls r0, 16 - lsrs r6, r0, 16 - ldr r3, [sp] - cmp r6, r7 - bcc _080FB50C - subs r0, r7, 0x1 - lsls r0, 16 - lsrs r6, r0, 16 -_080FB50C: - mov r2, r10 - ldrb r4, [r2, 0x3] - mov r0, r8 - adds r1, r4, 0 - str r3, [sp] - bl __divsi3 - lsls r0, 16 - lsrs r1, r0, 16 - ldr r3, [sp] - cmp r1, 0 - bne _080FB526 - movs r1, 0x1 -_080FB526: - adds r0, r3, 0 - bl __udivsi3 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, r4 - bcc _080FB53A - subs r0, r4, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 -_080FB53A: - cmp r5, 0x24 - beq _080FB59C - cmp r5, 0x24 - bgt _080FB554 - cmp r5, 0x1D - beq _080FB55E - b _080FB5BE - .align 2, 0 -_080FB548: .4byte gSaveBlock1 + 0x14 -_080FB54C: .4byte gUnknown_020388CC -_080FB550: .4byte gRegionMapLocations -_080FB554: - cmp r5, 0x29 - beq _080FB566 - cmp r5, 0x33 - beq _080FB566 - b _080FB5BE -_080FB55E: - cmp r3, 0 - beq _080FB5BE - movs r6, 0 - b _080FB5BE -_080FB566: - movs r6, 0 - ldr r1, _080FB598 @ =gSaveBlock1 - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0x20 - ble _080FB574 - movs r6, 0x1 -_080FB574: - cmp r0, 0x33 - ble _080FB57E - adds r0, r6, 0x1 - lsls r0, 16 - lsrs r6, r0, 16 -_080FB57E: - movs r3, 0 - movs r2, 0x2 - ldrsh r0, [r1, r2] - cmp r0, 0x25 - ble _080FB58A - movs r3, 0x1 -_080FB58A: - cmp r0, 0x38 - ble _080FB5BE - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - b _080FB5BE - .align 2, 0 -_080FB598: .4byte gSaveBlock1 -_080FB59C: - movs r6, 0 - mov r0, r9 - cmp r0, 0xE - bls _080FB5A6 - movs r6, 0x1 -_080FB5A6: - mov r1, r9 - cmp r1, 0x1C - bls _080FB5B2 - adds r0, r6, 0x1 - lsls r0, 16 - lsrs r6, r0, 16 -_080FB5B2: - mov r2, r9 - cmp r2, 0x36 - bls _080FB5BE - adds r0, r6, 0x1 - lsls r0, 16 - lsrs r6, r0, 16 -_080FB5BE: - ldr r0, _080FB5F8 @ =gUnknown_020388CC - ldr r2, [r0] - ldrh r0, [r2, 0x14] - lsls r0, 3 - ldr r1, _080FB5FC @ =gRegionMapLocations - adds r0, r1 - ldrb r0, [r0] - adds r0, r6, r0 - adds r0, 0x1 - adds r1, r2, 0 - adds r1, 0x54 - strh r0, [r1] - ldrh r0, [r2, 0x14] - lsls r0, 3 - ldr r1, _080FB5FC @ =gRegionMapLocations - adds r0, r1 - ldrb r0, [r0, 0x1] - adds r0, r3, r0 - adds r0, 0x2 - adds r2, 0x56 - strh r0, [r2] -_080FB5E8: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080FB5F8: .4byte gUnknown_020388CC -_080FB5FC: .4byte gRegionMapLocations - thumb_func_end sub_80FB32C - thumb_func_start sub_80FB600 sub_80FB600: @ 80FB600 push {r4-r7,lr} diff --git a/data-de/region_map_locations.inc b/data-de/region_map_locations.inc deleted file mode 100644 index 1f4863206..000000000 --- a/data-de/region_map_locations.inc +++ /dev/null @@ -1,327 +0,0 @@ -gMapName_LittlerootTown: @ 83E6FF4 - .string "WURZELHEIM$" - -gMapName_OldaleTown: @ 83E7006 - .string "ROSALTSTADT$" - -gMapName_DewfordTown: @ 83E7014 - .string "FAUSTAUHAVEN$" - -gMapName_LavaridgeTown: @ 83E7023 - .string "BAD LAVASTADT$" - -gMapName_FallarborTown: @ 83E7034 - .string "LAUBWECHSEL{NAME_END}FELD$" - -gMapName_VerdanturfTown: @ 83E7045 - .string "WIESENFLUR$" - -gMapName_PacifidlogTown: @ 83E7057 - .string "FLOSSBRUNN$" - -gMapName_PetalburgCity: @ 83E7069 - .string "BLÜTENBURG{NAME_END} CITY$" - -gMapName_SlateportCity: @ 83E707A - .string "GRAPHITPORT{NAME_END} CITY$" - -gMapName_MauvilleCity: @ 83E708B - .string "MALVENFROH{NAME_END} CITY$" - -gMapName_RustboroCity: @ 83E709B - .string "METAROST{NAME_END} CITY$" - -gMapName_FortreeCity: @ 83E70AB - .string "BAUMHAUSEN{NAME_END} CITY$" - -gMapName_LilycoveCity: @ 83E70BA - .string "SEEGRASULB{NAME_END} CITY$" - -gMapName_MossdeepCity: @ 83E70CA - .string "MOOSBACH{NAME_END} CITY$" - -gMapName_SootopolisCity: @ 83E70DA - .string "XENEROVILLE$" - -gMapName_EverGrandeCity: @ 83E70EC - .string "PRACHTPOLIS{NAME_END} CITY$" - -gMapName_Route101: @ 83E70FF - .string "ROUTE 101$" - -gMapName_Route102: @ 83E7109 - .string "ROUTE 102$" - -gMapName_Route103: @ 83E7113 - .string "ROUTE 103$" - -gMapName_Route104: @ 83E711D - .string "ROUTE 104$" - -gMapName_Route105: @ 83E7127 - .string "ROUTE 105$" - -gMapName_Route106: @ 83E7131 - .string "ROUTE 106$" - -gMapName_Route107: @ 83E713B - .string "ROUTE 107$" - -gMapName_Route108: @ 83E7145 - .string "ROUTE 108$" - -gMapName_Route109: @ 83E714F - .string "ROUTE 109$" - -gMapName_Route110: @ 83E7159 - .string "ROUTE 110$" - -gMapName_Route111: @ 83E7163 - .string "ROUTE 111$" - -gMapName_Route112: @ 83E716D - .string "ROUTE 112$" - -gMapName_Route113: @ 83E7177 - .string "ROUTE 113$" - -gMapName_Route114: @ 83E7181 - .string "ROUTE 114$" - -gMapName_Route115: @ 83E718B - .string "ROUTE 115$" - -gMapName_Route116: @ 83E7195 - .string "ROUTE 116$" - -gMapName_Route117: @ 83E719F - .string "ROUTE 117$" - -gMapName_Route118: @ 83E71A9 - .string "ROUTE 118$" - -gMapName_Route119: @ 83E71B3 - .string "ROUTE 119$" - -gMapName_Route120: @ 83E71BD - .string "ROUTE 120$" - -gMapName_Route121: @ 83E71C7 - .string "ROUTE 121$" - -gMapName_Route122: @ 83E71D1 - .string "ROUTE 122$" - -gMapName_Route123: @ 83E71DB - .string "ROUTE 123$" - -gMapName_Route124: @ 83E71E5 - .string "ROUTE 124$" - -gMapName_Route125: @ 83E71EF - .string "ROUTE 125$" - -gMapName_Route126: @ 83E71F9 - .string "ROUTE 126$" - -gMapName_Route127: @ 83E7203 - .string "ROUTE 127$" - -gMapName_Route128: @ 83E720D - .string "ROUTE 128$" - -gMapName_Route129: @ 83E7217 - .string "ROUTE 129$" - -gMapName_Route130: @ 83E7221 - .string "ROUTE 130$" - -gMapName_Route131: @ 83E722B - .string "ROUTE 131$" - -gMapName_Route132: @ 83E7235 - .string "ROUTE 132$" - -gMapName_Route133: @ 83E723F - .string "ROUTE 133$" - -gMapName_Route134: @ 83E7249 - .string "ROUTE 134$" - -gMapName_Underwater: @ 83E7253 - .string "UNTERWASSER$" - -gMapName_GraniteCave: @ 83E725E - .string "GRANITHÖHLE$" - -gMapName_MtChimney: @ 83E726B - .string "SCHLOTBERG$" - -gMapName_SafariZone: @ 83E7277 - .string "SAFARI-ZONE$" - -gMapName_BattleTower: @ 83E7283 - .string "DUELLTURM$" - -gMapName_PetalburgWoods: @ 83E7290 - .string "BLÜTENBURGWALD$" - -gMapName_RusturfTunnel: @ 83E72A0 - .string "METAFLURTUNNEL$" - -gMapName_AbandonedShip: @ 83E72AF - .string "SCHIFFSWRACK$" - -gMapName_NewMauville: @ 83E72BE - .string "NEU MALVENFROH$" - -gMapName_MeteorFalls: @ 83E72CB - .string "METEORFÄLLE$" - -gMapName_MtPyre: @ 83E72D8 - .string "PYROBERG$" - -gMapName_EvilTeamHideout: @ 83E72E1 - .string "{EVIL_TEAM}s VERSTECK$" - -gMapName_ShoalCave: @ 83E72EC - .string "KÜSTENHÖHLE$" - -gMapName_SeafloorCavern: @ 83E72F7 - .string "TIEFSEEHÖHLE$" - -gMapName_VictoryRoad: @ 83E7307 - .string "SIEGESSTRASSE$" - -gMapName_MirageIsland: @ 83E7314 - .string "WUNDEREILAND$" - -gMapName_CaveOfOrigin: @ 83E7322 - .string "URZEITHÖHLE$" - -gMapName_SouthernIsland: @ 83E7331 - .string "INSEL IM SÜDEN$" - -gMapName_FieryPath: @ 83E7341 - .string "FEURIGER PFAD$" - -gMapName_JaggedPass: @ 83E734C - .string "STEILPASS$" - -gMapName_SealedChamber: @ 83E7358 - .string "SIEGELKAMMER$" - -gMapName_ScorchedSlab: @ 83E7367 - .string "SONNENGROTTE$" - -gMapName_IslandCave: @ 83E7375 - .string "INSELHÖHLE$" - -gMapName_DesertRuins: @ 83E7381 - .string "WÜSTENRUINE$" - -gMapName_AncientTomb: @ 83E738E - .string "GRABMAL$" - -gMapName_InsideOfTruck: @ 83E739B - .string "IM MÖBELWAGEN$" - -gMapName_SkyPillar: @ 83E73AB - .string "HIMMELTURM$" - -gMapName_SecretBase: @ 83E73B6 - .string "GEHEIMBASIS$" - -gMapName_None: @ 83E73C2 - .string "$" - - .align 2 -gRegionMapLocations:: @ 83E73C4 - region_map_location 4, 11, 1, 1, LittlerootTown - region_map_location 4, 9, 1, 1, OldaleTown - region_map_location 2, 14, 1, 1, DewfordTown - region_map_location 5, 3, 1, 1, LavaridgeTown - region_map_location 3, 0, 1, 1, FallarborTown - region_map_location 4, 6, 1, 1, VerdanturfTown - region_map_location 17, 10, 1, 1, PacifidlogTown - region_map_location 1, 9, 1, 1, PetalburgCity - region_map_location 8, 10, 1, 2, SlateportCity - region_map_location 8, 6, 2, 1, MauvilleCity - region_map_location 0, 5, 1, 2, RustboroCity - region_map_location 12, 0, 1, 1, FortreeCity - region_map_location 18, 3, 2, 1, LilycoveCity - region_map_location 24, 5, 2, 1, MossdeepCity - region_map_location 21, 7, 1, 1, SootopolisCity - region_map_location 27, 8, 1, 2, EverGrandeCity - region_map_location 4, 10, 1, 1, Route101 - region_map_location 2, 9, 2, 1, Route102 - region_map_location 4, 8, 4, 1, Route103 - region_map_location 0, 7, 1, 3, Route104 - region_map_location 0, 10, 1, 3, Route105 - region_map_location 0, 13, 2, 1, Route106 - region_map_location 3, 14, 3, 1, Route107 - region_map_location 6, 14, 2, 1, Route108 - region_map_location 8, 12, 1, 3, Route109 - region_map_location 8, 7, 1, 3, Route110 - region_map_location 8, 0, 1, 6, Route111 - region_map_location 6, 3, 2, 1, Route112 - region_map_location 4, 0, 4, 1, Route113 - region_map_location 1, 0, 2, 3, Route114 - region_map_location 0, 2, 1, 3, Route115 - region_map_location 1, 5, 4, 1, Route116 - region_map_location 5, 6, 3, 1, Route117 - region_map_location 10, 6, 2, 1, Route118 - region_map_location 11, 0, 1, 6, Route119 - region_map_location 13, 0, 1, 4, Route120 - region_map_location 14, 3, 4, 1, Route121 - region_map_location 16, 4, 1, 2, Route122 - region_map_location 12, 6, 5, 1, Route123 - region_map_location 20, 3, 4, 3, Route124 - region_map_location 24, 3, 2, 2, Route125 - region_map_location 20, 6, 3, 3, Route126 - region_map_location 23, 6, 3, 3, Route127 - region_map_location 23, 9, 4, 1, Route128 - region_map_location 24, 10, 2, 1, Route129 - region_map_location 21, 10, 3, 1, Route130 - region_map_location 18, 10, 3, 1, Route131 - region_map_location 15, 10, 2, 1, Route132 - region_map_location 12, 10, 3, 1, Route133 - region_map_location 9, 10, 3, 1, Route134 - region_map_location 20, 3, 4, 3, Underwater - region_map_location 20, 6, 3, 3, Underwater - region_map_location 23, 6, 3, 3, Underwater - region_map_location 23, 9, 4, 1, Underwater - region_map_location 21, 7, 1, 1, Underwater - region_map_location 1, 13, 1, 1, GraniteCave - region_map_location 6, 2, 1, 1, MtChimney - region_map_location 16, 2, 1, 1, SafariZone - region_map_location 22, 12, 1, 1, BattleTower - region_map_location 0, 8, 1, 1, PetalburgWoods - region_map_location 2, 5, 1, 1, RusturfTunnel - region_map_location 6, 14, 1, 1, AbandonedShip - region_map_location 8, 7, 1, 1, NewMauville - region_map_location 0, 3, 1, 1, MeteorFalls - region_map_location 1, 2, 1, 1, MeteorFalls - region_map_location 16, 4, 1, 1, MtPyre - region_map_location 19, 3, 1, 1, EvilTeamHideout - region_map_location 24, 4, 1, 1, ShoalCave - region_map_location 24, 9, 1, 1, SeafloorCavern - region_map_location 24, 9, 1, 1, Underwater - region_map_location 27, 9, 1, 1, VictoryRoad - region_map_location 17, 10, 1, 1, MirageIsland - region_map_location 21, 7, 1, 1, CaveOfOrigin - region_map_location 12, 14, 1, 1, SouthernIsland - region_map_location 6, 3, 1, 1, FieryPath - region_map_location 7, 3, 1, 1, FieryPath - region_map_location 6, 3, 1, 1, JaggedPass - region_map_location 7, 2, 1, 1, JaggedPass - region_map_location 11, 10, 1, 1, SealedChamber - region_map_location 11, 10, 1, 1, Underwater - region_map_location 13, 0, 1, 1, ScorchedSlab - region_map_location 0, 10, 1, 1, IslandCave - region_map_location 8, 3, 1, 1, DesertRuins - region_map_location 13, 2, 1, 1, AncientTomb - region_map_location 0, 0, 1, 1, InsideOfTruck - region_map_location 19, 10, 1, 1, SkyPillar - region_map_location 0, 0, 1, 1, SecretBase - region_map_location 0, 0, 1, 1, None diff --git a/data/region_map.s b/data/region_map.s index ea81477dd..78b467212 100644 --- a/data/region_map.s +++ b/data/region_map.s @@ -3,11 +3,8 @@ .section .rodata -@ 83E6E50 - .include "data/region_map_sections.inc" - @ 83E6FF4 - .include "data/region_map_locations.inc" +@ .include "data/region_map_locations.inc" gUnknown_083E7684:: @ 83E7684 .2byte 50, 39 diff --git a/data/region_map_locations.inc b/data/region_map_locations.inc deleted file mode 100644 index 389b5aa0c..000000000 --- a/data/region_map_locations.inc +++ /dev/null @@ -1,327 +0,0 @@ -gMapName_LittlerootTown: @ 83E6FF4 - .string "LITTLEROOT{NAME_END} TOWN$" - -gMapName_OldaleTown: @ 83E7006 - .string "OLDALE{NAME_END} TOWN$" - -gMapName_DewfordTown: @ 83E7014 - .string "DEWFORD{NAME_END} TOWN$" - -gMapName_LavaridgeTown: @ 83E7023 - .string "LAVARIDGE{NAME_END} TOWN$" - -gMapName_FallarborTown: @ 83E7034 - .string "FALLARBOR{NAME_END} TOWN$" - -gMapName_VerdanturfTown: @ 83E7045 - .string "VERDANTURF{NAME_END} TOWN$" - -gMapName_PacifidlogTown: @ 83E7057 - .string "PACIFIDLOG{NAME_END} TOWN$" - -gMapName_PetalburgCity: @ 83E7069 - .string "PETALBURG{NAME_END} CITY$" - -gMapName_SlateportCity: @ 83E707A - .string "SLATEPORT{NAME_END} CITY$" - -gMapName_MauvilleCity: @ 83E708B - .string "MAUVILLE{NAME_END} CITY$" - -gMapName_RustboroCity: @ 83E709B - .string "RUSTBORO{NAME_END} CITY$" - -gMapName_FortreeCity: @ 83E70AB - .string "FORTREE{NAME_END} CITY$" - -gMapName_LilycoveCity: @ 83E70BA - .string "LILYCOVE{NAME_END} CITY$" - -gMapName_MossdeepCity: @ 83E70CA - .string "MOSSDEEP{NAME_END} CITY$" - -gMapName_SootopolisCity: @ 83E70DA - .string "SOOTOPOLIS{NAME_END} CITY$" - -gMapName_EverGrandeCity: @ 83E70EC - .string "EVER GRANDE{NAME_END} CITY$" - -gMapName_Route101: @ 83E70FF - .string "ROUTE 101$" - -gMapName_Route102: @ 83E7109 - .string "ROUTE 102$" - -gMapName_Route103: @ 83E7113 - .string "ROUTE 103$" - -gMapName_Route104: @ 83E711D - .string "ROUTE 104$" - -gMapName_Route105: @ 83E7127 - .string "ROUTE 105$" - -gMapName_Route106: @ 83E7131 - .string "ROUTE 106$" - -gMapName_Route107: @ 83E713B - .string "ROUTE 107$" - -gMapName_Route108: @ 83E7145 - .string "ROUTE 108$" - -gMapName_Route109: @ 83E714F - .string "ROUTE 109$" - -gMapName_Route110: @ 83E7159 - .string "ROUTE 110$" - -gMapName_Route111: @ 83E7163 - .string "ROUTE 111$" - -gMapName_Route112: @ 83E716D - .string "ROUTE 112$" - -gMapName_Route113: @ 83E7177 - .string "ROUTE 113$" - -gMapName_Route114: @ 83E7181 - .string "ROUTE 114$" - -gMapName_Route115: @ 83E718B - .string "ROUTE 115$" - -gMapName_Route116: @ 83E7195 - .string "ROUTE 116$" - -gMapName_Route117: @ 83E719F - .string "ROUTE 117$" - -gMapName_Route118: @ 83E71A9 - .string "ROUTE 118$" - -gMapName_Route119: @ 83E71B3 - .string "ROUTE 119$" - -gMapName_Route120: @ 83E71BD - .string "ROUTE 120$" - -gMapName_Route121: @ 83E71C7 - .string "ROUTE 121$" - -gMapName_Route122: @ 83E71D1 - .string "ROUTE 122$" - -gMapName_Route123: @ 83E71DB - .string "ROUTE 123$" - -gMapName_Route124: @ 83E71E5 - .string "ROUTE 124$" - -gMapName_Route125: @ 83E71EF - .string "ROUTE 125$" - -gMapName_Route126: @ 83E71F9 - .string "ROUTE 126$" - -gMapName_Route127: @ 83E7203 - .string "ROUTE 127$" - -gMapName_Route128: @ 83E720D - .string "ROUTE 128$" - -gMapName_Route129: @ 83E7217 - .string "ROUTE 129$" - -gMapName_Route130: @ 83E7221 - .string "ROUTE 130$" - -gMapName_Route131: @ 83E722B - .string "ROUTE 131$" - -gMapName_Route132: @ 83E7235 - .string "ROUTE 132$" - -gMapName_Route133: @ 83E723F - .string "ROUTE 133$" - -gMapName_Route134: @ 83E7249 - .string "ROUTE 134$" - -gMapName_Underwater: @ 83E7253 - .string "UNDERWATER$" - -gMapName_GraniteCave: @ 83E725E - .string "GRANITE CAVE$" - -gMapName_MtChimney: @ 83E726B - .string "MT. CHIMNEY$" - -gMapName_SafariZone: @ 83E7277 - .string "SAFARI ZONE$" - -gMapName_BattleTower: @ 83E7283 - .string "BATTLE TOWER$" - -gMapName_PetalburgWoods: @ 83E7290 - .string "PETALBURG WOODS$" - -gMapName_RusturfTunnel: @ 83E72A0 - .string "RUSTURF TUNNEL$" - -gMapName_AbandonedShip: @ 83E72AF - .string "ABANDONED SHIP$" - -gMapName_NewMauville: @ 83E72BE - .string "NEW MAUVILLE$" - -gMapName_MeteorFalls: @ 83E72CB - .string "METEOR FALLS$" - -gMapName_MtPyre: @ 83E72D8 - .string "MT. PYRE$" - -gMapName_EvilTeamHideout: @ 83E72E1 - .string "{EVIL_TEAM} HIDEOUT$" - -gMapName_ShoalCave: @ 83E72EC - .string "SHOAL CAVE$" - -gMapName_SeafloorCavern: @ 83E72F7 - .string "SEAFLOOR CAVERN$" - -gMapName_VictoryRoad: @ 83E7307 - .string "VICTORY ROAD$" - -gMapName_MirageIsland: @ 83E7314 - .string "MIRAGE ISLAND$" - -gMapName_CaveOfOrigin: @ 83E7322 - .string "CAVE OF ORIGIN$" - -gMapName_SouthernIsland: @ 83E7331 - .string "SOUTHERN ISLAND$" - -gMapName_FieryPath: @ 83E7341 - .string "FIERY PATH$" - -gMapName_JaggedPass: @ 83E734C - .string "JAGGED PASS$" - -gMapName_SealedChamber: @ 83E7358 - .string "SEALED CHAMBER$" - -gMapName_ScorchedSlab: @ 83E7367 - .string "SCORCHED SLAB$" - -gMapName_IslandCave: @ 83E7375 - .string "ISLAND CAVE$" - -gMapName_DesertRuins: @ 83E7381 - .string "DESERT RUINS$" - -gMapName_AncientTomb: @ 83E738E - .string "ANCIENT TOMB$" - -gMapName_InsideOfTruck: @ 83E739B - .string "INSIDE OF TRUCK$" - -gMapName_SkyPillar: @ 83E73AB - .string "SKY PILLAR$" - -gMapName_SecretBase: @ 83E73B6 - .string "SECRET BASE$" - -gMapName_None: @ 83E73C2 - .string "$" - - .align 2 -gRegionMapLocations:: @ 83E73C4 - region_map_location 4, 11, 1, 1, LittlerootTown - region_map_location 4, 9, 1, 1, OldaleTown - region_map_location 2, 14, 1, 1, DewfordTown - region_map_location 5, 3, 1, 1, LavaridgeTown - region_map_location 3, 0, 1, 1, FallarborTown - region_map_location 4, 6, 1, 1, VerdanturfTown - region_map_location 17, 10, 1, 1, PacifidlogTown - region_map_location 1, 9, 1, 1, PetalburgCity - region_map_location 8, 10, 1, 2, SlateportCity - region_map_location 8, 6, 2, 1, MauvilleCity - region_map_location 0, 5, 1, 2, RustboroCity - region_map_location 12, 0, 1, 1, FortreeCity - region_map_location 18, 3, 2, 1, LilycoveCity - region_map_location 24, 5, 2, 1, MossdeepCity - region_map_location 21, 7, 1, 1, SootopolisCity - region_map_location 27, 8, 1, 2, EverGrandeCity - region_map_location 4, 10, 1, 1, Route101 - region_map_location 2, 9, 2, 1, Route102 - region_map_location 4, 8, 4, 1, Route103 - region_map_location 0, 7, 1, 3, Route104 - region_map_location 0, 10, 1, 3, Route105 - region_map_location 0, 13, 2, 1, Route106 - region_map_location 3, 14, 3, 1, Route107 - region_map_location 6, 14, 2, 1, Route108 - region_map_location 8, 12, 1, 3, Route109 - region_map_location 8, 7, 1, 3, Route110 - region_map_location 8, 0, 1, 6, Route111 - region_map_location 6, 3, 2, 1, Route112 - region_map_location 4, 0, 4, 1, Route113 - region_map_location 1, 0, 2, 3, Route114 - region_map_location 0, 2, 1, 3, Route115 - region_map_location 1, 5, 4, 1, Route116 - region_map_location 5, 6, 3, 1, Route117 - region_map_location 10, 6, 2, 1, Route118 - region_map_location 11, 0, 1, 6, Route119 - region_map_location 13, 0, 1, 4, Route120 - region_map_location 14, 3, 4, 1, Route121 - region_map_location 16, 4, 1, 2, Route122 - region_map_location 12, 6, 5, 1, Route123 - region_map_location 20, 3, 4, 3, Route124 - region_map_location 24, 3, 2, 2, Route125 - region_map_location 20, 6, 3, 3, Route126 - region_map_location 23, 6, 3, 3, Route127 - region_map_location 23, 9, 4, 1, Route128 - region_map_location 24, 10, 2, 1, Route129 - region_map_location 21, 10, 3, 1, Route130 - region_map_location 18, 10, 3, 1, Route131 - region_map_location 15, 10, 2, 1, Route132 - region_map_location 12, 10, 3, 1, Route133 - region_map_location 9, 10, 3, 1, Route134 - region_map_location 20, 3, 4, 3, Underwater - region_map_location 20, 6, 3, 3, Underwater - region_map_location 23, 6, 3, 3, Underwater - region_map_location 23, 9, 4, 1, Underwater - region_map_location 21, 7, 1, 1, Underwater - region_map_location 1, 13, 1, 1, GraniteCave - region_map_location 6, 2, 1, 1, MtChimney - region_map_location 16, 2, 1, 1, SafariZone - region_map_location 22, 12, 1, 1, BattleTower - region_map_location 0, 8, 1, 1, PetalburgWoods - region_map_location 2, 5, 1, 1, RusturfTunnel - region_map_location 6, 14, 1, 1, AbandonedShip - region_map_location 8, 7, 1, 1, NewMauville - region_map_location 0, 3, 1, 1, MeteorFalls - region_map_location 1, 2, 1, 1, MeteorFalls - region_map_location 16, 4, 1, 1, MtPyre - region_map_location 19, 3, 1, 1, EvilTeamHideout - region_map_location 24, 4, 1, 1, ShoalCave - region_map_location 24, 9, 1, 1, SeafloorCavern - region_map_location 24, 9, 1, 1, Underwater - region_map_location 27, 9, 1, 1, VictoryRoad - region_map_location 17, 10, 1, 1, MirageIsland - region_map_location 21, 7, 1, 1, CaveOfOrigin - region_map_location 12, 14, 1, 1, SouthernIsland - region_map_location 6, 3, 1, 1, FieryPath - region_map_location 7, 3, 1, 1, FieryPath - region_map_location 6, 3, 1, 1, JaggedPass - region_map_location 7, 2, 1, 1, JaggedPass - region_map_location 11, 10, 1, 1, SealedChamber - region_map_location 11, 10, 1, 1, Underwater - region_map_location 13, 0, 1, 1, ScorchedSlab - region_map_location 0, 10, 1, 1, IslandCave - region_map_location 8, 3, 1, 1, DesertRuins - region_map_location 13, 2, 1, 1, AncientTomb - region_map_location 0, 0, 1, 1, InsideOfTruck - region_map_location 19, 10, 1, 1, SkyPillar - region_map_location 0, 0, 1, 1, SecretBase - region_map_location 0, 0, 1, 1, None diff --git a/data/region_map_sections.inc b/data/region_map_sections.inc deleted file mode 100644 index 6336eac0e..000000000 --- a/data/region_map_sections.inc +++ /dev/null @@ -1,16 +0,0 @@ -gRegionMapSections:: @ 83E6E50 - .byte 0x58,0x1D,0x1D,0x04,0x1C,0x1C,0x1C,0x1C,0x1A,0x58,0x58,0x22,0x0B,0x23,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 - .byte 0x58,0x1D,0x58,0x58,0x58,0x58,0x38,0x38,0x1A,0x58,0x58,0x22,0x58,0x23,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 - .byte 0x1E,0x1D,0x58,0x58,0x58,0x58,0x38,0x38,0x1A,0x58,0x58,0x22,0x58,0x23,0x58,0x58,0x39,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 - .byte 0x1E,0x58,0x58,0x58,0x58,0x03,0x1B,0x1B,0x1A,0x58,0x58,0x22,0x58,0x23,0x24,0x24,0x24,0x24,0x0C,0x0C,0x27,0x27,0x27,0x27,0x28,0x28,0x58,0x58 - .byte 0x1E,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x1A,0x58,0x58,0x22,0x58,0x58,0x58,0x58,0x25,0x58,0x58,0x58,0x27,0x27,0x27,0x27,0x28,0x28,0x58,0x58 - .byte 0x0A,0x1F,0x1F,0x1F,0x1F,0x58,0x58,0x58,0x1A,0x58,0x58,0x22,0x58,0x58,0x58,0x58,0x25,0x58,0x58,0x58,0x27,0x27,0x27,0x27,0x0D,0x0D,0x58,0x58 - .byte 0x0A,0x58,0x58,0x58,0x05,0x20,0x20,0x20,0x09,0x09,0x21,0x21,0x26,0x26,0x26,0x26,0x26,0x58,0x58,0x58,0x29,0x29,0x29,0x2A,0x2A,0x2A,0x58,0x58 - .byte 0x13,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x19,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x29,0x0E,0x29,0x2A,0x2A,0x2A,0x58,0x58 - .byte 0x13,0x58,0x58,0x58,0x12,0x12,0x12,0x12,0x19,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x29,0x29,0x29,0x2A,0x2A,0x2A,0x58,0x0F - .byte 0x13,0x07,0x11,0x11,0x01,0x58,0x58,0x58,0x19,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x2B,0x2B,0x2B,0x2B,0x0F - .byte 0x14,0x58,0x58,0x58,0x10,0x58,0x58,0x58,0x08,0x31,0x31,0x31,0x30,0x30,0x30,0x2F,0x2F,0x06,0x2E,0x2E,0x2E,0x2D,0x2D,0x2D,0x2C,0x2C,0x58,0x58 - .byte 0x14,0x58,0x58,0x58,0x00,0x58,0x58,0x58,0x08,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 - .byte 0x14,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x18,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x3A,0x58,0x58,0x58,0x58,0x58 - .byte 0x15,0x15,0x15,0x58,0x58,0x58,0x58,0x58,0x18,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 - .byte 0x58,0x58,0x02,0x16,0x16,0x16,0x17,0x17,0x18,0x58,0x58,0x58,0x49,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58 diff --git a/src/data/region_map_names_de.h b/src/data/region_map_names_de.h new file mode 100644 index 000000000..10f53c8ba --- /dev/null +++ b/src/data/region_map_names_de.h @@ -0,0 +1,79 @@ +const u8 gMapName_LittlerootTown[] = _("WURZELHEIM"); +const u8 gMapName_OldaleTown[] = _("ROSALTSTADT"); +const u8 gMapName_DewfordTown[] = _("FAUSTAUHAVEN"); +const u8 gMapName_LavaridgeTown[] = _("BAD LAVASTADT"); +const u8 gMapName_FallarborTown[] = _("LAUBWECHSEL{NAME_END}FELD"); +const u8 gMapName_VerdanturfTown[] = _("WIESENFLUR"); +const u8 gMapName_PacifidlogTown[] = _("FLOSSBRUNN"); +const u8 gMapName_PetalburgCity[] = _("BLÜTENBURG{NAME_END} CITY"); +const u8 gMapName_SlateportCity[] = _("GRAPHITPORT{NAME_END} CITY"); +const u8 gMapName_MauvilleCity[] = _("MALVENFROH{NAME_END} CITY"); +const u8 gMapName_RustboroCity[] = _("METAROST{NAME_END} CITY"); +const u8 gMapName_FortreeCity[] = _("BAUMHAUSEN{NAME_END} CITY"); +const u8 gMapName_LilycoveCity[] = _("SEEGRASULB{NAME_END} CITY"); +const u8 gMapName_MossdeepCity[] = _("MOOSBACH{NAME_END} CITY"); +const u8 gMapName_SootopolisCity[] = _("XENEROVILLE"); +const u8 gMapName_EverGrandeCity[] = _("PRACHTPOLIS{NAME_END} CITY"); +const u8 gMapName_Route101[] = _("ROUTE 101"); +const u8 gMapName_Route102[] = _("ROUTE 102"); +const u8 gMapName_Route103[] = _("ROUTE 103"); +const u8 gMapName_Route104[] = _("ROUTE 104"); +const u8 gMapName_Route105[] = _("ROUTE 105"); +const u8 gMapName_Route106[] = _("ROUTE 106"); +const u8 gMapName_Route107[] = _("ROUTE 107"); +const u8 gMapName_Route108[] = _("ROUTE 108"); +const u8 gMapName_Route109[] = _("ROUTE 109"); +const u8 gMapName_Route110[] = _("ROUTE 110"); +const u8 gMapName_Route111[] = _("ROUTE 111"); +const u8 gMapName_Route112[] = _("ROUTE 112"); +const u8 gMapName_Route113[] = _("ROUTE 113"); +const u8 gMapName_Route114[] = _("ROUTE 114"); +const u8 gMapName_Route115[] = _("ROUTE 115"); +const u8 gMapName_Route116[] = _("ROUTE 116"); +const u8 gMapName_Route117[] = _("ROUTE 117"); +const u8 gMapName_Route118[] = _("ROUTE 118"); +const u8 gMapName_Route119[] = _("ROUTE 119"); +const u8 gMapName_Route120[] = _("ROUTE 120"); +const u8 gMapName_Route121[] = _("ROUTE 121"); +const u8 gMapName_Route122[] = _("ROUTE 122"); +const u8 gMapName_Route123[] = _("ROUTE 123"); +const u8 gMapName_Route124[] = _("ROUTE 124"); +const u8 gMapName_Route125[] = _("ROUTE 125"); +const u8 gMapName_Route126[] = _("ROUTE 126"); +const u8 gMapName_Route127[] = _("ROUTE 127"); +const u8 gMapName_Route128[] = _("ROUTE 128"); +const u8 gMapName_Route129[] = _("ROUTE 129"); +const u8 gMapName_Route130[] = _("ROUTE 130"); +const u8 gMapName_Route131[] = _("ROUTE 131"); +const u8 gMapName_Route132[] = _("ROUTE 132"); +const u8 gMapName_Route133[] = _("ROUTE 133"); +const u8 gMapName_Route134[] = _("ROUTE 134"); +const u8 gMapName_Underwater[] = _("UNTERWASSER"); +const u8 gMapName_GraniteCave[] = _("GRANITHÖHLE"); +const u8 gMapName_MtChimney[] = _("SCHLOTBERG"); +const u8 gMapName_SafariZone[] = _("SAFARI-ZONE"); +const u8 gMapName_BattleTower[] = _("DUELLTURM"); +const u8 gMapName_PetalburgWoods[] = _("BLÜTENBURGWALD"); +const u8 gMapName_RusturfTunnel[] = _("METAFLURTUNNEL"); +const u8 gMapName_AbandonedShip[] = _("SCHIFFSWRACK"); +const u8 gMapName_NewMauville[] = _("NEU MALVENFROH"); +const u8 gMapName_MeteorFalls[] = _("METEORFÄLLE"); +const u8 gMapName_MtPyre[] = _("PYROBERG"); +const u8 gMapName_EvilTeamHideout[] = _("{EVIL_TEAM}s VERSTECK"); +const u8 gMapName_ShoalCave[] = _("KÜSTENHÖHLE"); +const u8 gMapName_SeafloorCavern[] = _("TIEFSEEHÖHLE"); +const u8 gMapName_VictoryRoad[] = _("SIEGESSTRASSE"); +const u8 gMapName_MirageIsland[] = _("WUNDEREILAND"); +const u8 gMapName_CaveOfOrigin[] = _("URZEITHÖHLE"); +const u8 gMapName_SouthernIsland[] = _("INSEL IM SÜDEN"); +const u8 gMapName_FieryPath[] = _("FEURIGER PFAD"); +const u8 gMapName_JaggedPass[] = _("STEILPASS"); +const u8 gMapName_SealedChamber[] = _("SIEGELKAMMER"); +const u8 gMapName_ScorchedSlab[] = _("SONNENGROTTE"); +const u8 gMapName_IslandCave[] = _("INSELHÖHLE"); +const u8 gMapName_DesertRuins[] = _("WÜSTENRUINE"); +const u8 gMapName_AncientTomb[] = _("GRABMAL"); +const u8 gMapName_InsideOfTruck[] = _("IM MÖBELWAGEN"); +const u8 gMapName_SkyPillar[] = _("HIMMELTURM"); +const u8 gMapName_SecretBase[] = _("GEHEIMBASIS"); +const u8 gMapName_None[] = _(""); diff --git a/src/data/region_map_names_en.h b/src/data/region_map_names_en.h new file mode 100644 index 000000000..9dde3d71a --- /dev/null +++ b/src/data/region_map_names_en.h @@ -0,0 +1,79 @@ +const u8 gMapName_LittlerootTown[] = _("LITTLEROOT{NAME_END} TOWN"); +const u8 gMapName_OldaleTown[] = _("OLDALE{NAME_END} TOWN"); +const u8 gMapName_DewfordTown[] = _("DEWFORD{NAME_END} TOWN"); +const u8 gMapName_LavaridgeTown[] = _("LAVARIDGE{NAME_END} TOWN"); +const u8 gMapName_FallarborTown[] = _("FALLARBOR{NAME_END} TOWN"); +const u8 gMapName_VerdanturfTown[] = _("VERDANTURF{NAME_END} TOWN"); +const u8 gMapName_PacifidlogTown[] = _("PACIFIDLOG{NAME_END} TOWN"); +const u8 gMapName_PetalburgCity[] = _("PETALBURG{NAME_END} CITY"); +const u8 gMapName_SlateportCity[] = _("SLATEPORT{NAME_END} CITY"); +const u8 gMapName_MauvilleCity[] = _("MAUVILLE{NAME_END} CITY"); +const u8 gMapName_RustboroCity[] = _("RUSTBORO{NAME_END} CITY"); +const u8 gMapName_FortreeCity[] = _("FORTREE{NAME_END} CITY"); +const u8 gMapName_LilycoveCity[] = _("LILYCOVE{NAME_END} CITY"); +const u8 gMapName_MossdeepCity[] = _("MOSSDEEP{NAME_END} CITY"); +const u8 gMapName_SootopolisCity[] = _("SOOTOPOLIS{NAME_END} CITY"); +const u8 gMapName_EverGrandeCity[] = _("EVER GRANDE{NAME_END} CITY"); +const u8 gMapName_Route101[] = _("ROUTE 101"); +const u8 gMapName_Route102[] = _("ROUTE 102"); +const u8 gMapName_Route103[] = _("ROUTE 103"); +const u8 gMapName_Route104[] = _("ROUTE 104"); +const u8 gMapName_Route105[] = _("ROUTE 105"); +const u8 gMapName_Route106[] = _("ROUTE 106"); +const u8 gMapName_Route107[] = _("ROUTE 107"); +const u8 gMapName_Route108[] = _("ROUTE 108"); +const u8 gMapName_Route109[] = _("ROUTE 109"); +const u8 gMapName_Route110[] = _("ROUTE 110"); +const u8 gMapName_Route111[] = _("ROUTE 111"); +const u8 gMapName_Route112[] = _("ROUTE 112"); +const u8 gMapName_Route113[] = _("ROUTE 113"); +const u8 gMapName_Route114[] = _("ROUTE 114"); +const u8 gMapName_Route115[] = _("ROUTE 115"); +const u8 gMapName_Route116[] = _("ROUTE 116"); +const u8 gMapName_Route117[] = _("ROUTE 117"); +const u8 gMapName_Route118[] = _("ROUTE 118"); +const u8 gMapName_Route119[] = _("ROUTE 119"); +const u8 gMapName_Route120[] = _("ROUTE 120"); +const u8 gMapName_Route121[] = _("ROUTE 121"); +const u8 gMapName_Route122[] = _("ROUTE 122"); +const u8 gMapName_Route123[] = _("ROUTE 123"); +const u8 gMapName_Route124[] = _("ROUTE 124"); +const u8 gMapName_Route125[] = _("ROUTE 125"); +const u8 gMapName_Route126[] = _("ROUTE 126"); +const u8 gMapName_Route127[] = _("ROUTE 127"); +const u8 gMapName_Route128[] = _("ROUTE 128"); +const u8 gMapName_Route129[] = _("ROUTE 129"); +const u8 gMapName_Route130[] = _("ROUTE 130"); +const u8 gMapName_Route131[] = _("ROUTE 131"); +const u8 gMapName_Route132[] = _("ROUTE 132"); +const u8 gMapName_Route133[] = _("ROUTE 133"); +const u8 gMapName_Route134[] = _("ROUTE 134"); +const u8 gMapName_Underwater[] = _("UNDERWATER"); +const u8 gMapName_GraniteCave[] = _("GRANITE CAVE"); +const u8 gMapName_MtChimney[] = _("MT. CHIMNEY"); +const u8 gMapName_SafariZone[] = _("SAFARI ZONE"); +const u8 gMapName_BattleTower[] = _("BATTLE TOWER"); +const u8 gMapName_PetalburgWoods[] = _("PETALBURG WOODS"); +const u8 gMapName_RusturfTunnel[] = _("RUSTURF TUNNEL"); +const u8 gMapName_AbandonedShip[] = _("ABANDONED SHIP"); +const u8 gMapName_NewMauville[] = _("NEW MAUVILLE"); +const u8 gMapName_MeteorFalls[] = _("METEOR FALLS"); +const u8 gMapName_MtPyre[] = _("MT. PYRE"); +const u8 gMapName_EvilTeamHideout[] = _("{EVIL_TEAM} HIDEOUT"); +const u8 gMapName_ShoalCave[] = _("SHOAL CAVE"); +const u8 gMapName_SeafloorCavern[] = _("SEAFLOOR CAVERN"); +const u8 gMapName_VictoryRoad[] = _("VICTORY ROAD"); +const u8 gMapName_MirageIsland[] = _("MIRAGE ISLAND"); +const u8 gMapName_CaveOfOrigin[] = _("CAVE OF ORIGIN"); +const u8 gMapName_SouthernIsland[] = _("SOUTHERN ISLAND"); +const u8 gMapName_FieryPath[] = _("FIERY PATH"); +const u8 gMapName_JaggedPass[] = _("JAGGED PASS"); +const u8 gMapName_SealedChamber[] = _("SEALED CHAMBER"); +const u8 gMapName_ScorchedSlab[] = _("SCORCHED SLAB"); +const u8 gMapName_IslandCave[] = _("ISLAND CAVE"); +const u8 gMapName_DesertRuins[] = _("DESERT RUINS"); +const u8 gMapName_AncientTomb[] = _("ANCIENT TOMB"); +const u8 gMapName_InsideOfTruck[] = _("INSIDE OF TRUCK"); +const u8 gMapName_SkyPillar[] = _("SKY PILLAR"); +const u8 gMapName_SecretBase[] = _("SECRET BASE"); +const u8 gMapName_None[] = _(""); diff --git a/src/region_map.c b/src/region_map.c index 0a50da51e..07c88ccd3 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1,7 +1,9 @@ #include "global.h" #include "main.h" #include "palette.h" +#include "rom4.h" #include "sprite.h" +#include "trig.h" struct UnknownStruct1 { @@ -12,7 +14,12 @@ struct UnknownStruct1 u8 (*unk18)(void); struct Sprite *unk1C; struct Sprite *unk20; - u8 filler24[0x18]; + s32 unk24; + s32 unk28; + u32 unk2C; + u32 unk30; + u32 unk34; + u32 unk38; s32 unk3C; s32 unk40; s32 unk44; @@ -44,7 +51,8 @@ struct UnknownStruct1 s8 unk7C; // movement delta vertical u8 unk7D; u8 unk7E; - u8 filler7F[0x101]; + u8 unk7F; + u8 filler80[0x100]; u8 unk180[0x100]; u8 unk280[0x100]; }; @@ -62,17 +70,142 @@ const u16 gUnknown_083E5D60[] = INCBIN_U16("graphics/pokenav/region_map.gbapal") const u8 gUnknown_083E5DA0[] = INCBIN_U8("graphics/pokenav/region_map.8bpp.lz"); const u8 gUnknown_083E6B04[] = INCBIN_U8("graphics/pokenav/region_map_map.bin.lz"); +const u8 gRegionMapSections[] = +{ + 0x58, 0x1D, 0x1D, 0x04, 0x1C, 0x1C, 0x1C, 0x1C, 0x1A, 0x58, 0x58, 0x22, 0x0B, 0x23, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x58, 0x1D, 0x58, 0x58, 0x58, 0x58, 0x38, 0x38, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x1E, 0x1D, 0x58, 0x58, 0x58, 0x58, 0x38, 0x38, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x58, 0x58, 0x39, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x1E, 0x58, 0x58, 0x58, 0x58, 0x03, 0x1B, 0x1B, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x24, 0x24, 0x24, 0x24, 0x0C, 0x0C, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0x58, 0x58, + 0x1E, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x58, 0x58, 0x58, 0x25, 0x58, 0x58, 0x58, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0x58, 0x58, + 0x0A, 0x1F, 0x1F, 0x1F, 0x1F, 0x58, 0x58, 0x58, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x58, 0x58, 0x58, 0x25, 0x58, 0x58, 0x58, 0x27, 0x27, 0x27, 0x27, 0x0D, 0x0D, 0x58, 0x58, + 0x0A, 0x58, 0x58, 0x58, 0x05, 0x20, 0x20, 0x20, 0x09, 0x09, 0x21, 0x21, 0x26, 0x26, 0x26, 0x26, 0x26, 0x58, 0x58, 0x58, 0x29, 0x29, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x58, + 0x13, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x29, 0x0E, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x58, + 0x13, 0x58, 0x58, 0x58, 0x12, 0x12, 0x12, 0x12, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x29, 0x29, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x0F, + 0x13, 0x07, 0x11, 0x11, 0x01, 0x58, 0x58, 0x58, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2B, 0x2B, 0x2B, 0x2B, 0x0F, + 0x14, 0x58, 0x58, 0x58, 0x10, 0x58, 0x58, 0x58, 0x08, 0x31, 0x31, 0x31, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x06, 0x2E, 0x2E, 0x2E, 0x2D, 0x2D, 0x2D, 0x2C, 0x2C, 0x58, 0x58, + 0x14, 0x58, 0x58, 0x58, 0x00, 0x58, 0x58, 0x58, 0x08, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x14, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x18, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x3A, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x15, 0x15, 0x15, 0x58, 0x58, 0x58, 0x58, 0x58, 0x18, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, + 0x58, 0x58, 0x02, 0x16, 0x16, 0x16, 0x17, 0x17, 0x18, 0x58, 0x58, 0x58, 0x49, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, +}; + +#if ENGLISH +#include "data/region_map_names_en.h" +#elif GERMAN +#include "data/region_map_names_de.h" +#endif + +struct RegionMapLocation +{ + u8 x, y; + u8 width, height; + const u8 *name; +}; + +const struct RegionMapLocation gRegionMapLocations[] = +{ + { 4, 11, 1, 1, gMapName_LittlerootTown}, + { 4, 9, 1, 1, gMapName_OldaleTown}, + { 2, 14, 1, 1, gMapName_DewfordTown}, + { 5, 3, 1, 1, gMapName_LavaridgeTown}, + { 3, 0, 1, 1, gMapName_FallarborTown}, + { 4, 6, 1, 1, gMapName_VerdanturfTown}, + {17, 10, 1, 1, gMapName_PacifidlogTown}, + { 1, 9, 1, 1, gMapName_PetalburgCity}, + { 8, 10, 1, 2, gMapName_SlateportCity}, + { 8, 6, 2, 1, gMapName_MauvilleCity}, + { 0, 5, 1, 2, gMapName_RustboroCity}, + {12, 0, 1, 1, gMapName_FortreeCity}, + {18, 3, 2, 1, gMapName_LilycoveCity}, + {24, 5, 2, 1, gMapName_MossdeepCity}, + {21, 7, 1, 1, gMapName_SootopolisCity}, + {27, 8, 1, 2, gMapName_EverGrandeCity}, + { 4, 10, 1, 1, gMapName_Route101}, + { 2, 9, 2, 1, gMapName_Route102}, + { 4, 8, 4, 1, gMapName_Route103}, + { 0, 7, 1, 3, gMapName_Route104}, + { 0, 10, 1, 3, gMapName_Route105}, + { 0, 13, 2, 1, gMapName_Route106}, + { 3, 14, 3, 1, gMapName_Route107}, + { 6, 14, 2, 1, gMapName_Route108}, + { 8, 12, 1, 3, gMapName_Route109}, + { 8, 7, 1, 3, gMapName_Route110}, + { 8, 0, 1, 6, gMapName_Route111}, + { 6, 3, 2, 1, gMapName_Route112}, + { 4, 0, 4, 1, gMapName_Route113}, + { 1, 0, 2, 3, gMapName_Route114}, + { 0, 2, 1, 3, gMapName_Route115}, + { 1, 5, 4, 1, gMapName_Route116}, + { 5, 6, 3, 1, gMapName_Route117}, + {10, 6, 2, 1, gMapName_Route118}, + {11, 0, 1, 6, gMapName_Route119}, + {13, 0, 1, 4, gMapName_Route120}, + {14, 3, 4, 1, gMapName_Route121}, + {16, 4, 1, 2, gMapName_Route122}, + {12, 6, 5, 1, gMapName_Route123}, + {20, 3, 4, 3, gMapName_Route124}, + {24, 3, 2, 2, gMapName_Route125}, + {20, 6, 3, 3, gMapName_Route126}, + {23, 6, 3, 3, gMapName_Route127}, + {23, 9, 4, 1, gMapName_Route128}, + {24, 10, 2, 1, gMapName_Route129}, + {21, 10, 3, 1, gMapName_Route130}, + {18, 10, 3, 1, gMapName_Route131}, + {15, 10, 2, 1, gMapName_Route132}, + {12, 10, 3, 1, gMapName_Route133}, + { 9, 10, 3, 1, gMapName_Route134}, + {20, 3, 4, 3, gMapName_Underwater}, + {20, 6, 3, 3, gMapName_Underwater}, + {23, 6, 3, 3, gMapName_Underwater}, + {23, 9, 4, 1, gMapName_Underwater}, + {21, 7, 1, 1, gMapName_Underwater}, + { 1, 13, 1, 1, gMapName_GraniteCave}, + { 6, 2, 1, 1, gMapName_MtChimney}, + {16, 2, 1, 1, gMapName_SafariZone}, + {22, 12, 1, 1, gMapName_BattleTower}, + { 0, 8, 1, 1, gMapName_PetalburgWoods}, + { 2, 5, 1, 1, gMapName_RusturfTunnel}, + { 6, 14, 1, 1, gMapName_AbandonedShip}, + { 8, 7, 1, 1, gMapName_NewMauville}, + { 0, 3, 1, 1, gMapName_MeteorFalls}, + { 1, 2, 1, 1, gMapName_MeteorFalls}, + {16, 4, 1, 1, gMapName_MtPyre}, + {19, 3, 1, 1, gMapName_EvilTeamHideout}, + {24, 4, 1, 1, gMapName_ShoalCave}, + {24, 9, 1, 1, gMapName_SeafloorCavern}, + {24, 9, 1, 1, gMapName_Underwater}, + {27, 9, 1, 1, gMapName_VictoryRoad}, + {17, 10, 1, 1, gMapName_MirageIsland}, + {21, 7, 1, 1, gMapName_CaveOfOrigin}, + {12, 14, 1, 1, gMapName_SouthernIsland}, + { 6, 3, 1, 1, gMapName_FieryPath}, + { 7, 3, 1, 1, gMapName_FieryPath}, + { 6, 3, 1, 1, gMapName_JaggedPass}, + { 7, 2, 1, 1, gMapName_JaggedPass}, + {11, 10, 1, 1, gMapName_SealedChamber}, + {11, 10, 1, 1, gMapName_Underwater}, + {13, 0, 1, 1, gMapName_ScorchedSlab}, + {0, 10, 1, 1, gMapName_IslandCave}, + { 8, 3, 1, 1, gMapName_DesertRuins}, + {13, 2, 1, 1, gMapName_AncientTomb}, + { 0, 0, 1, 1, gMapName_InsideOfTruck}, + {19, 10, 1, 1, gMapName_SkyPillar}, + { 0, 0, 1, 1, gMapName_SecretBase}, + { 0, 0, 1, 1, gMapName_None}, +}; + void sub_80FA904(struct UnknownStruct1 *, u8); bool8 sub_80FA940(void); u8 sub_80FAB78(void); u8 _swiopen(void); u8 sub_80FAD04(void); u8 sub_80FADE4(void); -void sub_80FB170(int, int, int, int, u16, u16, int); -void sub_80FB238(); +void sub_80FB170(s16, s16, s16, s16, u16, u16, u8); +void sub_80FB238(s16, s16); void sub_80FB260(void); -u16 GetRegionMapSectionAt(); +u16 GetRegionMapSectionAt(u16, u16); void sub_80FB32C(void); +void sub_80FB600(void); u16 sub_80FB758(); u16 sub_80FB9C0(u16); void sub_80FBA18(); @@ -409,3 +542,190 @@ u8 sub_80FAFC0(void) sub_80FB170(gUnknown_020388CC->unk5C, gUnknown_020388CC->unk5E, 0x38, 0x48, gUnknown_020388CC->unk4C >> 8, gUnknown_020388CC->unk4C >> 8, 0); return r4; } + +void sub_80FB170(s16 a, s16 b, s16 c, s16 d, u16 e, u16 f, u8 g) +{ + s32 var1; + s32 var2; + s32 var3; + s32 var4; + + gUnknown_020388CC->unk2C = e * gSineTable[g + 64] >> 8; + gUnknown_020388CC->unk30 = e * -gSineTable[g] >> 8; + gUnknown_020388CC->unk34 = f * gSineTable[g] >> 8; + gUnknown_020388CC->unk38 = f * gSineTable[g + 64] >> 8; + + var1 = (a << 8) + (c << 8); + var2 = d * gUnknown_020388CC->unk34 + gUnknown_020388CC->unk2C * c; + gUnknown_020388CC->unk24 = var1 - var2; + + var3 = (b << 8) + (d << 8); + var4 = gUnknown_020388CC->unk38 * d + gUnknown_020388CC->unk30 * c; + gUnknown_020388CC->unk28 = var3 - var4; + + gUnknown_020388CC->unk7D = 1; +} + +void sub_80FB238(s16 a, s16 b) +{ + gUnknown_020388CC->unk24 = 0x1C00 + (a << 8); + gUnknown_020388CC->unk28 = 0x2400 + (b << 8); + gUnknown_020388CC->unk7D = 1; +} + +void sub_80FB260(void) +{ + if (gUnknown_020388CC->unk7D != 0) + { + REG_BG2PA = gUnknown_020388CC->unk2C; + REG_BG2PB = gUnknown_020388CC->unk34; + REG_BG2PC = gUnknown_020388CC->unk30; + REG_BG2PD = gUnknown_020388CC->unk38; + REG_BG2X = gUnknown_020388CC->unk24; + REG_BG2Y = gUnknown_020388CC->unk28; + gUnknown_020388CC->unk7D = 0; + } +} + +void sub_80FB2A4(s16 a, s16 b) +{ + sub_80FB170(a, b, 0x38, 0x48, 0x100, 0x100, 0); + sub_80FB260(); + if (gUnknown_020388CC->unk20 != NULL) + { + gUnknown_020388CC->unk20->pos2.x = -a; + gUnknown_020388CC->unk20->pos2.y = -b; + } +} + +u16 GetRegionMapSectionAt(u16 x, u16 y) +{ + + if (y < 2 || y > 16 || x < 1 || x > 0x1C) + return 0x58; + y -= 2; + x -= 1; + return gRegionMapSections[x + y * 28]; +} + +void sub_80FB32C(void) +{ + struct MapHeader *mapHeader; + u16 mapWidth; + u16 mapHeight; + u16 x; + u16 y; + u16 r1; + u16 r9; + + if (gSaveBlock1.location.mapGroup == 0x19 && (gSaveBlock1.location.mapNum == 0x29 || gSaveBlock1.location.mapNum == 0x2A || gSaveBlock1.location.mapNum == 0x2B)) + { + sub_80FB600(); + return; + } + + switch (get_map_light_level_by_bank_and_number(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum) - 1) + { + default: + case 0: + case 1: + case 2: + case 4: + case 5: + gUnknown_020388CC->unk14 = gMapHeader.name; + gUnknown_020388CC->unk7F = 0; + mapWidth = gMapHeader.mapData->width; + mapHeight = gMapHeader.mapData->height; + x = gSaveBlock1.pos.x; + y = gSaveBlock1.pos.y; + if (gUnknown_020388CC->unk14 == 0x45) + gUnknown_020388CC->unk7F = 1; + break; + case 3: + case 6: + mapHeader = get_mapheader_by_bank_and_number(gSaveBlock1.warp4.mapGroup, gSaveBlock1.warp4.mapNum); + gUnknown_020388CC->unk14 = mapHeader->name; + gUnknown_020388CC->unk7F = 1; + mapWidth = mapHeader->mapData->width; + mapHeight = mapHeader->mapData->height; + x = gSaveBlock1.warp4.x; + y = gSaveBlock1.warp4.y; + break; + case 8: + mapHeader = get_mapheader_by_bank_and_number(gSaveBlock1.warp2.mapGroup, gSaveBlock1.warp2.mapNum); + gUnknown_020388CC->unk14 = mapHeader->name; + gUnknown_020388CC->unk7F = 1; + mapWidth = mapHeader->mapData->width; + mapHeight = mapHeader->mapData->height; + x = gSaveBlock1.warp2.x; + y = gSaveBlock1.warp2.y; + break; + case 7: + { + struct WarpData *r4; + + gUnknown_020388CC->unk14 = gMapHeader.name; + if (gUnknown_020388CC->unk14 != 0x57) + { + r4 = &gSaveBlock1.warp4; + mapHeader = get_mapheader_by_bank_and_number(r4->mapGroup, r4->mapNum); + } + else + { + r4 = &gSaveBlock1.warp2; + mapHeader = get_mapheader_by_bank_and_number(r4->mapGroup, r4->mapNum); + gUnknown_020388CC->unk14 = mapHeader->name; + } + gUnknown_020388CC->unk7F = 0; + mapWidth = mapHeader->mapData->width; + mapHeight = mapHeader->mapData->height; + x = r4->x; + y = r4->y; + } + break; + } + r9 = x; + r1 = mapWidth / gRegionMapLocations[gUnknown_020388CC->unk14].width; + if (r1 == 0) + r1 = 1; + x /= r1; + if (x >= gRegionMapLocations[gUnknown_020388CC->unk14].width) + x = gRegionMapLocations[gUnknown_020388CC->unk14].width - 1; + r1 = mapHeight / gRegionMapLocations[gUnknown_020388CC->unk14].height; + if (r1 == 0) + r1 = 1; + y /= r1; + if (y >= gRegionMapLocations[gUnknown_020388CC->unk14].height) + y = gRegionMapLocations[gUnknown_020388CC->unk14].height - 1; + switch (gUnknown_020388CC->unk14) + { + case 0x1D: + if (y != 0) + x = 0; + break; + case 0x29: + case 0x33: + x = 0; + if (gSaveBlock1.pos.x > 32) + x = 1; + if (gSaveBlock1.pos.x > 0x33) + x++; + y = 0; + if (gSaveBlock1.pos.y > 0x25) + y = 1; + if (gSaveBlock1.pos.y > 0x38) + y++; + break; + case 0x24: + x = 0; + if (r9 > 14) + x = 1; + if (r9 > 0x1C) + x++; + if (r9 > 0x36) + x++; + break; + } + gUnknown_020388CC->unk54 = gRegionMapLocations[gUnknown_020388CC->unk14].x + x + 1; + gUnknown_020388CC->unk56 = gRegionMapLocations[gUnknown_020388CC->unk14].y + y + 2; +} |