Merge pull request #571 from octorock/data

This commit is contained in:
notyourav
2022-09-05 11:38:44 -07:00
committed by GitHub
116 changed files with 9178 additions and 8793 deletions
File diff suppressed because it is too large Load Diff
+88 -95
View File
@@ -1,19 +1,20 @@
#include "beanstalkSubtask.h"
#include "backgroundAnimations.h"
#include "collision.h"
#include "common.h"
#include "fade.h"
#include "functions.h"
#include "game.h"
#include "global.h"
#include "item.h"
#include "main.h"
#include "manager.h"
#include "manager/diggingCaveEntranceManager.h"
#include "menu.h"
#include "object.h"
#include "screen.h"
#include "structures.h"
#include "manager/diggingCaveEntranceManager.h"
#include "scroll.h"
#include "structures.h"
extern void sub_0807C898(void);
extern void sub_0805BB74(s32);
@@ -35,17 +36,8 @@ extern const u16 gUnk_080B4410[];
extern const s16 gUnk_080B4488[];
extern const s16 gUnk_080B44A8[];
typedef struct {
u16 unk0;
u16 unk1;
} struct_080B44D0;
extern const struct_080B44D0 gUnk_080B44D0[];
extern const u16* gUnk_080B4550[];
extern const u16 gUnk_080B77C0[];
extern BgAnimationFrame* gUnk_080B7278[];
typedef struct {
u16 tileType;
u16 kind;
@@ -59,9 +51,8 @@ void sub_0801AD6C(const Data*, u32);
bool32 sub_0801A4F8(void);
bool32 sub_0801AA58(Entity*, u32, u32);
void sub_0801AB08(u16*, LayerStruct*);
void LoadBgAnimationGfx(BgAnimationGfx*);
u32 GetBgAnimationTimer(s32*);
void ClearBgAnimations(void);
u32 sub_0801AC68(u32 position, u32 data);
void sub_0801967C(void) {
gUnk_080B4458[gMenu.overlayType]();
@@ -403,7 +394,79 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
return FALSE;
}
ASM_FUNC("asm/non_matching/beanstalkSubtask/sub_0801AB08.inc", void sub_0801AB08(u16* a, LayerStruct* layer))
void sub_0801AB08(u16* specialData, LayerStruct* layer) {
u16* metatiles;
u16* mapData;
u16* mapDataClone;
u16 index;
u16 innerIndex;
u32 tmp2;
u32 tmp3;
u32 tmp1;
if (layer == &gMapBottom) {
tmp3 = 1;
} else {
tmp3 = 2;
}
tmp2 = tmp3 << 0xc;
mapDataClone = layer->mapDataClone;
mapData = layer->mapData;
for (index = 0; index < 0x40; index++) {
for (innerIndex = 0; innerIndex < 0x10; innerIndex++) {
if (mapData[0] < 0x4000) {
tmp1 = mapData[0] << 2;
} else {
tmp1 = sub_0801AC68(tmp2, mapDataClone[0]);
}
metatiles = layer->metatiles + tmp1;
specialData[0] = metatiles[0];
specialData[1] = metatiles[1];
specialData[0x80 + 0] = metatiles[2];
specialData[0x80 + 1] = metatiles[3];
specialData += 2;
if (mapData[1] < 0x4000) {
tmp1 = mapData[1] << 2;
} else {
tmp1 = sub_0801AC68(tmp2 + 1, mapDataClone[1]);
}
metatiles = layer->metatiles + tmp1;
specialData[0] = metatiles[0];
specialData[1] = metatiles[1];
specialData[0x80 + 0] = metatiles[2];
specialData[0x80 + 1] = metatiles[3];
specialData += 2;
if (mapData[2] < 0x4000) {
tmp1 = mapData[2] << 2;
} else {
tmp1 = sub_0801AC68(tmp2 + 2, mapDataClone[2]);
}
metatiles = layer->metatiles + tmp1;
specialData[0] = metatiles[0];
specialData[1] = metatiles[1];
specialData[0x80 + 0] = metatiles[2];
specialData[0x80 + 1] = metatiles[3];
specialData += 2;
if (mapData[3] < 0x4000) {
tmp1 = mapData[3] << 2;
} else {
tmp1 = sub_0801AC68(tmp2 + 3, mapDataClone[3]);
}
metatiles = layer->metatiles + tmp1;
specialData[0] = metatiles[0];
specialData[1] = metatiles[1];
specialData[0x80 + 0] = metatiles[2];
specialData[0x80 + 1] = metatiles[3];
specialData += 2;
mapData += 4;
mapDataClone += 4;
tmp2 = (u16)(tmp2 + 4);
}
specialData = specialData + 0x80;
}
}
u32 sub_0801AC68(u32 position, u32 data) {
u32 index;
@@ -601,7 +664,12 @@ void DeleteLoadedTileEntity(u32 position, s32 layer) {
ptr[t] = ptr[count];
}
// used for minish houses, seems to overwrite all tiles on layer 1 for them?
const struct_080B44D0 gUnk_080B44D0[] = {
{ 0x67, 0x4084 }, { 0x68, 0x4085 }, { 0x69, 0x4086 }, { 0x6a, 0x4087 },
{ 0x6b, 0x4088 }, { 0x27, 0x4083 }, { 0x23, 0x408d }, { 0x0, 0x0 },
};
// used for minish houses, seems to overwrite all tiles with certain collision values on layer 1 for them?
void sub_0801AFE4(void) {
const struct_080B44D0* ptr;
u8* collisionData;
@@ -615,9 +683,9 @@ void sub_0801AFE4(void) {
height = gRoomControls.height >> 4;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
for (ptr = gUnk_080B44D0; ptr->unk0 != 0; ptr++) {
if (ptr->unk0 == *collisionData) {
SetTile(ptr->unk1, y * 0x40 + x, 1);
for (ptr = gUnk_080B44D0; ptr->collision != 0; ptr++) {
if (ptr->collision == *collisionData) {
SetTile(ptr->tileIndex, y * 0x40 + x, 1);
break;
}
}
@@ -626,78 +694,3 @@ void sub_0801AFE4(void) {
collisionData = collisionData + (0x40 - width);
}
}
void UpdateBgAnimations(void) {
bool32 alreadyUploadedGfx = FALSE;
BgAnimation* animation = gBgAnimations;
s32 index = 8;
while (index != 0) {
if (animation->currentFrame == NULL) {
return;
}
if (--animation->timer == 0) {
if (!alreadyUploadedGfx) {
if (gFadeControl.active == 0) {
LoadBgAnimationGfx(animation->currentFrame->gfx);
}
animation->timer = GetBgAnimationTimer(&animation->currentFrame->unk_4);
animation->currentFrame++;
if (animation->currentFrame->gfx == NULL) {
animation->currentFrame -= animation->currentFrame->unk_4;
}
alreadyUploadedGfx = TRUE;
} else {
animation->timer++;
}
}
animation++;
index--;
}
}
u32 GetBgAnimationTimer(s32* param_1) {
if (param_1[0] < 0) {
return gUnk_080B4550[*(u8*)param_1][(Random() & 7)];
} else {
return param_1[0];
}
}
void LoadBgAnimationGfx(BgAnimationGfx* param_1) {
const u8* src;
u32 vramOffset;
u32 size;
while (TRUE) {
src = &gGlobalGfxAndPalettes[param_1->gfxOffset];
size = param_1->gfxSize;
vramOffset = param_1->vramOffset;
if ((*(u32*)param_1 >> 0x1c & 1) != 0) {
LoadPalettes(src, vramOffset >> 5, size);
} else {
MemCopy(src, (void*)(vramOffset + 0x6000000), size << 5);
}
if (*(int*)param_1 >= 0) {
return;
}
param_1++;
}
}
void LoadBgAnimations(u16* param_1) {
BgAnimation* animation;
ClearBgAnimations();
animation = gBgAnimations;
while (param_1[0] != 0xffff) {
animation->currentFrame = gUnk_080B7278[param_1[0]];
animation->timer = GetBgAnimationTimer(&animation->currentFrame->unk_4);
animation++;
param_1++;
}
}
void ClearBgAnimations(void) {
u32 index;
for (index = 0; index < MAX_BG_ANIMATIONS; index++) {
gBgAnimations[index].currentFrame = NULL;
}
}
+4 -1
View File
@@ -4,7 +4,10 @@
#include "room.h"
#include "structures.h"
extern const u8 gUnk_08109202[];
const u8 gUnk_08109202[] = {
255, 8, 24, 255, 0, 4, 28, 255, 16, 12, 20, 255, 255, 255, 255, 255, 0, 0,
};
u32 ConvInputToState(u32 keys);
bool32 sub_0805EC04(Entity* this) {
+133
View File
@@ -787,3 +787,136 @@ CollisionResult CollisionDefault(Entity* org, Entity* tgt, u32 direction, ColSet
}
return RESULT_COLLISION;
}
// unkData3 for tileType?
#ifdef EU
const u8 gUnk_080B37A0[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 11, 12, 11, 11, 11,
11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 13, 14, 14, 15, 16, 15, 14, 17, 18, 19, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 0, 0, 25, 25,
26, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 0, 36, 36, 36, 36, 37, 38, 38, 39,
39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 40, 40,
42, 41, 40, 43, 41, 40, 44, 41, 40, 45, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 40, 0,
42, 42, 42, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 40, 0, 42, 42, 42, 0, 46, 0, 0,
0, 0, 0, 0, 40, 0, 0, 0, 0, 43, 43, 43, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0,
40, 0, 44, 44, 44, 0, 46, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 45, 45, 45, 0, 0,
0, 0, 46, 0, 0, 0, 0, 0, 46, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0,
0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 0, 0, 40, 0, 40, 48, 49, 50, 51, 52, 52, 53,
53, 54, 55, 0, 56, 57, 58, 59, 0, 0, 60, 60, 60, 60, 0, 0, 0, 0, 61, 61, 62, 9, 9,
9, 9, 9, 9, 61, 61, 61, 9, 9, 61, 61, 61, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 63, 0, 63, 83,
83, 0, 0, 43, 43, 43, 0, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 85, 85, 85, 85, 85, 85, 85, 85,
85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 86, 0, 0, 86, 0, 0,
41, 0, 0, 41, 40, 0, 0, 0, 0, 0, 86, 0, 0, 86, 0, 0, 41, 0, 0, 41, 40, 0, 0,
0, 0, 0, 86, 0, 0, 86, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 10, 9, 10, 10, 13,
0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
16, 0, 12, 0, 0, 1, 24, 87, 88, 89, 89, 90, 91, 92, 93, 94, 95, 96, 0, 0, 0, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 97, 97, 97, 97, 98, 98, 0, 0, 99, 99, 99, 99,
100, 0, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 112, 112, 112, 112, 0, 113, 46, 46, 114,
114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 44, 45,
0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 116, 116, 0, 0, 0, 0, 43, 42, 45, 44, 117, 0, 82,
0, 0, 0, 0, 0, 0, 43, 42, 0, 0, 44, 0, 0, 45, 0, 0, 0, 0, 41, 40, 38, 38, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 90, 41, 41, 41, 12, 0, 12, 12, 41, 41, 116,
0, 0, 10, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 10, 10, 10, 10, 10, 10, 10, 40,
40, 84, 84, 84, 84, 0, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 10, 10, 10, 10, 10, 10,
15, 10, 42, 13, 0, 42, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 9, 9, 9, 56,
10, 42, 0, 10, 79, 77, 0, 0, 0, 0, 10, 0, 0, 0, 78, 78, 12, 12, 12, 12, 61, 61, 61,
40, 12, 40, 10, 10, 10, 0, 0, 39, 39, 39, 39, 39, 39, 38, 38, 52, 52, 12, 55, 0, 0, 0,
0, 0, 54, 0, 0, 0, 0, 40, 53, 53, 40, 55, 12, 0, 12, 12, 12, 12, 12, 54, 13, 40, 0,
0, 0, 52, 52, 52, 10, 10, 0, 0, 0, 0, 40, 15, 15, 51, 16, 10, 10, 16, 16, 10, 10, 10,
10, 0, 0, 15, 9, 14, 15, 14, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 15, 40, 15, 40, 40, 15, 12, 12, 12, 12, 12, 25,
40, 40, 40, 0, 16, 16, 116, 0, 0, 12, 45, 0, 40, 40, 43, 25, 0, 10, 0, 40, 0, 43, 43,
43, 0, 42, 42, 42, 42, 0, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 44, 42, 42, 0, 38,
38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 83, 0, 0, 0, 0, 38, 38, 40, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 41, 41, 38, 38, 12, 12, 41, 41, 12, 12, 116, 116, 116, 116, 116, 0,
0, 40, 0, 0, 43, 42, 0, 0, 44, 13, 40, 40, 42, 44, 45, 44, 45, 44, 45, 42, 42, 42, 43,
43, 43, 100, 101, 104, 106, 102, 107, 105, 103, 0, 14, 14, 41, 40, 0, 0, 40, 0, 40, 0, 17, 15,
0, 116, 43, 63, 35, 35, 35, 35, 116, 116, 0, 42, 42, 0, 0, 0, 10, 40, 40, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 0, 0, 44, 43, 40, 40, 40, 116, 0, 0,
};
#else
const u8 gUnk_080B37A0[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 11, 12, 11, 11, 11,
11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 13, 14, 14, 15, 16, 15, 14, 17, 18, 19, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 0, 0, 25, 25,
26, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 0, 36, 36, 36, 36, 37, 38, 38, 39,
39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 40, 40,
42, 41, 40, 43, 41, 40, 44, 41, 40, 45, 0, 0, 0, 0, 46, 0, 0, 41, 0, 0, 41, 40, 0,
42, 42, 42, 0, 0, 0, 0, 46, 0, 0, 41, 0, 0, 41, 40, 0, 42, 42, 42, 0, 46, 0, 0,
0, 0, 0, 41, 40, 0, 0, 41, 0, 43, 43, 43, 0, 0, 0, 0, 46, 0, 0, 41, 0, 0, 41,
40, 0, 44, 44, 44, 0, 46, 0, 0, 0, 0, 0, 41, 40, 0, 0, 41, 0, 45, 45, 45, 0, 0,
0, 0, 46, 0, 0, 0, 0, 0, 46, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0,
0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 0, 0, 40, 0, 40, 48, 49, 50, 51, 52, 52, 53,
53, 54, 55, 0, 56, 57, 58, 59, 0, 0, 60, 60, 60, 60, 0, 0, 0, 0, 61, 61, 62, 9, 9,
9, 9, 9, 9, 61, 61, 61, 9, 9, 61, 61, 61, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 63, 0, 63, 83,
83, 0, 0, 43, 43, 43, 0, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 85, 85, 85, 85, 85, 85, 85, 85,
85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 86, 0, 0, 86, 0, 0,
41, 0, 0, 41, 40, 0, 0, 0, 0, 0, 86, 0, 0, 86, 0, 0, 41, 0, 0, 41, 40, 0, 0,
0, 0, 0, 86, 0, 0, 86, 0, 0, 41, 0, 0, 41, 40, 0, 0, 0, 0, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 10, 9, 10, 10, 13,
0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
16, 0, 12, 0, 0, 1, 24, 87, 88, 89, 89, 90, 91, 92, 93, 94, 95, 96, 0, 0, 0, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 97, 97, 97, 97, 98, 98, 0, 0, 99, 99, 99, 99,
100, 0, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 112, 112, 112, 112, 0, 113, 46, 46, 114,
114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 44, 45,
0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 116, 116, 0, 0, 0, 0, 43, 42, 45, 44, 117, 0, 82,
0, 0, 0, 0, 0, 0, 43, 42, 0, 0, 44, 0, 0, 45, 0, 0, 0, 0, 41, 40, 38, 38, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 90, 41, 41, 41, 12, 0, 12, 12, 41, 41, 116,
0, 0, 10, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 10, 10, 10, 10, 10, 10, 10, 40,
40, 84, 84, 84, 84, 0, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 10, 10, 10, 10, 10, 10,
15, 10, 42, 13, 0, 42, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 9, 9, 9, 56,
10, 42, 0, 10, 79, 77, 0, 0, 0, 0, 10, 0, 0, 0, 78, 78, 12, 12, 12, 12, 61, 61, 61,
40, 12, 40, 10, 10, 10, 0, 0, 39, 39, 39, 39, 39, 39, 38, 38, 52, 52, 12, 55, 0, 0, 0,
0, 0, 54, 0, 0, 0, 0, 40, 53, 53, 40, 55, 12, 0, 12, 12, 12, 12, 12, 54, 13, 40, 0,
0, 0, 52, 52, 52, 10, 10, 0, 0, 0, 0, 40, 15, 15, 51, 16, 10, 10, 16, 16, 10, 10, 10,
10, 0, 0, 15, 9, 14, 15, 14, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 15, 40, 15, 40, 40, 15, 12, 12, 12, 12, 12, 25,
40, 40, 40, 0, 16, 16, 116, 0, 0, 12, 45, 0, 40, 40, 43, 25, 0, 10, 0, 40, 0, 43, 43,
43, 0, 42, 42, 42, 42, 0, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 44, 42, 42, 0, 38,
38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 83, 0, 0, 0, 0, 38, 38, 40, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 41, 41, 38, 38, 12, 12, 41, 41, 12, 12, 116, 116, 116, 116, 116, 0,
0, 40, 0, 0, 43, 42, 0, 0, 44, 13, 40, 40, 42, 44, 45, 44, 45, 44, 45, 42, 42, 42, 43,
43, 43, 100, 101, 104, 106, 102, 107, 105, 103, 0, 14, 14, 41, 40, 41, 41, 40, 41, 40, 41, 17, 15,
0, 116, 43, 63, 35, 35, 35, 35, 116, 116, 0, 42, 42, 0, 0, 0, 10, 40, 40, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 0, 0, 44, 43, 40, 40, 40, 116, 0, 0,
};
#endif
+171 -6
View File
@@ -25,10 +25,9 @@ typedef struct {
extern u8 gUnk_03003DE0;
extern u8 gzHeap[0x1000];
extern u32 gUnk_0201AEE0[0x800];
extern u8 gUnk_080CA11C[];
extern s16 gUnk_02018EE0[];
extern void (*gUnk_080C9CAC[])(void);
extern void (*const gUnk_080C9CAC[])(void);
static void StoreKeyInput(Input* input, u32 keyInput);
void ClearOAM(void);
@@ -76,7 +75,7 @@ void sub_0801E82C(void);
extern void* GetRoomProperty(u32, u32, u32);
extern u8 gMapData;
extern const DungeonLayout** gUnk_080C9C50[];
extern const DungeonLayout** const gUnk_080C9C50[];
extern u8 gMapDataBottomSpecial[];
u32 sub_0801DF10(const DungeonLayout* lyt);
@@ -480,13 +479,13 @@ void DrawDungeonFeatures(u32 floor, void* data, u32 size) {
}
}
u32 sub_0801DF10(const DungeonLayout* lyt) {
u32 sub_0801DF10(const DungeonLayout* layout) {
u32 offset;
if (lyt->unk_3 == 1)
if (layout->unk_3 == 1)
offset = 0x300;
else
offset = GetFlagBankOffset(lyt->area);
offset = GetFlagBankOffset(layout->area);
return offset;
}
@@ -898,6 +897,172 @@ void sub_0801E8D4(void) {
ASM_FUNC("asm/non_matching/common/sub_0801E99C.inc", u32 sub_0801E99C(u32 a1));
const struct_080C9C6C gUnk_080C9C6C[] = {
{ 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 },
};
void (*const gUnk_080C9CAC[])(void) = {
sub_0801E02C,
sub_0801E044,
sub_0801E074,
sub_0801E0A0,
};
// TODO merge
#ifdef JP
const struct_080C9CBC gUnk_080C9CBC[] = {
{ 15, 44, 45, 8, 0, 0, 0, 0 }, { 4, 8, 1, 0, 0, 1, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 13, 2, 0, 0, 6, 2, 0 }, { 4, 14, 2, 0, 0, 7, 2, 0 }, { 4, 15, 2, 0, 0, 8, 2, 0 },
{ 4, 16, 3, 0, 0, 9, 2, 0 }, { 0, 18, 5, 8, 20, 11, 3, 2 }, { 0, 18, 5, 8, 77, 11, 0, 4 },
{ 0, 18, 5, 8, 65, 11, 2, 5 }, { 0, 18, 5, 8, 7, 11, 1, 3 }, { 0, 18, 5, 8, 87, 11, 2, 0 },
{ 0, 18, 5, 8, 92, 11, 2, 8 }, { 0, 18, 5, 8, 37, 11, 0, 3 }, { 0, 18, 5, 8, 55, 11, 0, 5 },
{ 0, 18, 5, 8, 62, 11, 2, 5 }, { 0, 19, 5, 8, 63, 12, 0, 5 }, { 0, 19, 5, 8, 88, 12, 3, 4 },
{ 0, 19, 5, 8, 66, 12, 2, 5 }, { 0, 19, 5, 8, 10, 12, 3, 2 }, { 0, 20, 5, 8, 70, 13, 2, 6 },
{ 0, 19, 5, 8, 42, 12, 0, 5 }, { 0, 19, 5, 8, 38, 12, 0, 3 }, { 0, 19, 5, 8, 68, 12, 2, 6 },
{ 0, 20, 5, 8, 76, 13, 0, 4 }, { 0, 20, 5, 8, 91, 13, 3, 4 }, { 0, 20, 5, 8, 67, 13, 2, 5 },
{ 0, 20, 5, 8, 43, 13, 3, 5 }, { 0, 20, 5, 8, 41, 13, 0, 7 }, { 0, 20, 5, 8, 36, 13, 0, 3 },
{ 0, 20, 5, 8, 50, 13, 2, 7 }, { 1, 21, 6, 8, 39, 14, 0, 7 }, { 1, 21, 6, 8, 69, 14, 2, 6 },
{ 1, 21, 6, 8, 72, 14, 2, 6 }, { 1, 22, 6, 8, 82, 15, 2, 4 }, { 1, 22, 6, 8, 84, 15, 2, 4 },
{ 1, 21, 6, 8, 56, 14, 2, 5 }, { 1, 21, 6, 8, 78, 14, 2, 5 }, { 1, 21, 6, 8, 81, 14, 2, 4 },
{ 1, 21, 6, 8, 83, 14, 2, 4 }, { 1, 21, 6, 8, 85, 14, 2, 4 }, { 1, 21, 6, 8, 90, 14, 2, 4 },
{ 1, 22, 6, 8, 57, 15, 0, 5 }, { 1, 22, 6, 8, 71, 15, 2, 6 }, { 1, 22, 6, 8, 86, 15, 2, 4 },
{ 1, 22, 6, 8, 79, 15, 2, 5 }, { 1, 22, 6, 8, 89, 15, 2, 4 }, { 1, 22, 6, 8, 58, 15, 0, 5 },
{ 1, 22, 6, 8, 80, 15, 2, 4 }, { 2, 23, 7, 8, 40, 16, 1, 7 }, { 2, 23, 7, 8, 46, 16, 0, 5 },
{ 2, 23, 7, 8, 13, 16, 3, 2 }, { 2, 23, 7, 8, 16, 16, 1, 2 }, { 2, 23, 7, 8, 19, 16, 3, 2 },
{ 2, 23, 7, 8, 23, 16, 3, 2 }, { 2, 23, 7, 8, 47, 16, 3, 7 }, { 2, 23, 7, 8, 2, 16, 1, 3 },
{ 2, 23, 7, 8, 5, 16, 1, 3 }, { 2, 23, 7, 8, 9, 16, 1, 3 }, { 2, 23, 7, 8, 75, 16, 3, 7 },
{ 2, 23, 7, 8, 45, 16, 1, 5 }, { 2, 23, 7, 8, 51, 16, 2, 5 }, { 2, 23, 7, 8, 59, 16, 3, 5 },
{ 2, 23, 7, 8, 64, 16, 3, 5 }, { 2, 24, 7, 8, 11, 17, 3, 2 }, { 2, 24, 7, 8, 14, 17, 3, 2 },
{ 2, 24, 7, 8, 17, 17, 3, 2 }, { 2, 24, 7, 8, 21, 17, 3, 2 }, { 2, 24, 7, 8, 24, 17, 1, 2 },
{ 2, 24, 7, 8, 48, 17, 1, 7 }, { 2, 24, 7, 8, 3, 17, 1, 3 }, { 2, 24, 7, 8, 6, 17, 1, 3 },
{ 2, 24, 7, 8, 73, 17, 3, 7 }, { 2, 24, 7, 8, 49, 17, 1, 7 }, { 2, 24, 7, 8, 52, 17, 2, 5 },
{ 2, 24, 7, 8, 60, 17, 3, 5 }, { 2, 25, 7, 8, 12, 18, 3, 2 }, { 2, 25, 7, 8, 15, 18, 3, 2 },
{ 2, 25, 7, 8, 18, 18, 3, 2 }, { 2, 25, 7, 8, 22, 18, 3, 2 }, { 2, 25, 7, 8, 25, 18, 3, 2 },
{ 2, 25, 7, 8, 1, 18, 1, 3 }, { 2, 25, 7, 8, 4, 18, 1, 3 }, { 2, 25, 7, 8, 8, 18, 1, 3 },
{ 2, 25, 7, 8, 74, 18, 3, 7 }, { 2, 25, 7, 8, 44, 18, 1, 5 }, { 2, 25, 7, 8, 53, 18, 2, 5 },
{ 2, 25, 7, 8, 54, 18, 2, 5 }, { 2, 25, 7, 8, 61, 18, 3, 5 }, { 2, 23, 7, 8, 26, 16, 3, 2 },
{ 2, 24, 7, 8, 27, 17, 3, 2 }, { 2, 25, 7, 8, 28, 18, 3, 2 }, { 2, 23, 7, 8, 29, 16, 3, 2 },
{ 2, 24, 7, 8, 30, 17, 1, 2 }, { 2, 25, 7, 8, 31, 18, 3, 2 }, { 2, 24, 7, 8, 32, 17, 3, 2 },
{ 2, 24, 7, 8, 33, 17, 1, 2 }, { 2, 25, 7, 8, 34, 18, 3, 2 }, { 4, 26, 1, 8, 0, 1, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 31, 2, 8, 0, 6, 0, 0 }, { 4, 32, 2, 8, 0, 7, 0, 0 },
{ 4, 33, 2, 8, 0, 8, 0, 0 }, { 4, 34, 3, 8, 0, 9, 0, 0 }, { 0, 36, 5, 8, 0, 11, 0, 0 },
{ 0, 37, 5, 8, 0, 12, 0, 0 }, { 0, 38, 5, 8, 0, 13, 0, 0 }, { 1, 39, 6, 8, 0, 14, 0, 0 },
{ 1, 40, 6, 8, 0, 15, 0, 0 }, { 2, 41, 7, 8, 0, 16, 0, 0 }, { 2, 42, 7, 8, 0, 17, 0, 0 },
{ 2, 43, 7, 8, 0, 18, 0, 0 },
};
#else
#ifdef EU
const struct_080C9CBC gUnk_080C9CBC[] = {
{ 15, 44, 45, 8, 0, 0, 0, 0 }, { 4, 8, 1, 0, 0, 1, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 13, 2, 0, 0, 6, 2, 0 }, { 4, 14, 2, 0, 0, 7, 2, 0 }, { 4, 15, 2, 0, 0, 8, 2, 0 },
{ 4, 16, 3, 0, 0, 9, 2, 0 }, { 0, 18, 5, 8, 20, 11, 3, 2 }, { 0, 18, 5, 8, 77, 11, 0, 4 },
{ 0, 18, 5, 8, 65, 11, 2, 5 }, { 0, 18, 5, 8, 7, 11, 1, 3 }, { 0, 18, 5, 8, 87, 11, 2, 0 },
{ 0, 18, 5, 8, 92, 11, 2, 8 }, { 0, 18, 5, 8, 37, 11, 0, 3 }, { 0, 18, 5, 8, 55, 11, 0, 5 },
{ 0, 18, 5, 8, 62, 11, 2, 5 }, { 0, 19, 5, 8, 63, 12, 0, 5 }, { 0, 19, 5, 8, 88, 12, 3, 4 },
{ 0, 19, 5, 8, 66, 12, 2, 5 }, { 0, 19, 5, 8, 10, 12, 3, 2 }, { 0, 20, 5, 8, 70, 13, 2, 6 },
{ 0, 19, 5, 8, 42, 12, 0, 5 }, { 0, 19, 5, 8, 38, 12, 0, 3 }, { 0, 19, 5, 8, 68, 12, 2, 6 },
{ 0, 20, 5, 8, 76, 13, 0, 4 }, { 0, 20, 5, 8, 91, 13, 3, 4 }, { 0, 20, 5, 8, 67, 13, 2, 5 },
{ 0, 20, 5, 8, 43, 13, 3, 5 }, { 0, 20, 5, 8, 41, 13, 1, 7 }, { 0, 20, 5, 8, 36, 13, 0, 3 },
{ 0, 20, 5, 8, 50, 13, 2, 7 }, { 1, 21, 6, 8, 39, 14, 0, 7 }, { 1, 21, 6, 8, 69, 14, 2, 6 },
{ 1, 21, 6, 8, 72, 14, 2, 6 }, { 1, 22, 6, 8, 82, 15, 2, 4 }, { 1, 22, 6, 8, 84, 15, 2, 4 },
{ 1, 21, 6, 8, 56, 14, 2, 5 }, { 1, 21, 6, 8, 78, 14, 2, 5 }, { 1, 21, 6, 8, 81, 14, 2, 4 },
{ 1, 21, 6, 8, 83, 14, 2, 4 }, { 1, 21, 6, 8, 85, 14, 2, 4 }, { 1, 21, 6, 8, 90, 14, 2, 4 },
{ 1, 22, 6, 8, 57, 15, 0, 5 }, { 1, 22, 6, 8, 71, 15, 2, 6 }, { 1, 22, 6, 8, 86, 15, 2, 4 },
{ 1, 22, 6, 8, 79, 15, 2, 5 }, { 1, 22, 6, 8, 89, 15, 3, 4 }, { 1, 22, 6, 8, 58, 15, 0, 5 },
{ 1, 22, 6, 8, 80, 15, 2, 4 }, { 2, 23, 7, 8, 40, 16, 1, 7 }, { 2, 23, 7, 8, 46, 16, 0, 5 },
{ 2, 23, 7, 8, 13, 16, 3, 2 }, { 2, 23, 7, 8, 16, 16, 1, 2 }, { 2, 23, 7, 8, 19, 16, 3, 2 },
{ 2, 23, 7, 8, 23, 16, 3, 2 }, { 2, 23, 7, 8, 47, 16, 3, 7 }, { 2, 23, 7, 8, 2, 16, 1, 3 },
{ 2, 23, 7, 8, 5, 16, 1, 3 }, { 2, 23, 7, 8, 9, 16, 1, 3 }, { 2, 23, 7, 8, 75, 16, 3, 7 },
{ 2, 23, 7, 8, 45, 16, 1, 5 }, { 2, 23, 7, 8, 51, 16, 2, 5 }, { 2, 23, 7, 8, 59, 16, 1, 5 },
{ 2, 23, 7, 8, 64, 16, 1, 5 }, { 2, 24, 7, 8, 11, 17, 3, 2 }, { 2, 24, 7, 8, 14, 17, 3, 2 },
{ 2, 24, 7, 8, 17, 17, 3, 2 }, { 2, 24, 7, 8, 21, 17, 3, 2 }, { 2, 24, 7, 8, 24, 17, 1, 2 },
{ 2, 24, 7, 8, 48, 17, 3, 7 }, { 2, 24, 7, 8, 3, 17, 1, 3 }, { 2, 24, 7, 8, 6, 17, 1, 3 },
{ 2, 24, 7, 8, 73, 17, 3, 7 }, { 2, 24, 7, 8, 49, 17, 1, 7 }, { 2, 24, 7, 8, 52, 17, 2, 5 },
{ 2, 24, 7, 8, 60, 17, 3, 5 }, { 2, 25, 7, 8, 12, 18, 3, 2 }, { 2, 25, 7, 8, 15, 18, 3, 2 },
{ 2, 25, 7, 8, 18, 18, 3, 2 }, { 2, 25, 7, 8, 22, 18, 3, 2 }, { 2, 25, 7, 8, 25, 18, 3, 2 },
{ 2, 25, 7, 8, 1, 18, 1, 3 }, { 2, 25, 7, 8, 4, 18, 1, 3 }, { 2, 25, 7, 8, 8, 18, 1, 3 },
{ 2, 25, 7, 8, 74, 18, 3, 7 }, { 2, 25, 7, 8, 44, 18, 1, 5 }, { 2, 25, 7, 8, 53, 18, 2, 5 },
{ 2, 25, 7, 8, 54, 18, 2, 5 }, { 2, 25, 7, 8, 61, 18, 1, 5 }, { 2, 23, 7, 8, 26, 16, 3, 2 },
{ 2, 24, 7, 8, 27, 17, 3, 2 }, { 2, 25, 7, 8, 28, 18, 3, 2 }, { 2, 23, 7, 8, 29, 16, 3, 2 },
{ 2, 24, 7, 8, 30, 17, 1, 2 }, { 2, 25, 7, 8, 31, 18, 3, 2 }, { 2, 24, 7, 8, 32, 17, 3, 2 },
{ 2, 24, 7, 8, 33, 17, 1, 2 }, { 2, 25, 7, 8, 34, 18, 3, 2 }, { 4, 26, 1, 8, 0, 1, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 31, 2, 8, 0, 6, 0, 0 }, { 4, 32, 2, 8, 0, 7, 0, 0 },
{ 4, 33, 2, 8, 0, 8, 0, 0 }, { 4, 34, 3, 8, 0, 9, 0, 0 }, { 0, 36, 5, 8, 0, 11, 0, 0 },
{ 0, 37, 5, 8, 0, 12, 0, 0 }, { 0, 38, 5, 8, 0, 13, 0, 0 }, { 1, 39, 6, 8, 0, 14, 0, 0 },
{ 1, 40, 6, 8, 0, 15, 0, 0 }, { 2, 41, 7, 8, 0, 16, 0, 0 }, { 2, 42, 7, 8, 0, 17, 0, 0 },
{ 2, 43, 7, 8, 0, 18, 0, 0 },
};
#else
const struct_080C9CBC gUnk_080C9CBC[] = {
{ 15, 44, 45, 8, 0, 0, 0, 0 }, { 4, 8, 1, 0, 0, 1, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 10, 1, 0, 0, 3, 2, 0 }, { 4, 9, 1, 0, 0, 2, 2, 0 },
{ 4, 13, 2, 0, 0, 6, 2, 0 }, { 4, 14, 2, 0, 0, 7, 2, 0 }, { 4, 15, 2, 0, 0, 8, 2, 0 },
{ 4, 16, 3, 0, 0, 9, 2, 0 }, { 0, 18, 5, 8, 20, 11, 2, 2 }, { 0, 18, 5, 8, 77, 11, 0, 4 },
{ 0, 18, 5, 8, 65, 11, 2, 5 }, { 0, 18, 5, 8, 7, 11, 1, 3 }, { 0, 18, 5, 8, 87, 11, 2, 0 },
{ 0, 18, 5, 8, 92, 11, 2, 8 }, { 0, 18, 5, 8, 37, 11, 0, 3 }, { 0, 18, 5, 8, 55, 11, 0, 5 },
{ 0, 18, 5, 8, 62, 11, 2, 5 }, { 0, 19, 5, 8, 63, 12, 0, 5 }, { 0, 19, 5, 8, 88, 12, 2, 4 },
{ 0, 19, 5, 8, 66, 12, 2, 5 }, { 0, 19, 5, 8, 10, 12, 2, 2 }, { 0, 20, 5, 8, 70, 13, 2, 6 },
{ 0, 19, 5, 8, 42, 12, 0, 5 }, { 0, 19, 5, 8, 38, 12, 0, 3 }, { 0, 19, 5, 8, 68, 12, 2, 6 },
{ 0, 20, 5, 8, 76, 13, 0, 4 }, { 0, 20, 5, 8, 91, 13, 2, 4 }, { 0, 20, 5, 8, 67, 13, 2, 5 },
{ 0, 20, 5, 8, 43, 13, 2, 5 }, { 0, 20, 5, 8, 41, 13, 0, 7 }, { 0, 20, 5, 8, 36, 13, 0, 3 },
{ 0, 20, 5, 8, 50, 13, 2, 7 }, { 1, 21, 6, 8, 39, 14, 0, 7 }, { 1, 21, 6, 8, 69, 14, 2, 6 },
{ 1, 21, 6, 8, 72, 14, 2, 6 }, { 1, 22, 6, 8, 82, 15, 2, 4 }, { 1, 22, 6, 8, 84, 15, 2, 4 },
{ 1, 21, 6, 8, 56, 14, 2, 5 }, { 1, 21, 6, 8, 78, 14, 2, 5 }, { 1, 21, 6, 8, 81, 14, 2, 4 },
{ 1, 21, 6, 8, 83, 14, 2, 4 }, { 1, 21, 6, 8, 85, 14, 2, 4 }, { 1, 21, 6, 8, 90, 14, 2, 4 },
{ 1, 22, 6, 8, 57, 15, 0, 5 }, { 1, 22, 6, 8, 71, 15, 2, 6 }, { 1, 22, 6, 8, 86, 15, 2, 4 },
{ 1, 22, 6, 8, 79, 15, 2, 5 }, { 1, 22, 6, 8, 89, 15, 2, 4 }, { 1, 22, 6, 8, 58, 15, 0, 5 },
{ 1, 22, 6, 8, 80, 15, 2, 4 }, { 2, 23, 7, 8, 40, 16, 1, 7 }, { 2, 23, 7, 8, 46, 16, 0, 5 },
{ 2, 23, 7, 8, 13, 16, 2, 2 }, { 2, 23, 7, 8, 16, 16, 1, 2 }, { 2, 23, 7, 8, 19, 16, 2, 2 },
{ 2, 23, 7, 8, 23, 16, 2, 2 }, { 2, 23, 7, 8, 47, 16, 2, 7 }, { 2, 23, 7, 8, 2, 16, 1, 3 },
{ 2, 23, 7, 8, 5, 16, 1, 3 }, { 2, 23, 7, 8, 9, 16, 1, 3 }, { 2, 23, 7, 8, 75, 16, 2, 7 },
{ 2, 23, 7, 8, 45, 16, 1, 5 }, { 2, 23, 7, 8, 51, 16, 2, 5 }, { 2, 23, 7, 8, 59, 16, 2, 5 },
{ 2, 23, 7, 8, 64, 16, 2, 5 }, { 2, 24, 7, 8, 11, 17, 2, 2 }, { 2, 24, 7, 8, 14, 17, 2, 2 },
{ 2, 24, 7, 8, 17, 17, 2, 2 }, { 2, 24, 7, 8, 21, 17, 2, 2 }, { 2, 24, 7, 8, 24, 17, 1, 2 },
{ 2, 24, 7, 8, 48, 17, 1, 7 }, { 2, 24, 7, 8, 3, 17, 1, 3 }, { 2, 24, 7, 8, 6, 17, 1, 3 },
{ 2, 24, 7, 8, 73, 17, 2, 7 }, { 2, 24, 7, 8, 49, 17, 1, 7 }, { 2, 24, 7, 8, 52, 17, 2, 5 },
{ 2, 24, 7, 8, 60, 17, 2, 5 }, { 2, 25, 7, 8, 12, 18, 2, 2 }, { 2, 25, 7, 8, 15, 18, 2, 2 },
{ 2, 25, 7, 8, 18, 18, 2, 2 }, { 2, 25, 7, 8, 22, 18, 2, 2 }, { 2, 25, 7, 8, 25, 18, 2, 2 },
{ 2, 25, 7, 8, 1, 18, 1, 3 }, { 2, 25, 7, 8, 4, 18, 1, 3 }, { 2, 25, 7, 8, 8, 18, 1, 3 },
{ 2, 25, 7, 8, 74, 18, 2, 7 }, { 2, 25, 7, 8, 44, 18, 1, 5 }, { 2, 25, 7, 8, 53, 18, 2, 5 },
{ 2, 25, 7, 8, 54, 18, 2, 5 }, { 2, 25, 7, 8, 61, 18, 2, 5 }, { 2, 23, 7, 8, 26, 16, 2, 2 },
{ 2, 24, 7, 8, 27, 17, 2, 2 }, { 2, 25, 7, 8, 28, 18, 2, 2 }, { 2, 23, 7, 8, 29, 16, 2, 2 },
{ 2, 24, 7, 8, 30, 17, 1, 2 }, { 2, 25, 7, 8, 31, 18, 2, 2 }, { 2, 24, 7, 8, 32, 17, 2, 2 },
{ 2, 24, 7, 8, 33, 17, 1, 2 }, { 2, 25, 7, 8, 34, 18, 2, 2 }, { 4, 26, 1, 8, 0, 1, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 }, { 4, 28, 1, 8, 0, 3, 0, 0 },
{ 4, 27, 1, 8, 0, 2, 0, 0 }, { 4, 31, 2, 8, 0, 6, 0, 0 }, { 4, 32, 2, 8, 0, 7, 0, 0 },
{ 4, 33, 2, 8, 0, 8, 0, 0 }, { 4, 34, 3, 8, 0, 9, 0, 0 }, { 0, 36, 5, 8, 0, 11, 0, 0 },
{ 0, 37, 5, 8, 0, 12, 0, 0 }, { 0, 38, 5, 8, 0, 13, 0, 0 }, { 1, 39, 6, 8, 0, 14, 0, 0 },
{ 1, 40, 6, 8, 0, 15, 0, 0 }, { 2, 41, 7, 8, 0, 16, 0, 0 }, { 2, 42, 7, 8, 0, 17, 0, 0 },
{ 2, 43, 7, 8, 0, 18, 0, 0 },
};
#endif
#endif
// For sub_080A4418
// TODO these are gGlobalGfxAndPalettes offsets with the size of 0x80
#ifdef EU
const u32 gUnk_080CA06C[] = { 139744, 139744, 140256, 140768, 141280, 141792, 142304, 142816, 143840, 144864, 145888,
146912, 147936, 148960, 149984, 151008, 152032, 153056, 154080, 155104, 156128, 157152,
158176, 159200, 160224, 161248, 143328, 144352, 145376, 146400, 147424, 148448, 149472,
150496, 151520, 152544, 153568, 154592, 155616, 156640, 157664, 158688, 159712, 160736 };
#else
const u32 gUnk_080CA06C[] = { 139808, 139808, 140320, 140832, 141344, 141856, 142368, 142880, 143904, 144928, 145952,
146976, 148000, 149024, 150048, 151072, 152096, 153120, 154144, 155168, 156192, 157216,
158240, 159264, 160288, 161312, 143392, 144416, 145440, 146464, 147488, 148512, 149536,
150560, 151584, 152608, 153632, 154656, 155680, 156704, 157728, 158752, 159776, 160800 };
#endif
// TODO maybe KinstoneFlag?
const u8 gUnk_080CA11C[] = {
24, 45, 53, 54, 55, 57, 60, 68, 70, 71, 78, 80, 83, 85, 86, 88, 95, 96, 0, 0,
};
u32 sub_0801EA74(void) {
s32 r = (s32)Random() % 18;
u32 i;
+75
View File
@@ -0,0 +1,75 @@
#include "area.h"
#include "room.h"
#include "roomid.h"
// clang-format off
const ScreenTransitionData gUnk_0813AA54 = { 1, { 0, 0, 0, 0 }, 0x98, 0xa8, 0, AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MAIN_CART, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AA68 = { 1, { 0, 0, 0, 0 }, 0xa8, 0xb8, 0, AREA_DEEPWOOD_SHRINE, ROOM_DEEPWOOD_SHRINE_ENTRANCE, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AA7C = { 1, { 0, 0, 0, 0 }, 0x98, 0xa8, 0, AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MAIN_CART, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AA90 = { 1, { 0, 0, 0, 0 }, 0x78, 0xa8, 0, AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_CENTER_STAIRS_1F, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AAA4 = { 1, { 0, 0, 0, 0 }, 0x108, 0xf8, 0, AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ENTRANCE, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AAB8 = { 1, { 0, 0, 0, 0 }, 0x238, 0x58, 0, AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_ENTRANCE_ROOM, 1, 2, 6, 0 };
const ScreenTransitionData gUnk_0813AACC = { 1, { 0, 0, 0, 0 }, 0x198, 0x1d8, 0, AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_ENTRANCE, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AAE0 = { 1, { 0, 0, 0, 0 }, 0x88, 0x78, 0, AREA_ROYAL_CRYPT, ROOM_ROYAL_CRYPT_ENTRANCE, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AB08 = { 1, { 0, 0, 0, 0 }, 0x98, 0xa8, 0, AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MAIN_CART, 1, 2, 0, 0 };
const ScreenTransitionData gUnk_0813AAF4 = { 1, { 0, 0, 0, 0 }, 0x98, 0xa8, 0, AREA_CAVE_OF_FLAMES, ROOM_CAVE_OF_FLAMES_MAIN_CART, 1, 2, 0, 0 };
const ScreenTransitionData* const gWallMasterScreenTransitions[] = {
&gUnk_0813AA54, &gUnk_0813AA68, &gUnk_0813AA7C, &gUnk_0813AA90, &gUnk_0813AAA4,
&gUnk_0813AAB8, &gUnk_0813AACC, &gUnk_0813AAE0, &gUnk_0813AB08, &gUnk_0813AAF4,
};
const ScreenTransitionData unusedScreenTransition = { 1, { 0, 0, 0, 0 }, 0x48, 0x68, 0, AREA_CASTLE_GARDEN, ROOM_CASTLE_GARDEN_MAIN, 1, 0, 2, 0 };
const ScreenTransitionData gUnk_0813AB58 = { 1, { 0, 0, 0, 0 }, 0x108, 0xc8, 0, AREA_TEMPLE_OF_DROPLETS, ROOM_TEMPLE_OF_DROPLETS_ENTRANCE, 2, 2, 4, 0 };
const ScreenTransitionData gUnk_0813AB6C = { 1, { 0, 0, 0, 0 }, 0x198, 0x68, 0, AREA_RUINS, ROOM_RUINS_FORTRESS_ENTRANCE, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AB80 = { 1, { 0, 0, 0, 0 }, 0xc8, 0x48, 0, AREA_HYRULE_CASTLE, ROOM_HYRULE_CASTLE_4, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AB94 = { 1, { 0, 0, 0, 0 }, 0xb8, 0x5c, 0, AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_MAZAAL, 1, 1, 4, 0 };
const ScreenTransitionData gUnk_0813ABA8 = { 1, { 0, 0, 0, 0 }, 0xb8, 0x78, 0, AREA_FORTRESS_OF_WINDS, ROOM_FORTRESS_OF_WINDS_MAZAAL, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_0813ABBC = { 1, { 0, 0, 0, 0 }, 0xf0, 0xbc, 0, AREA_ROYAL_VALLEY, ROOM_ROYAL_VALLEY_MAIN, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ABD0 = { 1, { 0, 0, 0, 0 }, 0x1d8, 0xd8, 0, AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_GYORG_TORNADO, 2, 2, 4, 0 };
const ScreenTransitionData gUnk_0813ABE4 = { 1, { 0, 0, 0, 0 }, 0x198, 0x168, 0, AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_ENTRANCE, 1, 0, 4, 0 };
#if defined(EU) || defined(JP)
const ScreenTransitionData gUnk_0813ABF8 = { 1, { 0, 0, 0, 0 }, 0x128, 0x1a8, 0, AREA_CASTLE_GARDEN, ROOM_CASTLE_GARDEN_MAIN, 1, 0, 0, 0 };
#else
const ScreenTransitionData gUnk_0813ABF8 = { 1, { 0, 0, 0, 0 }, 0x128, 0x1b0, 0, AREA_CASTLE_GARDEN, ROOM_CASTLE_GARDEN_MAIN, 1, 0, 0, 0 };
#endif
const ScreenTransitionData gUnk_0813AC0C = { 1, { 0, 0, 0, 0 }, 0xb0, 0xd8, 0, AREA_VAATI_2, ROOM_VAATI_2_0, 2, 0, 0, 0 };
const ScreenTransitionData gUnk_0813AC20 = { 1, { 0, 0, 0, 0 }, 0xa8, 0x78, 0, AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_3F_TRIPLE_DARKNUT, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_0813AC34 = { 1, { 0, 0, 0, 0 }, 0xb0, 0x88, 0, AREA_VAATI_3, ROOM_VAATI_3_0, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_0813AC48 = { 1, { 0, 0, 0, 0 }, 0xb0, 0x88, 0, AREA_VAATI_3, ROOM_VAATI_3_0, 1, 1, 4, 0 };
const ScreenTransitionData gUnk_0813AC5C = { 1, { 0, 0, 0, 0 }, 0xa8, 0x88, 0, AREA_DARK_HYRULE_CASTLE_OUTSIDE, ROOM_DARK_HYRULE_CASTLE_OUTSIDE_GARDEN, 1, 0, 6, 0 };
const ScreenTransitionData gUnk_0813AC70 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_THRONE_ROOM, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AC84 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_HYRULE_CASTLE, ROOM_HYRULE_CASTLE_2, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AC98 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_DARK_HYRULE_CASTLE, ROOM_DARK_HYRULE_CASTLE_1F_ENTRANCE, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ACAC = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_HYRULE_CASTLE, ROOM_HYRULE_CASTLE_0, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ACC0 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_HYRULE_CASTLE, ROOM_HYRULE_CASTLE_1, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ACD4 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_MINISH_WOODS, ROOM_MINISH_WOODS_MAIN, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ACE8 = { 1, { 0, 0, 0, 0 }, 0x0, 0x0, 0, AREA_MT_CRENEL, ROOM_MT_CRENEL_TOP, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813ACFC = { 1, { 0, 0, 0, 0 }, 0xa8, 0x88, 0, AREA_SANCTUARY_ENTRANCE, ROOM_SANCTUARY_ENTRANCE_MAIN, 1, 0, 6, 0 };
const ScreenTransitionData gUnk_0813AD10 = { 1, { 0, 0, 0, 0 }, 0x50, 0x38, 0, AREA_HOUSE_INTERIORS_1, ROOM_HOUSE_INTERIORS_1_INN_WEST_ROOM, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AD24 = { 1, { 0, 0, 0, 0 }, 0x50, 0x38, 0, AREA_HOUSE_INTERIORS_1, ROOM_HOUSE_INTERIORS_1_INN_MIDDLE_ROOM, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AD38 = { 1, { 0, 0, 0, 0 }, 0x60, 0x38, 0, AREA_HOUSE_INTERIORS_1, ROOM_HOUSE_INTERIORS_1_INN_EAST_ROOM, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AD4C = { 1, { 0, 0, 0, 0 }, 0x78, 0x68, 0, AREA_HOUSE_INTERIORS_3, ROOM_HOUSE_INTERIORS_3_BORLOV_ENTRANCE, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_0813AD60 = { 1, { 0, 0, 0, 0 }, 0x98, 0x88, 0, AREA_SIMONS_SIMULATION, ROOM_SIMONS_SIMULATION_0, 1, 2, 4, 0 };
const ScreenTransitionData gUnk_0813AD74 = { 1, { 0, 0, 0, 0 }, 0x50, 0x48, 0, AREA_HOUSE_INTERIORS_3, ROOM_HOUSE_INTERIORS_3_SIMON, 1, 0, 4, 0 };
const ScreenTransitionData gUnk_0813AD88[] = {
{ 1, { 0, 0, 0, 0 }, 0x128, 0x188, 0, AREA_LAKE_HYLIA, ROOM_LAKE_HYLIA_MAIN, 1, 9, 4, 0},
{ 1, { 0, 0, 0, 0 }, 0x190, 0x1c0, 0, AREA_CLOUD_TOPS, ROOM_CLOUD_TOPS_CLOUD_BOTTOMS, 1, 10, 4, 0},
{ 1, { 0, 0, 0, 0 }, 0x1e8, 0x1f0, 0, AREA_CLOUD_TOPS, ROOM_CLOUD_TOPS_CLOUD_TOPS, 1, 10, 4, 0},
{ 1, { 0, 0, 0, 0 }, 0x268, 0x58, 0, AREA_PALACE_OF_WINDS, ROOM_PALACE_OF_WINDS_ENTRANCE_ROOM, 1, 10, 6, 0},
#if defined(EU)
{ 1, { 0, 0, 0, 0 }, 0x200, 0x350, 0, AREA_PALACE_OF_WINDS_BOSS, ROOM_PALACE_OF_WINDS_BOSS_0, 2, 10, 4, 0},
#else
{ 1, { 0, 0, 0, 0 }, 0x200, 0x300, 0, AREA_PALACE_OF_WINDS_BOSS, ROOM_PALACE_OF_WINDS_BOSS_0, 2, 10, 4, 0},
#endif
};
const ScreenTransitionData gUnk_0813ADEC[] = {
{ 1, { 0, 0, 0, 0 }, 0xb8, 0x58, 0, AREA_WIND_TRIBE_TOWER, ROOM_WIND_TRIBE_TOWER_ENTRANCE, 1, 0, 4, 0},
{ 1, { 0, 0, 0, 0 }, 0x248, 0x108, 0, AREA_HYRULE_FIELD, ROOM_HYRULE_FIELD_SOUTH_HYRULE_FIELD, 1, 0, 4, 0},
};
// clang-format on
+1 -1
View File
@@ -1,6 +1,6 @@
#include "transitions.h"
#include "area.h"
#include "roomid.h"
#include "transitions.h"
// clang-format off
+29 -6
View File
@@ -5,19 +5,21 @@
* @brief Debug task
*/
#include "global.h"
#include "sound.h"
#include "common.h"
#include "functions.h"
#include "game.h"
#include "main.h"
#include "menu.h"
#include "screen.h"
#include "message.h"
#include "game.h"
#include "screen.h"
#include "sound.h"
extern void (*const gUnk_08109A30[])(void);
void sub_0805FA04(void);
void sub_0805FA98(void);
void sub_0805FBC4(void);
void DebugTask(void) {
static void (*const gUnk_08109A30[])(void) = { sub_0805FA04, sub_0805FA98, sub_0805FBC4 };
gUnk_08109A30[gMain.state]();
}
@@ -44,7 +46,7 @@ void sub_0805FA04(void) {
}
void sub_0805FA98(void) {
int iVar1;
s32 iVar1;
switch (gInput.newKeys) {
case DPAD_UP:
@@ -101,3 +103,24 @@ void sub_0805FA98(void) {
void sub_0805FBC4(void) {
SetTask(TASK_TITLE);
}
extern const char gUnk_08109A58[];
extern const char gUnk_08109A68[];
extern const char gUnk_08109A78[];
extern const char gUnk_08109A88[];
extern const char gUnk_08109A98[];
extern const char gUnk_08109AA8[];
extern const char gUnk_08109AB8[];
const char* const* const unusedLanguageEnum[] = {
(void*)gUnk_08109AB8, (void*)gUnk_08109AA8, (void*)gUnk_08109A98, (void*)gUnk_08109A88,
(void*)gUnk_08109A78, (void*)gUnk_08109A68, (void*)gUnk_08109A58,
};
const char gUnk_08109A58[] = " ITALIAN \0";
const char gUnk_08109A68[] = " SPANISH \0";
const char gUnk_08109A78[] = " GERMAN \0";
const char gUnk_08109A88[] = " FRENCH \0";
const char gUnk_08109A98[] = " PAL ENGLISH \0";
const char gUnk_08109AA8[] = " USA ENGLISH \0";
const char gUnk_08109AB8[] = " JAPANESE \0";
+63 -4
View File
@@ -43,7 +43,7 @@ typedef struct {
Gleerok_HeapStruct* unk_84;
} GleerokEntity;
extern void (*const Gleerok_Functions[])(Entity*);
extern void (*const Gleerok_Functions[])(GleerokEntity*);
extern void (*const gUnk_080CD75C[])(GleerokEntity*);
extern void (*const gUnk_080CD7B8[])(GleerokEntity*);
extern void (*const gUnk_080CD7E4[])(GleerokEntity*);
@@ -51,7 +51,6 @@ extern void (*const gUnk_080CD810[])(GleerokEntity*);
extern void (*const gUnk_080CD828[])(GleerokEntity*);
extern void (*const gUnk_080CD848[])(GleerokEntity*);
extern u8 gUnk_080CD774[];
extern Gleerok_HeapStruct2 gUnk_080CD7C4[];
extern u8 gUnk_080CD884[];
extern u8 gUnk_080CD7F8[];
@@ -81,8 +80,68 @@ extern bool32 sub_0802E7CC(Gleerok_HeapStruct* param_1, u32 param_2, u32 param_3
extern bool32 sub_0802EA88(Gleerok_HeapStruct* param_1);
extern bool32 sub_0802E768(Gleerok_HeapStruct* param_1);
void Gleerok(Entity* this) {
Gleerok_Functions[GetNextFunction(this)](this);
void Gleerok_OnTick(GleerokEntity* this);
void Gleerok_OnDeath(GleerokEntity* this);
void sub_0802D158(GleerokEntity* this);
void sub_0802D170(GleerokEntity* this);
void sub_0802D218(GleerokEntity* this);
void sub_0802D258(GleerokEntity* this);
void sub_0802D33C(GleerokEntity* this);
void sub_0802D3B8(GleerokEntity* this);
void sub_0802D86C(GleerokEntity* this);
void sub_0802D650(GleerokEntity* this);
void (*const Gleerok_Functions[])(GleerokEntity*) = {
Gleerok_OnTick,
Gleerok_OnTick,
(void (*)(GleerokEntity*))GenericKnockback,
Gleerok_OnDeath,
(void (*)(GleerokEntity*))GenericConfused,
};
void (*const gUnk_080CD75C[])(GleerokEntity*) = {
sub_0802D158, sub_0802D170, sub_0802D170, sub_0802D218, sub_0802D258, sub_0802D33C,
};
const u8 gUnk_080CD774[] = {
24, 3, 16, 0, 32, 1, 16, 2, 16, 3, 24, 0, 24, 1, 4, 3, 4, 2, 24, 0, 4, 3, 24, 1, 4, 2, 24, 0, 24, 1, 24, 0, 24, 1,
24, 0, 24, 1, 4, 3, 4, 2, 24, 0, 24, 1, 4, 3, 4, 2, 24, 0, 24, 1, 4, 3, 4, 2, 4, 3, 4, 2, 24, 0, 24, 1, 255, 0,
};
void (*const gUnk_080CD7B8[])(GleerokEntity*) = {
sub_0802D3B8,
sub_0802D86C,
sub_0802D650,
};
/*
remaining data:
extern void (*const gUnk_080CD7B8[])(GleerokEntity*);
extern Gleerok_HeapStruct2 gUnk_080CD7C4[];
extern void (*const gUnk_080CD7E4[])(GleerokEntity*);
extern u8 gUnk_080CD7F8[];
extern void (*const gUnk_080CD810[])(GleerokEntity*);
extern void (*const gUnk_080CD828[])(GleerokEntity*);
extern u8 gUnk_080CD840[];
extern u8 gUnk_080CD844[];
extern void (*const gUnk_080CD848[])(GleerokEntity*);
extern u8 gUnk_080CD850[];
extern u8 gUnk_080CD854[];
extern u8 gUnk_080CD858[];
extern u8 gUnk_080CD85B[];
extern u8 gUnk_080CD85E[];
extern u8 gUnk_080CD861[];
extern u8 gUnk_080CD864[];
extern u8 gUnk_080CD867[];
extern const u8* gUnk_080CD86C[];
extern const u8* gUnk_080CD878[];
extern u8 gUnk_080CD884[];
*/
void Gleerok(GleerokEntity* this) {
Gleerok_Functions[GetNextFunction(super)](this);
}
void Gleerok_OnDeath(GleerokEntity* this) {
+5 -6
View File
@@ -1,11 +1,11 @@
#define NENT_DEPRECATED
#include "global.h"
#include "entity.h"
#include "enemy.h"
#include "sound.h"
#include "asm.h"
#include "functions.h"
#include "collision.h"
#include "enemy.h"
#include "enemy/gyorg.h"
#include "entity.h"
#include "functions.h"
#include "sound.h"
extern u8 gEntCount;
extern u8 gMapDataTopSpecial[];
@@ -29,7 +29,6 @@ void sub_080467DC(GyorgFemaleEntity*);
extern u8 gUpdateVisibleTiles;
extern u8 gUnk_080B3E80[];
extern u8 gUnk_080B37A0[];
extern const u8 gUnk_080D1A94[];
extern const u8 gUnk_080D1AAC[];
+11 -5
View File
@@ -5,9 +5,11 @@
* @brief Mazaal Head enemy
*/
#include "area.h"
#include "enemy.h"
#include "object.h"
#include "functions.h"
#include "object.h"
#include "roomid.h"
#include "screen.h"
extern void UnloadOBJPalette(Entity*);
@@ -98,8 +100,12 @@ void (*const gUnk_080CED74[])(Entity*) = {
sub_08034BA0,
};
const s8 gUnk_080CED84[] = { 0x0d, 0x10, -0xd, 0x10 };
const ScreenTransitionData gUnk_080CED88 = { 1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, 0x5a, 1, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_080CED9C = { 1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, 0x5a, 0, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_080CED88 = {
1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_PHASE_1, 1, 0, 0, 0
};
const ScreenTransitionData gUnk_080CED9C = {
1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_MAIN, 1, 0, 0, 0
};
void MazaalHead(Entity* this) {
MazaalHead_Functions[GetNextFunction(this)](this);
@@ -812,9 +818,9 @@ void sub_08034C00(Entity* this) {
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.origin_x, this->y.HALF.HI - gRoomControls.origin_y + 0xd, 3,
3) != 0) {
if (gRoomTransition.field_0x39 >= 0x3d) {
DoExitTransition((ScreenTransitionData*)&gUnk_080CED88);
DoExitTransition(&gUnk_080CED88);
} else {
DoExitTransition((ScreenTransitionData*)&gUnk_080CED9C);
DoExitTransition(&gUnk_080CED9C);
}
}
}
+3 -4
View File
@@ -6,9 +6,10 @@
*/
#include "enemy.h"
#include "functions.h"
#include "screenTransitions.h"
#include "script.h"
#include "structures.h"
#include "functions.h"
extern void sub_0807B600(u32);
@@ -51,8 +52,6 @@ const u8 gUnk_080CEECC[] = { 0x58, 0x68, 0x88, 0x68, 0xb8, 0x68, 0x58, 0xa8, 0x8
const s16 gUnk_080CEED8[] = { -0x82, -0x81, -0x80, -0x7f, -0x7e, -0x42, -0x41, -0x40, -0x3f, -0x3e, -2, -1,
1, 2, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x7e, 0x7f, 0x80, 0x81, 0x82 };
extern const ScreenTransitionData gUnk_0813ABA8;
void MazaalMacro(Entity* this) {
MazaalMacro_Functions[GetNextFunction(this)](this);
}
@@ -184,7 +183,7 @@ void sub_08034EE4(Entity* this) {
}
void sub_08034F58(Entity* this) {
DoExitTransition((ScreenTransitionData*)&gUnk_0813ABA8);
DoExitTransition(&gUnk_0813ABA8);
DeleteEntity(this);
}
+5 -6
View File
@@ -5,6 +5,7 @@
* @brief Moldworm enemy
*/
#include "collision.h"
#include "enemy.h"
#include "functions.h"
@@ -21,8 +22,6 @@ void sub_0802390C(Entity*);
void sub_080239F0(Entity*);
bool32 sub_08023B38(Entity*);
extern const u8 gUnk_080B37A0[];
extern void (*const Moldworm_Functions[])(Entity*);
extern void (*const gUnk_080CBC50[])(Entity*);
extern const s8 gUnk_080CBC70[];
@@ -488,12 +487,12 @@ void sub_080239F0(Entity* this) {
*(u8*)((int)&this->field_0x86 + 1) = 0x88;
}
bool32 sub_08023A38(u32 unk) {
if (unk == 0x1a || unk == 0x29) {
bool32 sub_08023A38(u32 tileType) {
if (tileType == 0x1a || tileType == 0x29) {
return TRUE;
} else {
unk = gUnk_080B37A0[unk];
if (unk == 9 || unk == 11 || unk == 10 || unk == 12) {
tileType = gUnk_080B37A0[tileType];
if (tileType == 9 || tileType == 11 || tileType == 10 || tileType == 12) {
return TRUE;
} else {
return FALSE;
+9 -12
View File
@@ -5,11 +5,10 @@
* @brief Puffstool enemy
*/
#include "enemy.h"
#include "collision.h"
#include "enemy.h"
#include "object.h"
extern u8 gUnk_080B37A0[];
extern u8 gUnk_080B3E80[];
bool32 sub_080258C4(Entity*);
@@ -414,25 +413,23 @@ bool32 sub_0802571C(Entity* this) {
}
bool32 sub_080257EC(Entity* this, u32 x, u32 y) {
u16 tmp;
tmp = sub_080B1A48(x - 0x00, y - 0x00, this->collisionLayer);
if (tmp != 0x312 && gUnk_080B37A0[tmp] != 0x16 && gUnk_080B3E80[tmp] == 0) {
u16 tileType = sub_080B1A48(x - 0x00, y - 0x00, this->collisionLayer);
if (tileType != 0x312 && gUnk_080B37A0[tileType] != 0x16 && gUnk_080B3E80[tileType] == 0) {
return TRUE;
}
tmp = sub_080B1A48(x - 0x10, y - 0x00, this->collisionLayer);
if (tmp != 0x312 && gUnk_080B37A0[tmp] != 0x16 && gUnk_080B3E80[tmp] == 0) {
tileType = sub_080B1A48(x - 0x10, y - 0x00, this->collisionLayer);
if (tileType != 0x312 && gUnk_080B37A0[tileType] != 0x16 && gUnk_080B3E80[tileType] == 0) {
return TRUE;
}
tmp = sub_080B1A48(x - 0x00, y - 0x10, this->collisionLayer);
if (tmp != 0x312 && gUnk_080B37A0[tmp] != 0x16 && gUnk_080B3E80[tmp] == 0) {
tileType = sub_080B1A48(x - 0x00, y - 0x10, this->collisionLayer);
if (tileType != 0x312 && gUnk_080B37A0[tileType] != 0x16 && gUnk_080B3E80[tileType] == 0) {
return TRUE;
}
tmp = sub_080B1A48(x - 0x10, y - 0x10, this->collisionLayer);
if (tmp != 0x312 && gUnk_080B37A0[tmp] != 0x16 && gUnk_080B3E80[tmp] == 0) {
tileType = sub_080B1A48(x - 0x10, y - 0x10, this->collisionLayer);
if (tileType != 0x312 && gUnk_080B37A0[tileType] != 0x16 && gUnk_080B3E80[tileType] == 0) {
return TRUE;
}
+7 -3
View File
@@ -5,10 +5,12 @@
* @brief Vaati Arm enemy
*/
#include "area.h"
#include "enemy.h"
#include "object.h"
#include "functions.h"
#include "hitbox.h"
#include "object.h"
#include "roomid.h"
typedef struct VaatiArm_HeapStruct1 {
union SplitHWord unk00;
@@ -166,7 +168,9 @@ const Coords gUnk_080D13D8[] = { { .HALF = { -0x60, 0x80 } }, { .HALF = { 0x60,
const u8 gUnk_080D13E0[] = { 0xc, 0xe, 0x10 };
const u8 gUnk_080D13E3[] = { 8, 9, 10, 4, 4, 5 };
const s8 gUnk_080D13E9[] = { -8, 8 };
const ScreenTransitionData gUnk_080D13EC = { 1, { 0, 0, 0, 0 }, 0x98, 0xb8, 0, 0x8a, 0, 1, 0, 0, 0 };
const ScreenTransitionData gUnk_080D13EC = {
1, { 0, 0, 0, 0 }, 0x98, 0xb8, 0, AREA_VAATIS_ARMS, ROOM_VAATIS_ARMS_FIRST, 1, 0, 0, 0
};
const u16 gUnk_080D1400[][5] = {
{ 0x8000, 0x7000, 0x6000, 0x5000, 0x4000 },
{ 0x8000, -0x7000, -0x6000, -0x5000, -0x4000 },
@@ -1450,7 +1454,7 @@ static void sub_08043DB0(Entity* this) {
pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.origin_x,
pEVar3->y.HALF.HI - gRoomControls.origin_y + 2, 3, 3)) {
DoExitTransition((ScreenTransitionData*)&gUnk_080D13EC);
DoExitTransition(&gUnk_080D13EC);
if ((gRoomTransition.field_0x39 & 3) != 3) {
gRoomTransition.player_status.room_next = 1;
}
+3 -2
View File
@@ -7,9 +7,9 @@
#include "enemy.h"
#include "functions.h"
#include "screenTransitions.h"
extern Entity* gUnk_020000B0;
extern const ScreenTransitionData gUnk_0813AB94;
bool32 sub_0803E4A0(Entity*);
void VaatiProjectile_OnTick(Entity*);
@@ -199,7 +199,8 @@ void VaatiProjectileFunction0Action7(Entity* this) {
sub_0803E4D8(this);
if ((gRoomControls.origin_y + gRoomControls.height + -0x10) <= this->y.HALF.HI) {
SetInitializationPriority();
DoExitTransition((ScreenTransitionData*)&gUnk_0813AB94);
// TODO this screen transition is to mazaal. Is this also the projectile for Mazaals shrink ray?
DoExitTransition(&gUnk_0813AB94);
}
}
+3 -4
View File
@@ -5,11 +5,10 @@
* @brief Wall Master enemy
*/
#include "enemy.h"
#include "area.h"
#include "enemy.h"
#include "functions.h"
extern ScreenTransitionData* gUnk_0813AB1C[];
#include "screenTransitions.h"
void sub_0802A78C(Entity*);
void sub_0802A7D0(Entity*);
@@ -169,7 +168,7 @@ void sub_0802A734(Entity* this) {
sub_0802A7D0(this);
if (--this->timer == 0) {
SetInitializationPriority();
DoExitTransition(gUnk_0813AB1C[gArea.dungeon_idx]);
DoExitTransition(gWallMasterScreenTransitions[gArea.dungeon_idx]);
} else {
this->z.WORD -= Q_16_16(2);
gPlayerState.field_0xa |= 0x80;
+3 -3
View File
@@ -5,14 +5,14 @@
* @brief Wall Master 2 enemy
*/
#include "enemy.h"
#include "area.h"
#include "enemy.h"
#include "functions.h"
#include "screenTransitions.h"
extern void GenericKnockback2(Entity*);
extern Entity* gUnk_020000B0;
extern ScreenTransitionData* gUnk_0813AB1C[];
void sub_0802CF64(Entity*);
void sub_0802CF8C(Entity*);
@@ -145,7 +145,7 @@ void sub_0802CEF4(Entity* this) {
sub_0802CFD8(this);
if (--this->timer == 0) {
SetInitializationPriority();
DoExitTransition(gUnk_0813AB1C[gArea.dungeon_idx]);
DoExitTransition(gWallMasterScreenTransitions[gArea.dungeon_idx]);
} else {
this->z.WORD -= Q_16_16(2);
if (this->z.HALF.HI < -0x30) {
-1
View File
@@ -225,7 +225,6 @@ void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem) {
}
}
}
return;
}
}
+2 -2
View File
@@ -23,7 +23,7 @@ extern const EntityData* gUnk_080D4110[];
bool32 sub_0804AD18(void);
void sub_0804AD6C(RoomControls*);
void sub_080A71F4(ScreenTransitionData*);
void sub_080A71F4(const ScreenTransitionData*);
bool32 sub_0804ACA8(void);
bool32 CheckInitPortal(void) {
@@ -143,7 +143,7 @@ void sub_0804ACC8(void) {
if (gFadeControl.active == 0) {
SetGlobalFlag(gArea.portal_type + ENTRANCE_0);
sub_0804AD6C(&gUI.roomControls);
sub_080A71F4(0);
sub_080A71F4(NULL);
}
}
+8 -9
View File
@@ -4,10 +4,11 @@
*
* @brief Game task
*/
#include "game.h"
#include "global.h"
#include "area.h"
#include "asm.h"
#include "backgroundAnimations.h"
#include "common.h"
#include "droptables.h"
#include "enemy.h"
@@ -15,7 +16,6 @@
#include "fileselect.h"
#include "flags.h"
#include "functions.h"
#include "game.h"
#include "item.h"
#include "itemMetaData.h"
#include "main.h"
@@ -87,7 +87,6 @@ extern const u16 gUnk_080FD5A8[];
extern void** gAreaTilesets[];
extern void** gAreaRoomMaps[];
extern void* gAreaMetatiles[];
extern void* gUnk_080B755C[];
extern void** gAreaTable[];
extern void FinalizeSave(void);
@@ -384,7 +383,7 @@ static void GameMain_ChangeRoom(void) {
SetPlayerControl(0);
gPauseMenuOptions.disabled = 0;
#if defined(USA) || defined(DEMO_USA)
if (gArea.unk28.inventoryGfxIdx != 0xff) {
if (gArea.unk28.textBaseIndex != 0xff) {
sub_0801855C();
}
CreateMiscManager();
@@ -394,13 +393,13 @@ static void GameMain_ChangeRoom(void) {
sub_0801855C();
#elif defined(JP)
CheckAreaDiscovery();
if (gArea.unk28.inventoryGfxIdx != 0xff) {
if (gArea.unk28.textBaseIndex != 0xff) {
sub_0801855C();
}
#elif defined(DEMO_JP)
if (gRoomTransition.field_0x2c[4])
CheckAreaDiscovery();
if (gArea.unk28.inventoryGfxIdx != 0xff) {
if (gArea.unk28.textBaseIndex != 0xff) {
sub_0801855C();
}
CreateMiscManager();
@@ -1428,7 +1427,7 @@ static void InitRoomResInfo(RoomResInfo* info, RoomHeader* r_hdr, u32 area, u32
info->tileset = *(gAreaTilesets[area] + r_hdr->tileset_id);
info->map = *(gAreaRoomMaps[area] + room);
info->metatiles = gAreaMetatiles[area];
info->bg_anim = gUnk_080B755C[area];
info->bg_anim = (void*)gUnk_080B755C[area];
info->exits = gExitLists[area][room];
if (gAreaTable[area] != NULL) {
info->properties = *(gAreaTable[area] + room);
@@ -1532,7 +1531,7 @@ void sub_08052FF4(u32 area, u32 room) {
gArea.currentRoomInfo.tileset = *(gAreaTilesets[area] + r_hdr->tileset_id);
gArea.currentRoomInfo.map = *(gAreaRoomMaps[area] + room);
gArea.currentRoomInfo.metatiles = gAreaMetatiles[area];
gArea.currentRoomInfo.bg_anim = gUnk_080B755C[area];
gArea.currentRoomInfo.bg_anim = (void*)gUnk_080B755C[area];
}
void ChangeLightLevel(s32 lightLevel) {
@@ -2840,7 +2839,7 @@ void sub_080548E8(void) {
void sub_08054920(void) {
MessageInitialize();
sub_0806F38C();
if (gUnk_080C9CBC[gFuseInfo._3]._5[1] != 0) {
if (gUnk_080C9CBC[gFuseInfo._3].unk7 != 0) {
MenuFadeIn(10, gUI.field_0x3);
} else {
gUI.nextToLoad = 3;
+113 -54
View File
@@ -1,22 +1,17 @@
#include "global.h"
#include "room.h"
#include "subtask.h"
#include "area.h"
#include "asm.h"
#include "common.h"
#include "flags.h"
#include "player.h"
#include "global.h"
#include "item.h"
#include "kinstone.h"
#include "area.h"
#include "manager.h"
#include "asm.h"
#include "message.h"
#include "player.h"
#include "room.h"
#include "subtask.h"
typedef struct {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
} struct_gUnk_080B3D20;
extern struct_gUnk_080B3D20 gUnk_080B3D20[];
extern const struct_gUnk_080B3D20 gUnk_080B3D20[];
extern EntityData gUnk_080FEC28[];
extern EntityData gUnk_080FEBE8[];
extern EntityData gUnk_080FECC8[];
@@ -28,7 +23,6 @@ extern const EntityData gUnk_080FEE18[];
extern const EntityData gUnk_080FEE48[];
extern const EntityData gUnk_080FEE58[];
extern const void* gUnk_080FED98[];
extern const u16 gUnk_080B3D14[];
void sub_08018AB4(int);
void sub_08018BB4(int);
@@ -37,10 +31,14 @@ void sub_08018B50(int);
void sub_080189EC(int);
void sub_0801876C(int, int);
void sub_08018738(u32, int);
void sub_08018690(int param_1, u16* param_2);
void ShuffleEzloHints(int count, u16* basePtr);
void sub_08018500();
bool32 sub_080185B4(const struct_gUnk_080B3D20* param_1);
const u16 gEzloHintTextBase[] = { TEXT_INDEX(TEXT_EZLO2, 0x0), TEXT_INDEX(TEXT_EZLO2, 0x12),
TEXT_INDEX(TEXT_EZLO2, 0x2d), TEXT_INDEX(TEXT_EZLO2, 0x48),
TEXT_INDEX(TEXT_EZLO2, 0x57), TEXT_INDEX(TEXT_EZLO2, 0x6f) };
void sub_08018500(void) {
s32 sVar1;
u32 i;
@@ -48,8 +46,8 @@ void sub_08018500(void) {
u16* puVar4;
struct_area_28* ptr = &gArea.unk28;
puVar3 = ptr->unk2C;
sVar1 = gUnk_080B3D14[ptr->inventoryGfxIdx] + ptr->unk29 * 3;
puVar3 = ptr->ezloHintTexts;
sVar1 = gEzloHintTextBase[ptr->textBaseIndex] + ptr->textIndexOffset * 3;
for (i = 0; i < 3; i++) {
*puVar3 = sVar1;
@@ -57,24 +55,85 @@ void sub_08018500(void) {
puVar3++;
}
sVar1 = ptr->inventoryGfxIdx * 5 + 0xc81;
for (i = 0, puVar4 = &ptr->unk2C[3]; i < 5; i++) {
sVar1 = ptr->textBaseIndex * 5 + 0xc81;
for (i = 0, puVar4 = &ptr->ezloHintTexts[3]; i < 5; i++) {
*puVar3 = sVar1;
sVar1++;
puVar3++;
}
sub_08018690(5, puVar4);
ptr->unk2a = 0;
ShuffleEzloHints(5, puVar4);
ptr->currentHint = 0;
}
/*
Some sort of ezlo hint? Seem to be the ezlo hints depending on the current progress.
*/
#define CHECK_ITEM 0xfe
#define CHECK_KINSTONE 0xfd
const struct_gUnk_080B3D20 gUnk_080B3D20[] = {
{ LOCAL_BANK_0, EZERO_1ST, 0, 0 },
{ LOCAL_BANK_0, ENTRANCE_0, 0, 1 },
{ LOCAL_BANK_2, KOBITO_MORI_1ST, 0, 2 },
{ LOCAL_BANK_2, M_PRIEST_TALK, 0, 3 },
{ CHECK_ITEM, ITEM_JABBERNUT, 0, 4 },
{ LOCAL_BANK_2, M_ELDER_TALK1ST, 0, 5 },
{ LOCAL_BANK_0, LV1_CLEAR, 1, 0 },
{ LOCAL_BANK_2, M_ELDER_TALK2ND, 1, 1 },
{ CHECK_ITEM, ITEM_KINSTONE_BAG, 1, 2 },
{ CHECK_ITEM, ITEM_SKILL_SPIN_ATTACK, 1, 3 },
{ LOCAL_BANK_1, YAMA_00_01, 1, 4 },
{ LOCAL_BANK_0, WATERBEAN_PUT, 1, 5 },
{ LOCAL_BANK_1, YAMA_00_00, 1, 6 },
{ LOCAL_BANK_2, KOBITO_YAMA_ENTER, 1, 7 },
{ LOCAL_BANK_2, OYAKATA_DEMO, 1, 8 },
{ LOCAL_BANK_0, LV2_CLEAR, 2, 0 },
{ CHECK_ITEM, ITEM_GREEN_SWORD, 2, 1 },
{ LOCAL_BANK_3, SEIIKI_ENTER, 2, 2 },
{ LOCAL_BANK_3, SEIIKI_BUNSHIN, 2, 3 },
{ LOCAL_BANK_0, DASHBOOTS, 2, 4 },
{ LOCAL_BANK_2, KHOUSE52_KINOKO, 2, 5 },
{ CHECK_ITEM, ITEM_QST_MUSHROOM, 2, 6 },
{ CHECK_ITEM, ITEM_PEGASUS_BOOTS, 2, 7 },
{ LOCAL_BANK_1, LOST_00_ENTER, 2, 8 },
{ CHECK_ITEM, ITEM_OCARINA, 3, 0 },
{ LOCAL_BANK_0, MIZUKAKI_START, 3, 1 },
{ LOCAL_BANK_0, MIZUKAKI_NECHAN, 3, 2 },
{ LOCAL_BANK_2, MIZUKAKI_BOOK_ALLBACK, 3, 3 },
{ CHECK_ITEM, ITEM_FLIPPERS, 3, 4 },
{ LOCAL_BANK_1, LV4_CLEAR_MES, 4, 0 },
{ CHECK_ITEM, ITEM_BLUE_SWORD, 4, 1 },
{ LOCAL_BANK_3, LV4_HAKA_08_CAP_0, 4, 2 },
{ LOCAL_BANK_3, OUBO_KAKERA, 4, 3 },
{ CHECK_KINSTONE, KINSTONE_9, 4, 4 },
{ LOCAL_BANK_0, TATSUMAKI, 4, 5 },
{ LOCAL_BANK_2, SORA_YAKATA_ENTER, 4, 6 },
{ LOCAL_BANK_2, SORA_CHIEF_TALK, 4, 7 },
{ LOCAL_BANK_0, LV5_CLEAR, 5, 0 },
{ CHECK_ITEM, ITEM_FOURSWORD, 5, 1 },
{ LOCAL_BANK_10, LV6_1d_KEYGET, 5, 2 },
{ LOCAL_BANK_10, LV6_KANE_START, 5, 3 },
{ LOCAL_BANK_10, LV6_GUFUU2_DEAD, 5, 4 },
{ LOCAL_BANK_10, LV6_ZELDA_DISCURSE, 5, 5 },
{ 0xff, 0xff, 0xff, 0xff },
};
void sub_0801855C(void) {
u32 bVar3;
struct_area_28* ptr;
// TODO: Figure out what is up with the pointer assignment
struct_gUnk_080B3D20* pcVar2 = (struct_gUnk_080B3D20*)&gArea.unk28;
const struct_gUnk_080B3D20* pcVar2 = (const struct_gUnk_080B3D20*)&gArea.unk28;
MemClear(pcVar2, sizeof(struct_area_28));
MemClear((void*)pcVar2, sizeof(struct_area_28));
ptr = (struct_area_28*)pcVar2;
// Find the latest hint that is true.
for (pcVar2 = gUnk_080B3D20, bVar3 = 0; pcVar2->unk0 != 0xff; pcVar2++) {
if (sub_080185B4(pcVar2)) {
bVar3 = ptr->unk2b;
@@ -83,21 +142,21 @@ void sub_0801855C(void) {
}
ptr->unk2b = bVar3;
pcVar2 = &gUnk_080B3D20[ptr->unk2b];
ptr->inventoryGfxIdx = pcVar2->unk2;
ptr->unk29 = pcVar2->unk3;
ptr->textBaseIndex = pcVar2->unk2;
ptr->textIndexOffset = pcVar2->unk3;
ptr->unk2b = bVar3 + 1;
sub_08018500();
}
bool32 sub_080185B4(const struct_gUnk_080B3D20* param_1) {
if (param_1->unk0 == 0xff)
return 0;
return FALSE;
if (param_1->unk0 == 0xfe) {
if (param_1->unk0 == CHECK_ITEM) {
return GetInventoryValue(param_1->unk1) != 0;
}
if (param_1->unk0 == 0xfd) {
if (param_1->unk0 == CHECK_KINSTONE) {
return CheckKinstoneFused(param_1->unk1);
}
return CheckLocalFlagByBank(gLocalFlagBanks[param_1->unk0], param_1->unk1);
@@ -105,18 +164,18 @@ bool32 sub_080185B4(const struct_gUnk_080B3D20* param_1) {
void sub_080185F8(void) {
struct_area_28* ptr2 = &gArea.unk28;
struct_gUnk_080B3D20* ptr = &gUnk_080B3D20[ptr2->unk2b];
const struct_gUnk_080B3D20* ptr = &gUnk_080B3D20[ptr2->unk2b];
if (sub_080185B4(ptr)) {
ptr2->inventoryGfxIdx = ptr->unk2;
ptr2->unk29 = ptr->unk3;
ptr2->textBaseIndex = ptr->unk2;
ptr2->textIndexOffset = ptr->unk3;
ptr2->unk2b++;
sub_08018500();
}
}
void GenerateAreaHint(void) {
u16 uVar1;
u16 tmp;
struct_area_28* ptr;
gPlayerState.queued_action = PLAYER_TALKEZLO;
@@ -127,24 +186,24 @@ void GenerateAreaHint(void) {
gRoomTransition.hint_height = 0;
#endif
ptr = &gArea.unk28;
if (ptr->inventoryGfxIdx == 0xff) {
gRoomTransition.hint_idx = ptr->unk2C[0];
if (ptr->textBaseIndex == 0xff) {
gRoomTransition.hint_idx = ptr->ezloHintTexts[0];
} else {
gRoomTransition.hint_idx = ptr->unk2C[ptr->unk2a];
ptr->unk2a++;
if (ptr->unk2a > 7) {
ptr->unk2a = 0;
sub_08018690(8, ptr->unk2C);
if (ptr->unk2C[0] == gRoomTransition.hint_idx) {
uVar1 = ptr->unk2C[0];
ptr->unk2C[0] = ptr->unk3E;
ptr->unk3E = uVar1;
gRoomTransition.hint_idx = ptr->ezloHintTexts[ptr->currentHint];
ptr->currentHint++;
if (ptr->currentHint > 7) {
ptr->currentHint = 0;
ShuffleEzloHints(8, ptr->ezloHintTexts);
if (ptr->ezloHintTexts[0] == gRoomTransition.hint_idx) {
tmp = ptr->ezloHintTexts[0];
ptr->ezloHintTexts[0] = ptr->ezloHintTexts[7];
ptr->ezloHintTexts[7] = tmp;
}
}
}
}
void sub_08018690(int param_1, u16* param_2) {
void ShuffleEzloHints(int count, u16* basePtr) {
u32 uVar1;
s32 uVar4;
s32 uVar2;
@@ -152,14 +211,14 @@ void sub_08018690(int param_1, u16* param_2) {
u16* puVar4;
u16* puVar5;
uVar4 = param_1 - 1;
uVar4 = count - 1;
if (uVar4 != 0) {
puVar5 = (u16*)(uVar4 * 2 + (int)param_2);
puVar5 = (u16*)(uVar4 * 2 + (int)basePtr);
do {
uVar2 = Random();
iVar3 = uVar2 % (uVar4 + 1);
uVar1 = *puVar5;
puVar4 = (u16*)(iVar3 * 2 + (int)param_2);
puVar4 = (u16*)(iVar3 * 2 + (int)basePtr);
*puVar5 = *puVar4;
*puVar4 = uVar1;
puVar5--;
@@ -168,19 +227,19 @@ void sub_08018690(int param_1, u16* param_2) {
}
}
void sub_080186C0(u32 param_1) {
gArea.unk28.inventoryGfxIdx = 0xff;
gArea.unk28.unk2C[0] = param_1;
void SetNextAreaHint(u32 textId) {
gArea.unk28.textBaseIndex = 0xff;
gArea.unk28.ezloHintTexts[0] = textId;
}
void sub_080186D4(void) {
if (gArea.unk28.inventoryGfxIdx == 0xff) {
if (gArea.unk28.textBaseIndex == 0xff) {
sub_0801855C();
}
}
void sub_080186EC(u32 param_1) {
struct_080C9CBC* psVar1;
const struct_080C9CBC* psVar1;
u32 i;
for (i = 0, psVar1 = gUnk_080C9CBC; i <= 100; psVar1++, i++) {
@@ -191,7 +250,7 @@ void sub_080186EC(u32 param_1) {
}
void sub_08018710(u32 param_1) {
struct_080C9CBC* psVar1;
const struct_080C9CBC* psVar1;
u32 i;
for (i = 0, psVar1 = gUnk_080C9CBC; i <= 100; psVar1++, i++) {
+9 -8
View File
@@ -90,14 +90,15 @@ void AgbMain(void) {
}
}
extern u8 gUnk_02000030[];
// Interrupt handlers that are loaded into RAM.
extern u8 sub_080B197C[];
extern u8 ram_sub_080B197C[];
extern u8 gUnk_02038560[];
extern u8 gUnk_080B2CD8[];
extern u8 gUnk_080B2CD8_2[];
extern u8 gUnk_080B2CD8_3[];
extern u8 gUnk_02000030[];
extern u8 RAMFUNCS_END[];
extern u8 gCopyToEndOfEwram_Start[];
extern u8 gCopyToEndOfEwram_End[];
extern u8 gEndOfEwram[];
static void InitOverlays(void) {
u32 size;
@@ -108,14 +109,14 @@ static void InitOverlays(void) {
REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3;
size = 0x3FFD0;
MemClear(gUnk_02000030, size);
size = (u32)gUnk_080B2CD8 - (u32)sub_080B197C;
size = (u32)RAMFUNCS_END - (u32)sub_080B197C;
if (size != 0) {
MemCopy(sub_080B197C, ram_sub_080B197C, size);
}
size = (u32)gUnk_080B2CD8_2 - (u32)gUnk_080B2CD8_3;
size = (u32)gCopyToEndOfEwram_End - (u32)gCopyToEndOfEwram_Start;
if (size != 0) {
MemCopy(gUnk_080B2CD8_3, gUnk_02038560, size);
MemCopy(gCopyToEndOfEwram_Start, gEndOfEwram, size);
}
DispReset(0);
+2 -2
View File
@@ -78,7 +78,7 @@ static void EzloHintManager_Action2(EzloHintManager* this) {
case 3:
super->action = 4;
super->subAction = 0;
sub_080186C0(this->msg_idx);
SetNextAreaHint(this->msg_idx);
return;
}
}
@@ -149,7 +149,7 @@ static void EzloHintManager_Action3(EzloHintManager* this) {
}
static void EzloHintManager_Action4(EzloHintManager* this) {
if (gArea.unk28.inventoryGfxIdx != 0xFF) {
if (gArea.unk28.textBaseIndex != 0xFF) {
DeleteThisEntity();
}
if (CheckFlags(this->flag1)) {
+5 -5
View File
@@ -13,6 +13,7 @@
#include "area.h"
#include "common.h"
#include "flags.h"
#include "message.h"
#include "room.h"
#include "sound.h"
@@ -61,16 +62,15 @@ void FightManager_Init(FightManager* this) {
}
void FightManager_WaitForFlag(FightManager* this) {
int tmp;
if (CheckFlags(this->fightStartFlag)) {
FightManager_LoadFight(this);
if (!this->unk_35) {
tmp = gRoomVars.fight_bgm ? gRoomVars.fight_bgm : BGM_FIGHT_THEME2;
u32 bgm = gRoomVars.fight_bgm ? gRoomVars.fight_bgm : BGM_FIGHT_THEME2;
this->prevBgm = gArea.bgm;
gArea.bgm = tmp;
SoundReq(tmp);
gArea.bgm = bgm;
SoundReq(bgm);
}
sub_080186C0(0xB0F);
SetNextAreaHint(TEXT_INDEX(TEXT_EZLO, 0xf));
}
}
+26 -27
View File
@@ -118,22 +118,21 @@ void MiscManager_Type0(MiscManager* this) {
DeleteThisEntity();
}
void sub_08058F44(u32 unk0, u32 unk1, u32 unk2) {
if (CheckRoomFlag(unk2))
void sub_08058F44(u32 x, u32 y, u32 flag) {
if (CheckRoomFlag(flag))
return;
if (sub_080B1A48(unk0, unk1, 1) != 0x61)
if (sub_080B1A48(x, y, 1) != 0x61)
return;
SetTileType(0x26, ((unk0 >> 4) & 0x3F) | (((unk1 >> 4) & 0x3F) << 6), 1);
sub_08058F84(unk0, unk1);
SetTileType(0x26, ((x >> 4) & 0x3F) | (((y >> 4) & 0x3F) << 6), 1);
sub_08058F84(x, y);
}
void sub_08058F84(u32 unk0, u32 unk1) {
Entity* tmp;
tmp = CreateObject(DIRT_PARTICLE, 0, 0);
if (!tmp)
void sub_08058F84(u32 x, u32 y) {
Entity* particle = CreateObject(DIRT_PARTICLE, 0, 0);
if (!particle)
return;
tmp->x.HALF.HI = gRoomControls.origin_x + unk0;
tmp->y.HALF.HI = gRoomControls.origin_y + unk1;
particle->x.HALF.HI = gRoomControls.origin_x + x;
particle->y.HALF.HI = gRoomControls.origin_y + y;
}
void MiscManager_Type1(MiscManager* this) {
@@ -147,12 +146,12 @@ void MiscManager_Type1(MiscManager* this) {
super->subAction = 8;
super->subtimer = 2;
}
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
DeleteManager(super);
}
break;
case 1:
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
super->action = 2;
super->timer = 120;
RequestPriorityDuration((Entity*)this, 240);
@@ -173,7 +172,7 @@ void MiscManager_Type1(MiscManager* this) {
}
break;
default:
SetFlag(this->unk_3e);
SetFlag(this->flags);
SetPlayerControl(1);
DeleteThisEntity();
}
@@ -237,14 +236,14 @@ void MiscManager_Type5(MiscManager* this) {
}
break;
case 0:
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
DeleteThisEntity();
}
super->action = 1;
SetTileType(0x365, ((this->unk_38 >> 4) & 0x3f) | ((this->unk_3a >> 4) & 0x3f) << 6, super->type2);
break;
case 1:
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
RequestPriorityDuration((Entity*)this, 75);
super->timer = 45;
super->action++;
@@ -255,14 +254,14 @@ void MiscManager_Type5(MiscManager* this) {
void MiscManager_Type6(MiscManager* this) {
if (super->action == 0) {
super->action = 1;
super->type2 = CheckFlags(this->unk_3e);
super->type2 = CheckFlags(this->flags);
if (super->type2) {
gRoomVars.lightLevel = this->unk_3a;
} else {
gRoomVars.lightLevel = this->unk_38;
}
} else {
u32 tmp = CheckFlags(this->unk_3e);
u32 tmp = CheckFlags(this->flags);
if (super->type2 != tmp) {
super->type2 = tmp;
if (tmp) {
@@ -305,12 +304,12 @@ void MiscManager_Type8(MiscManager* this) {
void MiscManager_Type9(MiscManager* this) {
if (super->action == 0) {
super->action = 1;
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
sub_080592EC(this);
DeleteThisEntity();
}
} else {
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
sub_080592EC(this);
sub_0805930C(this);
#ifndef EU
@@ -348,7 +347,7 @@ void SetDirtTile(u32 tile) {
void MiscManager_TypeA(MiscManager* this) {
super->action = 1;
if (this->unk_3c == gTextRender.curToken.textIndex) {
SetFlag(this->unk_3e);
SetFlag(this->flags);
DeleteThisEntity();
}
}
@@ -373,7 +372,7 @@ bool32 sub_080593CC(MiscManager* this) {
void MiscManager_TypeC(MiscManager* this) {
Entity* tmp;
if (CheckFlags(this->unk_3e)) {
if (CheckFlags(this->flags)) {
DeleteThisEntity();
}
if (!CheckFlags(this->unk_3c))
@@ -389,7 +388,7 @@ void MiscManager_TypeC(MiscManager* this) {
}
void MiscManager_TypeD(MiscManager* this) {
if (!CheckFlags(this->unk_3e)) {
if (!CheckFlags(this->flags)) {
SetPlayerControl(3);
if (gRoomControls.reload_flags)
return;
@@ -411,17 +410,17 @@ void MiscManager_TypeE(MiscManager* this) {
case 1:
if (!GetInventoryValue(ITEM_FOURSWORD))
return;
if (CheckLocalFlagByBank(FLAG_BANK_10, 0x85))
if (CheckLocalFlagByBank(FLAG_BANK_10, LV6SOTO_01_CAP_0))
return;
super->action = 2;
sub_080186C0(0xB0F);
SetNextAreaHint(TEXT_INDEX(TEXT_EZLO, 0xf));
break;
case 2:
default:
if (gArea.unk28.inventoryGfxIdx != 0xFF) {
if (gArea.unk28.textBaseIndex != 0xFF) {
DeleteThisEntity();
}
if (CheckLocalFlagByBank(FLAG_BANK_10, 0x85)) {
if (CheckLocalFlagByBank(FLAG_BANK_10, LV6SOTO_01_CAP_0)) {
sub_0801855C();
DeleteThisEntity();
}
+1 -2
View File
@@ -6,6 +6,7 @@
*/
#include "manager/vaati3InsideArmManager.h"
#include "functions.h"
#include "screenTransitions.h"
#include "sound.h"
#include "structures.h"
@@ -14,8 +15,6 @@ void Vaati3InsideArmManager_Init(Vaati3InsideArmManager*);
void Vaati3InsideArmManager_Action1(Vaati3InsideArmManager*);
void Vaati3InsideArmManager_Action2(Vaati3InsideArmManager*);
extern ScreenTransitionData gUnk_0813AC48;
void sub_0805DC70(void);
void Vaati3InsideArmManager_Main(Vaati3InsideArmManager* this) {
+2 -3
View File
@@ -13,11 +13,10 @@
#include "object.h"
#include "save.h"
#include "screen.h"
#include "screenTransitions.h"
#include "sound.h"
#include "structures.h"
extern ScreenTransitionData gUnk_0813AC34;
void sub_0805E094(void);
void Vaati3StartManager_Type0(Vaati3StartManager*);
void Vaati3StartManager_Type1(Vaati3StartManager*);
@@ -155,5 +154,5 @@ void Vaati3StartManager_Type1_Action1(Vaati3StartManager* this) {
void sub_0805E094(void) {
SetInitializationPriority();
sub_0808091C((ScreenTransitionData*)&gUnk_0813AC34, TRANSITION_7);
sub_0808091C(&gUnk_0813AC34, TRANSITION_7);
}
+27 -14
View File
@@ -1,19 +1,20 @@
#include "global.h"
#include "menu.h"
#include "room.h"
#include "subtask.h"
#include "area.h"
#include "common.h"
#include "enemy.h"
#include "flags.h"
#include "functions.h"
#include "kinstone.h"
#include "main.h"
#include "menu.h"
#include "message.h"
#include "npc.h"
#include "object.h"
#include "room.h"
#include "roomid.h"
#include "save.h"
#include "screen.h"
#include "sound.h"
#include "save.h"
#include "kinstone.h"
#include "flags.h"
#include "message.h"
#include "main.h"
#include "object.h"
#include "npc.h"
#include "enemy.h"
#include "functions.h"
#include "subtask.h"
#include "ui.h"
extern u32 sub_08000E44(u32);
@@ -64,6 +65,18 @@ Subtask KinstoneMenu_Type3;
Subtask KinstoneMenu_Type4;
Subtask KinstoneMenu_Type5;
// Belongs to subtask2.c
const ScreenTransitionData gUnk_08128024[] = {
{ 1, { 0, 0, 0, 0 }, 0x98, 0xf8, 0, AREA_MT_CRENEL, ROOM_MT_CRENEL_CAVERN_OF_FLAMES_ENTRANCE, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0xf8, 0xf8, 0, AREA_VEIL_FALLS, ROOM_VEIL_FALLS_MAIN, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0x1e8, 0x1a8, 0, AREA_CLOUD_TOPS, ROOM_CLOUD_TOPS_CLOUD_TOPS, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0x278, 0x58, 0, AREA_HYRULE_TOWN, ROOM_HYRULE_TOWN_MAIN, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0xa8, 0x1b8, 0, AREA_LAKE_HYLIA, ROOM_LAKE_HYLIA_MAIN, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0x228, 0x398, 0, AREA_CASTOR_WILDS, ROOM_CASTOR_WILDS_MAIN, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0x2c8, 0x128, 0, AREA_HYRULE_FIELD, ROOM_HYRULE_FIELD_SOUTH_HYRULE_FIELD, 1, 12, 4, 0 },
{ 1, { 0, 0, 0, 0 }, 0x128, 0x2a8, 0, AREA_MINISH_WOODS, ROOM_MINISH_WOODS_MAIN, 1, 12, 4, 0 },
};
u32 sub_080A3B48(void) {
u32 index;
for (index = 0; index <= 0x12; index++) {
@@ -581,7 +594,7 @@ u32 sub_080A4418(u32 param_1, u32 param_2) {
} else {
DMA3->sourceAddress = src;
DMA3->destinationAddress = dest;
DMA3->control.word = 0x84000080;
DMA3->control.word = ((DMA_ENABLE | DMA_START_NOW | DMA_32BIT | DMA_SRC_INC | DMA_DEST_INC) << 16) + 0x80;
return DMA3->control.word;
}
}
+2 -5
View File
@@ -1,10 +1,7 @@
#include "entity.h"
#include "script.h"
#include "functions.h"
extern ScreenTransitionData gUnk_0813AD10;
extern ScreenTransitionData gUnk_0813AD24;
extern ScreenTransitionData gUnk_0813AD38;
#include "screenTransitions.h"
#include "script.h"
void Emma(Entity* this) {
if (this->action == 0) {
+17 -30
View File
@@ -1,14 +1,14 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "sound.h"
#include "save.h"
#include "flags.h"
#include "object.h"
#include "npc.h"
#include "functions.h"
#include "game.h"
#include "hitbox.h"
#include "item.h"
#include "npc.h"
#include "object.h"
#include "save.h"
#include "screenTransitions.h"
#include "sound.h"
typedef struct {
u32 unk_00;
@@ -20,8 +20,8 @@ extern void script_MinishVillageObjectRightStoneOpening; // Cutscene data type?
const Hitbox gUnk_08114154;
const u8 gUnk_0811415C[];
const ScreenTransitionData* const gUnk_081141A4[];
const u8 gUnk_081141E4[];
const ScreenTransitionData* const gNpc4ETransitions[];
const u8 gNpc4ETransitionTypes[];
const u16 gUnk_081141F4[];
extern void sub_0809623C(Entity*);
@@ -48,9 +48,8 @@ void sub_0806DA04(Entity* this, ScriptExecutionContext* context) {
sub_08078850(this, 1, (u8)a->unk_04, a);
}
void sub_0806DA1C(Entity* this, ScriptExecutionContext* context) {
sub_0808091C((ScreenTransitionData*)(gUnk_081141A4)[context->intVariable],
(u32)(gUnk_081141E4[context->intVariable]));
void NPC4E_DoScreenTransition(Entity* this, ScriptExecutionContext* context) {
sub_0808091C(gNpc4ETransitions[context->intVariable], gNpc4ETransitionTypes[context->intVariable]);
}
// Returns the kinstone id?
@@ -244,32 +243,20 @@ const u8 gUnk_0811415C[] = { //
0x00, 0x00, 0x58, 0x08, 0x0e, 0x00, 0x00, 0x00
#endif
};
extern ScreenTransitionData gUnk_0813AB6C;
extern ScreenTransitionData gUnk_0813ABBC;
extern ScreenTransitionData gUnk_0813ABE4;
extern ScreenTransitionData gUnk_0813ABF8;
extern ScreenTransitionData gUnk_0813AC0C;
extern ScreenTransitionData gUnk_0813AC20;
extern ScreenTransitionData gUnk_0813AC5C;
extern ScreenTransitionData gUnk_0813AC70;
extern ScreenTransitionData gUnk_0813AC84;
extern ScreenTransitionData gUnk_0813AC98;
extern ScreenTransitionData gUnk_0813ACAC;
extern ScreenTransitionData gUnk_0813ACC0;
extern ScreenTransitionData gUnk_0813ACD4;
extern ScreenTransitionData gUnk_0813ACE8;
extern ScreenTransitionData gUnk_0813ACFC;
// Array of pointers to ScreenTransitionData
const ScreenTransitionData* const gUnk_081141A4[] = { //
const ScreenTransitionData* const gNpc4ETransitions[] = { //
&gUnk_0813AB6C, &gUnk_0813ABBC, &gUnk_0813ABE4, &gUnk_0813ABF8, &gUnk_0813AC0C, &gUnk_0813AC20,
&gUnk_0813AC5C, &gUnk_0813AC70, &gUnk_0813AC84, &gUnk_0813AC98, &gUnk_0813ACAC, &gUnk_0813ACC0,
&gUnk_0813ACD4, &gUnk_0813ACE8, &gUnk_0813AC5C, &gUnk_0813ACFC
};
// param_2 for the call to sub_0808091C, same indices as gUnk_081141A4
const u8 gUnk_081141E4[] = { //
0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x09, 0x02, 0x02, 0x04, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02
// param_2 for the call to sub_0808091C, same indices as gNpc4ETransitions
const u8 gNpc4ETransitionTypes[] = { //
TRANSITION_FADE_WHITE_SLOW, TRANSITION_FADE_WHITE_SLOW, TRANSITION_FADE_BLACK_SLOW, TRANSITION_FADE_BLACK_SLOW,
TRANSITION_FADE_WHITE_SLOW, TRANSITION_FADE_WHITE_SLOW, TRANSITION_CUT_FAST, TRANSITION_FADE_WHITE_SLOW,
TRANSITION_FADE_WHITE_SLOW, TRANSITION_FADE_BLACK_SLOW, TRANSITION_FADE_WHITE_SLOW, TRANSITION_FADE_BLACK_SLOW,
TRANSITION_FADE_BLACK_SLOW, TRANSITION_FADE_BLACK_SLOW, TRANSITION_FADE_BLACK_SLOW, TRANSITION_FADE_WHITE_SLOW
};
// tiles that are changed?
+8 -7
View File
@@ -1,13 +1,14 @@
#define NENT_DEPRECATED
#include "entity.h"
#include "script.h"
#include "structures.h"
#include "functions.h"
#include "message.h"
#include "object.h"
#include "npc.h"
#include "hitbox.h"
#include "kinstone.h"
#include "message.h"
#include "npc.h"
#include "object.h"
#include "screenTransitions.h"
#include "script.h"
#include "structures.h"
typedef struct {
Entity base;
@@ -18,8 +19,6 @@ typedef struct {
u16 unk76;
} PicolyteBottleEntity;
extern ScreenTransitionData gUnk_0813AD4C;
void sub_0806E014(PicolyteBottleEntity* this);
void sub_0806E0DC(PicolyteBottleEntity* this);
void PicolyteBottle_Init(PicolyteBottleEntity* this);
@@ -157,6 +156,8 @@ void sub_0806E0DC(PicolyteBottleEntity* this) {
}
}
// TODO the following functions seem to be script functions regarding burlov and carlov
void sub_0806E140(PicolyteBottleEntity* this, ScriptExecutionContext* context) {
u32 uVar1, uVar2;
+5 -8
View File
@@ -1,21 +1,18 @@
#include "global.h"
#include "sound.h"
#include "entity.h"
#include "room.h"
#include "flags.h"
#include "script.h"
#include "object.h"
#include "functions.h"
#include "object.h"
#include "room.h"
#include "screen.h"
#include "screenTransitions.h"
#include "script.h"
#include "sound.h"
typedef struct {
u8 filler[4];
u32 unk;
} struct_0806C2A0;
extern ScreenTransitionData gUnk_0813AD60;
extern ScreenTransitionData gUnk_0813AD74;
void Simon(Entity* this) {
if (this->action == 0) {
this->action++;
+10 -8
View File
@@ -206,28 +206,30 @@ u32 sub_08081F00(u32*, u32*);
extern u16 gMapDataTopSpecial[0x2000];
extern u16 gMapDataBottomSpecial[];
NONMATCH("asm/non_matching/button/sub_08081E6C.inc", void sub_08081E6C(Entity* this)) {
void sub_08081E6C(Entity* this) {
u32 r4;
u16 *tmp, *r1;
LayerStruct* r1;
u16* tmp2;
u16* tmp;
u16* tmp3;
u32 r6 = this->field_0x74.HWORD;
u32 r5 = this->collisionLayer;
u32 tile = GetTileType(r6, r5);
if (tile < 0x4000)
return;
r1 = (u16*)GetLayerByIndex(r5);
r1 = GetLayerByIndex(r5);
r4 = (this->type == 0 ? 0x7a : 0x78);
tmp = r1 + 0x3802;
r1 += 0x3002 + r4;
tmp = tmp + (*r1 << 2);
tmp = r1->metatiles;
tmp = tmp + (r1->unkData2[r4] << 2);
tmp2 = (r5 == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
tmp2 += (((0x3f & r6) << 1) + ((0xfc0 & r6) << 2)) << 1;
tmp2 += (((0x3f & r6) << 1) + ((0xfc0 & r6) << 2));
if (sub_08081F00((u32*)tmp2, (u32*)tmp))
return;
SetTileType(r4, r6, r5);
SetTile(tile, r6, r5);
}
END_NONMATCH
u32 sub_08081F00(u32* unk1, u32* unk2) {
if (*unk1 != *unk2)
+2 -2
View File
@@ -116,7 +116,7 @@ void CameraTarget_Action2(Entity* this) {
u32 bVar3;
u32 temp;
u32 temp2;
struct_080C9CBC* ptr;
const struct_080C9CBC* ptr;
if ((this->type != 1) &&
(((u8)(gUnk_03003DF0.unk_4[3] - 1) >= 100 || (this->child != *(Entity**)(gUnk_03003DF0.unk_4 + 8))))) {
@@ -133,7 +133,7 @@ void CameraTarget_Action2(Entity* this) {
bVar2 = this->type2;
}
ptr = gUnk_080C9CBC + bVar2;
bVar1 = ptr->_5[0];
bVar1 = ptr->unk6;
bVar3 = bVar1 & 1;
this->palette.b.b0 = bVar3;
temp = gUnk_0811F744[bVar1] < 0;
+1 -2
View File
@@ -13,8 +13,7 @@
#include "object.h"
#include "room.h"
#include "screen.h"
extern const ScreenTransitionData gUnk_0813ABD0;
#include "screenTransitions.h"
struct GyorgChildSpawns {
s16 offsetX;
+1 -2
View File
@@ -11,14 +11,13 @@
#include "global.h"
#include "hitbox.h"
#include "object.h"
#include "screenTransitions.h"
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68;
} WindTribeTeleporterEntity;
extern ScreenTransitionData gUnk_0813ADEC[];
void WindTribeTeleporter_Init(WindTribeTeleporterEntity*);
void WindTribeTeleporter_Action1(WindTribeTeleporterEntity*);
void WindTribeTeleporter_Action2(WindTribeTeleporterEntity*);
+1 -2
View File
@@ -22,6 +22,7 @@
#include "playeritem.h"
#include "save.h"
#include "screen.h"
#include "screenTransitions.h"
#include "sound.h"
#define GRAVITY_RATE Q_8_8(32)
@@ -271,8 +272,6 @@ void SurfaceAction_AutoLadder(Entity*);
extern void InitPauseMenu(void);
extern u32 UpdatePlayerCollision(void);
extern ScreenTransitionData gUnk_0813AB58;
extern ScreenTransitionData gUnk_0813AD88[];
extern u8 gUnk_080082DC[];
extern u16 script_BedInLinksRoom;
+2 -2
View File
@@ -2,6 +2,7 @@
#include "area.h"
#include "asm.h"
#include "common.h"
#include "collision.h"
#include "entity.h"
#include "functions.h"
#include "game.h"
@@ -16,6 +17,7 @@
#include "room.h"
#include "save.h"
#include "screen.h"
#include "screenTransitions.h"
static void sub_08077E54(ItemBehavior* beh);
@@ -31,7 +33,6 @@ void sub_08079064(Entity*);
extern u8 gMapData;
extern const u8 gUnk_020176E0[];
extern const ScreenTransitionData gUnk_0813AD88[];
extern const s8* gUnk_0811C0E8[];
extern const u8 gUnk_0800851C[];
extern const u8 gUnk_080084BC[];
@@ -70,7 +71,6 @@ extern ItemBehavior* (*const gCreateItemsFuncs[])(Item);
extern void DeleteLoadedTileEntity(u32, u32);
extern const u8 gUnk_080B3E80[]; // collisionData for tileType?
extern const u8 gUnk_080B37A0[]; // unkData3 for tileType?
extern u8 gUpdateVisibleTiles;
extern u16 gMapDataTopSpecial[];
+11 -13
View File
@@ -1,18 +1,18 @@
#include "global.h"
#include "main.h"
#include "common.h"
#include "functions.h"
#include "sound.h"
#include "effects.h"
#include "screen.h"
#include "flags.h"
#include "item.h"
#include "save.h"
#include "area.h"
#include "common.h"
#include "effects.h"
#include "flags.h"
#include "functions.h"
#include "game.h"
#include "npc.h"
#include "item.h"
#include "kinstone.h"
#include "main.h"
#include "npc.h"
#include "object.h"
#include "save.h"
#include "screen.h"
#include "screenTransitions.h"
#include "sound.h"
extern u32 sub_08060354(void);
extern void sub_08057E64(void);
@@ -710,8 +710,6 @@ void sub_StateChange_HyruleCastle_4(void) {
#endif
}
extern ScreenTransitionData gUnk_0813AB80;
void sub_0804BCDC(void) {
sub_0808091C(&gUnk_0813AB80, TRANSITION_FADE_BLACK_SLOW);
}
+15 -15
View File
@@ -1,18 +1,19 @@
#include "scroll.h"
#include "global.h"
#include "asm.h"
#include "collision.h"
#include "common.h"
#include "effects.h"
#include "entity.h"
#include "structures.h"
#include "fileselect.h"
#include "functions.h"
#include "game.h"
#include "map.h"
#include "asm.h"
#include "common.h"
#include "fileselect.h"
#include "screen.h"
#include "manager/diggingCaveEntranceManager.h"
#include "kinstone.h"
#include "effects.h"
#include "manager/diggingCaveEntranceManager.h"
#include "map.h"
#include "object.h"
#include "screen.h"
#include "structures.h"
extern void sub_08080BC4(void);
extern void sub_080197D4(const void*);
@@ -29,7 +30,6 @@ extern u16 gUnk_0200B640;
extern u32** gUnk_08109194[];
extern u8 gUnk_02022830[];
extern u16 gUnk_020246B0[];
extern u8 gUnk_080B37A0[];
extern u8 gUnk_080B7910[];
void sub_0807FC64(RoomControls*);
@@ -634,9 +634,9 @@ void sub_08080910(s32 param_1) {
gRoomTransition.type = TRANSITION_CUT;
}
void sub_0808091C(const ScreenTransitionData* param_1, u32 param_2) {
DoExitTransition(param_1);
gRoomTransition.type = param_2;
void sub_0808091C(const ScreenTransitionData* screenTransition, u32 transitionType) {
DoExitTransition(screenTransition);
gRoomTransition.type = transitionType;
}
void sub_08080930(u32 unused) {
@@ -770,7 +770,7 @@ END_NONMATCH
void sub_08080B60(LayerStruct* layer) {
u32 index;
u16* metatileTypes = layer->metatileTypes;
u8* ptr = gUnk_080B37A0;
const u8* ptr = gUnk_080B37A0;
u8* ptr3 = layer->unkData3;
u16* mapData = layer->mapData;
for (index = 0; index < 0x1000; index++) {
@@ -831,7 +831,7 @@ NONMATCH("asm/non_matching/scroll/sub_08080CB4.inc", void sub_08080CB4(Entity* t
if (this->type != this->animIndex) {
InitAnimationForceUpdate(this, this->type);
if (this->type == 0x5c) {
struct_080C9CBC* ptr = &gUnk_080C9CBC[this->type2];
const struct_080C9CBC* ptr = &gUnk_080C9CBC[this->type2];
this->palette.raw = ((ptr->unk0 & 0xf) << 4) | ptr->unk0;
}
+25 -27
View File
@@ -1,19 +1,18 @@
#include "global.h"
#include "menu.h"
#include "game.h"
#include "subtask.h"
#include "save.h"
#include "screen.h"
#include "common.h"
#include "fileselect.h"
#include "flags.h"
#include "functions.h"
#include "main.h"
#include "message.h"
#include "ui.h"
#include "kinstone.h"
#include "itemMetaData.h"
#include "game.h"
#include "item.h"
#include "itemMetaData.h"
#include "kinstone.h"
#include "main.h"
#include "menu.h"
#include "message.h"
#include "save.h"
#include "screen.h"
#include "subtask.h"
#include "ui.h"
#ifdef EU
#define DRAW_DIRECT_SPRITE_INDEX 0x1fa
@@ -24,7 +23,6 @@
extern u8 gUnk_08128D38[];
extern u8 gUnk_08128D43[];
extern u16 gUnk_02017830[];
extern u8 gUnk_080C9C6C[];
extern u8 gUnk_020350F0[];
extern u8 gUnk_08128C00[];
extern Frame* gSpriteAnimations_322[];
@@ -100,7 +98,7 @@ void sub_080A6290(void);
u32 sub_080A6D74(u32);
extern const ScreenTransitionData gUnk_08128024[];
void sub_080A71F4(ScreenTransitionData*);
void sub_080A71F4(const ScreenTransitionData* exitTransition);
extern void DeleteAllEntities(void);
extern void sub_0805E974(void);
@@ -632,10 +630,10 @@ void sub_080A5C44(u32 param_1, u32 param_2, u32 param_3) {
void sub_080A5C9C(void) {
s32 newChoice;
u8* ptr;
const struct_080C9C6C* ptr;
if (sub_080A51F4()) {
ptr = &gUnk_080C9C6C[gArea.dungeon_idx * 4];
ptr = &gUnk_080C9C6C[gArea.dungeon_idx];
newChoice = gMenu.field_0x3;
switch (gInput.newKeys) {
case DPAD_UP:
@@ -644,7 +642,7 @@ void sub_080A5C9C(void) {
}
break;
case DPAD_DOWN:
if (*ptr - 1 > newChoice) {
if (ptr->unk_0 - 1 > newChoice) {
newChoice++;
}
break;
@@ -677,10 +675,10 @@ void sub_080A5D1C(void) {
u32 uVar6;
u32 index;
u8* puVar8;
u8* pbVar9;
const struct_080C9C6C* pbVar9;
pbVar9 = &gUnk_080C9C6C[gArea.dungeon_idx * 4];
bVar1 = gUnk_08128D3C[*pbVar9];
pbVar9 = &gUnk_080C9C6C[gArea.dungeon_idx];
bVar1 = gUnk_08128D3C[pbVar9->unk_0];
uVar4 = sub_0801DB94();
gOamCmd._4 = 0x400;
gOamCmd._6 = 0;
@@ -711,7 +709,7 @@ void sub_080A5D1C(void) {
if (sub_080A5F24()) {
gOamCmd._8 = 0;
gOamCmd.x = 0x46;
gOamCmd.y = bVar1 + (pbVar9[1] - pbVar9[2]) * 0xc;
gOamCmd.y = bVar1 + (pbVar9->unk_1 - pbVar9->unk_2) * 0xc;
if ((gMain.ticks & 0x20) != 0) {
uVar6 = 0x7a;
} else {
@@ -723,9 +721,9 @@ void sub_080A5D1C(void) {
gOamCmd._8 = 0;
gOamCmd.x = 0x34;
gOamCmd.y = bVar1;
iVar3 = pbVar9[1] + 0x82;
iVar3 = pbVar9->unk_1 + 0x82;
for (index = 0; index < *pbVar9; index++) {
for (index = 0; index < pbVar9->unk_0; index++) {
DrawDirect(DRAW_DIRECT_SPRITE_INDEX, iVar3);
iVar3--;
gOamCmd.y = gOamCmd.y + 0xc;
@@ -1291,7 +1289,7 @@ void sub_080A68D4(void) {
for (i = 10; i <= 100; i++) {
if (CheckKinstoneFused(i) && !sub_0801E810(i)) {
uVar4 = gUnk_080C9CBC[i]._5[1];
uVar4 = gUnk_080C9CBC[i].unk7;
ptr = &gUnk_080FE320[gUnk_080C9CBC[i].evt_type];
sub_080A698C(ptr->_c, ptr->_e, DRAW_DIRECT_SPRITE_INDEX, uVar4 + 100);
}
@@ -1378,7 +1376,7 @@ void sub_080A6B04(void) {
u32 uVar4;
int uVar6;
u32 uVar7;
struct_080C9CBC* ptr;
const struct_080C9CBC* ptr;
struct_080FE320* ptr2;
const struct_gUnk_08128E94* ptr3;
@@ -1386,7 +1384,7 @@ void sub_080A6B04(void) {
sub_080A4DB8(6);
ptr = &gUnk_080C9CBC[gFuseInfo._3];
ptr2 = &gUnk_080FE320[ptr->evt_type];
bVar1 = ptr->_5[1];
bVar1 = ptr->unk7;
uVar3 = ptr2->_c;
uVar4 = ptr2->_e;
uVar2 = sub_080A6A80(uVar3, uVar4)->_4;
@@ -1571,7 +1569,7 @@ void sub_080A6DF8(void) {
void sub_080A6E44(void) {
if (gFadeControl.active == 0) {
sub_080A71F4((ScreenTransitionData*)&gUnk_08128024[gMenu.field_0x3]);
sub_080A71F4(&gUnk_08128024[gMenu.field_0x3]);
}
}
@@ -1758,7 +1756,7 @@ void Subtask_Exit(void) {
SetFade(FADE_IN_OUT | FADE_INSTANT, 0x20);
}
void sub_080A71F4(ScreenTransitionData* exitTransition) {
void sub_080A71F4(const ScreenTransitionData* exitTransition) {
if (exitTransition != NULL) {
DoExitTransition(exitTransition);
}