diff --git a/assets/xml/objects/gameplay_dangeon_keep.xml b/assets/xml/objects/gameplay_dangeon_keep.xml
index 7e4d2d201..123aebdd1 100644
--- a/assets/xml/objects/gameplay_dangeon_keep.xml
+++ b/assets/xml/objects/gameplay_dangeon_keep.xml
@@ -4,8 +4,12 @@
-
-
+
+
+
+
+
+
diff --git a/include/z64map.h b/include/z64map.h
index d9b7ac4df..7ee0ded56 100644
--- a/include/z64map.h
+++ b/include/z64map.h
@@ -17,13 +17,13 @@
typedef struct {
/* 0x00 */ TexturePtr lmapTex; //minimap texture
- /* 0x04 */ u8 unk4;
- /* 0x05 */ u8 unk5;
+ /* 0x04 */ u8 width;
+ /* 0x05 */ u8 height;
/* 0x06 */ u8 unk6;
/* 0x07 */ u8 unk7;
/* 0x08 */ u8 unk8;
/* 0x09 */ u8 unk9;
- /* 0x0A */ s16 unkA;
+ /* 0x0A */ s16 scale;
} T_801BED4C; // size 0x0C
typedef struct {
@@ -102,10 +102,12 @@ s16 func_80109F78(s32);
s32 func_80109BA0(s32);
s32 func_80109714(s32);
s32 MapData_GetMapSize(s32);
+void func_801098A0(s32, s32*);
+s32 func_80109908(s32);
s32 func_80109A98(s32);
s32 func_80109AD8(s32);
s32 func_801096D4(s32 arg0);
-void func_80109754(s32 arg0, s32 *arg1, s32 *arg2);
+void MapData_GetMapTexDim(s32 arg0, s32 *arg1, s32 *arg2);
void func_801097C8(s32 arg0, s32* arg1, s32* arg2);
void MapData_GetMapScale(s32 mapId, s32 *scale);
void func_80109D40(s32, s32*, s32*);
diff --git a/src/code/z_map_data.c b/src/code/z_map_data.c
index b61f1438e..67dbe6d31 100644
--- a/src/code/z_map_data.c
+++ b/src/code/z_map_data.c
@@ -7,94 +7,69 @@ static Color_RGBA8 D_801BED40[3] = {
{ 100, 255, 255, 255 },
};
static T_801BED4C D_801BED4C[5] = {
- { 0x050022C8, 0x60, 0x55, 0x30, 0x2A, 0x00, 0x00, 20 }, { 0x050042C8, 0x60, 0x55, 0x30, 0x3E, 0x00, 0x00, 20 },
- { 0x050052C8, 0x60, 0x55, 0x44, 0x2A, 0x00, 0x00, 20 }, { 0x050032C8, 0x60, 0x55, 0x30, 0x3E, 0x00, 0x00, 20 },
- { 0x050062C8, 0x60, 0x55, 0x44, 0x3E, 0x00, 0x00, 20 },
+ { 0x050022C8, 96, 85, 48, 42, 0x00, 0x00, 20 }, { 0x050042C8, 96, 85, 48, 62, 0x00, 0x00, 20 },
+ { 0x050052C8, 96, 85, 68, 42, 0x00, 0x00, 20 }, { 0x050032C8, 96, 85, 48, 62, 0x00, 0x00, 20 },
+ { 0x050062C8, 96, 85, 68, 62, 0x00, 0x00, 20 },
};
static T_801BF170 D_801BED88[98] = {
- { 0x60, 0x55, 48, 42, 0x00, 0x00, 20 }, { 0x60, 0x55, 48, 62, 0x00, 0x00, 20 },
- { 0x60, 0x55, 68, 42, 0x00, 0x00, 20 }, { 0x60, 0x55, 48, 62, 0x00, 0x00, 20 },
- { 0x60, 0x55, 68, 62, 0x00, 0x00, 20 }, { 0x50, 0x48, 40, 35, 0x01, 0x01, 52 },
- { 0x60, 0x55, 49, 43, 0x03, 0x02, 20 }, { 0x60, 0x55, 49, 43, 0x03, 0x02, 20 },
- { 0x60, 0x55, 49, 43, 0x03, 0x02, 20 }, { 0x60, 0x55, 49, 49, 0x03, 0x02, 20 },
- { 0x30, 0x2C, 25, 23, 0x03, 0x02, 20 }, { 0x60, 0x55, 49, 43, 0x03, 0x02, 20 },
- { 0x30, 0x2E, 25, 24, 0x03, 0x02, 20 }, { 0x40, 0x3D, 32, 31, 0x03, 0x02, 20 },
- { 0x60, 0x55, 49, 50, 0x03, 0x02, 20 }, { 0x60, 0x55, 49, 62, 0x03, 0x02, 20 },
- { 0x60, 0x55, 49, 43, 0x03, 0x02, 20 }, { 0x30, 0x50, 21, 41, 0x01, 0x01, 198 },
- { 0x20, 0x80, 17, 87, 0x01, 0x01, 138 }, { 0x50, 0x35, 40, 27, 0x01, 0x01, 54 },
- { 0x20, 0x51, 16, 15, 0x03, 0x02, 20 }, { 0x50, 0x2D, 35, 23, 0x03, 0x02, 20 },
- { 0x40, 0x57, 36, 44, 0x03, 0x02, 20 }, { 0x40, 0x33, 31, 23, 0x03, 0x02, 20 },
- { 0x50, 0x4F, 40, 40, 0x03, 0x02, 20 }, { 0x60, 0x4B, 36, 26, 0x03, 0x02, 20 },
- { 0x30, 0x29, 24, 20, 0x03, 0x02, 20 }, { 0x40, 0x2D, 31, 20, 0x03, 0x02, 20 },
- { 0x50, 0x34, 38, 28, 0x03, 0x02, 20 }, { 0x30, 0x2D, 23, 20, 0x03, 0x02, 20 },
- { 0x30, 0x3B, 25, 37, 0x03, 0x02, 20 }, { 0x30, 0x3C, 21, 38, 0x03, 0x02, 20 },
- { 0x30, 0x51, 24, 40, 0x03, 0x02, 20 }, { 0x30, 0x51, 24, 40, 0x03, 0x02, 20 },
- { 0x50, 0x59, 41, 26, 0x03, 0x02, 20 }, { 0x50, 0x35, 39, 26, 0x03, 0x02, 20 },
- { 0x40, 0x4E, 37, 36, 0x03, 0x02, 20 }, { 0x40, 0x44, 33, 33, 0x03, 0x02, 20 },
- { 0x30, 0x44, 23, 35, 0x03, 0x02, 20 }, { 0x30, 0x24, 25, 17, 0x03, 0x02, 20 },
- { 0x30, 0x19, 24, 12, 0x03, 0x02, 20 }, { 0x40, 0x4B, 24, 37, 0x03, 0x02, 20 },
- { 0x20, 0x35, 17, 26, 0x03, 0x02, 20 }, { 0x50, 0x3E, 35, 27, 0x01, 0x01, 105 },
- { 0x40, 0x4C, 31, 31, 0x01, 0x01, 133 }, { 0x60, 0x55, 47, 43, 0x03, 0x02, 20 },
- { 0x50, 0x47, 48, 33, 0x01, 0x01, 180 }, { 0x50, 0x57, 44, 44, 0x01, 0x01, 72 },
- { 0x40, 0x41, 31, 36, 0x01, 0x01, 57 }, { 0x30, 0x29, 28, 20, 0x01, 0x01, 60 },
- { 0x40, 0x4C, 17, 36, 0x01, 0x01, 58 }, { 0x50, 0x3C, 27, 22, 0x01, 0x01, 83 },
- { 0x50, 0x2F, 38, 23, 0x01, 0x01, 69 }, { 0x50, 0x3C, 40, 38, 0x01, 0x01, 29 },
- { 0x30, 0x13, 17, 8, 0x01, 0x01, 25 }, { 0x20, 0x63, 17, 16, 0x01, 0x01, 88 },
- { 0x30, 0x45, 19, 28, 0x01, 0x01, 76 }, { 0x30, 0x53, 34, 47, 0x01, 0x01, 104 },
- { 0x50, 0x36, 45, 27, 0x01, 0x01, 61 }, { 0x50, 0x5C, 35, 50, 0x01, 0x01, 60 },
- { 0x30, 0x4B, 24, 37, 0x03, 0x02, 20 }, { 0x40, 0x31, 32, 23, 0x03, 0x02, 20 },
- { 0x40, 0x31, 25, 24, 0x03, 0x02, 20 }, { 0x40, 0x34, 32, 24, 0x03, 0x02, 34 },
- { 0x40, 0x31, 31, 24, 0x03, 0x02, 34 }, { 0x20, 0x21, 18, 14, 0x03, 0x02, 34 },
- { 0x30, 0x32, 25, 25, 0x03, 0x02, 34 }, { 0x40, 0x34, 32, 25, 0x03, 0x02, 34 },
- { 0x30, 0x23, 24, 18, 0x03, 0x02, 34 }, { 0x40, 0x33, 32, 26, 0x03, 0x02, 34 },
- { 0x30, 0x23, 24, 18, 0x03, 0x02, 34 }, { 0x30, 0x35, 24, 28, 0x03, 0x02, 34 },
- { 0x40, 0x35, 33, 25, 0x03, 0x02, 34 }, { 0x40, 0x2F, 31, 24, 0x03, 0x02, 34 },
- { 0x40, 0x34, 32, 35, 0x03, 0x02, 34 }, { 0x30, 0x30, 24, 23, 0x03, 0x02, 34 },
- { 0x40, 0x57, 32, 26, 0x03, 0x02, 34 }, { 0x30, 0x1E, 24, 14, 0x03, 0x02, 34 },
- { 0x50, 0x4A, 40, 36, 0x01, 0x01, 50 }, { 0x50, 0x57, 6, 41, 0x01, 0x01, 42 },
- { 0x50, 0x38, 19, 27, 0x01, 0x01, 40 }, { 0x50, 0x41, 25, 33, 0x01, 0x01, 40 },
- { 0x10, 0x26, 8, 12, 0x01, 0x01, 47 }, { 0x50, 0x4E, 46, 33, 0x01, 0x01, 142 },
- { 0x50, 0x37, 32, 29, 0x01, 0x01, 155 }, { 0x50, 0x62, 67, 48, 0x01, 0x01, 51 },
- { 0x50, 0x3E, 47, 19, 0x01, 0x01, 55 }, { 0x20, 0x7B, 15, 83, 0x01, 0x01, 140 },
- { 0x50, 0x3C, 47, 14, 0x01, 0x01, 170 }, { 0x30, 0x4D, 18, 59, 0x01, 0x01, 79 },
- { 0x50, 0x40, 35, 30, 0x01, 0x01, 33 }, { 0x40, 0x32, 29, 22, 0x01, 0x01, 40 },
- { 0x50, 0x41, 39, 5, 0x01, 0x01, 37 }, { 0x20, 0x3D, 8, 56, 0x01, 0x01, 35 },
- { 0x50, 0x53, 37, 42, 0x01, 0x01, 95 }, { 0x50, 0x1B, 30, 21, 0x01, 0x01, 134 },
- { 0x50, 0x17, 122, -18, 0x01, 0x01, 53 }, { 0x50, 0x3C, 27, 22, 0x01, 0x01, 83 },
+ { 96, 85, 48, 42, 0x00, 0x00, 20 }, { 96, 85, 48, 62, 0x00, 0x00, 20 }, { 96, 85, 68, 42, 0x00, 0x00, 20 },
+ { 96, 85, 48, 62, 0x00, 0x00, 20 }, { 96, 85, 68, 62, 0x00, 0x00, 20 }, { 80, 72, 40, 35, 0x01, 0x01, 52 },
+ { 96, 85, 49, 43, 0x03, 0x02, 20 }, { 96, 85, 49, 43, 0x03, 0x02, 20 }, { 96, 85, 49, 43, 0x03, 0x02, 20 },
+ { 96, 85, 49, 49, 0x03, 0x02, 20 }, { 48, 44, 25, 23, 0x03, 0x02, 20 }, { 96, 85, 49, 43, 0x03, 0x02, 20 },
+ { 48, 46, 25, 24, 0x03, 0x02, 20 }, { 64, 61, 32, 31, 0x03, 0x02, 20 }, { 96, 85, 49, 50, 0x03, 0x02, 20 },
+ { 96, 85, 49, 62, 0x03, 0x02, 20 }, { 96, 85, 49, 43, 0x03, 0x02, 20 }, { 48, 80, 21, 41, 0x01, 0x01, 198 },
+ { 32, 128, 17, 87, 0x01, 0x01, 138 }, { 80, 53, 40, 27, 0x01, 0x01, 54 }, { 32, 81, 16, 15, 0x03, 0x02, 20 },
+ { 80, 45, 35, 23, 0x03, 0x02, 20 }, { 64, 87, 36, 44, 0x03, 0x02, 20 }, { 64, 51, 31, 23, 0x03, 0x02, 20 },
+ { 80, 79, 40, 40, 0x03, 0x02, 20 }, { 96, 75, 36, 26, 0x03, 0x02, 20 }, { 48, 41, 24, 20, 0x03, 0x02, 20 },
+ { 64, 45, 31, 20, 0x03, 0x02, 20 }, { 80, 52, 38, 28, 0x03, 0x02, 20 }, { 48, 45, 23, 20, 0x03, 0x02, 20 },
+ { 48, 59, 25, 37, 0x03, 0x02, 20 }, { 48, 60, 21, 38, 0x03, 0x02, 20 }, { 48, 81, 24, 40, 0x03, 0x02, 20 },
+ { 48, 81, 24, 40, 0x03, 0x02, 20 }, { 80, 89, 41, 26, 0x03, 0x02, 20 }, { 80, 53, 39, 26, 0x03, 0x02, 20 },
+ { 64, 78, 37, 36, 0x03, 0x02, 20 }, { 64, 68, 33, 33, 0x03, 0x02, 20 }, { 48, 68, 23, 35, 0x03, 0x02, 20 },
+ { 48, 36, 25, 17, 0x03, 0x02, 20 }, { 48, 25, 24, 12, 0x03, 0x02, 20 }, { 64, 75, 24, 37, 0x03, 0x02, 20 },
+ { 32, 53, 17, 26, 0x03, 0x02, 20 }, { 80, 62, 35, 27, 0x01, 0x01, 105 }, { 64, 76, 31, 31, 0x01, 0x01, 133 },
+ { 96, 85, 47, 43, 0x03, 0x02, 20 }, { 80, 71, 48, 33, 0x01, 0x01, 180 }, { 80, 87, 44, 44, 0x01, 0x01, 72 },
+ { 64, 65, 31, 36, 0x01, 0x01, 57 }, { 48, 41, 28, 20, 0x01, 0x01, 60 }, { 64, 76, 17, 36, 0x01, 0x01, 58 },
+ { 80, 60, 27, 22, 0x01, 0x01, 83 }, { 80, 47, 38, 23, 0x01, 0x01, 69 }, { 80, 60, 40, 38, 0x01, 0x01, 29 },
+ { 48, 19, 17, 8, 0x01, 0x01, 25 }, { 32, 99, 17, 16, 0x01, 0x01, 88 }, { 48, 69, 19, 28, 0x01, 0x01, 76 },
+ { 48, 83, 34, 47, 0x01, 0x01, 104 }, { 80, 54, 45, 27, 0x01, 0x01, 61 }, { 80, 92, 35, 50, 0x01, 0x01, 60 },
+ { 48, 75, 24, 37, 0x03, 0x02, 20 }, { 64, 49, 32, 23, 0x03, 0x02, 20 }, { 64, 49, 25, 24, 0x03, 0x02, 20 },
+ { 64, 52, 32, 24, 0x03, 0x02, 34 }, { 64, 49, 31, 24, 0x03, 0x02, 34 }, { 32, 33, 18, 14, 0x03, 0x02, 34 },
+ { 48, 50, 25, 25, 0x03, 0x02, 34 }, { 64, 52, 32, 25, 0x03, 0x02, 34 }, { 48, 35, 24, 18, 0x03, 0x02, 34 },
+ { 64, 51, 32, 26, 0x03, 0x02, 34 }, { 48, 35, 24, 18, 0x03, 0x02, 34 }, { 48, 53, 24, 28, 0x03, 0x02, 34 },
+ { 64, 53, 33, 25, 0x03, 0x02, 34 }, { 64, 47, 31, 24, 0x03, 0x02, 34 }, { 64, 52, 32, 35, 0x03, 0x02, 34 },
+ { 48, 48, 24, 23, 0x03, 0x02, 34 }, { 64, 87, 32, 26, 0x03, 0x02, 34 }, { 48, 30, 24, 14, 0x03, 0x02, 34 },
+ { 80, 74, 40, 36, 0x01, 0x01, 50 }, { 80, 87, 6, 41, 0x01, 0x01, 42 }, { 80, 56, 19, 27, 0x01, 0x01, 40 },
+ { 80, 65, 25, 33, 0x01, 0x01, 40 }, { 16, 38, 8, 12, 0x01, 0x01, 47 }, { 80, 78, 46, 33, 0x01, 0x01, 142 },
+ { 80, 55, 32, 29, 0x01, 0x01, 155 }, { 80, 98, 67, 48, 0x01, 0x01, 51 }, { 80, 62, 47, 19, 0x01, 0x01, 55 },
+ { 32, 123, 15, 83, 0x01, 0x01, 140 }, { 80, 60, 47, 14, 0x01, 0x01, 170 }, { 48, 77, 18, 59, 0x01, 0x01, 79 },
+ { 80, 64, 35, 30, 0x01, 0x01, 33 }, { 64, 50, 29, 22, 0x01, 0x01, 40 }, { 80, 65, 39, 5, 0x01, 0x01, 37 },
+ { 32, 61, 8, 56, 0x01, 0x01, 35 }, { 80, 83, 37, 42, 0x01, 0x01, 95 }, { 80, 27, 30, 21, 0x01, 0x01, 134 },
+ { 80, 23, 122, -18, 0x01, 0x01, 53 }, { 80, 60, 27, 22, 0x01, 0x01, 83 },
};
static s32 D_801BF15C[5] = {
0x50, 0x50, 0x8D, 0x50, 0x50,
};
static T_801BF170 D_801BF170[58] = {
- { 0x60, 0x55, 73, 67, 0x00, 0x00, 60 }, { 0x60, 0x55, 73, 74, 0x00, 0x00, 60 },
- { 0x60, 0x55, 80, 67, 0x00, 0x00, 60 }, { 0x60, 0x55, 73, 67, 0x00, 0x00, 60 },
- { 0x60, 0x55, 80, 74, 0x00, 0x00, 60 }, { 0x20, 0x1D, 17, 14, 0x02, 0x00, 50 },
- { 0x20, 0x1B, 16, 13, 0x02, 0x00, 50 }, { 0x20, 0x1E, 16, 15, 0x02, 0x00, 50 },
- { 0x10, 0x20, 8, 20, 0x02, 0x00, 50 }, { 0x10, 0x0C, 8, 6, 0x02, 0x00, 50 },
- { 0x20, 0x1B, 16, 13, 0x02, 0x00, 50 }, { 0x10, 0x0E, 8, 7, 0x02, 0x00, 50 },
- { 0x20, 0x13, 16, 9, 0x02, 0x00, 50 }, { 0x20, 0x1A, 16, 16, 0x02, 0x00, 50 },
- { 0x10, 0x20, 8, 22, 0x02, 0x00, 50 }, { 0x20, 0x1B, 16, 13, 0x02, 0x00, 50 },
- { 0x10, 0x23, 9, 5, 0x02, 0x00, 45 }, { 0x20, 0x12, 14, 9, 0x02, 0x00, 45 },
- { 0x20, 0x26, 18, 19, 0x02, 0x00, 45 }, { 0x20, 0x15, 16, 9, 0x02, 0x00, 45 },
- { 0x20, 0x22, 16, 17, 0x02, 0x00, 45 }, { 0x30, 0x20, 19, 11, 0x02, 0x00, 45 },
- { 0x20, 0x11, 16, 8, 0x02, 0x00, 45 }, { 0x20, 0x11, 16, 7, 0x02, 0x00, 45 },
- { 0x20, 0x15, 16, 11, 0x02, 0x00, 45 }, { 0x20, 0x12, 16, 8, 0x02, 0x00, 45 },
- { 0x10, 0x18, 9, 15, 0x02, 0x00, 45 }, { 0x10, 0x19, 7, 16, 0x02, 0x00, 45 },
- { 0x20, 0x23, 16, 17, 0x02, 0x00, 45 }, { 0x10, 0x13, 5, 9, 0x02, 0x00, 80 },
- { 0x20, 0x1C, 17, 7, 0x02, 0x00, 66 }, { 0x20, 0x10, 16, 8, 0x02, 0x00, 66 },
- { 0x20, 0x18, 18, 11, 0x02, 0x00, 66 }, { 0x20, 0x15, 16, 10, 0x02, 0x00, 66 },
- { 0x10, 0x15, 8, 11, 0x02, 0x00, 66 }, { 0x10, 0x0A, 8, 4, 0x02, 0x00, 66 },
- { 0x10, 0x07, 8, 3, 0x02, 0x00, 66 }, { 0x20, 0x17, 13, 11, 0x02, 0x00, 66 },
- { 0x10, 0x10, 8, 8, 0x02, 0x00, 66 }, { 0x10, 0x11, 8, 7, 0x02, 0x00, 50 },
- { 0x10, 0x17, 9, 10, 0x02, 0x00, 66 }, { 0x10, 0x0F, 8, 7, 0x02, 0x00, 66 },
- { 0x20, 0x0F, 15, 7, 0x02, 0x00, 66 }, { 0x20, 0x11, 16, 8, 0x02, 0x00, 90 },
- { 0x20, 0x10, 16, 8, 0x02, 0x00, 90 }, { 0x10, 0x0A, 8, 5, 0x02, 0x00, 90 },
- { 0x10, 0x11, 8, 8, 0x02, 0x00, 90 }, { 0x20, 0x11, 17, 8, 0x02, 0x00, 90 },
- { 0x10, 0x0B, 8, 5, 0x02, 0x00, 90 }, { 0x20, 0x11, 15, 9, 0x02, 0x00, 90 },
- { 0x10, 0x0C, 8, 6, 0x02, 0x00, 90 }, { 0x10, 0x12, 9, 9, 0x02, 0x00, 90 },
- { 0x20, 0x11, 17, 8, 0x02, 0x00, 90 }, { 0x20, 0x0F, 16, 8, 0x02, 0x00, 90 },
- { 0x10, 0x12, 9, 13, 0x02, 0x00, 90 }, { 0x10, 0x10, 8, 7, 0x02, 0x00, 90 },
- { 0x10, 0x1E, 9, 8, 0x02, 0x00, 90 }, { 0x10, 0x09, 9, 4, 0x02, 0x00, 90 },
+ { 96, 85, 73, 67, 0x00, 0x00, 60 }, { 96, 85, 73, 74, 0x00, 0x00, 60 }, { 96, 85, 80, 67, 0x00, 0x00, 60 },
+ { 96, 85, 73, 67, 0x00, 0x00, 60 }, { 96, 85, 80, 74, 0x00, 0x00, 60 }, { 32, 29, 17, 14, 0x02, 0x00, 50 },
+ { 32, 27, 16, 13, 0x02, 0x00, 50 }, { 32, 30, 16, 15, 0x02, 0x00, 50 }, { 16, 32, 8, 20, 0x02, 0x00, 50 },
+ { 16, 12, 8, 6, 0x02, 0x00, 50 }, { 32, 27, 16, 13, 0x02, 0x00, 50 }, { 16, 14, 8, 7, 0x02, 0x00, 50 },
+ { 32, 19, 16, 9, 0x02, 0x00, 50 }, { 32, 26, 16, 16, 0x02, 0x00, 50 }, { 16, 32, 8, 22, 0x02, 0x00, 50 },
+ { 32, 27, 16, 13, 0x02, 0x00, 50 }, { 16, 35, 9, 5, 0x02, 0x00, 45 }, { 32, 18, 14, 9, 0x02, 0x00, 45 },
+ { 32, 38, 18, 19, 0x02, 0x00, 45 }, { 32, 21, 16, 9, 0x02, 0x00, 45 }, { 32, 34, 16, 17, 0x02, 0x00, 45 },
+ { 48, 32, 19, 11, 0x02, 0x00, 45 }, { 32, 17, 16, 8, 0x02, 0x00, 45 }, { 32, 17, 16, 7, 0x02, 0x00, 45 },
+ { 32, 21, 16, 11, 0x02, 0x00, 45 }, { 32, 18, 16, 8, 0x02, 0x00, 45 }, { 16, 24, 9, 15, 0x02, 0x00, 45 },
+ { 16, 25, 7, 16, 0x02, 0x00, 45 }, { 32, 35, 16, 17, 0x02, 0x00, 45 }, { 16, 19, 5, 9, 0x02, 0x00, 80 },
+ { 32, 28, 17, 7, 0x02, 0x00, 66 }, { 32, 16, 16, 8, 0x02, 0x00, 66 }, { 32, 24, 18, 11, 0x02, 0x00, 66 },
+ { 32, 21, 16, 10, 0x02, 0x00, 66 }, { 16, 21, 8, 11, 0x02, 0x00, 66 }, { 16, 10, 8, 4, 0x02, 0x00, 66 },
+ { 16, 7, 8, 3, 0x02, 0x00, 66 }, { 32, 23, 13, 11, 0x02, 0x00, 66 }, { 16, 16, 8, 8, 0x02, 0x00, 66 },
+ { 16, 17, 8, 7, 0x02, 0x00, 50 }, { 16, 23, 9, 10, 0x02, 0x00, 66 }, { 16, 15, 8, 7, 0x02, 0x00, 66 },
+ { 32, 15, 15, 7, 0x02, 0x00, 66 }, { 32, 17, 16, 8, 0x02, 0x00, 90 }, { 32, 16, 16, 8, 0x02, 0x00, 90 },
+ { 16, 10, 8, 5, 0x02, 0x00, 90 }, { 16, 17, 8, 8, 0x02, 0x00, 90 }, { 32, 17, 17, 8, 0x02, 0x00, 90 },
+ { 16, 11, 8, 5, 0x02, 0x00, 90 }, { 32, 17, 15, 9, 0x02, 0x00, 90 }, { 16, 12, 8, 6, 0x02, 0x00, 90 },
+ { 16, 18, 9, 9, 0x02, 0x00, 90 }, { 32, 17, 17, 8, 0x02, 0x00, 90 }, { 32, 15, 16, 8, 0x02, 0x00, 90 },
+ { 16, 18, 9, 13, 0x02, 0x00, 90 }, { 16, 16, 8, 7, 0x02, 0x00, 90 }, { 16, 30, 9, 8, 0x02, 0x00, 90 },
+ { 16, 9, 9, 4, 0x02, 0x00, 90 },
};
static s32 D_801BF3B4[5] = {
0x00, 0x01, 0x02, 0x03, 0x04,
@@ -119,33 +94,33 @@ void func_801094A0(s32 arg0, Color_RGBA8* color) {
*color = D_801BED40[arg0];
}
-void func_801094C8(s32 arg0, s32* arg1, s32* arg2) {
- *arg1 = D_801BED4C[arg0].unk4;
- *arg2 = D_801BED4C[arg0].unk5;
+void MapData_GetMapTexDimGameplayDangeonKeep(s32 mapId, s32* width, s32* height) {
+ *width = D_801BED4C[mapId].width;
+ *height = D_801BED4C[mapId].height;
}
-void func_801094F8(s32 arg0, s32* arg1, s32* arg2) {
- *arg1 = D_801BED4C[arg0].unk6;
- *arg2 = D_801BED4C[arg0].unk7;
+void func_801094F8(s32 mapId, s32* arg1, s32* arg2) {
+ *arg1 = D_801BED4C[mapId].unk6;
+ *arg2 = D_801BED4C[mapId].unk7;
}
-void func_80109528(s32 arg0, s32* arg1) {
- *arg1 = D_801BED4C[arg0].unk8;
+void func_80109528(s32 mapId, s32* arg1) {
+ *arg1 = D_801BED4C[mapId].unk8;
}
u8 func_8010954C(s32 arg0) {
return D_801BED4C[arg0].unk9;
}
-s16 func_8010956C(s32 arg0) {
- return D_801BED4C[arg0].unkA;
+s16 MapData_GetMapScaleGameplayDangeonKeep(s32 mapId) {
+ return D_801BED4C[mapId].scale;
}
TexturePtr func_8010958C(s32 arg0) {
return D_801BED4C[arg0].lmapTex;
}
-void func_801095AC(s32 mapId, s32* arg1, s32* arg2) {
+void MapData_GetMapTexDimGrandMap(s32 mapId, s32* arg1, s32* arg2) {
*arg1 = D_801BED88[mapId - 0x100].unk0;
*arg2 = D_801BED88[mapId - 0x100].unk1;
}
@@ -192,17 +167,16 @@ s32 func_80109714(s32 mapId) {
return MAPDATA_MID_MAP_I_STATIC;
}
-void func_80109754(s32 mapId, s32* arg1, s32* arg2) {
+void MapData_GetMapTexDim(s32 mapId, s32* width, s32* height) {
switch (func_80109714(mapId)) {
case MAPDATA_MID_GAMEPLAY_DANGEON_KEEP:
- func_801094C8(mapId, arg1, arg2);
+ MapData_GetMapTexDimGameplayDangeonKeep(mapId, width, height);
return;
case MAPDATA_MID_GRAND_MAP_STATIC:
- func_801095AC(mapId, arg1, arg2);
+ MapData_GetMapTexDimGrandMap(mapId, width, height);
return;
default:
- *arg2 = 0;
- *arg1 = 0;
+ *width = *height = 0;
return;
}
}
@@ -216,8 +190,7 @@ void func_801097C8(s32 mapId, s32* arg1, s32* arg2) {
func_801095DC(mapId, arg1, arg2);
return;
default:
- *arg2 = 0;
- *arg1 = 0;
+ *arg1 = *arg2 = 0;
return;
}
}
@@ -228,7 +201,7 @@ void MapData_GetMapScale(s32 mapId, s32* scale) {
*scale = 0;
return;
case MAPDATA_MID_GAMEPLAY_DANGEON_KEEP:
- *scale = func_8010956C(mapId);
+ *scale = MapData_GetMapScaleGameplayDangeonKeep(mapId);
return;
case MAPDATA_MID_GRAND_MAP_STATIC:
*scale = func_80109650(mapId);
@@ -251,7 +224,7 @@ void func_801098A0(s32 mapId, s32* arg1) {
}
// return some color index?
-u8 func_80109908(s32 mapId) {
+s32 func_80109908(s32 mapId) {
switch (func_80109714(mapId)) {
case MAPDATA_MID_GAMEPLAY_DANGEON_KEEP:
return func_8010954C(mapId);
@@ -389,22 +362,20 @@ s32 MapData_GetMapSize(s32 mapCompactId) {
void func_80109D40(s32 mapCompactId, s32* arg1, s32* arg2) {
if (mapCompactId == -1) {
- *arg2 = 0;
- *arg1 = 0;
+ *arg1 = *arg2 = 0;
return;
}
switch (func_80109BF4(mapCompactId)) {
case MAPDATA_CPID_GRAND_MAP_STATIC:
// id base 0x100
- func_801095AC(mapCompactId + 0xC6, arg1, arg2);
+ MapData_GetMapTexDimGrandMap(mapCompactId + 0xC6, arg1, arg2);
return;
case MAPDATA_CPID_MAP_I_STATIC:
func_8010997C(mapCompactId, arg1, arg2);
return;
case MAPDATA_CPID_2:
default:
- *arg2 = 0;
- *arg1 = 0;
+ *arg1 = *arg2 = 0;
return;
}
}
@@ -413,8 +384,7 @@ void func_80109DD8(s32 mapCompactId, s32* arg1, s32* arg2) {
s32 temp_v0;
if (mapCompactId == -1) {
- *arg2 = 0;
- *arg1 = 0;
+ *arg1 = *arg2 = 0;
return;
}
switch (func_80109BF4(mapCompactId)) {
@@ -426,8 +396,7 @@ void func_80109DD8(s32 mapCompactId, s32* arg1, s32* arg2) {
return;
case MAPDATA_CPID_2:
default:
- *arg2 = 0;
- *arg1 = 0;
+ *arg1 = *arg2 = 0;
return;
}
}
diff --git a/src/code/z_map_disp.c b/src/code/z_map_disp.c
index 417f6aab6..026eb0a87 100644
--- a/src/code/z_map_disp.c
+++ b/src/code/z_map_disp.c
@@ -95,8 +95,8 @@ f32 func_80102F9C(f32 arg0) {
return 0.0f;
}
-void func_80103090(MinimapEntry* arg0, s32* out1, s32* out2) {
- func_80109754(arg0->mapId, out1, out2);
+void MapDisp_GetMapTexDim(MinimapEntry* arg0, s32* out1, s32* out2) {
+ MapData_GetMapTexDim(arg0->mapId, out1, out2);
}
void MapDisp_GetMapScale(MinimapEntry* arg0, s32* scale) {
@@ -106,32 +106,29 @@ void MapDisp_GetMapScale(MinimapEntry* arg0, s32* scale) {
}
}
-void func_801030F4(MinimapEntry* arg0, s32* arg1, s32* arg2) {
- s32 sp2C;
- s32 sp28;
- s32 temp_v0;
- s32 temp_v0_2;
+void MapDisp_GetMapPos(MinimapEntry* arg0, s32* arg1, s32* arg2) {
+ s32 width;
+ s32 height;
+ s32 temp;
+ s32 temp2;
if (arg0->mapId == 0xFFFF) {
*arg1 = 0;
*arg2 = 0;
return;
}
- func_80103090(arg0, &sp2C, &sp28);
+ MapDisp_GetMapTexDim(arg0, &width, &height);
func_801097C8(arg0->mapId, arg1, arg2);
if (arg0->unk8 & 1) {
- temp_v0 = sp2C / 2;
- *arg1 = (temp_v0 - *arg1) + temp_v0;
+ temp = width / 2;
+ *arg1 = (temp - *arg1) + temp;
}
if (arg0->unk8 & 2) {
- temp_v0_2 = sp28 / 2;
- *arg2 = (temp_v0_2 - *arg2) + temp_v0_2;
+ temp2 = height / 2;
+ *arg2 = (temp2 - *arg2) + temp2;
}
}
-void func_801098A0(u16, s32*);
-s32 func_80109908(u16);
-
#ifdef NON_MATCHING
// https://decomp.me/scratch/XPZfI
void func_801031D0(PlayState* play, TexturePtr arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5) {
@@ -149,7 +146,7 @@ void func_801031D0(PlayState* play, TexturePtr arg1, s32 arg2, s32 arg3, s32 arg
spCC = &D_801BEBB8.unk0->entry[arg4];
if ((spCC->mapId != 0xFFFF) && (arg1 != 0)) {
- func_80103090(spCC, &spC8, &spC4);
+ MapDisp_GetMapTexDim(spCC, &spC8, &spC4);
OPEN_DISPS(play->state.gfxCtx);
func_8012C654(play->state.gfxCtx);
func_801094A0(func_80109908(spCC->mapId), &spAC);
@@ -253,8 +250,8 @@ void func_80103A58(PlayState* play, Actor* actor) {
spDC = &D_801BEBB8.unk0->entry[D_801BEBB8.curRoom];
spB4 = GET_PLAYER(play);
if (spDC->mapId != 0xFFFF) {
- func_801030F4(spDC, &spD0, &spCC);
- func_80103090(spDC, &spC8, &spC4);
+ MapDisp_GetMapPos(spDC, &spD0, &spCC);
+ MapDisp_GetMapTexDim(spDC, &spC8, &spC4);
var_v0 = D_801BEBB8.unk0->scale;
if (D_801BEBB8.unk0->scale == 0) {
var_v0 = 20;
@@ -412,8 +409,8 @@ void func_801045AC(PlayState* play, Actor* actor) {
}
sp7C = &D_801BEBB8.unk0->entry[D_801BEBB8.curRoom];
if (sp7C->mapId != 0xFFFF) {
- func_801030F4(sp7C, &sp70, &sp6C);
- func_80103090(sp7C, &sp68, &sp64);
+ MapDisp_GetMapPos(sp7C, &sp70, &sp6C);
+ MapDisp_GetMapTexDim(sp7C, &sp68, &sp64);
var_v1 = D_801BEBB8.unk0->scale;
if (D_801BEBB8.unk0->scale == 0) {
@@ -837,8 +834,8 @@ void func_80105C40(s16 room) {
D_801BEBB8.unk1C = D_801BEBB8.unk1E;
return;
}
- func_801030F4(temp_s0, &sp44, &sp40);
- func_80103090(temp_s0, &sp4C, &sp48);
+ MapDisp_GetMapPos(temp_s0, &sp44, &sp40);
+ MapDisp_GetMapTexDim(temp_s0, &sp4C, &sp48);
D_801BEBB8.unk8 = 0x127 - sp4C;
D_801BEBB8.unkA = 0xDC - sp48;
if (D_801BEBB8.prevRoom != -1) {
@@ -855,7 +852,7 @@ void func_80105C40(s16 room) {
s32 sp38;
s32 var_v0;
s32 pad;
- func_801030F4(sp58, &sp3C, &sp38);
+ MapDisp_GetMapPos(sp58, &sp3C, &sp38);
var_v0 = D_801BEBB8.unk0->scale;
if (D_801BEBB8.unk0->scale == 0) {
var_v0 = 20;
@@ -913,8 +910,8 @@ void func_80105FE0(PlayState* play, s32 x, s32 z, s32 rot) {
sp6C = &D_801BEBB8.unk0->entry[D_801BEBB8.curRoom];
if (sp6C->mapId != 0xFFFF) {
f32 sp4C;
- func_801030F4(sp6C, &sp60, &sp5C);
- func_80103090(sp6C, &sp58, &sp54);
+ MapDisp_GetMapPos(sp6C, &sp60, &sp5C);
+ MapDisp_GetMapTexDim(sp6C, &sp58, &sp54);
var_v0 = D_801BEBB8.unk0->scale;
if (D_801BEBB8.unk0->scale == 0) {
var_v0 = 20;
@@ -1183,9 +1180,7 @@ void func_80106D5C(PlayState* play, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32
temp1 = ((D_801F56B0.unk184 * -120.0f / 40.0f) + 200.0f) * 31.0f / 255.0f;
temp2 = ((D_801F56B0.unk184 * 115.0f / 40.0f) + 140.0f) * 31.0f / 255.0f;
- D_801BECC4[1] =
- (temp1 << 6) | (temp2 << 1) |
- 1;
+ D_801BECC4[1] = (temp1 << 6) | (temp2 << 1) | 1;
if (CHECK_DUNGEON_ITEM(2, arg6)) {
D_801BEC84[0xF] = 0xAD5F;
D_801BECA4[0xF] = 0xAD5F;
diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt
index 1c8124afe..55f7518ce 100644
--- a/tools/disasm/functions.txt
+++ b/tools/disasm/functions.txt
@@ -1908,9 +1908,9 @@
0x80102ED0:("func_80102ED0",),
0x80102EF0:("func_80102EF0",),
0x80102F9C:("func_80102F9C",),
- 0x80103090:("func_80103090",),
+ 0x80103090:("MapDisp_GetMapTexDim",),
0x801030B4:("MapDisp_GetMapScale",),
- 0x801030F4:("func_801030F4",),
+ 0x801030F4:("MapDisp_GetMapPos",),
0x801031D0:("func_801031D0",),
0x801039EC:("MapDisp_IsDataRotated",),
0x80103A10:("func_80103A10",),
@@ -1962,7 +1962,7 @@
0x8010954C:("func_8010954C",),
0x8010956C:("func_8010956C",),
0x8010958C:("func_8010958C",),
- 0x801095AC:("func_801095AC",),
+ 0x801095AC:("MapData_GetMapTexDimGrandMap",),
0x801095DC:("func_801095DC",),
0x8010960C:("func_8010960C",),
0x80109630:("func_80109630",),
@@ -1970,7 +1970,7 @@
0x80109670:("func_80109670",),
0x801096D4:("func_801096D4",),
0x80109714:("func_80109714",),
- 0x80109754:("func_80109754",),
+ 0x80109754:("MapData_GetMapTexDim",),
0x801097C8:("func_801097C8",),
0x8010983C:("MapData_GetMapScale",),
0x801098A0:("func_801098A0",),
diff --git a/tools/overlayhelpers/mapdata.py b/tools/overlayhelpers/mapdata.py
index 7e17beb80..26c91dfa2 100755
--- a/tools/overlayhelpers/mapdata.py
+++ b/tools/overlayhelpers/mapdata.py
@@ -10,8 +10,8 @@ MAP_DATA_DATA_END = 0x801BF550
typeInfo = {
"Color_RGBA8" : [ 0x04, ">BBBB", "{{ {0}, {1}, {2}, {3} }}" ],
- "T_801BED4C" : [ 0x0C, ">IBBBBBBh", "{{ D_{0:08X}, 0x{1:02X}, 0x{2:02X}, 0x{3:02X}, 0x{4:02X}, 0x{5:02X}, 0x{6:02X}, {7} }}"],
- "T_801BF170" : [ 0x0A, ">BBhhBBh", "{{ 0x{0:02X}, 0x{1:02X}, {2}, {3}, 0x{4:02X}, 0x{5:02X}, {6} }}"],
+ "T_801BED4C" : [ 0x0C, ">IBBBBBBh", "{{ D_{0:08X}, {1}, {2}, {3}, {4}, 0x{5:02X}, 0x{6:02X}, {7} }}"],
+ "T_801BF170" : [ 0x0A, ">BBhhBBh", "{{ {0}, {1}, {2}, {3}, 0x{4:02X}, 0x{5:02X}, {6} }}"],
"s32" : [ 0x04, ">I", "0x{0:02X}"]
}