mirror of
https://github.com/zeldaret/tmc
synced 2026-07-02 12:36:27 -04:00
Extract dungeon maps
This commit is contained in:
@@ -374,6 +374,7 @@ void Bird_Type10(Entity* this) {
|
||||
void CreateBird(Entity* this) {
|
||||
Entity* birdEnt;
|
||||
|
||||
// EU only allows warp from the overworld. This prevents warping from the rooftop of the Wind Tribe's tower.
|
||||
#ifndef EU
|
||||
if (AreaAllowsWarp()) {
|
||||
#else
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ void Bush_Action2SubAction2(BushEntity* this) {
|
||||
if (this->unk_72 == 0) {
|
||||
this->unk_72 = 1;
|
||||
super->spriteOffsetX = 0;
|
||||
sub_0807B9B8(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
|
||||
Bush_Action2SubAction5(this);
|
||||
|
||||
+18
-17
@@ -208,35 +208,36 @@ extern u16 gMapDataTopSpecial[0x2000];
|
||||
extern u16 gMapDataBottomSpecial[];
|
||||
|
||||
void sub_08081E6C(Entity* this) {
|
||||
u32 r4;
|
||||
u32 tileType;
|
||||
LayerStruct* r1;
|
||||
u16* tmp2;
|
||||
u16* tmp;
|
||||
u16* tmp3;
|
||||
u32 r6 = this->field_0x74.HWORD;
|
||||
u32 r5 = this->collisionLayer;
|
||||
u32 tile = GetTileType(r6, r5);
|
||||
u32 tilePosition = this->field_0x74.HWORD;
|
||||
u32 layer = this->collisionLayer;
|
||||
u32 tile = GetTileType(tilePosition, layer);
|
||||
|
||||
if (tile < 0x4000)
|
||||
return;
|
||||
r1 = GetLayerByIndex(r5);
|
||||
r4 = (this->type == 0 ? 0x7a : 0x78);
|
||||
r1 = GetLayerByIndex(layer);
|
||||
tileType = (this->type == 0 ? 0x7a : 0x78);
|
||||
tmp = r1->metatiles;
|
||||
tmp = tmp + (r1->unkData2[r4] << 2);
|
||||
tmp2 = (r5 == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
|
||||
tmp2 += (((0x3f & r6) << 1) + ((0xfc0 & r6) << 2));
|
||||
tmp = tmp + (r1->unkData2[tileType] << 2);
|
||||
tmp2 = (layer == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
|
||||
tmp2 += (((0x3f & tilePosition) << 1) + ((0xfc0 & tilePosition) << 2));
|
||||
if (sub_08081F00((u32*)tmp2, (u32*)tmp))
|
||||
return;
|
||||
SetTileType(r4, r6, r5);
|
||||
SetTile(tile, r6, r5);
|
||||
SetTileType(tileType, tilePosition, layer);
|
||||
SetTile(tile, tilePosition, layer);
|
||||
}
|
||||
|
||||
u32 sub_08081F00(u32* unk1, u32* unk2) {
|
||||
if (*unk1 != *unk2)
|
||||
return 0;
|
||||
if (unk1[0x40] != unk2[1])
|
||||
return 0;
|
||||
return 1;
|
||||
// Are the two tiles already set to the correct one
|
||||
bool32 sub_08081F00(u32* screenblock, u32* metatileList) {
|
||||
if (screenblock[0] != metatileList[0])
|
||||
return FALSE;
|
||||
if (screenblock[0x40] != metatileList[1])
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_08081F24(Entity* this) {
|
||||
|
||||
@@ -340,7 +340,7 @@ bool32 sub_0809A6F8(u32 param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
if (sub_0809A758(param_1, param_2) != 0) {
|
||||
if (gUnk_081238A0[param_3] != 0) {
|
||||
if ((param_4 & 1) != 0) {
|
||||
sub_0807B9B8(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
SetMetaTileByIndex(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
} else {
|
||||
RestorePrevTileEntity((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
}
|
||||
|
||||
@@ -494,9 +494,9 @@ void sub_08090094(PushableFurnitureEntity* this, u32 param_2, u32 tilePos) {
|
||||
}
|
||||
|
||||
void sub_08090254(PushableFurnitureEntity* this) {
|
||||
sub_0807B9B8(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
if (this->unk_80 == 1) {
|
||||
sub_0807B9B8(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,16 +157,16 @@ bool32 sub_0809785C(PushableGraveEntity* this) {
|
||||
super->direction = 0;
|
||||
super->speed = 0x40;
|
||||
tilePosition = this->unk_68;
|
||||
sub_0807B9B8(this->unk_72, tilePosition, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_72, tilePosition, super->collisionLayer);
|
||||
if (super->type2 == 2) {
|
||||
sub_0807B9B8(this->unk_6a, tilePosition - 0x41, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_6c, tilePosition - 0x40, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_6e, tilePosition - 0x3f, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_70, tilePosition - 1, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_74, tilePosition + 1, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_76, tilePosition + 0x3f, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_78, tilePosition + 0x40, super->collisionLayer);
|
||||
sub_0807B9B8(this->unk_7a, tilePosition + 0x41, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6a, tilePosition - 0x41, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6c, tilePosition - 0x40, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6e, tilePosition - 0x3f, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_70, tilePosition - 1, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_74, tilePosition + 1, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_76, tilePosition + 0x3f, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_78, tilePosition + 0x40, super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_7a, tilePosition + 0x41, super->collisionLayer);
|
||||
}
|
||||
SoundReq(SFX_10F);
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user