mirror of
https://github.com/zeldaret/tmc
synced 2026-05-31 17:32:43 -04:00
Extract dungeon maps
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
ands r0, r1
|
||||
strb r0, [r5, #2]
|
||||
adds r5, #3
|
||||
ldr r1, _0801DBE8 @ =gUnk_080C9C50
|
||||
ldr r1, _0801DBE8 @ =gDungeonLayouts
|
||||
ldr r0, _0801DBEC @ =gArea
|
||||
ldrb r0, [r0, #3]
|
||||
lsls r0, r0, #2
|
||||
@@ -34,7 +34,7 @@
|
||||
b _0801DD3A
|
||||
.align 2, 0
|
||||
_0801DBE4: .4byte gRoomTransition
|
||||
_0801DBE8: .4byte gUnk_080C9C50
|
||||
_0801DBE8: .4byte gDungeonLayouts
|
||||
_0801DBEC: .4byte gArea
|
||||
_0801DBF0:
|
||||
ldrb r0, [r6]
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
cmp r1, r0
|
||||
beq _0807C01C
|
||||
str r0, [r2, #0x34]
|
||||
bl sub_080197D4
|
||||
bl LoadMapData
|
||||
_0807C01C:
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, #0x10]
|
||||
bl sub_080197D4
|
||||
bl LoadMapData
|
||||
ldr r1, _0807C0D0 @ =gPaletteBuffer
|
||||
adds r0, r1, #0
|
||||
adds r0, #0x60
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ gUnk_08000258::
|
||||
.4byte gMapTop+0x5004
|
||||
.4byte gMapBottom+0x3004
|
||||
.4byte gMapBottom+0x5004
|
||||
gUnk_08000278::
|
||||
gUnk_08000278:: @ unkData3 for layers
|
||||
.4byte gMapBottom+0xb004
|
||||
.4byte gMapBottom+0xb004
|
||||
.4byte gMapTop+0xb004
|
||||
|
||||
+1543
-436
File diff suppressed because it is too large
Load Diff
@@ -1,336 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
@ before: playerItemCellOverwriteSet
|
||||
@ in here: ui.c, color.c, common.c
|
||||
@ before on data side: sineTable.c
|
||||
@ after: octorok.c
|
||||
|
||||
@ code_080043E8.c
|
||||
gUnk_080C93E0:: @ 080C93E0
|
||||
.incbin "data_080C93E0/gUnk_080C93E0.bin"
|
||||
|
||||
@ common.c
|
||||
gUnk_080C9460:: @ 080C9460
|
||||
.incbin "data_080C93E0/gUnk_080C9460.bin"
|
||||
|
||||
|
||||
@ DungeonLayout
|
||||
|
||||
gUnk_080C9480:: @ 080C9480
|
||||
.incbin "data_080C93E0/gUnk_080C9480.bin"
|
||||
|
||||
gUnk_080C9488:: @ 080C9488
|
||||
.4byte gUnk_080C9480
|
||||
|
||||
gUnk_080C948C:: @ 080C948C
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C948C_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C948C_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C94A4:: @ 080C94A4
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C94A4_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C94A4_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9514:: @ 080C9514
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9514_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9514_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C953C:: @ 080C953C
|
||||
.4byte gUnk_080C948C
|
||||
.4byte gUnk_080C94A4
|
||||
.4byte gUnk_080C9514
|
||||
|
||||
gUnk_080C9548:: @ 080C9548
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9548_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9548_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9570:: @ 080C9570
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9570_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9570_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C95B8:: @ 080C95B8
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C95B8_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C95B8_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C95F0:: @ 080C95F0
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C95F0_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C95F0_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9600:: @ 080C9600
|
||||
.4byte gUnk_080C9548
|
||||
.4byte gUnk_080C9570
|
||||
.4byte gUnk_080C95B8
|
||||
.4byte gUnk_080C95F0
|
||||
|
||||
gUnk_080C9610:: @ 080C9610
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9610_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9610_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9648:: @ 080C9648
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9648_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9648_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C96C8:: @ 080C96C8
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C96C8_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C96C8_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C96F8:: @ 080C96F8
|
||||
.4byte gUnk_080C9610
|
||||
.4byte gUnk_080C9648
|
||||
.4byte gUnk_080C96C8
|
||||
|
||||
gUnk_080C9704:: @ 080C9704
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9704_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9704_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9794:: @ 080C9794
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9794_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9794_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9854:: @ 080C9854
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9854_EU.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9854_1_USA-JP-DEMO_USA-DEMO_JP.bin"
|
||||
.endif
|
||||
|
||||
gUnk_080C9864:: @ 080C9864
|
||||
.4byte gUnk_080C9704
|
||||
.4byte gUnk_080C9794
|
||||
.4byte gUnk_080C9854
|
||||
|
||||
gUnk_080C9870:: @ 080C9870
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9870_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9870_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9870_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9870_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C98E8:: @ 080C98E8
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C98E8_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C98E8_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C98E8_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C98E8_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9928:: @ 080C9928
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9928_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9928_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9928_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9928_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9988:: @ 080C9988
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9988_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9988_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9988_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9988_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C99E8:: @ 080C99E8
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C99E8_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C99E8_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C99E8_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C99E8_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9A30:: @ 080C9A30
|
||||
.4byte gUnk_080C9870
|
||||
.4byte gUnk_080C98E8
|
||||
.4byte gUnk_080C9928
|
||||
.4byte gUnk_080C9988
|
||||
.4byte gUnk_080C99E8
|
||||
|
||||
gUnk_080C9A44:: @ 080C9A44
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9A44_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9A44_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9A44_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9A44_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9A7C:: @ 080C9A7C
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9A7C_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9A7C_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9A7C_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9A7C_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9B2C:: @ 080C9B2C
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9B2C_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9B2C_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9B2C_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9B2C_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9BB4:: @ 080C9BB4
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9BB4_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9BB4_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9BB4_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9BB4_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9C1C:: @ 080C9C1C
|
||||
.ifdef EU
|
||||
@ TODO only small differences
|
||||
.incbin "data_080C93E0/gUnk_080C9C1C_EU.bin"
|
||||
.else
|
||||
.ifdef JP
|
||||
.incbin "data_080C93E0/gUnk_080C9C1C_1_JP.bin"
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
.incbin "data_080C93E0/gUnk_080C9C1C_2_DEMO_JP.bin"
|
||||
.else
|
||||
.incbin "data_080C93E0/gUnk_080C9C1C_3_USA-DEMO_USA.bin"
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
gUnk_080C9C3C:: @ 080C9C3C
|
||||
.4byte gUnk_080C9A44
|
||||
.4byte gUnk_080C9A7C
|
||||
.4byte gUnk_080C9B2C
|
||||
.4byte gUnk_080C9BB4
|
||||
.4byte gUnk_080C9C1C
|
||||
|
||||
@ common.c
|
||||
gUnk_080C9C50:: @ 080C9C50
|
||||
.4byte gUnk_080C9488
|
||||
.4byte gUnk_080C953C
|
||||
.4byte gUnk_080C9600
|
||||
.4byte gUnk_080C96F8
|
||||
.4byte gUnk_080C9864
|
||||
.4byte gUnk_080C9A30
|
||||
.4byte gUnk_080C9C3C
|
||||
+442
-436
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -16,9 +16,9 @@ gAreaRoomMaps_Unused::
|
||||
.4byte gAreaTileset_Unused_0
|
||||
|
||||
gAreaTileset_MinishWoods_0:: @ 08100CF4
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_palette_set 28, 1
|
||||
|
||||
gAreaTileset_MinishWoods_1:: @ 08100D24
|
||||
@@ -199,9 +199,9 @@ gAreaTilesets_GreatFairies:: @ 0810115C
|
||||
.4byte gAreaTileset_GreatFairies_2
|
||||
|
||||
gAreaTileset_LakeWoodsCave_0:: @ 08101168
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_MinishWoods_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_3, 0x6001000, 0x2000, 1
|
||||
tileset_tiles offset_gAreaTileset_LakeWoodsCave_0_4, 0x6009000, 0x2000, 1
|
||||
tileset_palette_set 21, 1
|
||||
@@ -822,9 +822,9 @@ gAreaTilesets_InnerMazaal:: @ 08102040
|
||||
.4byte gAreaTileset_InnerMazaal_0
|
||||
|
||||
gAreaTileset_TempleOfDroplets_0:: @ 08102044
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_palette_set 55, 1
|
||||
|
||||
gAreaTilesets_TempleOfDroplets:: @ 08102074
|
||||
@@ -840,9 +840,9 @@ gAreaTilesets_61:: @ 081020A8
|
||||
.4byte gAreaTileset_61_0
|
||||
|
||||
gAreaTileset_HyruleTownMinishCaves_0:: @ 081020AC
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_HyruleTownMinishCaves_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_0, 0x6000000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_1, 0x6004000, 0x4000, 1
|
||||
tileset_tiles offset_gAreaTileset_TempleOfDroplets_0_2, 0x6008000, 0x4000, 1
|
||||
tileset_palette_set 130, 1
|
||||
|
||||
gAreaTilesets_HyruleTownMinishCaves:: @ 081020DC
|
||||
|
||||
+16
-4
@@ -2,6 +2,7 @@
|
||||
#define AREA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "map.h"
|
||||
#include "transitions.h"
|
||||
|
||||
#define MAX_ROOMS 64
|
||||
@@ -11,9 +12,9 @@ typedef struct {
|
||||
u16 pixel_height;
|
||||
u16 map_x;
|
||||
u16 map_y;
|
||||
void* tileset;
|
||||
void* map;
|
||||
void* metatiles;
|
||||
MapDataDefinition* tileset;
|
||||
MapDataDefinition* map;
|
||||
MapDataDefinition* metatiles;
|
||||
void* bg_anim;
|
||||
const Transition* exits;
|
||||
void** properties;
|
||||
@@ -80,10 +81,21 @@ typedef struct {
|
||||
u8 flags;
|
||||
u8 location;
|
||||
u8 flag_bank;
|
||||
u8 _3;
|
||||
u8 queueBgm;
|
||||
} AreaHeader;
|
||||
extern AreaHeader gAreaMetadata[];
|
||||
|
||||
typedef enum {
|
||||
AR_IS_OVERWORLD = 0x1,
|
||||
AR_HAS_KEYS = 0x2,
|
||||
AR_IS_DUNGEON = 0x4, /**< Causes the area to have a red name. */
|
||||
AR_HAS_MAP = 0x8,
|
||||
AR_HAS_ENEMIES = 0x10,
|
||||
AR_IS_MOLE_CAVE = 0x20,
|
||||
AR_HAS_NO_ENEMIES = 0x40,
|
||||
AR_ALLOWS_WARP = 0x80, /**< Not used in EU. Allows to warp in areas that do not have AR_OVERWORLD set. */
|
||||
} AreaFlags;
|
||||
|
||||
typedef enum {
|
||||
AREA_MINISH_WOODS,
|
||||
AREA_MINISH_VILLAGE,
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ extern void SetTile(u32 index, u32 position, u32 layer);
|
||||
extern void UpdateScrollVram(void);
|
||||
extern u32 sub_080B1B0C(struct Entity_*);
|
||||
extern u32 sub_080B1BA4(u32, u32, u32);
|
||||
extern void LoadResourceAsync(const void*, u32, u32);
|
||||
extern void LoadResourceAsync(const void* src, u32 dest, u32 size);
|
||||
extern void GenericConfused(struct Entity_*);
|
||||
extern void sub_08001290(struct Entity_*, u32);
|
||||
extern void GenericKnockback(struct Entity_*);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define BEANSTALKSUBTASK_H
|
||||
|
||||
#include "global.h"
|
||||
#include "map.h"
|
||||
|
||||
/*
|
||||
tiles 0x4000 and above create an entry here
|
||||
@@ -18,10 +19,6 @@ typedef struct {
|
||||
u16 tileIndex;
|
||||
} struct_080B44D0;
|
||||
|
||||
typedef struct {
|
||||
u32 src;
|
||||
void* dest;
|
||||
u32 size;
|
||||
} struct_08109194;
|
||||
void LoadMapData(MapDataDefinition* dataDefinition);
|
||||
|
||||
#endif // BEANSTALKSUBTASK_H
|
||||
|
||||
+13
-4
@@ -126,12 +126,21 @@ bool32 sub_0801E810(u32);
|
||||
u32 sub_0801DB94(void);
|
||||
|
||||
typedef struct {
|
||||
u8 unk_0;
|
||||
u8 unk_1;
|
||||
u8 numFloors;
|
||||
u8 highestFloor;
|
||||
u8 unk_2;
|
||||
// u8 pad;
|
||||
} struct_080C9C6C;
|
||||
} DungeonFloorMetadata;
|
||||
|
||||
extern const struct_080C9C6C gUnk_080C9C6C[];
|
||||
extern const DungeonFloorMetadata gDungeonFloorMetadatas[];
|
||||
|
||||
|
||||
typedef struct {
|
||||
u8 area;
|
||||
u8 room;
|
||||
u8 unk_2; // TODO u16 pad?
|
||||
u8 unk_3;
|
||||
u32 mapDataOffset;
|
||||
} DungeonLayout;
|
||||
|
||||
#endif // COMMON_H
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ void RoomExitCallback(void);
|
||||
*
|
||||
* @param a1
|
||||
*/
|
||||
void RestoreGameTask(u32 a1);
|
||||
void RestoreGameTask(bool32 loadGfx);
|
||||
|
||||
/**
|
||||
* Check if an Ezlo message can be displayed.
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ typedef struct {
|
||||
/*0x003*/ u8 field_0x3;
|
||||
/*0x004*/ u8 state;
|
||||
/*0x005*/ u8 field_0x5;
|
||||
/*0x006*/ u8 field_0x6;
|
||||
/*0x006*/ bool8 loadGfxOnRestore; // used in Subtask_FadeOut to determine the loadGfx parameter of RestoreGameTask.
|
||||
/*0x007*/ u8 pauseFadeIn;
|
||||
/*0x008*/ u16 fadeType;
|
||||
/*0x00A*/ u16 fadeInTime;
|
||||
|
||||
+37
-7
@@ -6,18 +6,48 @@
|
||||
|
||||
typedef struct {
|
||||
/*0x0000*/ BgSettings* bgSettings;
|
||||
/*0x0004*/ u16 mapData[0x1000]; // tilemap data? <-- gMapDataTop / gMapDataBottom
|
||||
/*0x2004*/ u8 collisionData[0x1000]; // more tilemap data? <-- gUnk_0200D654 / gUnk_02027EB4
|
||||
/*0x3004*/ u16 mapDataClone[0x1000]; // more tilemap data? <-- gUnk_0200E654 / gUnk_02028EB4
|
||||
/*0x5004*/ u16 metatileTypes[0x800]; // gMetatileTypesTop, gMetatileTypesBottom
|
||||
/*0x6004*/ u16 unkData2[0x800]; // gUnk_02011654,gUnk_0202BEB4
|
||||
/*0x7004*/ u16 metatiles[0x2000]; // gMetatilesTop, gMetatilesBottom
|
||||
/*0xb004*/ u8 unkData3[0x1000]; // gUnk_02016654, gUnk_02030EB4
|
||||
/*0x0004*/ u16 mapData[0x40*0x40]; /**< MetaTileIndex for each tile on the current layer. */ // tilemap data? <-- gMapDataTop / gMapDataBottom
|
||||
/*0x2004*/ u8 collisionData[0x40*0x40]; // more tilemap data? <-- gUnk_0200D654 / gUnk_02027EB4
|
||||
/*0x3004*/ u16 mapDataClone[0x40*0x40]; // more tilemap data? <-- gUnk_0200E654 / gUnk_02028EB4
|
||||
// Tileset
|
||||
/*0x5004*/ u16 metatileTypes[0x800]; /**< Maps from the MetaTileIndex to the MetaTileType. */ // gMetatileTypesTop, gMetatileTypesBottom
|
||||
/*0x6004*/ u16 unkData2[0x800]; /**< Maps from a MetaTileType to a MetaTileIndex. */ // gUnk_02011654,gUnk_0202BEB4 // TODO metatile index for the metatile type??
|
||||
/*0x7004*/ u16 metatiles[0x800 * 4]; /**< Mapping from a metatile to the four tile_attrs it consists of.*/ // gMetatilesTop, gMetatilesBottom
|
||||
|
||||
|
||||
/*0xb004*/ u8 unkData3[0x40*0x40]; /**< Some sort of special behavior for tiles? Falling into holes or jumping off walls does not work when this is all zero.*/ // gUnk_02016654, gUnk_02030EB4
|
||||
// TODO check with debugger what accesses this
|
||||
// 0x637
|
||||
// 0x2030eb4 + 0x637
|
||||
// 0x20314eb
|
||||
// e.g. sub_080B1AE0 accesses this
|
||||
// TODO check whether this also affects sound played when walking?
|
||||
/*
|
||||
0x10: water
|
||||
0x12: ice
|
||||
0x57: cloning pad
|
||||
*/
|
||||
} LayerStruct;
|
||||
|
||||
extern LayerStruct gMapTop;
|
||||
extern LayerStruct gMapBottom;
|
||||
|
||||
// Rendered tilemaps https://www.coranac.com/tonc/text/regbg.htm#sec-map
|
||||
//extern u16 gMapDataTopSpecial[0x4000];
|
||||
//extern u16 gMapDataBottomSpecial[0x4000];
|
||||
|
||||
LayerStruct* GetLayerByIndex(u32);
|
||||
|
||||
|
||||
/*
|
||||
Definition where some map data is found and where it should be copied to.
|
||||
Defined using the map_data asm macro, e.g. in map_headers.s
|
||||
*/
|
||||
typedef struct {
|
||||
u32 src;
|
||||
void* dest;
|
||||
u32 size;
|
||||
} MapDataDefinition;
|
||||
|
||||
|
||||
#endif // MAP_H
|
||||
|
||||
+1
-1
@@ -475,7 +475,7 @@ void sub_08078850(Entity*, u32, u32, const void*);
|
||||
void sub_08079D84(void);
|
||||
u32 sub_0807953C(void);
|
||||
void sub_0807BB68(const s16*, u32, u32);
|
||||
void sub_0807B9B8(u32, u32, u32);
|
||||
void SetMetaTileByIndex(u32 tileIndex, u32 position, u32 layer);
|
||||
void sub_0807B7D8(u32, u32, u32);
|
||||
void RestorePrevTileEntity(u32, u32);
|
||||
void UpdateItemAnim(ItemBehavior*);
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ enum RoomReloadType {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ u16 reload_flags;
|
||||
/*0x00*/ u16 reload_flags; // anything except for 0x1 prevents the screen from reloading when tiles are changed.
|
||||
/*0x02*/ u8 scrollAction;
|
||||
/*0x03*/ u8 scrollSubAction;
|
||||
/*0x04*/ u8 area;
|
||||
|
||||
@@ -51,7 +51,7 @@ SECTIONS {
|
||||
. = 0x00018EB0; gUnk_02018EB0 = .;
|
||||
. = 0x00018EE0; gUnk_02018EE0 = .;
|
||||
. = 0x00019EE0; gMapDataBottomSpecial = .;
|
||||
. = 0x0001AEE0; gUnk_0201AEE0 = .;
|
||||
. = 0x0001AEE0; gDungeonMap = .;
|
||||
. = 0x00021EE0; gSoundPlayingInfo = .;
|
||||
. = 0x00021F00; gUnk_02021F00 = .;
|
||||
. = 0x00021F20; gUnk_02021F20 = .;
|
||||
@@ -909,7 +909,6 @@ SECTIONS {
|
||||
data/const/collisionMatrix.o(.rodata);
|
||||
data/const/ui.o(.rodata);
|
||||
src/sineTable.o(.rodata);
|
||||
data/const/common.o(.rodata);
|
||||
src/common.o(.rodata);
|
||||
src/enemy/octorok.o(.rodata);
|
||||
data/animations/enemy/octorok.o(.rodata);
|
||||
|
||||
@@ -2519,4 +2519,5 @@ const u16* const gUnk_080B755C[] = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
};
|
||||
|
||||
// TODO gMapTop.bgSettings->control values
|
||||
const u16 gUnk_080B77C0[] = { 0x1c42, 0x1d45, 0x1d46, 0x1e03 };
|
||||
|
||||
+12
-12
@@ -53,7 +53,7 @@ extern const Data gUnk_080B44C2[];
|
||||
void sub_0801AD6C(const Data*, u32);
|
||||
bool32 sub_0801A4F8(void);
|
||||
bool32 sub_0801AA58(Entity*, u32, u32);
|
||||
void sub_0801AB08(u16*, LayerStruct*);
|
||||
void RenderTilemapToScreenblock(u16*, LayerStruct*);
|
||||
|
||||
u32 sub_0801AC68(u32 position, u32 data);
|
||||
|
||||
@@ -132,30 +132,30 @@ void SetBGDefaults(void) {
|
||||
gMapTop.bgSettings->control = gUnk_080B77C0[1];
|
||||
}
|
||||
|
||||
void sub_080197D4(struct_08109194* param_1) {
|
||||
void LoadMapData(MapDataDefinition* dataDefinition) {
|
||||
u32 uVar1;
|
||||
u8* src;
|
||||
void* dest;
|
||||
|
||||
do {
|
||||
dest = param_1->dest;
|
||||
dest = dataDefinition->dest;
|
||||
if (dest != NULL) {
|
||||
src = &gMapData + (param_1->src & 0x7fffffff);
|
||||
if ((param_1->size & 0x80000000) != 0) {
|
||||
src = &gMapData + (dataDefinition->src & 0x7fffffff);
|
||||
if ((dataDefinition->size & 0x80000000) != 0) {
|
||||
if ((u32)dest >> 0x18 == 6) {
|
||||
LZ77UnCompVram(src, dest);
|
||||
} else {
|
||||
LZ77UnCompWram(src, dest);
|
||||
}
|
||||
} else {
|
||||
MemCopy(src, dest, param_1->size);
|
||||
MemCopy(src, dest, dataDefinition->size);
|
||||
}
|
||||
} else {
|
||||
LoadPaletteGroup(*(u16*)param_1);
|
||||
LoadPaletteGroup(*(u16*)dataDefinition);
|
||||
sub_080533CC();
|
||||
}
|
||||
param_1++;
|
||||
} while (((param_1 - 1)->src & 0x80000000) != 0);
|
||||
dataDefinition++;
|
||||
} while (((dataDefinition - 1)->src & 0x80000000) != 0);
|
||||
}
|
||||
|
||||
// Has ifdefs for other variants
|
||||
@@ -841,7 +841,7 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
void RenderTilemapToScreenblock(u16* specialData, LayerStruct* layer) {
|
||||
u16* metatiles;
|
||||
u16* mapData;
|
||||
u16* mapDataClone;
|
||||
@@ -1039,10 +1039,10 @@ void sub_0801AE44(bool32 loadGfx) {
|
||||
}
|
||||
if ((gRoomControls.scroll_flags & 1) == 0) {
|
||||
if (gMapBottom.bgSettings != NULL) {
|
||||
sub_0801AB08(gMapDataBottomSpecial, &gMapBottom);
|
||||
RenderTilemapToScreenblock(gMapDataBottomSpecial, &gMapBottom);
|
||||
}
|
||||
if (gMapTop.bgSettings != NULL) {
|
||||
sub_0801AB08(gMapDataTopSpecial, &gMapTop);
|
||||
RenderTilemapToScreenblock(gMapDataTopSpecial, &gMapTop);
|
||||
}
|
||||
} else {
|
||||
sub_0807C4F8();
|
||||
|
||||
+127
-32
@@ -1,6 +1,8 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "assets/map_offsets.h"
|
||||
#include "area.h"
|
||||
#include "asm.h"
|
||||
#include "common.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
@@ -14,17 +16,10 @@
|
||||
#include "sound.h"
|
||||
#include "structures.h"
|
||||
|
||||
typedef struct {
|
||||
u8 area;
|
||||
u8 room;
|
||||
u8 unk_2;
|
||||
u8 unk_3;
|
||||
u32 mapDataOffset;
|
||||
} DungeonLayout;
|
||||
|
||||
extern u8 gUnk_03003DE0;
|
||||
extern u8 gzHeap[0x1000];
|
||||
extern u32 gUnk_0201AEE0[0x800];
|
||||
extern u32 gDungeonMap[0x800];
|
||||
extern s16 gUnk_02018EE0[];
|
||||
|
||||
extern void (*const gUnk_080C9CAC[])(void);
|
||||
@@ -75,18 +70,18 @@ void sub_0801E82C(void);
|
||||
extern void* GetRoomProperty(u32, u32, u32);
|
||||
|
||||
extern u8 gMapData;
|
||||
extern const DungeonLayout** const gUnk_080C9C50[];
|
||||
extern const DungeonLayout* const* const gDungeonLayouts[];
|
||||
extern u8 gMapDataBottomSpecial[];
|
||||
|
||||
u32 sub_0801DF10(const DungeonLayout* lyt);
|
||||
bool32 IsRoomVisited(TileEntity* tileEntity, u32 bank);
|
||||
u32 sub_0801DF60(u32 a1, u8* p);
|
||||
u32 sub_0801DF78(u32 a1, u32 a2);
|
||||
void sub_0801DF28(u32 x, u32 y, s32 color);
|
||||
void DrawMapPixel(u32 x, u32 y, s32 color);
|
||||
|
||||
u32 DecToHex(u32 value) {
|
||||
u32 result;
|
||||
register u32 r1 asm("r1");
|
||||
FORCE_REGISTER(u32 r1, r1);
|
||||
|
||||
if (value >= 100000000) {
|
||||
return 0x99999999;
|
||||
@@ -330,26 +325,41 @@ void sub_0801D898(void* dest, void* src, u32 word, u32 size) {
|
||||
|
||||
ASM_FUNC("asm/non_matching/common/zMalloc.inc", void* zMalloc(u32 size));
|
||||
|
||||
|
||||
typedef struct {
|
||||
u16 start; // chunk start (offset from gzHeap)
|
||||
u16 end; // chunk end (offset from gzHeap)
|
||||
} HEAP_ENTRY;
|
||||
|
||||
typedef struct {
|
||||
u16 num_entries; // allocated HEAP_ENTRYs in entries
|
||||
|
||||
// maybe union, HEAP_ENTRY and heap space share the same space
|
||||
HEAP_ENTRY entries[0];
|
||||
u8 buf[4096 - 4]; // pads to 0x1000
|
||||
} HEAP;
|
||||
|
||||
|
||||
void zFree(void* ptr) {
|
||||
u32 uVar1;
|
||||
u32 i;
|
||||
u16* puVar3;
|
||||
s32 uVar5;
|
||||
u16* ptr2;
|
||||
u16* entryPtr;
|
||||
s32 numEntries;
|
||||
u16* lastEntryPtr;
|
||||
|
||||
uVar1 = (int)ptr - (int)gzHeap;
|
||||
if (uVar1 < 0x1000) {
|
||||
puVar3 = (u16*)gzHeap;
|
||||
uVar5 = *puVar3++;
|
||||
entryPtr = (u16*)gzHeap;
|
||||
numEntries = *entryPtr++;
|
||||
|
||||
for (i = 0; i < uVar5; puVar3 += 2, i++) {
|
||||
if (*puVar3 == uVar1) {
|
||||
ptr2 = &((u16*)(gzHeap - 2))[uVar5 * 2];
|
||||
*puVar3 = *ptr2;
|
||||
*ptr2++ = 0;
|
||||
*(puVar3 + 1) = *ptr2;
|
||||
*ptr2 = 0;
|
||||
*(u16*)(gzHeap) = uVar5 - 1;
|
||||
for (i = 0; i < numEntries; entryPtr += 2, i++) {
|
||||
if (*entryPtr == uVar1) {
|
||||
lastEntryPtr = &((u16*)(gzHeap - 2))[numEntries * 2];
|
||||
*entryPtr = *lastEntryPtr;
|
||||
*lastEntryPtr++ = 0;
|
||||
*(entryPtr + 1) = *lastEntryPtr;
|
||||
*lastEntryPtr = 0;
|
||||
*(u16*)(gzHeap) = numEntries - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -414,7 +424,7 @@ void sub_0801DD58(u32 area, u32 room) {
|
||||
}
|
||||
|
||||
void LoadDungeonMap(void) {
|
||||
LoadResourceAsync(gUnk_0201AEE0, 0x6006000, sizeof(gUnk_0201AEE0));
|
||||
LoadResourceAsync(gDungeonMap, 0x6006000, sizeof(gDungeonMap));
|
||||
}
|
||||
|
||||
void DrawDungeonFeatures(u32 floor, void* data, u32 size) {
|
||||
@@ -440,7 +450,7 @@ void DrawDungeonFeatures(u32 floor, void* data, u32 size) {
|
||||
if (!AreaHasMap()) {
|
||||
return;
|
||||
}
|
||||
layout = gUnk_080C9C50[gArea.dungeon_idx][floor];
|
||||
layout = gDungeonLayouts[gArea.dungeon_idx][floor];
|
||||
MemClear(gMapDataBottomSpecial, 0x8000);
|
||||
while (layout->area != 0) {
|
||||
// ROOM_VISIT_MARKER has to be first TileEntity in the room.
|
||||
@@ -462,6 +472,7 @@ void DrawDungeonFeatures(u32 floor, void* data, u32 size) {
|
||||
}
|
||||
nextLayout = layout + 1;
|
||||
if (features != 0) {
|
||||
// Copies 0x400 bytes even though the data is less most of the time.
|
||||
DmaCopy32(3, &gMapData + layout->mapDataOffset, &gMapDataBottomSpecial, 0x400);
|
||||
|
||||
roomHeader = gAreaRoomHeaders[layout->area] + layout->room;
|
||||
@@ -478,7 +489,7 @@ void DrawDungeonFeatures(u32 floor, void* data, u32 size) {
|
||||
for (x = 0; x < width; x++) {
|
||||
tmp2 = mapX + x;
|
||||
color = sub_0801DF78(sub_0801DF60(x, ptr), features);
|
||||
sub_0801DF28(tmp2, mapY + y, color);
|
||||
DrawMapPixel(tmp2, mapY + y, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -496,10 +507,10 @@ u32 sub_0801DF10(const DungeonLayout* layout) {
|
||||
return offset;
|
||||
}
|
||||
|
||||
void sub_0801DF28(u32 x, u32 y, s32 color) {
|
||||
void DrawMapPixel(u32 x, u32 y, s32 color) {
|
||||
u32* ptr;
|
||||
u32 tmp;
|
||||
ptr = &gUnk_0201AEE0[(((y >> 3) * 0x10 + (x >> 3)) * 8)];
|
||||
ptr = &gDungeonMap[(((y >> 3) * 0x10 + (x >> 3)) * 8)];
|
||||
ptr = &ptr[(y & 7)];
|
||||
tmp = (color << ((x & 7) * 4));
|
||||
ptr[0] = (ptr[0] & gUnk_080C9460[x & 7]) | tmp;
|
||||
@@ -710,7 +721,7 @@ ASM_FUNC("asm/non_matching/common/sub_0801E49C.inc", void sub_0801E49C(u32 a1, u
|
||||
void sub_0801E64C(s32 param_1, s32 param_2, s32 param_3, s32 param_4, s32 param_5) {
|
||||
s32 sVar1;
|
||||
s32* ptr = (s32*)gUnk_02018EE0;
|
||||
register s32 tmp asm("r1");
|
||||
FORCE_REGISTER(s32 tmp, r1);
|
||||
|
||||
if ((0 <= param_2 || 0 <= param_4) && (param_2 < 0xa0 || (param_4 < 0xa0))) {
|
||||
if (param_2 > param_4) {
|
||||
@@ -968,7 +979,91 @@ void sub_0801E8D4(void) {
|
||||
|
||||
ASM_FUNC("asm/non_matching/common/sub_0801E99C.inc", u32 sub_0801E99C(u32 a1));
|
||||
|
||||
const struct_080C9C6C gUnk_080C9C6C[] = {
|
||||
const u16 gUnk_080C93E0[] = { 3, 9, 16, 22, 28, 35, 41, 48, 54, 61, 67, 74, 81, 88, 95, 102, 110, 117, 125, 133, 141, 149, 158, 167, 176, 185, 195, 205, 215, 226, 238, 250, 262, 276, 290, 304, 320, 336, 354, 373, 394, 415, 439, 465, 493, 525, 559, 597, 640, 689, 744, 808, 883, 971, 1078, 1209, 1375, 1591, 1885, 2308, 2973, 4167, 6950, 20860 };
|
||||
|
||||
const u32 gUnk_080C9460[] = {
|
||||
0xfffffff0, 0xffffff0f, 0xfffff0ff, 0xffff0fff, 0xfff0ffff, 0xff0fffff, 0xf0ffffff, 0xfffffff,
|
||||
};
|
||||
|
||||
const DungeonLayout gDungeonLayouts_None_None[] = { { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_None[] = {gDungeonLayouts_None_None, };
|
||||
|
||||
const DungeonLayout gDungeonLayouts_DeepwoodShrine_1F[] = { { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_BOSS_DOOR, 0, 0, offset_gDungeonMaps_DeepwoodShrine_BossDoor }, { AREA_DEEPWOOD_SHRINE_BOSS, ROOM_DEEPWOOD_SHRINE_BOSS_MAIN, 2, 0, offset_gDungeonMaps_DeepwoodShrineBoss_Main }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_DeepwoodShrine_B1[] = { { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_MADDERPILLAR, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Madderpillar }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_BLUE_PORTAL, 0, 0, offset_gDungeonMaps_DeepwoodShrine_BluePortal }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_STAIRS_TO_B1, 0, 0, offset_gDungeonMaps_DeepwoodShrine_StairsToB1 }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_POT_BRIDGE, 0, 0, offset_gDungeonMaps_DeepwoodShrine_PotBridge }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_DOUBLE_STATUE, 0, 0, offset_gDungeonMaps_DeepwoodShrine_DoubleStatue }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_MAP, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Map }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_BARREL, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Barrel }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_BUTTON, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Button }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_MULLDOZER, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Mulldozer }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_PILLARS, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Pillars }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_LEVER, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Lever }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_ENTRANCE, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Entrance }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_TORCHES, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Torches }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_DeepwoodShrine_B2[] = { { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_BOSS_KEY, 0, 0, offset_gDungeonMaps_DeepwoodShrine_BossKey }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_COMPASS, 0, 0, offset_gDungeonMaps_DeepwoodShrine_Compass }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_LILY_PAD_WEST, 0, 0, offset_gDungeonMaps_DeepwoodShrine_LilyPadWest }, { AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_LILY_PAD_EAST, 0, 0, offset_gDungeonMaps_DeepwoodShrine_LilyPadEast }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_DeepwoodShrine[] = {gDungeonLayouts_DeepwoodShrine_1F, gDungeonLayouts_DeepwoodShrine_B1, gDungeonLayouts_DeepwoodShrine_B2, };
|
||||
|
||||
const DungeonLayout gDungeonLayouts_CaveOfFlames_1F[] = { { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_ENTRANCE, 0, 0, offset_gDungeonMaps_CaveOfFlames_Entrance }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_NORTH_ENTRANCE, 0, 0, offset_gDungeonMaps_CaveOfFlames_NorthEntrance }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_COMPASS, 0, 0, offset_gDungeonMaps_CaveOfFlames_Compass }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_BOB_OMB_WALL, 0, 0, offset_gDungeonMaps_CaveOfFlames_BobOmbWall }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_CaveOfFlames_B1[] = { { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_AFTER_CANE, 0, 0, offset_gDungeonMaps_CaveOfFlames_AfterCane }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_SPINY_CHU, 0, 0, offset_gDungeonMaps_CaveOfFlames_SpinyChu }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_CART_TO_SPINY_CHU, 0, 0, offset_gDungeonMaps_CaveOfFlames_CartToSpinyChu }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MAIN_CART, 0, 0, offset_gDungeonMaps_CaveOfFlames_MainCart }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_CART_WEST, 0, 0, offset_gDungeonMaps_CaveOfFlames_CartWest }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_HELMASAUR_FIGHT, 0, 0, offset_gDungeonMaps_CaveOfFlames_HelmasaurFight }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_ROLLOBITE_LAVA_ROOM, 0, 0, offset_gDungeonMaps_CaveOfFlames_RollobiteLavaRoom }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MINISH_LAVA_ROOM, 0, 0, offset_gDungeonMaps_CaveOfFlames_MinishLavaRoom }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_CaveOfFlames_B2[] = { { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MINISH_SPIKES, 0, 0, offset_gDungeonMaps_CaveOfFlames_MinishSpikes }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_TOMPAS_DOOM, 0, 0, offset_gDungeonMaps_CaveOfFlames_TompasDoom }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_BEFORE_GLEEROK, 0, 0, offset_gDungeonMaps_CaveOfFlames_BeforeGleerok }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_BOSSKEY_PATH1, 0, 0, offset_gDungeonMaps_CaveOfFlames_BosskeyPath1 }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_BOSSKEY_PATH2, 0, 0, offset_gDungeonMaps_CaveOfFlames_BosskeyPath2 }, { AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_BOSS_DOOR, 0, 0, offset_gDungeonMaps_CaveOfFlames_BossDoor }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_CaveOfFlames_B3[] = { { AREA_CAVE_OF_FLAMES_BOSS, ROOM_CAVE_OF_FLAMES_BOSS_0, 2, 0, offset_gDungeonMaps_CaveOfFlamesBoss_0 }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_CaveOfFlames[] = {gDungeonLayouts_CaveOfFlames_1F, gDungeonLayouts_CaveOfFlames_B1, gDungeonLayouts_CaveOfFlames_B2, gDungeonLayouts_CaveOfFlames_B3, };
|
||||
|
||||
|
||||
const DungeonLayout gDungeonLayouts_FortressOfWinds_3F[] = { { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_DOUBLE_EYEGORE, 0, 0, offset_gDungeonMaps_FortressOfWinds_DoubleEyegore }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_EAST_KEY_LEVER, 0, 0, offset_gDungeonMaps_FortressOfWinds_EastKeyLever }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_PIT_PLATFORMS, 0, 0, offset_gDungeonMaps_FortressOfWinds_PitPlatforms }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_WEST_KEY_LEVER, 0, 0, offset_gDungeonMaps_FortressOfWinds_WestKeyLever }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_MAZAAL, 2, 0, offset_gDungeonMaps_FortressOfWinds_Mazaal }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_BEFORE_MAZAAL, 0, 0, offset_gDungeonMaps_FortressOfWinds_BeforeMazaal }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_FortressOfWinds_2F[] = { { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_DARKNUT_ROOM, 0, 0, offset_gDungeonMaps_FortressOfWinds_DarknutRoom }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_ARROW_EYE_BRIDGE, 0, 0, offset_gDungeonMaps_FortressOfWinds_ArrowEyeBridge }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_NORTH_SPLIT_PATH_PIT, 0, 0, offset_gDungeonMaps_FortressOfWinds_NorthSplitPathPit }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_WALLMASTER_MINISH_PORTAL, 0, 0, offset_gDungeonMaps_FortressOfWinds_WallmasterMinishPortal }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_PILLAR_CLONE_BUTTONS, 0, 0, offset_gDungeonMaps_FortressOfWinds_PillarCloneButtons }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_ROTATING_SPIKE_TRAPS, 0, 0, offset_gDungeonMaps_FortressOfWinds_RotatingSpikeTraps }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_STALFOS, 0, 0, offset_gDungeonMaps_FortressOfWinds_Stalfos }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_ENTRANCE_MOLE_MITTS, 0, 0, offset_gDungeonMaps_FortressOfWinds_EntranceMoleMitts }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_MAIN_2F, 0, 0, offset_gDungeonMaps_FortressOfWinds_Main2f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_MINISH_HOLE, 0, 0, offset_gDungeonMaps_FortressOfWinds_MinishHole }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_BOSS_KEY, 0, 0, offset_gDungeonMaps_FortressOfWinds_BossKey }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_WEST_STAIRS_2F, 0, 0, offset_gDungeonMaps_FortressOfWinds_WestStairs2f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_EAST_STAIRS_2F, 0, 0, offset_gDungeonMaps_FortressOfWinds_EastStairs2f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_5, 1, 1, offset_gDungeonMaps_FortressOfWinds_5 }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_6, 1, 1, offset_gDungeonMaps_FortressOfWinds_6 }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_FortressOfWinds_1F[] = { { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_WEST_STAIRS_1F, 0, 0, offset_gDungeonMaps_FortressOfWinds_WestStairs1f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_CENTER_STAIRS_1F, 0, 0, offset_gDungeonMaps_FortressOfWinds_CenterStairs1f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_EAST_STAIRS_1F, 0, 0, offset_gDungeonMaps_FortressOfWinds_EastStairs1f }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_WIZZROBE, 0, 0, offset_gDungeonMaps_FortressOfWinds_Wizzrobe }, { AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_HEART_PIECE, 0, 0, offset_gDungeonMaps_FortressOfWinds_HeartPiece }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_FortressOfWinds[] = {gDungeonLayouts_FortressOfWinds_3F, gDungeonLayouts_FortressOfWinds_2F, gDungeonLayouts_FortressOfWinds_1F, };
|
||||
|
||||
|
||||
const DungeonLayout gDungeonLayouts_TempleOfDroplets_B1[] = { { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_WEST_HOLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_WestHole }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_NORTH_SPLIT_ROOM, 0, 0, offset_gDungeonMaps_TempleOfDroplets_NorthSplitRoom }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_EAST_HOLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_EastHole }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ENTRANCE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_Entrance }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_NORTHWEST_STAIRS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_NorthwestStairs }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_SCISSORS_MINIBOSS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_ScissorsMiniboss }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_WATERFALL_NORTHWEST, 0, 0, offset_gDungeonMaps_TempleOfDroplets_WaterfallNorthwest }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_WATERFALL_NORTHEAST, 0, 0, offset_gDungeonMaps_TempleOfDroplets_WaterfallNortheast }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ELEMENT, 0, 0, offset_gDungeonMaps_TempleOfDroplets_Element }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ICE_CORNER, 0, 0, offset_gDungeonMaps_TempleOfDroplets_IceCorner }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ICE_PIT_MAZE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_IcePitMaze }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_HOLE_TO_BLUE_CHU_KEY, 0, 0, offset_gDungeonMaps_TempleOfDroplets_HoleToBlueChuKey }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_WEST_WATERFALL_SOUTHEAST, 0, 0, offset_gDungeonMaps_TempleOfDroplets_WestWaterfallSoutheast }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_WEST_WATERFALL_SOUTHWEST, 0, 0, offset_gDungeonMaps_TempleOfDroplets_WestWaterfallSouthwest }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BIG_OCTO, 2, 0, offset_gDungeonMaps_TempleOfDroplets_BigOcto }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_TO_BLUE_CHU, 0, 0, offset_gDungeonMaps_TempleOfDroplets_ToBlueChu }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLUE_CHU, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlueChu }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_TempleOfDroplets_B2[] = { { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BOSS_KEY, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BossKey }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_NORTH_SMALL_KEY, 0, 0, offset_gDungeonMaps_TempleOfDroplets_NorthSmallKey }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLOCK_CLONE_BUTTON_PUZZLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlockCloneButtonPuzzle }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLOCK_CLONE_PUZZLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlockClonePuzzle }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLOCK_CLONE_ICE_BRIDGE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlockCloneIceBridge }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_STAIRS_TO_SCISSORS_MINIBOSS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_StairsToScissorsMiniboss }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_SPIKE_BAR_FLIPPER_ROOM, 0, 0, offset_gDungeonMaps_TempleOfDroplets_SpikeBarFlipperRoom }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_9_LANTERNS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_9Lanterns }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_LILYPAD_ICE_BLOCKS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_LilypadIceBlocks }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_29, 0, 0, offset_gDungeonMaps_TempleOfDroplets_29 }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_MULLDOZERS_FIRE_BARS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_MulldozersFireBars }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_DARK_MAZE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_DarkMaze }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_TWIN_MADDERPILLARS, 1, 0, offset_gDungeonMaps_TempleOfDroplets_TwinMadderpillars }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_AFTER_TWIN_MADDERPILLARS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_AfterTwinMadderpillars }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLUE_CHU_KEY_LEVER, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlueChuKeyLever }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_MULLDOZER_KEY, 1, 0, offset_gDungeonMaps_TempleOfDroplets_MulldozerKey }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BEFORE_TWIN_MADDERPILLARS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BeforeTwinMadderpillars }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_LILYPAD_B2_WEST, 0, 0, offset_gDungeonMaps_TempleOfDroplets_LilypadB2West }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_COMPASS, 0, 0, offset_gDungeonMaps_TempleOfDroplets_Compass }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_DARK_SCISSOR_BEETLES, 0, 0, offset_gDungeonMaps_TempleOfDroplets_DarkScissorBeetles }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_LILYPAD_B2_MIDDLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_LilypadB2Middle }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ICE_MADDERPILLAR, 0, 0, offset_gDungeonMaps_TempleOfDroplets_IceMadderpillar }, { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_FLAMEBAR_BLOCK_PUZZLE, 0, 0, offset_gDungeonMaps_TempleOfDroplets_FlamebarBlockPuzzle }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_TempleOfDroplets_B3[] = { { AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_BLUE_CHU_KEY, 0, 0, offset_gDungeonMaps_TempleOfDroplets_BlueChuKey }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_TempleOfDroplets[] = {gDungeonLayouts_TempleOfDroplets_B1, gDungeonLayouts_TempleOfDroplets_B2, gDungeonLayouts_TempleOfDroplets_B3, };
|
||||
|
||||
const DungeonLayout gDungeonLayouts_PalaceOfWinds_5F[] = { { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GYORG_TORNADO, 2, 0, offset_gDungeonMaps_PalaceOfWinds_GyorgTornado }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BOSS_KEY, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BossKey }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BEFORE_BALL_AND_CHAIN_SOLDIERS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BeforeBallAndChainSoldiers }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GYORG_BOSS_DOOR, 0, 0, offset_gDungeonMaps_PalaceOfWinds_GyorgBossDoor }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_EAST_CHEST_FROM_GYORG_BOSS_DOOR, 0, 0, offset_gDungeonMaps_PalaceOfWinds_EastChestFromGyorgBossDoor }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_MOBLIN_AND_WIZZROBE_FIGHT, 0, 0, offset_gDungeonMaps_PalaceOfWinds_MoblinAndWizzrobeFight }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_FOUR_BUTTON_STALFOS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_FourButtonStalfos }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_FAN_AND_KEY_TO_BOSS_KEY, 0, 0, offset_gDungeonMaps_PalaceOfWinds_FanAndKeyToBossKey }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BALL_AND_CHAIN_SOLDIERS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BallAndChainSoldiers }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BOMBAROSSA_PATH, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BombarossaPath }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_HOLE_TO_DARKNUT, 0, 0, offset_gDungeonMaps_PalaceOfWinds_HoleToDarknut }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_TO_BOMBAROSSA_PATH, 0, 0, offset_gDungeonMaps_PalaceOfWinds_ToBombarossaPath }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BOMB_WALL_INSIDE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BombWallInside }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BOMB_WALL_OUTSIDE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BombWallOutside }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_PalaceOfWinds_4F[] = { { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_CLOUD_JUMPS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_CloudJumps }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BLOCK_MAZE_TO_BOSS_DOOR, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BlockMazeToBossDoor }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_CRACKED_FLOOR_LAKITU, 0, 0, offset_gDungeonMaps_PalaceOfWinds_CrackedFloorLakitu }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_HEART_PIECE_BRIDGE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_HeartPieceBridge }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_FAN_BRIDGE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_FanBridge }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_TO_FAN_BRIDGE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_ToFanBridge }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_RED_WARP_HALL, 0, 0, offset_gDungeonMaps_PalaceOfWinds_RedWarpHall }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_PalaceOfWinds_3F[] = { { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_PLATFORM_CLONE_RIDE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PlatformCloneRide }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_PIT_CORNER_AFTER_KEY, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PitCornerAfterKey }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_PLATFORM_CROW_RIDE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PlatformCrowRide }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GRATE_PLATFORM_RIDE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_GratePlatformRide }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_POT_PUSH, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PotPush }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_FLOORMASTER_LEVER, 0, 0, offset_gDungeonMaps_PalaceOfWinds_FloormasterLever }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_MAP, 0, 0, offset_gDungeonMaps_PalaceOfWinds_Map }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_CORNER_TO_MAP, 0, 0, offset_gDungeonMaps_PalaceOfWinds_CornerToMap }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_STAIRS_AFTER_FLOORMASTER, 0, 0, offset_gDungeonMaps_PalaceOfWinds_StairsAfterFloormaster }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_HOLE_TO_KINSTONE_WIZZROBE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_HoleToKinstoneWizzrobe }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_KEY_ARROW_BUTTON, 0, 0, offset_gDungeonMaps_PalaceOfWinds_KeyArrowButton }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_PalaceOfWinds_2F[] = { { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GRATES_TO_3F, 0, 0, offset_gDungeonMaps_PalaceOfWinds_GratesTo3f }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_SPINY_FIGHT, 0, 0, offset_gDungeonMaps_PalaceOfWinds_SpinyFight }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_PEAHAT_SWITCH, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PeahatSwitch }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_WHIRLWIND_BOMBAROSSA, 0, 0, offset_gDungeonMaps_PalaceOfWinds_WhirlwindBombarossa }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_DOOR_TO_STALFOS_FIREBAR, 0, 0, offset_gDungeonMaps_PalaceOfWinds_DoorToStalfosFirebar }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_STALFOS_FIREBAR_HOLE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_StalfosFirebarHole }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_SHORTCUT_DOOR_BUTTONS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_ShortcutDoorButtons }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_TO_PEAHAT_SWITCH, 0, 0, offset_gDungeonMaps_PalaceOfWinds_ToPeahatSwitch }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_KINSTONE_WIZZROBE_FIGHT, 0, 0, offset_gDungeonMaps_PalaceOfWinds_KinstoneWizzrobeFight }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GIBDO_STAIRS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_GibdoStairs }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_SPIKE_BAR_SMALL_KEY, 0, 0, offset_gDungeonMaps_PalaceOfWinds_SpikeBarSmallKey }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_PalaceOfWinds_1F[] = { { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_DARKNUT_MINIBOSS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_DarknutMiniboss }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_ROC_CAPE, 0, 0, offset_gDungeonMaps_PalaceOfWinds_RocCape }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_FIRE_BAR_GRATES, 0, 0, offset_gDungeonMaps_PalaceOfWinds_FireBarGrates }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_PLATFORM_RIDE_BOMBAROSSAS, 0, 0, offset_gDungeonMaps_PalaceOfWinds_PlatformRideBombarossas }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BRIDGE_AFTER_DARKNUT, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BridgeAfterDarknut }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_BRIDGE_SWITCHES_CLONE_BLOCK, 0, 0, offset_gDungeonMaps_PalaceOfWinds_BridgeSwitchesCloneBlock }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_ENTRANCE_ROOM, 0, 0, offset_gDungeonMaps_PalaceOfWinds_EntranceRoom }, { AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_DARK_COMPASS_HALL, 0, 0, offset_gDungeonMaps_PalaceOfWinds_DarkCompassHall }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout* const gDungeonLayouts_PalaceOfWinds[] = {gDungeonLayouts_PalaceOfWinds_5F, gDungeonLayouts_PalaceOfWinds_4F, gDungeonLayouts_PalaceOfWinds_3F, gDungeonLayouts_PalaceOfWinds_2F, gDungeonLayouts_PalaceOfWinds_1F, };
|
||||
|
||||
|
||||
const DungeonLayout gDungeonLayouts_DarkHyruleCastle_3F[] = { { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_TOP_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_3fTopLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_TOP_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_3fTopRightTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_BOTTOM_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_3fBottomLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_BOTTOM_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_3fBottomRightTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_KEATON_HALL_TO_VAATI, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_3fKeatonHallToVaati }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_TRIPLE_DARKNUT, 2, 0, offset_gDungeonMaps_DarkHyruleCastle_3fTripleDarknut }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_DarkHyruleCastle_2F[] = { { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_LEFT_CORNER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopLeftCorner }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOSS_KEY, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBossKey }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BLUE_WARP, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBlueWarp }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_RIGHT_CORNER_GHINI, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopRightCornerGhini }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_RIGHT_CORNER_TORCHES, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopRightCornerTorches }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopRightTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_LEFT_DARKNUT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopLeftDarknut }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_SPARKS, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fSparks }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_TOP_RIGHT_DARKNUTS, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fTopRightDarknuts }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_LEFT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fLeft }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_RIGHT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fRight }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_LEFT_DARKNUTS, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomLeftDarknuts }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOSS_DOOR, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBossDoor }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_RIGHT_DARKNUT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomRightDarknut }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_LEFT_CORNER_PUZZLE, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomLeftCornerPuzzle }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_ENTRANCE, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fEntrance }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_RIGHT_CORNER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomRightCorner }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_LEFT_GHINI, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomLeftGhini }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_2F_BOTTOM_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_2fBottomRightTower }, { 0, 0, 0, 0, 0 }, };
|
||||
const DungeonLayout gDungeonLayouts_DarkHyruleCastle_1F[] = { { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_ENTRANCE, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fEntrance }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_TOP_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fTopLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_THRONE_ROOM, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fThroneRoom }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_COMPASS, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fCompass }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_TOP_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fTopRightTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_BEFORE_THRONE, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fBeforeThrone }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_TOP_LEFT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopTopLeft }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_TOP, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopTop }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_TOP_RIGHT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopTopRight }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_LEFT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopLeft }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_RIGHT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopRight }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_BOTTOM_LEFT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopBottomLeft }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_BOTTOM, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopBottom }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_LOOP_BOTTOM_RIGHT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fLoopBottomRight }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_BOTTOM_LEFT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fBottomLeftTower }, { AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_BOTTOM_RIGHT_TOWER, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_1fBottomRightTower }, { 0, 0, 0, 0, 0 }, };
|
||||
|
||||
const DungeonLayout gDungeonLayouts_DarkHyruleCastle_B1[] = {
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_ENTRANCE, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1Entrance },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_BELOW_THRONE, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1BelowThrone },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_BELOW_COMPASS, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1BelowCompass },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_BEFORE_THRONE, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1BeforeThrone },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_TO_PRISON, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1ToPrison },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_BOMB_WALL, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1BombWall },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_KEATONS, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1Keatons },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_TO_PRISON_FIREBAR, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1ToPrisonFirebar },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_CANNONS, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B1Cannons, },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_LEFT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_B1Left },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_RIGHT, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_B1Right },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B1_MAP, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_B1Map },
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
};
|
||||
const DungeonLayout gDungeonLayouts_DarkHyruleCastle_B2[] = {
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B2_TO_PRISON, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B2ToPrison },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B2_PRISON, 0, 0, offset_gDungeonMaps_DarkHyruleCastle_B2Prison },
|
||||
{ AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_B2_DROPDOWN, 0, 0,
|
||||
offset_gDungeonMaps_DarkHyruleCastle_B2Dropdown },
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
const DungeonLayout* const gDungeonLayouts_DarkHyruleCastle[] = {gDungeonLayouts_DarkHyruleCastle_3F, gDungeonLayouts_DarkHyruleCastle_2F, gDungeonLayouts_DarkHyruleCastle_1F, gDungeonLayouts_DarkHyruleCastle_B1, gDungeonLayouts_DarkHyruleCastle_B2, };
|
||||
|
||||
|
||||
const DungeonLayout* const* const gDungeonLayouts[] = {gDungeonLayouts_None, gDungeonLayouts_DeepwoodShrine, gDungeonLayouts_CaveOfFlames, gDungeonLayouts_FortressOfWinds, gDungeonLayouts_TempleOfDroplets, gDungeonLayouts_PalaceOfWinds, gDungeonLayouts_DarkHyruleCastle, };
|
||||
|
||||
|
||||
|
||||
const DungeonFloorMetadata gDungeonFloorMetadatas[] = {
|
||||
{ 1, 2, 2 }, { 3, 3, 3 }, { 4, 3, 0 }, { 3, 5, 5 }, { 3, 2, 2 }, { 5, 7, 7 }, { 5, 5, 5 }, { 1, 3, 3 },
|
||||
{ 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 },
|
||||
};
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ void CutsceneMain_Init(void) {
|
||||
void sub_080535AC(void) {
|
||||
gMenu.overlayType = 1;
|
||||
gMenu.transitionTimer = 120;
|
||||
gUI.field_0x6 = 1;
|
||||
gUI.loadGfxOnRestore = TRUE;
|
||||
gUpdateVisibleTiles = 1;
|
||||
gScreen.lcd.displayControl &= 0xfeff;
|
||||
LoadRoomEntityList(gUnk_080FCB94);
|
||||
@@ -216,7 +216,7 @@ void sub_08053758(void) {
|
||||
gMenu.transitionTimer = 120;
|
||||
gMenu.field_0xa = 0x1e;
|
||||
*((u8*)&gMenu + 0x10) = 0; // TODO
|
||||
gUI.field_0x6 = 1;
|
||||
gUI.loadGfxOnRestore = TRUE;
|
||||
gMapBottom.bgSettings = NULL;
|
||||
gMapTop.bgSettings = NULL;
|
||||
gRoomControls.camera_target = NULL;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#define NENT_DEPRECATED
|
||||
#include "asm.h"
|
||||
#include "beanstalkSubtask.h"
|
||||
#include "collision.h"
|
||||
#include "enemy.h"
|
||||
#include "enemy/gyorg.h"
|
||||
@@ -12,8 +13,6 @@ extern u8 gMapDataTopSpecial[];
|
||||
|
||||
extern u16 gMapDataBottomSpecial[];
|
||||
|
||||
extern void sub_080197D4(const void*);
|
||||
|
||||
extern u32 sub_08000E62(u32);
|
||||
extern void RegisterTransitionManager(void*, void (*)(), void (*)());
|
||||
|
||||
@@ -229,7 +228,7 @@ void sub_080464C0(GyorgFemaleEntity* this) {
|
||||
s32 i;
|
||||
u8* src;
|
||||
u8* dst;
|
||||
sub_080197D4(gUnk_080D1A74[super->animationState >> 6]);
|
||||
LoadMapData((MapDataDefinition*)gUnk_080D1A74[super->animationState >> 6]);
|
||||
sub_08046518();
|
||||
for (i = 0x20, src = ((u8*)&gMapDataBottomSpecial), dst = ((u8*)&gMapDataBottomSpecial) + 0x3260; i != 0; i--) {
|
||||
MemCopy(src, dst, 0x40);
|
||||
|
||||
@@ -111,7 +111,7 @@ void sub_08033958(SpinyBeetleEntity* this) {
|
||||
u32 direction;
|
||||
if (sub_08033DF0(this)) {
|
||||
sub_08033E1C(this);
|
||||
sub_0807B9B8(this->tileIndex, this->tile, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->tileIndex, this->tile, super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ void sub_08033958(SpinyBeetleEntity* this) {
|
||||
COLLISION_ON(super);
|
||||
|
||||
super->y.WORD = (super->y.WORD & 0xfff00000) | 0xC0000;
|
||||
sub_0807B9B8(this->tileIndex, this->tile, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->tileIndex, this->tile, super->collisionLayer);
|
||||
InitializeAnimation(super, 2);
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* @brief Game Utils
|
||||
*/
|
||||
#include "area.h"
|
||||
#include "backgroundAnimations.h"
|
||||
#include "enemy.h"
|
||||
#include "entity.h"
|
||||
@@ -162,17 +163,17 @@ void InitializePlayer(void) {
|
||||
|
||||
bool32 AreaIsOverworld(void) {
|
||||
#ifdef EU
|
||||
return gArea.areaMetadata == 0x01;
|
||||
return gArea.areaMetadata == AR_IS_OVERWORLD;
|
||||
#else
|
||||
return gArea.areaMetadata == 0x81;
|
||||
return gArea.areaMetadata == (AR_ALLOWS_WARP | AR_IS_OVERWORLD);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool32 CheckAreaOverworld(u32 area) {
|
||||
#if EU
|
||||
return gAreaMetadata[area].flags == 0x01;
|
||||
return gAreaMetadata[area].flags == AR_IS_OVERWORLD;
|
||||
#else
|
||||
return gAreaMetadata[area].flags == 0x81;
|
||||
return gAreaMetadata[area].flags == (AR_ALLOWS_WARP | AR_IS_OVERWORLD);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -274,20 +275,20 @@ bool32 HasDungeonSmallKey(void) {
|
||||
}
|
||||
|
||||
extern u8 gPaletteBufferBackup[];
|
||||
void RestoreGameTask(u32 a1) {
|
||||
void RestoreGameTask(bool32 loadGfx) {
|
||||
LoadGfxGroups();
|
||||
#ifndef EU
|
||||
CleanUpGFXSlots();
|
||||
#endif
|
||||
sub_080ADE24();
|
||||
InitUI(TRUE);
|
||||
sub_0801AE44(a1);
|
||||
sub_0801AE44(loadGfx);
|
||||
MemCopy(gPaletteBufferBackup, gPaletteBuffer, 1024);
|
||||
gUsedPalettes = 0xffffffff;
|
||||
}
|
||||
|
||||
void LoadRoomBgm(void) {
|
||||
gArea.queued_bgm = gAreaMetadata[gRoomControls.area]._3;
|
||||
gArea.queued_bgm = gAreaMetadata[gRoomControls.area].queueBgm;
|
||||
if (CheckLocalFlagByBank(FLAG_BANK_10, LV6_KANE_START)) {
|
||||
gArea.queued_bgm = BGM_FIGHT_THEME2;
|
||||
}
|
||||
|
||||
@@ -113,32 +113,32 @@ void sub_08059B18(void) {
|
||||
if (CheckGlobalFlag(TATEKAKE_HOUSE) != 0) {
|
||||
for (loopVar = 0; loopVar < 4; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
sub_0807B9B8(loopVar * 0x10 + 0x4ab + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
|
||||
SetMetaTileByIndex(loopVar * 0x10 + 0x4ab + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
|
||||
1);
|
||||
}
|
||||
}
|
||||
|
||||
for (loopVar = 0; loopVar < 3; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
sub_0807B9B8(loopVar * 0x10 + 0x440 + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
|
||||
SetMetaTileByIndex(loopVar * 0x10 + 0x440 + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
|
||||
2);
|
||||
}
|
||||
}
|
||||
sub_0807B9B8(0xd6, 0x5c2, 2);
|
||||
sub_0807B9B8(0xd7, 0x5c3, 2);
|
||||
SetMetaTileByIndex(0xd6, 0x5c2, 2);
|
||||
SetMetaTileByIndex(0xd7, 0x5c3, 2);
|
||||
LoadResourceAsync(&gUnk_086E8460, 0x6001800, 0x800);
|
||||
} else {
|
||||
if (CheckGlobalFlag(TATEKAKE_TOCHU) != 0) {
|
||||
for (loopVar = 0; loopVar < 5; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
sub_0807B9B8(loopVar * 0x10 + 0x4a6 + innerLoopVar,
|
||||
SetMetaTileByIndex(loopVar * 0x10 + 0x4a6 + innerLoopVar,
|
||||
COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
|
||||
}
|
||||
}
|
||||
sub_0807B9B8(0x444, 0x602, 2);
|
||||
sub_0807B9B8(0x445, 0x605, 2);
|
||||
sub_0807B9B8(0x454, 0x642, 2);
|
||||
sub_0807B9B8(0x455, 0x645, 2);
|
||||
SetMetaTileByIndex(0x444, 0x602, 2);
|
||||
SetMetaTileByIndex(0x445, 0x605, 2);
|
||||
SetMetaTileByIndex(0x454, 0x642, 2);
|
||||
SetMetaTileByIndex(0x455, 0x645, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-12
@@ -581,7 +581,7 @@ extern u32 gUnk_085C4620[];
|
||||
extern void (*const gUnk_08128D58[])(void);
|
||||
extern KeyButtonLayout gUnk_08128D60;
|
||||
|
||||
void sub_080A5D1C();
|
||||
void DrawDungeonMapActually();
|
||||
void sub_080A5CFC(u32, void*, u32);
|
||||
void sub_080A6FB4(u32, u32);
|
||||
void DrawDungeonFeatures(u32, void*, u32);
|
||||
@@ -1067,7 +1067,7 @@ void PauseMenu_Screen_5(void) {
|
||||
u32 temp;
|
||||
|
||||
gUnk_08128D30[gMenu.menuType]();
|
||||
sub_080A5D1C();
|
||||
DrawDungeonMapActually();
|
||||
temp = gMain.ticks;
|
||||
if ((temp & 7) == 0) {
|
||||
uVar1 = *gUnk_02017830;
|
||||
@@ -1091,10 +1091,10 @@ void sub_080A5C44(u32 param_1, u32 param_2, u32 param_3) {
|
||||
|
||||
void sub_080A5C9C(void) {
|
||||
s32 newChoice;
|
||||
const struct_080C9C6C* ptr;
|
||||
const DungeonFloorMetadata* floorMetadata;
|
||||
|
||||
if (sub_080A51F4()) {
|
||||
ptr = &gUnk_080C9C6C[gArea.dungeon_idx];
|
||||
floorMetadata = &gDungeonFloorMetadatas[gArea.dungeon_idx];
|
||||
newChoice = gMenu.field_0x3;
|
||||
switch (gInput.newKeys) {
|
||||
case DPAD_UP:
|
||||
@@ -1103,7 +1103,7 @@ void sub_080A5C9C(void) {
|
||||
}
|
||||
break;
|
||||
case DPAD_DOWN:
|
||||
if (ptr->unk_0 - 1 > newChoice) {
|
||||
if (floorMetadata->numFloors - 1 > newChoice) {
|
||||
newChoice++;
|
||||
}
|
||||
break;
|
||||
@@ -1129,7 +1129,7 @@ void sub_080A5CFC(u32 menuType, void* param_2, u32 param_3) {
|
||||
#endif
|
||||
|
||||
// Actually draw the sprites for the dungeon map.
|
||||
void sub_080A5D1C(void) {
|
||||
void DrawDungeonMapActually(void) {
|
||||
extern u8 gUnk_08128D3C[];
|
||||
u32 bVar1;
|
||||
int frameIndex;
|
||||
@@ -1137,10 +1137,10 @@ void sub_080A5D1C(void) {
|
||||
u32 uVar6;
|
||||
u32 index;
|
||||
u8* puVar8;
|
||||
const struct_080C9C6C* pbVar9;
|
||||
const DungeonFloorMetadata* pbVar9;
|
||||
|
||||
pbVar9 = &gUnk_080C9C6C[gArea.dungeon_idx];
|
||||
bVar1 = gUnk_08128D3C[pbVar9->unk_0];
|
||||
pbVar9 = &gDungeonFloorMetadatas[gArea.dungeon_idx];
|
||||
bVar1 = gUnk_08128D3C[pbVar9->numFloors];
|
||||
uVar4 = sub_0801DB94();
|
||||
gOamCmd._4 = 0x400;
|
||||
gOamCmd._6 = 0;
|
||||
@@ -1171,7 +1171,7 @@ void sub_080A5D1C(void) {
|
||||
if (sub_080A5F24()) {
|
||||
gOamCmd._8 = 0;
|
||||
gOamCmd.x = 0x46;
|
||||
gOamCmd.y = bVar1 + (pbVar9->unk_1 - pbVar9->unk_2) * 0xc;
|
||||
gOamCmd.y = bVar1 + (pbVar9->highestFloor - pbVar9->unk_2) * 0xc;
|
||||
if ((gMain.ticks & 0x20) != 0) {
|
||||
uVar6 = 0x7a;
|
||||
} else {
|
||||
@@ -1183,9 +1183,10 @@ void sub_080A5D1C(void) {
|
||||
gOamCmd._8 = 0;
|
||||
gOamCmd.x = 0x34;
|
||||
gOamCmd.y = bVar1;
|
||||
frameIndex = pbVar9->unk_1 + 0x82;
|
||||
frameIndex = pbVar9->highestFloor + 0x82;
|
||||
|
||||
for (index = 0; index < pbVar9->unk_0; index++) {
|
||||
// Floor number sprites?
|
||||
for (index = 0; index < pbVar9->numFloors; index++) {
|
||||
DrawDirect(DRAW_DIRECT_SPRITE_INDEX, frameIndex);
|
||||
frameIndex--;
|
||||
gOamCmd.y = gOamCmd.y + 0xc;
|
||||
|
||||
@@ -374,6 +374,7 @@ void Bird_Type10(Entity* this) {
|
||||
void CreateBird(Entity* this) {
|
||||
Entity* birdEnt;
|
||||
|
||||
// EU only allows warp from the overworld. This prevents warping from the rooftop of the Wind Tribe's tower.
|
||||
#ifndef EU
|
||||
if (AreaAllowsWarp()) {
|
||||
#else
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ void Bush_Action2SubAction2(BushEntity* this) {
|
||||
if (this->unk_72 == 0) {
|
||||
this->unk_72 = 1;
|
||||
super->spriteOffsetX = 0;
|
||||
sub_0807B9B8(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
|
||||
Bush_Action2SubAction5(this);
|
||||
|
||||
+18
-17
@@ -208,35 +208,36 @@ extern u16 gMapDataTopSpecial[0x2000];
|
||||
extern u16 gMapDataBottomSpecial[];
|
||||
|
||||
void sub_08081E6C(Entity* this) {
|
||||
u32 r4;
|
||||
u32 tileType;
|
||||
LayerStruct* r1;
|
||||
u16* tmp2;
|
||||
u16* tmp;
|
||||
u16* tmp3;
|
||||
u32 r6 = this->field_0x74.HWORD;
|
||||
u32 r5 = this->collisionLayer;
|
||||
u32 tile = GetTileType(r6, r5);
|
||||
u32 tilePosition = this->field_0x74.HWORD;
|
||||
u32 layer = this->collisionLayer;
|
||||
u32 tile = GetTileType(tilePosition, layer);
|
||||
|
||||
if (tile < 0x4000)
|
||||
return;
|
||||
r1 = GetLayerByIndex(r5);
|
||||
r4 = (this->type == 0 ? 0x7a : 0x78);
|
||||
r1 = GetLayerByIndex(layer);
|
||||
tileType = (this->type == 0 ? 0x7a : 0x78);
|
||||
tmp = r1->metatiles;
|
||||
tmp = tmp + (r1->unkData2[r4] << 2);
|
||||
tmp2 = (r5 == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
|
||||
tmp2 += (((0x3f & r6) << 1) + ((0xfc0 & r6) << 2));
|
||||
tmp = tmp + (r1->unkData2[tileType] << 2);
|
||||
tmp2 = (layer == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
|
||||
tmp2 += (((0x3f & tilePosition) << 1) + ((0xfc0 & tilePosition) << 2));
|
||||
if (sub_08081F00((u32*)tmp2, (u32*)tmp))
|
||||
return;
|
||||
SetTileType(r4, r6, r5);
|
||||
SetTile(tile, r6, r5);
|
||||
SetTileType(tileType, tilePosition, layer);
|
||||
SetTile(tile, tilePosition, layer);
|
||||
}
|
||||
|
||||
u32 sub_08081F00(u32* unk1, u32* unk2) {
|
||||
if (*unk1 != *unk2)
|
||||
return 0;
|
||||
if (unk1[0x40] != unk2[1])
|
||||
return 0;
|
||||
return 1;
|
||||
// Are the two tiles already set to the correct one
|
||||
bool32 sub_08081F00(u32* screenblock, u32* metatileList) {
|
||||
if (screenblock[0] != metatileList[0])
|
||||
return FALSE;
|
||||
if (screenblock[0x40] != metatileList[1])
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_08081F24(Entity* this) {
|
||||
|
||||
@@ -340,7 +340,7 @@ bool32 sub_0809A6F8(u32 param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
if (sub_0809A758(param_1, param_2) != 0) {
|
||||
if (gUnk_081238A0[param_3] != 0) {
|
||||
if ((param_4 & 1) != 0) {
|
||||
sub_0807B9B8(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
SetMetaTileByIndex(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
} else {
|
||||
RestorePrevTileEntity((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
}
|
||||
|
||||
@@ -494,9 +494,9 @@ void sub_08090094(PushableFurnitureEntity* this, u32 param_2, u32 tilePos) {
|
||||
}
|
||||
|
||||
void sub_08090254(PushableFurnitureEntity* this) {
|
||||
sub_0807B9B8(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
if (this->unk_80 == 1) {
|
||||
sub_0807B9B8(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,16 +157,16 @@ bool32 sub_0809785C(PushableGraveEntity* this) {
|
||||
super->direction = 0;
|
||||
super->speed = 0x40;
|
||||
tilePosition = this->unk_68;
|
||||
sub_0807B9B8(this->unk_72, tilePosition, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_72, tilePosition, super->collisionLayer);
|
||||
if (super->type2 == 2) {
|
||||
sub_0807B9B8(this->unk_6a, tilePosition - 0x41, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_6c, tilePosition - 0x40, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_6e, tilePosition - 0x3f, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_70, tilePosition - 1, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_74, tilePosition + 1, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_76, tilePosition + 0x3f, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_78, tilePosition + 0x40, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_7a, tilePosition + 0x41, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6a, tilePosition - 0x41, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6c, tilePosition - 0x40, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6e, tilePosition - 0x3f, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_70, tilePosition - 1, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_74, tilePosition + 1, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_76, tilePosition + 0x3f, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_78, tilePosition + 0x40, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_7a, tilePosition + 0x41, super->collisionLayer);
|
||||
}
|
||||
SoundReq(SFX_10F);
|
||||
return TRUE;
|
||||
|
||||
+82
-72
@@ -1,6 +1,7 @@
|
||||
#define NENT_DEPRECATED
|
||||
#include "area.h"
|
||||
#include "asm.h"
|
||||
#include "beanstalkSubtask.h"
|
||||
#include "common.h"
|
||||
#include "collision.h"
|
||||
#include "entity.h"
|
||||
@@ -106,19 +107,17 @@ extern const u16* sub_0806FC50(u32 param_1, u32 param_2);
|
||||
|
||||
bool32 sub_08079F48(u32 param_1, u32 param_2);
|
||||
|
||||
extern void sub_08080B60(LayerStruct*);
|
||||
extern void sub_0801AB08(u16*, LayerStruct*);
|
||||
extern void FillUnkData3ForLayer(LayerStruct*);
|
||||
extern void RenderTilemapToScreenblock(u16*, LayerStruct*);
|
||||
|
||||
extern u8 gUnk_02006F00[];
|
||||
extern u16 gUnk_080B77C0[];
|
||||
|
||||
void sub_0807BFA8(void);
|
||||
void sub_080197D4(const void*);
|
||||
void sub_0807C8B0(u16*, u32, u32);
|
||||
void sub_0807C69C(u8*, u32, u32);
|
||||
void sub_0807C460(void);
|
||||
void sub_0807BBE4(void);
|
||||
void sub_0807BC84(void);
|
||||
void CreateCollisionDataBorderAroundRoom(void);
|
||||
void sub_0807C5F4(u16*, u16*);
|
||||
void sub_0807C5B0(void);
|
||||
|
||||
@@ -127,18 +126,16 @@ extern const u8 gUnk_080B3E80[];
|
||||
// collisions for tiles > 0x4000
|
||||
extern const u8 gUnk_080B79A7[];
|
||||
|
||||
extern void sub_0801AB08(u16*, LayerStruct*);
|
||||
extern void RenderTilemapToScreenblock(u16*, LayerStruct*);
|
||||
|
||||
extern u8 gUnk_02006F00[];
|
||||
extern u16 gUnk_080B77C0[];
|
||||
|
||||
void sub_0807BFA8(void);
|
||||
void sub_080197D4(const void*);
|
||||
void sub_0807C8B0(u16*, u32, u32);
|
||||
void sub_0807C69C(u8*, u32, u32);
|
||||
void sub_0807C460(void);
|
||||
void sub_0807BBE4(void);
|
||||
void sub_0807BC84(void);
|
||||
void CreateCollisionDataBorderAroundRoom(void);
|
||||
void sub_0807C5F4(u16*, u16*);
|
||||
void sub_0807C5B0(void);
|
||||
|
||||
@@ -2906,6 +2903,10 @@ void sub_0807B2F8(PlayerEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// tileType < 0x800 : set the MetaTileType
|
||||
// tileType >= 0x4000 : call SetTile directly
|
||||
// else : restore the previous tile entity
|
||||
void SetTileType(u32 tileType, u32 position, u32 layer) {
|
||||
u8 collisionData;
|
||||
u16 metatile;
|
||||
@@ -2932,7 +2933,8 @@ void SetTileType(u32 tileType, u32 position, u32 layer) {
|
||||
dest = gMapDataTopSpecial + offset;
|
||||
}
|
||||
src = data->metatiles + metatile * 4;
|
||||
*dest = *src;
|
||||
// Copy over the tilemap entries (tile_attrs) to the special map data but in a different order.
|
||||
dest[0] = src[0];
|
||||
dest[1] = src[1];
|
||||
dest[0x80] = src[2];
|
||||
dest[0x81] = src[3];
|
||||
@@ -3126,7 +3128,7 @@ void sub_0807B930(u32 position) {
|
||||
SetTileType(0x292, position + TILE_POS(1, 0), 1);
|
||||
}
|
||||
|
||||
void sub_0807B9B8(u32 tileIndex, u32 position, u32 layer) {
|
||||
void SetMetaTileByIndex(u32 tileIndex, u32 position, u32 layer) {
|
||||
LayerStruct* data;
|
||||
u16* src;
|
||||
u16* dest;
|
||||
@@ -3243,7 +3245,8 @@ void sub_0807BBE4(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0807BC84(void) {
|
||||
// Set collisionData at the room bounds (?) to 0xff?
|
||||
void CreateCollisionDataBorderAroundRoom(void) {
|
||||
s32 height;
|
||||
u32 width;
|
||||
u8* puVar3;
|
||||
@@ -3438,7 +3441,10 @@ ASM_FUNC("asm/non_matching/playerUtils/sub_0807BFD0.inc", void sub_0807BFD0())
|
||||
|
||||
void LoadRoomGfx(void) {
|
||||
RoomControls* roomControls;
|
||||
bool32 tmp;
|
||||
bool32 clearBottomMap; // TODO maybe if it is a 256 bit background?
|
||||
// So the first u16 being 0xffff indicates this and the rest of the background does not matter?
|
||||
// Or is it used anywhere else?
|
||||
// Probaby rather is some sort of different scroll mode where only a small part of the map is used?
|
||||
|
||||
sub_0807BFA8();
|
||||
roomControls = &gRoomControls;
|
||||
@@ -3447,14 +3453,14 @@ void LoadRoomGfx(void) {
|
||||
MemClear(gMapTop.collisionData, sizeof(gMapTop.collisionData));
|
||||
MemClear(&gMapDataBottomSpecial, 0x8000);
|
||||
MemClear(&gMapDataTopSpecial, 0x8000);
|
||||
sub_080197D4((gArea.pCurrentRoomInfo)->map);
|
||||
LoadMapData((gArea.pCurrentRoomInfo)->map);
|
||||
if (gMapBottom.mapData[0] != 0xffff) {
|
||||
sub_0807C8B0(gMapBottom.mapData, roomControls->width >> 4, roomControls->height >> 4);
|
||||
sub_0807C8B0(gMapTop.mapData, roomControls->width >> 4, roomControls->height >> 4);
|
||||
tmp = FALSE;
|
||||
clearBottomMap = FALSE;
|
||||
} else {
|
||||
MemClear(gMapBottom.mapData, sizeof(gMapBottom.mapData));
|
||||
tmp = TRUE;
|
||||
clearBottomMap = TRUE;
|
||||
}
|
||||
if (gRoomTransition.field_0x2c[0] == 0) {
|
||||
MemCopy(gMapBottom.mapData, gMapBottom.mapDataClone, sizeof(gMapBottom.mapData));
|
||||
@@ -3473,48 +3479,52 @@ void LoadRoomGfx(void) {
|
||||
MemCopy(gMapTop.mapDataClone + 0x800, gMapTop.mapData + 0x800, 0x1000);
|
||||
MemCopy(gMapTop.unkData3, gMapTop.mapDataClone + 0x800, 0x1000);
|
||||
}
|
||||
if (!tmp) {
|
||||
if (!clearBottomMap) {
|
||||
sub_0807BBE4();
|
||||
} else {
|
||||
sub_0807C69C(gMapBottom.collisionData, roomControls->width >> 4, roomControls->height >> 4);
|
||||
sub_0807C69C(gMapTop.collisionData, roomControls->width >> 4, roomControls->height >> 4);
|
||||
sub_0807C460();
|
||||
}
|
||||
sub_0807BC84();
|
||||
sub_08080B60(&gMapBottom);
|
||||
sub_08080B60(&gMapTop);
|
||||
if (!tmp) {
|
||||
sub_0801AB08((u16*)&gMapDataBottomSpecial, &gMapBottom);
|
||||
sub_0801AB08((u16*)&gMapDataTopSpecial, &gMapTop);
|
||||
CreateCollisionDataBorderAroundRoom();
|
||||
FillUnkData3ForLayer(&gMapBottom);
|
||||
FillUnkData3ForLayer(&gMapTop);
|
||||
if (!clearBottomMap) {
|
||||
// Render the complete bottom and top metatilemaps into the tilemaps.
|
||||
RenderTilemapToScreenblock((u16*)&gMapDataBottomSpecial, &gMapBottom);
|
||||
RenderTilemapToScreenblock((u16*)&gMapDataTopSpecial, &gMapTop);
|
||||
} else {
|
||||
// Copy first half to second half.
|
||||
// Then copy the room back to the first half?
|
||||
// Then clear the second half.
|
||||
MemCopy(&gMapDataBottomSpecial, &gMapDataBottomSpecial[0x2000], 0x4000); // TODO
|
||||
sub_0807C5F4((u16*)&gMapDataBottomSpecial, &gMapDataBottomSpecial[0x2000]);
|
||||
sub_0807C5F4(gMapDataBottomSpecial, &gMapDataBottomSpecial[0x2000]);
|
||||
MemClear(&gMapDataBottomSpecial[0x2000], 0x4000);
|
||||
MemCopy(&gMapDataTopSpecial, &gMapDataTopSpecial[0x2000], 0x4000);
|
||||
sub_0807C5F4((u16*)&gMapDataTopSpecial, (u16*)&gMapDataTopSpecial[0x2000]);
|
||||
sub_0807C5F4(gMapDataTopSpecial, &gMapDataTopSpecial[0x2000]);
|
||||
MemClear(&gMapDataTopSpecial[0x2000], 0x4000);
|
||||
}
|
||||
if (tmp || roomControls->area == 0x71) {
|
||||
if (clearBottomMap || roomControls->area == AREA_PALACE_OF_WINDS_BOSS) {
|
||||
roomControls->scroll_flags |= 1;
|
||||
}
|
||||
|
||||
switch (roomControls->area) {
|
||||
case 0x20:
|
||||
case 0x2d:
|
||||
case AREA_MINISH_HOUSE_INTERIORS:
|
||||
case AREA_TOWN_MINISH_HOLES:
|
||||
if (gMapBottom.bgSettings != NULL) {
|
||||
gMapBottom.bgSettings->control |= 0x80;
|
||||
}
|
||||
gScreen.lcd.displayControl &= 0xfdff;
|
||||
break;
|
||||
case 0x21:
|
||||
case 0x22:
|
||||
case 0x23:
|
||||
case 0x24:
|
||||
case 0x25:
|
||||
case 0x27:
|
||||
case 0x28:
|
||||
case 0x30:
|
||||
case 0x38:
|
||||
case AREA_HOUSE_INTERIORS_1:
|
||||
case AREA_HOUSE_INTERIORS_2:
|
||||
case AREA_HOUSE_INTERIORS_3:
|
||||
case AREA_TREE_INTERIORS:
|
||||
case AREA_DOJOS:
|
||||
case AREA_MINISH_CRACKS:
|
||||
case AREA_HOUSE_INTERIORS_4:
|
||||
case AREA_WIND_TRIBE_TOWER:
|
||||
case AREA_EZLO_CUTSCENE:
|
||||
if (gMapTop.bgSettings != NULL) {
|
||||
gMapTop.bgSettings->control = gUnk_080B77C0[2];
|
||||
}
|
||||
@@ -3581,7 +3591,7 @@ void sub_0807C4F8(void) {
|
||||
ptr[0] = puVar1[0] & 0x7fffffff;
|
||||
ptr[1] = puVar1[1];
|
||||
ptr[2] = puVar1[2];
|
||||
sub_080197D4(ptr);
|
||||
LoadMapData((MapDataDefinition*)ptr);
|
||||
}
|
||||
} while ((s32)*puVar1 < 0);
|
||||
MemCopy(gMapDataBottomSpecial, gMapDataBottomSpecial + 0x2000, 0x4000);
|
||||
@@ -3620,55 +3630,55 @@ void sub_0807C5B0(void) {
|
||||
roomControls->scroll_flags |= 2;
|
||||
}
|
||||
|
||||
void sub_0807C5F4(u16* param_1, u16* param_2) {
|
||||
s32 iVar1;
|
||||
u16* puVar2;
|
||||
u16* puVar3;
|
||||
u32 uVar4;
|
||||
u32 index;
|
||||
u32 innerIndex;
|
||||
// Copies parts over
|
||||
// 0x20 * 0x20 chunk if gRoomControls.width <= 0xff
|
||||
// more up to 0x40 * 0x40 if the room is bigger
|
||||
void sub_0807C5F4(u16* dest, u16* src) {
|
||||
s32 index1;
|
||||
u32 index2;
|
||||
u16* ptr;
|
||||
|
||||
puVar2 = param_1;
|
||||
for (iVar1 = 0x20; iVar1 != 0; iVar1--) {
|
||||
for (uVar4 = 0; uVar4 < 0x20; uVar4++) {
|
||||
*puVar2 = *param_2;
|
||||
param_2++;
|
||||
puVar2++;
|
||||
ptr = dest;
|
||||
for (index1 = 0x20; index1 != 0; index1--) {
|
||||
for (index2 = 0; index2 < 0x20; index2++) {
|
||||
*ptr = *src;
|
||||
src++;
|
||||
ptr++;
|
||||
}
|
||||
puVar2 += 0x60;
|
||||
ptr += 0x60;
|
||||
}
|
||||
|
||||
if (gRoomControls.width > 0xff) {
|
||||
puVar2 = param_1 + 0x20;
|
||||
for (iVar1 = 0x20; iVar1 != 0; iVar1--) {
|
||||
for (uVar4 = 0; uVar4 < 0x20; uVar4++) {
|
||||
*puVar2 = *param_2;
|
||||
param_2++;
|
||||
puVar2++;
|
||||
ptr = dest + 0x20;
|
||||
for (index1 = 0x20; index1 != 0; index1--) {
|
||||
for (index2 = 0; index2 < 0x20; index2++) {
|
||||
*ptr = *src;
|
||||
src++;
|
||||
ptr++;
|
||||
}
|
||||
puVar2 += 0x60;
|
||||
ptr += 0x60;
|
||||
}
|
||||
}
|
||||
if (gRoomControls.height > 0xff) {
|
||||
puVar2 = param_1 + 0x1000;
|
||||
for (iVar1 = 0x20; iVar1 != 0; iVar1--) {
|
||||
for (uVar4 = 0; uVar4 < 0x20; uVar4++) {
|
||||
*puVar2 = *param_2;
|
||||
param_2++;
|
||||
puVar2++;
|
||||
ptr = dest + 0x1000;
|
||||
for (index1 = 0x20; index1 != 0; index1--) {
|
||||
for (index2 = 0; index2 < 0x20; index2++) {
|
||||
*ptr = *src;
|
||||
src++;
|
||||
ptr++;
|
||||
}
|
||||
puVar2 += 0x60;
|
||||
ptr += 0x60;
|
||||
}
|
||||
}
|
||||
if (gRoomControls.width > 0xff && gRoomControls.height > 0xff) {
|
||||
param_1 += 0x1020;
|
||||
puVar2 = param_1;
|
||||
dest += 0x1020;
|
||||
ptr = dest;
|
||||
|
||||
for (iVar1 = 0x20; iVar1 != 0; iVar1--) {
|
||||
for (uVar4 = 0; uVar4 < 0x20; uVar4++) {
|
||||
*puVar2++ = *param_2++;
|
||||
for (index1 = 0x20; index1 != 0; index1--) {
|
||||
for (index2 = 0; index2 < 0x20; index2++) {
|
||||
*ptr++ = *src++;
|
||||
}
|
||||
puVar2 += 0x60;
|
||||
ptr += 0x60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -118,7 +118,7 @@ u32 sub_unk3_ArmosInteriors_FortressOfWindsLeft(void) {
|
||||
void sub_StateChange_ArmosInteriors_FortressOfWindsLeft(void) {
|
||||
sub_08030118(9);
|
||||
gArea.dungeon_idx = 3;
|
||||
gArea.areaMetadata = 0x4e;
|
||||
gArea.areaMetadata = AR_HAS_NO_ENEMIES | AR_HAS_MAP | AR_IS_DUNGEON | AR_HAS_KEYS;
|
||||
}
|
||||
|
||||
u32 sub_unk3_ArmosInteriors_FortressOfWindsRight(void) {
|
||||
@@ -128,7 +128,7 @@ u32 sub_unk3_ArmosInteriors_FortressOfWindsRight(void) {
|
||||
void sub_StateChange_ArmosInteriors_FortressOfWindsRight(void) {
|
||||
sub_08030118(10);
|
||||
gArea.dungeon_idx = 3;
|
||||
gArea.areaMetadata = 0x4e;
|
||||
gArea.areaMetadata = AR_HAS_NO_ENEMIES | AR_HAS_MAP | AR_IS_DUNGEON | AR_HAS_KEYS;
|
||||
}
|
||||
|
||||
u32 sub_unk3_CrenelMinishPaths_CrenelBean(void) {
|
||||
@@ -1065,7 +1065,7 @@ u32 sub_unk3_RoyalValley_ForestMaze(void) {
|
||||
}
|
||||
|
||||
void sub_StateChange_RoyalValley_ForestMaze(void) {
|
||||
gArea.areaMetadata |= 0x40;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES;
|
||||
gArea.unk_0c_0 = 1;
|
||||
sub_0804C128();
|
||||
}
|
||||
@@ -2341,7 +2341,7 @@ u32 sub_unk3_DeepwoodShrine_InsideBarrel(void) {
|
||||
|
||||
void sub_StateChange_DeepwoodShrine_InsideBarrel(void) {
|
||||
sub_08058D34();
|
||||
gArea.areaMetadata |= 0x40;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES;
|
||||
gMain.substate = GAMEMAIN_BARRELUPDATE;
|
||||
}
|
||||
|
||||
@@ -3681,7 +3681,7 @@ extern EntityData gUnk_080EAEC0;
|
||||
extern EntityData gUnk_080EAF20;
|
||||
|
||||
void sub_StateChange_DarkHyruleCastleOutside_Garden(void) {
|
||||
gArea.areaMetadata = 0x40;
|
||||
gArea.areaMetadata = AR_HAS_NO_ENEMIES;
|
||||
gArea.locationIndex = 0;
|
||||
if (CheckGlobalFlag(ENDING)) {
|
||||
if (!CheckLocalFlag(0x7f)) {
|
||||
@@ -5131,7 +5131,7 @@ void sub_StateChange_VeilFallsDigCave_Main(void) {
|
||||
}
|
||||
|
||||
u32 sub_unk3_OuterFortressOfWinds_EntranceHall(void) {
|
||||
gArea.areaMetadata |= 0x48;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES | AR_HAS_MAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5139,7 +5139,7 @@ void sub_StateChange_OuterFortressOfWinds_EntranceHall(void) {
|
||||
}
|
||||
|
||||
u32 sub_unk3_OuterFortressOfWinds_2F(void) {
|
||||
gArea.areaMetadata |= 0x48;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES | AR_HAS_MAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5147,7 +5147,7 @@ void sub_StateChange_OuterFortressOfWinds_2F(void) {
|
||||
}
|
||||
|
||||
u32 sub_unk3_OuterFortressOfWinds_3F(void) {
|
||||
gArea.areaMetadata |= 0x48;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES | AR_HAS_MAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5156,7 +5156,7 @@ void sub_StateChange_OuterFortressOfWinds_3F(void) {
|
||||
|
||||
u32 sub_unk3_OuterFortressOfWinds_MoleMitts(void) {
|
||||
sub_0801DD58(0x58, 5);
|
||||
gArea.areaMetadata |= 0x48;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES | AR_HAS_MAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5165,7 +5165,7 @@ void sub_StateChange_OuterFortressOfWinds_MoleMitts(void) {
|
||||
|
||||
u32 sub_unk3_OuterFortressOfWinds_SmallKey(void) {
|
||||
sub_0801DD58(0x58, 6);
|
||||
gArea.areaMetadata |= 0x48;
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES | AR_HAS_MAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5549,7 +5549,7 @@ void sub_StateChange_WindTribeTowerRoof_Main(void) {
|
||||
}
|
||||
SetWorldMapPos(8, 0, 0x1e8, 0x158);
|
||||
#ifndef EU
|
||||
gArea.areaMetadata |= 0x80;
|
||||
gArea.areaMetadata |= AR_ALLOWS_WARP;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+24
-23
@@ -1,6 +1,7 @@
|
||||
#include "scroll.h"
|
||||
|
||||
#include "asm.h"
|
||||
#include "beanstalkSubtask.h"
|
||||
#include "collision.h"
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
@@ -16,13 +17,12 @@
|
||||
#include "structures.h"
|
||||
|
||||
extern void sub_08080BC4(void);
|
||||
extern void sub_080197D4(const void*);
|
||||
extern void sub_0807C8B0(u16*, u32, u32);
|
||||
extern void sub_0801AB08(u8*, LayerStruct*);
|
||||
extern void RenderTilemapToScreenblock(u8*, LayerStruct*);
|
||||
extern void sub_0807C810();
|
||||
extern void DeleteSleepingEntities(void);
|
||||
extern void sub_0807BBE4();
|
||||
extern void sub_0807BC84();
|
||||
extern void CreateCollisionDataBorderAroundRoom();
|
||||
extern void sub_0805E248();
|
||||
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
@@ -52,9 +52,9 @@ void sub_08080198(RoomControls*);
|
||||
void sub_080801BC(RoomControls*);
|
||||
u32 sub_080803D0();
|
||||
u32 sub_08080278();
|
||||
void sub_08080C80(u32*);
|
||||
void sub_08080C80(MapDataDefinition*);
|
||||
void sub_08080368();
|
||||
void sub_08080B60(LayerStruct*);
|
||||
void FillUnkData3ForLayer(LayerStruct*);
|
||||
bool32 sub_08080794(const Transition* transition, u32 param_2, u32 param_3, u32 param_4);
|
||||
bool32 sub_08080808(const Transition* transition, u32 param_2, u32 param_3, u32 param_4);
|
||||
void sub_080808D8(s32);
|
||||
@@ -301,9 +301,9 @@ void sub_0807FFE4(RoomControls* controls) {
|
||||
controls->scrollSubAction = 2;
|
||||
controls->unk_18 = sub_080803D0() + 6;
|
||||
gUnk_0200B640 = sub_08080278();
|
||||
sub_080197D4(*gUnk_08109194[gDiggingCaveEntranceTransition.entrance->type]);
|
||||
LoadMapData((MapDataDefinition*)*gUnk_08109194[gDiggingCaveEntranceTransition.entrance->type]);
|
||||
sub_0807C8B0(gMapTop.mapData, controls->width >> 4, controls->height >> 4);
|
||||
sub_0801AB08(gMapDataTopSpecial, &gMapTop);
|
||||
RenderTilemapToScreenblock(gMapDataTopSpecial, &gMapTop);
|
||||
}
|
||||
|
||||
void sub_08080040(RoomControls* controls) {
|
||||
@@ -342,7 +342,7 @@ void sub_08080040(RoomControls* controls) {
|
||||
controls->scrollSubAction = 3;
|
||||
DeleteSleepingEntities();
|
||||
sub_0807C810();
|
||||
sub_08080C80(*(gUnk_08109194[gDiggingCaveEntranceTransition.entrance->type] + 1));
|
||||
sub_08080C80((MapDataDefinition*)*(gUnk_08109194[gDiggingCaveEntranceTransition.entrance->type] + 1));
|
||||
} else {
|
||||
gUpdateVisibleTiles = 4;
|
||||
}
|
||||
@@ -355,13 +355,13 @@ void sub_08080108(RoomControls* controls) {
|
||||
sub_08080368();
|
||||
gUnk_02034480.unk_00 = gUnk_0200B640;
|
||||
MemCopy(gUnk_02022830, gUnk_020246B0, 0x1800);
|
||||
sub_08080B60(&gMapBottom);
|
||||
sub_08080B60(&gMapTop);
|
||||
FillUnkData3ForLayer(&gMapBottom);
|
||||
FillUnkData3ForLayer(&gMapTop);
|
||||
sub_0807BBE4();
|
||||
sub_0807BC84();
|
||||
CreateCollisionDataBorderAroundRoom();
|
||||
sub_0805E248();
|
||||
sub_0801AB08((u8*)&gMapDataBottomSpecial, &gMapBottom);
|
||||
sub_0801AB08(gMapDataTopSpecial, &gMapTop);
|
||||
RenderTilemapToScreenblock((u8*)&gMapDataBottomSpecial, &gMapBottom);
|
||||
RenderTilemapToScreenblock(gMapDataTopSpecial, &gMapTop);
|
||||
}
|
||||
|
||||
void sub_08080198(RoomControls* controls) {
|
||||
@@ -433,7 +433,7 @@ void sub_08080368(void) {
|
||||
tmp = gUnk_02034480.unk_00 << 1;
|
||||
index = 0;
|
||||
while (index < tmp) {
|
||||
sub_0807B9B8(ptr[1], ptr[0] & 0xfff, (ptr[0] >> 0xe));
|
||||
SetMetaTileByIndex(ptr[1], ptr[0] & 0xfff, (ptr[0] >> 0xe));
|
||||
ptr += 2;
|
||||
index += 2;
|
||||
}
|
||||
@@ -637,8 +637,8 @@ void sub_08080930(u32 unused) {
|
||||
SetInitializationPriority();
|
||||
}
|
||||
|
||||
LayerStruct* GetLayerByIndex(u32 param_1) {
|
||||
if (param_1 == 2) {
|
||||
LayerStruct* GetLayerByIndex(u32 layerIndex) {
|
||||
if (layerIndex == 2) {
|
||||
return &gMapTop;
|
||||
} else {
|
||||
return &gMapBottom;
|
||||
@@ -755,18 +755,19 @@ void UpdateDoorTransition() {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08080B60(LayerStruct* layer) {
|
||||
// fill the unkData3 for the whole layer
|
||||
void FillUnkData3ForLayer(LayerStruct* layer) {
|
||||
u32 index;
|
||||
u16* metatileTypes = layer->metatileTypes;
|
||||
const u8* ptr = gUnk_080B37A0;
|
||||
u8* ptr3 = layer->unkData3;
|
||||
u16* mapData = layer->mapData;
|
||||
for (index = 0; index < 0x1000; index++) {
|
||||
u16 val = mapData[index];
|
||||
if (val < 0x4000) {
|
||||
layer->unkData3[index] = ptr[metatileTypes[val]];
|
||||
u16 metaTileIndex = mapData[index];
|
||||
if (metaTileIndex < 0x4000) {
|
||||
layer->unkData3[index] = ptr[metatileTypes[metaTileIndex]];
|
||||
} else {
|
||||
layer->unkData3[index] = gUnk_080B7910[val - 0x4000];
|
||||
layer->unkData3[index] = gUnk_080B7910[metaTileIndex - 0x4000];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,8 +806,8 @@ void sub_08080BC4(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08080C80(u32* param_1) {
|
||||
sub_080197D4(param_1);
|
||||
void sub_08080C80(MapDataDefinition* param_1) {
|
||||
LoadMapData(param_1);
|
||||
sub_0807C8B0(gMapBottom.mapData, gRoomControls.width >> 4, gRoomControls.height >> 4);
|
||||
sub_0807C8B0(gMapTop.mapData, gRoomControls.width >> 4, gRoomControls.height >> 4);
|
||||
}
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ void MenuFadeIn(u32 param_1, u32 param_2) {
|
||||
gUI.field_0x5 = param_2;
|
||||
gUI.nextToLoad = 1; // Subtask_Init
|
||||
}
|
||||
gUI.field_0x6 = 0;
|
||||
gUI.loadGfxOnRestore = FALSE;
|
||||
gUI.fadeType = -1;
|
||||
gUI.fadeInTime = 0x20;
|
||||
gMain.substate = GAMEMAIN_SUBTASK;
|
||||
@@ -256,7 +256,7 @@ void Subtask_FadeOut(void) {
|
||||
MemCopy(&gUnk_03001020, &gScreen, sizeof(Screen));
|
||||
gArea.localFlagOffset = GetFlagBankOffset(gRoomControls.area);
|
||||
gArea.pCurrentRoomInfo = GetCurrentRoomInfo();
|
||||
RestoreGameTask(gUI.field_0x6);
|
||||
RestoreGameTask(gUI.loadGfxOnRestore);
|
||||
sub_0801D000(gUI.unk_d != 0);
|
||||
sub_080A74F4();
|
||||
if (gUI.fadeType != 0xffff) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ class BaseAsset {
|
||||
}
|
||||
|
||||
// Returns the base of the filename of the asset.
|
||||
[[nodiscard]] std::string getSymbol() const {
|
||||
[[nodiscard]] virtual std::string getSymbol() const {
|
||||
// Need to get the stem twice to remove both of the .4bpp.lz extensions.
|
||||
return (path.stem()).stem();
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
#include "dungeonmap.h"
|
||||
#include "util.h"
|
||||
#include <fmt/format.h>
|
||||
#include <fstream>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <util/file.h>
|
||||
|
||||
std::filesystem::path DungeonMapAsset::generateAssetPath() {
|
||||
std::filesystem::path txtPath = path;
|
||||
txtPath.replace_extension(".txt");
|
||||
return txtPath;
|
||||
}
|
||||
|
||||
void DungeonMapAsset::convertToHumanReadable(const std::vector<char>& baserom) {
|
||||
(void)baserom;
|
||||
const char characters[] = {' ', '#', '.', '-'};
|
||||
|
||||
std::ifstream file(path.string(), std::ios::binary | std::ios::ate);
|
||||
auto fileSize = file.tellg();
|
||||
file.seekg(0, std::ios::beg);
|
||||
|
||||
std::vector<char> data(static_cast<size_t>(fileSize));
|
||||
if (!file.read(data.data(), fileSize)) {
|
||||
fmt::print(stderr, "Can not read dungeon map {}\n", path.string());
|
||||
std::exit(1);
|
||||
}
|
||||
file.close();
|
||||
|
||||
auto output_file = util::open_file(assetPath, "w");
|
||||
|
||||
size_t width = asset["options"]["width"];
|
||||
width *= 4;
|
||||
size_t height = asset["options"]["height"];
|
||||
size_t bytesPerRow = (width + 3) / 4;
|
||||
|
||||
for (size_t y = 0; y < height; y++) {
|
||||
for (size_t x = 0; x < width; x +=4) {
|
||||
size_t offset = y * bytesPerRow + x / 4;
|
||||
char byte = data[offset];
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
int color = (byte >> (6 - i*2)) & 3;
|
||||
std::fputc(characters[color], output_file.get());
|
||||
}
|
||||
}
|
||||
std::fputc('\n', output_file.get());
|
||||
}
|
||||
}
|
||||
|
||||
void DungeonMapAsset::buildToBinary() {
|
||||
std::ifstream file(assetPath.string(), std::ios::binary | std::ios::ate);
|
||||
auto fileSize = file.tellg();
|
||||
file.seekg(0, std::ios::beg);
|
||||
|
||||
std::vector<char> data(static_cast<size_t>(fileSize));
|
||||
if (!file.read(data.data(), fileSize)) {
|
||||
fmt::print(stderr, "Can not read dungeon map {}\n", assetPath.string());
|
||||
std::exit(1);
|
||||
}
|
||||
file.close();
|
||||
|
||||
auto output_file = util::open_file(buildPath, "w");
|
||||
char byte = 0;
|
||||
size_t pixels = 0;
|
||||
for (size_t i = 0; i < static_cast<size_t>(fileSize); i++) {
|
||||
switch (data[i]) {
|
||||
case '\n':
|
||||
continue;
|
||||
case ' ':
|
||||
byte <<= 2;
|
||||
pixels++;
|
||||
break;
|
||||
case '#':
|
||||
byte <<= 2;
|
||||
byte |= 1;
|
||||
pixels++;
|
||||
break;
|
||||
case '.':
|
||||
byte <<= 2;
|
||||
byte |= 2;
|
||||
pixels++;
|
||||
break;
|
||||
case '-':
|
||||
byte <<= 2;
|
||||
byte |= 3;
|
||||
pixels++;
|
||||
break;
|
||||
default:
|
||||
fmt::print(stderr, "Unexpected character {}\n", data[i]);
|
||||
std::exit(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (pixels % 4 == 0) {
|
||||
std::fputc(byte, output_file.get());
|
||||
byte = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Pad to two bytes.
|
||||
while ((pixels / 4) % 4 != 0) {
|
||||
std::fputc(0, output_file.get());
|
||||
pixels += 4;
|
||||
}
|
||||
}
|
||||
|
||||
std::string DungeonMapAsset::getSymbol() const {
|
||||
return asset["name"];
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#ifndef DUNGEONMAP_H
|
||||
#define DUNGEONMAP_H
|
||||
|
||||
#include "asset.h"
|
||||
|
||||
class DungeonMapAsset : public BaseAsset {
|
||||
public:
|
||||
using BaseAsset::BaseAsset;
|
||||
virtual void convertToHumanReadable(const std::vector<char>& baserom);
|
||||
virtual void buildToBinary();
|
||||
virtual std::string getSymbol() const;
|
||||
|
||||
private:
|
||||
virtual std::filesystem::path generateAssetPath();
|
||||
};
|
||||
|
||||
#endif // DUNGEONMAP_H
|
||||
+1
@@ -56,6 +56,7 @@ void GfxAsset::buildToBinary() {
|
||||
check_call(cmd);
|
||||
|
||||
if (isCompressed()) {
|
||||
cmd.clear();
|
||||
// Compress.
|
||||
cmd.push_back(toolsPath / "bin" / "gbagfx");
|
||||
cmd.push_back(decompressedPath);
|
||||
|
||||
@@ -53,6 +53,7 @@ void TilesetAsset::buildToBinary() {
|
||||
|
||||
if (isCompressed()) {
|
||||
// Compress.
|
||||
cmd.clear();
|
||||
cmd.push_back(toolsPath / "bin" / "gbagfx");
|
||||
cmd.push_back(decompressedPath);
|
||||
cmd.push_back(path);
|
||||
|
||||
Vendored
+4
-1
@@ -1,6 +1,7 @@
|
||||
#include "main.h"
|
||||
#include "assets/aif.h"
|
||||
#include "assets/animation.h"
|
||||
#include "assets/dungeonmap.h"
|
||||
#include "assets/frameobjlists.h"
|
||||
#include "assets/gfx.h"
|
||||
#include "assets/map.h"
|
||||
@@ -284,6 +285,8 @@ std::unique_ptr<BaseAsset> getAssetHandlerByType(const std::filesystem::path& pa
|
||||
type == "map_mapping1" || type == "map_mapping2" || type == "tileset_mapping3" ||
|
||||
type == "map_collision") {
|
||||
assetHandler = std::make_unique<MapAsset>(path, start, size, asset);
|
||||
} else if (type == "dungeon_map") {
|
||||
assetHandler = std::make_unique<DungeonMapAsset>(path, start, size, asset);
|
||||
} else if (type == "unknown") {
|
||||
// TODO implement conversions
|
||||
assetHandler = std::make_unique<BaseAsset>(path, start, size, asset);
|
||||
@@ -291,7 +294,7 @@ std::unique_ptr<BaseAsset> getAssetHandlerByType(const std::filesystem::path& pa
|
||||
// Unknown binary asset
|
||||
assetHandler = std::make_unique<BaseAsset>(path, start, size, asset);
|
||||
} else {
|
||||
fmt::print(stderr, "Error: Unimplemented asset type \"{}\"", type);
|
||||
fmt::print(stderr, "Error: Unimplemented asset type \"{}\"\n", type);
|
||||
std::exit(1);
|
||||
}
|
||||
assetHandler->setup();
|
||||
|
||||
Reference in New Issue
Block a user