mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
Convert z_map_data to C (#183)
* Convert z_map_data to C * Style Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> * Cleanup Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> * Convert the whole file * Cleanup * Cleanup Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * floorNames → floorID * Style * Format & fix switch array padding * Remove trailing zeroes * Cleanup Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
78049aa5c5
commit
69e30364b9
4 changed files with 354 additions and 127 deletions
|
@ -1,124 +0,0 @@
|
|||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .data
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_80123A70
|
||||
.incbin "baserom.z64", 0xB9AC10, 0xA0
|
||||
|
||||
glabel D_80123B10
|
||||
.incbin "baserom.z64", 0xB9ACB0, 0x10
|
||||
|
||||
glabel D_80123B20
|
||||
.incbin "baserom.z64", 0xB9ACC0, 0x280
|
||||
|
||||
glabel D_80123DA0
|
||||
.incbin "baserom.z64", 0xB9AF40, 0x14
|
||||
|
||||
glabel D_80123DB4
|
||||
.incbin "baserom.z64", 0xB9AF54, 0x8C0
|
||||
|
||||
glabel D_80124674
|
||||
.incbin "baserom.z64", 0xB9B814, 0x370
|
||||
|
||||
glabel D_801249E4
|
||||
.incbin "baserom.z64", 0xB9BB84, 0x370
|
||||
|
||||
glabel D_80124D54
|
||||
.incbin "baserom.z64", 0xB9BEF4, 0xC
|
||||
|
||||
glabel D_80124D60
|
||||
.incbin "baserom.z64", 0xB9BF00, 0x14
|
||||
|
||||
glabel D_80124D74
|
||||
.incbin "baserom.z64", 0xB9BF14, 0x30
|
||||
|
||||
glabel D_80124DA4
|
||||
.incbin "baserom.z64", 0xB9BF44, 0x30
|
||||
|
||||
glabel D_80124DD4
|
||||
.incbin "baserom.z64", 0xB9BF74, 0x30
|
||||
|
||||
glabel D_80124E04
|
||||
.incbin "baserom.z64", 0xB9BFA4, 0x30
|
||||
|
||||
glabel D_80124E34
|
||||
.incbin "baserom.z64", 0xB9BFD4, 0xC0
|
||||
|
||||
glabel D_80124EF4
|
||||
.incbin "baserom.z64", 0xB9C094, 0x14
|
||||
|
||||
glabel D_80124F08
|
||||
.incbin "baserom.z64", 0xB9C0A8, 0x50
|
||||
|
||||
glabel D_80124F58
|
||||
.incbin "baserom.z64", 0xB9C0F8, 0x30
|
||||
|
||||
glabel D_80124F88
|
||||
.incbin "baserom.z64", 0xB9C128, 0x30
|
||||
|
||||
glabel D_80124FB8
|
||||
.incbin "baserom.z64", 0xB9C158, 0x30
|
||||
|
||||
glabel D_80124FE8
|
||||
.incbin "baserom.z64", 0xB9C188, 0x30
|
||||
|
||||
glabel D_80125018
|
||||
.incbin "baserom.z64", 0xB9C1B8, 0x28
|
||||
|
||||
glabel D_80125040
|
||||
.incbin "baserom.z64", 0xB9C1E0, 0x140
|
||||
|
||||
glabel D_80125180
|
||||
.incbin "baserom.z64", 0xB9C320, 0x14
|
||||
|
||||
glabel D_80125194
|
||||
.incbin "baserom.z64", 0xB9C334, 0x200
|
||||
|
||||
glabel D_80125394
|
||||
.incbin "baserom.z64", 0xB9C534, 0x200
|
||||
|
||||
glabel D_80125594
|
||||
.incbin "baserom.z64", 0xB9C734, 0x200
|
||||
|
||||
glabel D_80125794
|
||||
.incbin "baserom.z64", 0xB9C934, 0x50
|
||||
|
||||
glabel D_801257E4
|
||||
.incbin "baserom.z64", 0xB9C984, 0x14
|
||||
|
||||
glabel gMapDataTable
|
||||
.word D_80123A70
|
||||
.word D_80123B10
|
||||
.word D_80123B20
|
||||
.word D_80123DA0
|
||||
.word D_80123DB4
|
||||
.word D_80124674
|
||||
.word D_801249E4
|
||||
.word D_80124D54
|
||||
.word D_80124D60
|
||||
.word D_80124D74
|
||||
.word D_80124DA4
|
||||
.word D_80124DD4
|
||||
.word D_80124E04
|
||||
.word D_80124E34
|
||||
.word D_80124EF4
|
||||
.word D_80124F08
|
||||
.word D_80124F58
|
||||
.word D_80124F88
|
||||
.word D_80124FB8
|
||||
.word D_80124FE8
|
||||
.word D_80125018
|
||||
.word D_80125040
|
||||
.word D_80125180
|
||||
.word D_80125194
|
||||
.word D_80125394
|
||||
.word D_80125594
|
||||
.word D_80125794
|
||||
.word D_801257E4
|
|
@ -1289,6 +1289,25 @@ typedef struct PreNMIContext {
|
|||
/* 0xA8 */ UNK_TYPE unk_A8;
|
||||
} PreNMIContext; // size = 0xAC
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ F_8F = 1,
|
||||
/* 2 */ F_7F,
|
||||
/* 3 */ F_6F,
|
||||
/* 4 */ F_5F,
|
||||
/* 5 */ F_4F,
|
||||
/* 6 */ F_3F,
|
||||
/* 7 */ F_2F,
|
||||
/* 8 */ F_1F,
|
||||
/* 9 */ F_B1,
|
||||
/* 10 */ F_B2,
|
||||
/* 11 */ F_B3,
|
||||
/* 12 */ F_B4,
|
||||
/* 13 */ F_B5,
|
||||
/* 14 */ F_B6,
|
||||
/* 15 */ F_B7,
|
||||
/* 16 */ F_B8
|
||||
} FloorID;
|
||||
|
||||
// All arrays pointed in this struct are indexed by "map indexes"
|
||||
// In dungeons, the map index corresponds to the dungeon index (which also indexes keys, items, etc)
|
||||
// In overworld areas, the map index corresponds to the overworld area index (spot 00, 01, etc)
|
||||
|
@ -1319,8 +1338,8 @@ typedef struct {
|
|||
/* 0x5C */ u8 (*switchFromRoom)[51]; // room to come from
|
||||
/* 0x60 */ u8 (*switchFromFloor)[51]; // floor to come from
|
||||
/* 0x64 */ u8 (*switchToRoom)[51]; // room to go to
|
||||
/* 0x68 */ UNK_PTR unk_68;
|
||||
/* 0x6C */ UNK_PTR unk_6C;
|
||||
/* 0x68 */ u8 (*floorID)[8];
|
||||
/* 0x6C */ s16* skullFloorIconY; // dungeon big skull icon Y pos
|
||||
} MapData; // size = 0x70
|
||||
|
||||
typedef struct {
|
||||
|
|
2
spec
2
spec
|
@ -334,7 +334,7 @@ beginseg
|
|||
include "build/src/code/z_onepointdemo.o"
|
||||
include "build/data/z_onepointdemo.data.o"
|
||||
include "build/src/code/z_map_exp.o"
|
||||
include "build/data/z_map_data.data.o"
|
||||
include "build/src/code/z_map_data.o"
|
||||
include "build/src/code/z_parameter.o"
|
||||
include "build/src/code/z_path.o"
|
||||
include "build/src/code//code_8008E6A0.o"
|
||||
|
|
332
src/code/z_map_data.c
Normal file
332
src/code/z_map_data.c
Normal file
|
@ -0,0 +1,332 @@
|
|||
#include <global.h>
|
||||
|
||||
static s16 sFloorTexIndexOffset[10][8] = {
|
||||
{ 0, 0, 0, 0, 2, 4, 6, 8 }, { 0, 0, 0, 0, 0, 0, 0, 2 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 2, 4, 6 },
|
||||
{ 0, 0, 0, 0, 2, 4, 6, 8 }, { 0, 0, 0, 0, 0, 2, 4, 6 },
|
||||
{ 0, 0, 0, 0, 0, 2, 4, 6 }, { 0, 0, 0, 0, 0, 2, 4, 6 },
|
||||
{ 0, 0, 0, 0, 0, 0, 2, 4 }, { 0 },
|
||||
};
|
||||
|
||||
static s16 sBossFloor[8] = {
|
||||
7, 7, 6, 7, 7, 4, 5, 7,
|
||||
};
|
||||
|
||||
static s16 sRoomPalette[10][32] = {
|
||||
{ 10, 1, 2, 10, 4, 5, 6, 7, 8, 10, 11 },
|
||||
{ 1, 3, 5, 6, 10, 3, 9, 2, 4, 2, 4, 7, 7, 8, 13, 11 },
|
||||
{ 3, 1, 2, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 3 },
|
||||
{ 9, 1, 2, 3, 6, 5, 6, 7, 8, 8, 5, 4, 3, 13, 11, 10, 11, 2, 13, 12, 10, 12, 13 },
|
||||
{ 1, 6, 7, 2, 3, 4, 6, 10, 6, 10, 7, 9, 11, 1, 12, 3, 11, 4, 5, 8, 9, 10, 11, 12, 13, 2 },
|
||||
{ 1, 2, 10, 3, 3, 4, 5, 13, 5, 6, 7, 8, 7, 9, 8, 9, 11, 10, 12, 11, 12, 13, 9, 7, 8, 12 },
|
||||
{ 10, 1, 2, 3, 4, 5, 10, 7, 8, 9, 10, 6, 12, 13, 11, 8, 13, 1, 2, 3, 4, 11, 6, 12, 8, 5, 10, 9, 6 },
|
||||
{ 13, 1, 5, 4, 4, 5, 3, 7, 8, 9, 10, 11, 12, 13, 2, 5, 1, 1, 6, 7, 8, 3, 9, 7, 8, 12 },
|
||||
{ 13, 1, 2, 3, 4, 5, 6 },
|
||||
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
|
||||
};
|
||||
|
||||
static s16 sMaxPaletteCount[10] = {
|
||||
6, 11, 12, 14, 11, 13, 13, 13, 7, 12,
|
||||
};
|
||||
|
||||
static s16 sPaletteRoom[10][8][14] = {
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 10, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 255, 255, 255 },
|
||||
{ 0, 255, 255, 255, 255, 255 },
|
||||
{ 3, 4, 5, 6, 7, 8 },
|
||||
{ 9, 255, 255, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 2, 3, 5, 6, 9, 10, 12, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 4, 7, 8, 11, 13, 14, 15 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
|
||||
{ 1, 3, 6, 13, 14, 255, 255, 255, 255, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 6, 7, 8, 10, 11, 12, 13, 14, 19, 20, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 15, 16, 18, 21 },
|
||||
{ 9, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 17, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 7, 8, 12, 13, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 5, 6, 7, 10, 11, 12, 13, 14, 24, 255, 255 },
|
||||
{ 4, 5, 6, 9, 10, 11, 16, 23, 24, 25, 255 },
|
||||
{ 4, 6, 10, 21, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 15, 17, 18, 19, 20, 21, 22 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 4, 5, 6, 7, 10, 11, 13, 17, 19, 20, 255 },
|
||||
{ 0, 1, 4, 5, 6, 10, 17, 20, 21, 255, 255, 255, 255 },
|
||||
{ 0, 1, 3, 5, 8, 9, 12, 14, 15, 16, 17, 18, 21 },
|
||||
{ 0, 1, 2, 3, 5, 8, 9, 12, 14, 15, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 22, 23, 24, 25, 26, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 5, 7, 8, 9, 10, 11, 16, 17, 18, 19, 20, 21, 23 },
|
||||
{ 4, 5, 6, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 4, 12, 13, 14, 15, 27, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 5, 6, 7, 8, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 8, 9, 12, 14, 16, 21, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 3, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 4, 5, 6 },
|
||||
{ 0, 1, 255, 255, 255, 255, 255 },
|
||||
{ 1, 255, 255, 255, 255, 255, 255 },
|
||||
},
|
||||
{
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
|
||||
},
|
||||
};
|
||||
|
||||
static s16 sRoomCompassOffsetX[10][44] = {
|
||||
{ 1090, 1390, 1560, 1220, 1200, 1390, 1770, 1610, 2000, 1290, 1420,
|
||||
1110, 1040, 470, 790, 1570, 720, 1000, 1580, 70, 0 },
|
||||
{ 940, 320, 1500, 240, 580, 1510, 720, 1030, 800, 660, 180, 520, 310, 550, 790, 1650, 1000, 1570, 80, 70 },
|
||||
{ 1130, 1070, 1090, 1160, 1500, 690, 1540, 920, 1160, 700, 1650, 950, 1380, 1460, 830, 1170, 1620 },
|
||||
{ 1130, 1170, 965, 890, 1170, 1460, 1170, 800, 1320, 880, 1130, 1590, 1390, 830, 610, 580, 710,
|
||||
980, 1640, 1510, 590, 1610, 1130, 1130, 820, 1320, 1620, 0, 0, 0, 0, 1300, 1270 },
|
||||
{ 1160, 620, 1330, 1280, 440, 600, 810, 830, 720, 1170, 1490, 1640, 1870, 1800, 1610, 1130, 860, 1310, 1140,
|
||||
850, 760, 380, 800, 800, 1930, 1410, 640, 845, 810, 810, 850, 1390, 1540, 1650, 1880, 1530, 420, 1950 },
|
||||
{ 1120, 1290, 1120, 1380, 930, 1520, 1980, 2010, 1590, 1510, 1500, 1300, 1240, 1800, 1290,
|
||||
1450, 1560, 880, 820, 820, 1060, 1670, 1120, 1130, 1130, 1290, 1290, 1280, 1390, 940,
|
||||
1520, 1520, 1980, 1620, 1510, 1490, 1240, 1290, 1450, 880, 880, 1060, 1670, 1520 },
|
||||
{ 800, 1500, 1370, 1730, 1590, 1020, 1060, 1470, 1600, 1830, 1630, 2000, 650, 660, 1020, 880,
|
||||
940, 720, 570, 620, 570, 550, 970, 920, 1040, 1150, 1200, 1550, 1520, 1020, 820, 1010 },
|
||||
{ 1320, 1320, 1090, 1510, 1480, 940, 920, 910, 800, 820, 1150, 1000, 1800, 1660,
|
||||
1090, 1630, 710, 1670, 830, 770, 800, 850, 830, 820, 1800, 1090, 850 },
|
||||
{ 1080, 1420, 1620, 1040, 940, 1190, 1310, 1090, 1380, 1080 },
|
||||
{ 1070, 1180, 1270, 990, 1280, 1450, 1680, 1530, 760, 860, 1500, 800 },
|
||||
};
|
||||
|
||||
static s16 sRoomCompassOffsetY[10][44] = {
|
||||
{ -660, -570, -410, -690, -500, -380, -470, -630, -990, -870,
|
||||
-720, -630, -660, -1280, -1910, -670, -1220, -870, -1070, -1080 },
|
||||
{ -780, -800, -1090, -1230, -1140, -820, -1210, -1430, -1580, -920,
|
||||
-830, -730, -950, -1580, -1910, -950, -860, -1070, -1070, -1080 },
|
||||
{ -770, -1320, -1750, -1800, -1360, -1330, -1700, -2280, -2700, -2360, -2360, -2650, -2650, -1600, -1445, -1370,
|
||||
-1910 },
|
||||
{ -660, -900, -1040, -1210, -1520, -1190, -1670, -1320, -1310, -1260, -1500,
|
||||
-1080, -1650, -1620, -1090, -1390, -1220, -1090, -1290, -1410, -1390, -1600,
|
||||
-660, -1630, -1290, -1290, -1080, 0, 0, 0, 0, -1100, -1280 },
|
||||
{ -580, -620, -700, -1150, -710, -670, -850, -1000, -720, -840, -870, -840, -790,
|
||||
-1000, -980, -900, -660, -910, -1130, -1230, -1300, -810, -380, -1270, -820, -1120,
|
||||
-880, -1070, -850, -850, -1060, -640, -900, -850, -890, -740, -880, -840 },
|
||||
{ -610, -930, -770, -680, -1060, -930, -980, -1860, -1380, -1050, -830, -1230, -1380, -1330, -1750,
|
||||
-1610, -1600, -830, -800, -820, -690, -1540, -620, -790, -780, -930, -930, -870, -690, -1050,
|
||||
-930, -930, -980, -1370, -1050, -800, -1380, -1750, -1610, -840, -830, -690, -1540, -930 },
|
||||
{ -570, -900, -1070, -1090, -1280, -1160, -920, -980, -780, -530, -350, -1000, -1440, -1080, -1100, -1110,
|
||||
-980, -860, -790, -540, -350, -1000, -1250, -820, -1070, -1180, -950, -1380, -1160, -1100, -1150, -830 },
|
||||
{ -940, -960, -860, -870, -920, -870, -980, -820, -860, -520, -500, -780, -1050, -1130,
|
||||
-770, -1010, -680, -930, -880, -900, -980, -990, -770, -520, -1050, -770, -990 },
|
||||
{ -570, -930, -1040, -1100, -800, -1100, -1100, -570, -930, -890 },
|
||||
{ 100, -280, -690, -840, -1010, -950, -730, -470, -1130, -1440, -420, -700 },
|
||||
};
|
||||
|
||||
static u8 sDgnMinimapCount[12] = {
|
||||
13, 19, 17, 27, 38, 44, 32, 27, 10, 12, 0, 0,
|
||||
};
|
||||
|
||||
static u16 sDgnMinimapTexIndexOffset[10] = {
|
||||
0, 13, 32, 49, 76, 114, 158, 190, 217, 227,
|
||||
};
|
||||
|
||||
static u16 sOwMinimapTexSize[24] = {
|
||||
2920, 2560, 1560, 2784, 2976, 2040, 3240, 2336, 2080, 2600, 1792, 1888,
|
||||
3400, 1792, 1888, 2040, 3120, 2304, 2176, 1888, 1560, 3240, 2600, 3400,
|
||||
};
|
||||
|
||||
static u16 sOwMinimapTexOffset[24] = {
|
||||
0x0000, 0x0B68, 0x1568, 0x1B80, 0x2660, 0x3200, 0x39F8, 0x46A0, 0x4FC0, 0x57E0, 0x6208, 0x6908,
|
||||
0x7068, 0x7DB0, 0x84B0, 0x8C10, 0x9408, 0xA038, 0xA938, 0xB1B8, 0xB918, 0xBF30, 0xCBD8, 0xD600,
|
||||
};
|
||||
|
||||
static s16 sOwMinimapPosX[24] = {
|
||||
216, 216, 218, 202, 202, 250, 216, 234, 234, 216, 234, 234,
|
||||
216, 234, 234, 250, 216, 234, 234, 234, 218, 80, 80, 216,
|
||||
};
|
||||
|
||||
static s16 sOwMinimapPosY[24] = {
|
||||
150, 158, 184, 164, 160, 138, 140, 150, 156, 158, 168, 162,
|
||||
138, 168, 162, 138, 146, 150, 154, 162, 218, 81, 65, 216,
|
||||
};
|
||||
|
||||
static s16 sOwCompassInfo[24][4] = {
|
||||
{ 25, 25, 1080, -360 }, { 7, 6, 1000, -650 }, { 6, 6, 890, -800 }, { 7, 7, 720, -730 },
|
||||
{ 8, 8, 660, -730 }, { 5, 7, 1220, -660 }, { 13, 13, 1080, -260 }, { 5, 5, 1120, -880 },
|
||||
{ 8, 8, 1150, -630 }, { 11, 11, 1060, -680 }, { 12, 12, 1100, -720 }, { 11, 11, 930, -710 },
|
||||
{ 9, 9, 850, -830 }, { 15, 15, 1100, -780 }, { 10, 10, 1030, -540 }, { 10, 9, 1240, -700 },
|
||||
{ 6, 6, 1030, -620 }, { 5, 5, 1100, -660 }, { 11, 11, 1120, -750 }, { 10, 10, 1070, -580 },
|
||||
{ 6, 6, 890, -800 }, { 13, 13, 1080, -260 }, { 11, 11, 1060, -680 }, { 9, 9, 850, -830 },
|
||||
};
|
||||
|
||||
static s16 sDgnMinimapTexIndexBase[10] = {
|
||||
0, 10, 14, 18, 26, 36, 44, 52, 60, 66,
|
||||
};
|
||||
|
||||
static s16 sDgnCompassInfo[10][4] = {
|
||||
{ 3, 3, 1070, -690 }, { 4, 4, 1070, -690 }, { 3, 3, 1070, -690 }, { 4, 4, 1070, -690 }, { 4, 4, 1070, -690 },
|
||||
{ 4, 4, 900, -640 }, { 3, 3, 900, -640 }, { 10, 10, 900, -640 }, { 5, 5, 900, -640 }, { 3, 3, 900, -640 },
|
||||
};
|
||||
|
||||
static s16 sOwMinimapWidth[24] = {
|
||||
80, 80, 80, 96, 96, 48, 80, 64, 64, 80, 64, 64, 80, 64, 64, 48, 80, 64, 64, 64, 80, 80, 80, 80,
|
||||
};
|
||||
|
||||
static s16 sOwMinimapHeight[24] = {
|
||||
73, 64, 39, 58, 62, 85, 81, 73, 65, 65, 56, 59, 85, 56, 59, 85, 78, 72, 68, 59, 39, 81, 65, 85,
|
||||
};
|
||||
|
||||
static s16 sOwEntranceIconPosX[24] = {
|
||||
1, 269, 1, 1, 273, 279, 259, 1, 260, 1, 1, 235, 1, 1, 1, 267, 261, 1, 1, 260, 294, 259, 1, 243,
|
||||
};
|
||||
|
||||
static s16 sOwEntranceIconPosY[24] = {
|
||||
0, -833, 0, 0, -850, -889, -829, 0, -844, 0, 0, -836, 0, 0, 0, -852, -873, 0, 0, -848, -825, -829, 0, -833,
|
||||
};
|
||||
|
||||
static u16 sOwEntranceFlag[20] = {
|
||||
0xFFFF, 0x0008, 0x0007, 0xFFFF, 0x0000, 0x0003, 0x0005, 0xFFFF, 0x0002, 0xFFFF,
|
||||
0xFFFF, 0x0006, 0x000B, 0xFFFF, 0xFFFF, 0x0001, 0x0004, 0xFFFF, 0xFFFF, 0x000D,
|
||||
};
|
||||
|
||||
static f32 sFloorCoordY[10][8] = {
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 760.0f, 360.0f, -40.0f, -1000.0f, -2000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, 280.0f, -440.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, -640.0f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 760.0f, -40.0f, -440.0f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 4360.0f, 3640.0f, 2760.0f, 2020.0f, -140.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 690.0f, 330.0f, -160.0f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 1480.0f, 760.0f, 280.0f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, -343.3f, -863.3f, -1143.3f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, -100.0f, -520.0f, -3000.0f },
|
||||
{ 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, 9999.0f, -3000.0f },
|
||||
};
|
||||
|
||||
static u16 sSwitchEntryCount[10] = { 5, 6, 4, 10, 25, 50, 8, 10, 6, 1 };
|
||||
|
||||
static u8 sSwitchFromRoom[10][51] = {
|
||||
{ 11, 0, 0, 12, 11 },
|
||||
{ 0, 2, 3, 16, 17, 18 },
|
||||
{ 1, 6, 15, 16 },
|
||||
{ 0, 6, 7, 8, 11, 22, 23, 24, 25, 26 },
|
||||
{ 21, 4, 6, 10, 5, 11, 24, 28, 31, 10, 7, 12, 13, 30, 34, 35, 27, 33, 37, 29, 32, 26, 28, 31, 36 },
|
||||
{ 0, 1, 4, 5, 6, 10, 17, 20, 0, 1, 22, 25, 30, 39, 21, 17, 0, 1, 23, 26, 3, 9, 12, 14, 15,
|
||||
31, 8, 24, 27, 28, 33, 36, 37, 38, 43, 34, 23, 26, 31, 40, 42, 17, 22, 25, 29, 30, 32, 35, 39, 41 },
|
||||
{ 4, 15, 5, 23, 31, 29, 28, 30 },
|
||||
{ 8, 9, 12, 14, 21, 23, 24, 25, 26, 22 },
|
||||
{ 0, 1, 8, 9, 7, 8 },
|
||||
{ 255 },
|
||||
};
|
||||
|
||||
static u8 sSwitchFromFloor[10][51] = {
|
||||
{ 3, 4, 3, 4, 5 },
|
||||
{ 6, 6, 6, 7, 7, 7 },
|
||||
{ 7, 7, 6, 6 },
|
||||
{ 4, 4, 4, 4, 4, 5, 5, 5, 5, 5 },
|
||||
{ 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7 },
|
||||
{ 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4 },
|
||||
{ 6, 6, 5, 4, 5, 6, 7, 7 },
|
||||
{ 6, 7, 7, 7, 7, 6, 6, 6, 6, 5 },
|
||||
{ 6, 6, 7, 6, 5, 5 },
|
||||
{ 255 },
|
||||
};
|
||||
|
||||
static u8 sSwitchToRoom[10][51] = {
|
||||
{ 12, 11, 12, 11 },
|
||||
{ 16, 17, 18, 0, 2, 3 },
|
||||
{ 15, 16, 1, 6 },
|
||||
{ 22, 23, 24, 25, 26, 0, 6, 7, 8, 11 },
|
||||
{ 36, 26, 28, 31, 27, 33, 37, 29, 32, 32, 30, 34, 35, 7, 12, 13, 5, 11, 24, 28, 31, 4, 6, 10, 21 },
|
||||
{ 22, 25, 29, 30, 32, 35, 39, 41, 23, 26, 23, 26, 31, 40, 42, 40, 24, 27, 24, 27, 28, 34, 36, 37, 38,
|
||||
43, 33, 23, 26, 3, 8, 12, 14, 15, 31, 9, 22, 25, 30, 39, 21, 39, 0, 1, 4, 5, 6, 10, 17, 20 },
|
||||
{ 28, 30, 29, 31, 23, 5, 4, 15 },
|
||||
{ 22, 23, 24, 25, 26, 9, 12, 14, 21, 8 },
|
||||
{ 7, 8, 9, 8, 0, 1 },
|
||||
{ 255 },
|
||||
};
|
||||
|
||||
static u8 sFloorID[10][8] = {
|
||||
/* clang-format off */
|
||||
{ 0, 0, 0, F_3F, F_2F, F_1F, F_B1, F_B2 },
|
||||
{ 0, 0, 0, 0, 0, 0, F_2F, F_1F },
|
||||
{ 0, 0, 0, 0, 0, 0, F_1F, F_B1 },
|
||||
{ 0, 0, 0, 0, F_2F, F_1F, F_B1, F_B2 },
|
||||
{ 0, 0, 0, F_5F, F_4F, F_3F, F_2F, F_1F },
|
||||
{ 0, 0, 0, 0, F_3F, F_2F, F_1F, F_B1 },
|
||||
{ 0, 0, 0, 0, F_4F, F_3F, F_2F, F_1F },
|
||||
{ 0, 0, 0, 0, F_B1, F_B2, F_B3, F_B4 },
|
||||
{ 0, 0, 0, 0, 0, F_B1, F_B2, F_B3 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, F_1F },
|
||||
}; /* clang-format on */
|
||||
|
||||
/* Y coord of big skull icon on map screen, relative to center of screen.
|
||||
-99 if no dungeon map, otherwise (51 - 14 * FloorNumber) */
|
||||
static s16 sSkullFloorIconY[10] = { -47, -47, -33, -47, -47, -5, -19, -47, -99, -99 };
|
||||
|
||||
MapData gMapDataTable = {
|
||||
sFloorTexIndexOffset, sBossFloor, sRoomPalette,
|
||||
sMaxPaletteCount, sPaletteRoom, sRoomCompassOffsetX,
|
||||
sRoomCompassOffsetY, sDgnMinimapCount, sDgnMinimapTexIndexOffset,
|
||||
sOwMinimapTexSize, sOwMinimapTexOffset, sOwMinimapPosX,
|
||||
sOwMinimapPosY, sOwCompassInfo, sDgnMinimapTexIndexBase,
|
||||
sDgnCompassInfo, sOwMinimapWidth, sOwMinimapHeight,
|
||||
sOwEntranceIconPosX, sOwEntranceIconPosY, sOwEntranceFlag,
|
||||
sFloorCoordY, sSwitchEntryCount, sSwitchFromRoom,
|
||||
sSwitchFromFloor, sSwitchToRoom, sFloorID,
|
||||
sSkullFloorIconY,
|
||||
};
|
Loading…
Reference in a new issue