propagate changes

This commit is contained in:
theo3 2021-12-19 18:19:19 -08:00
parent 29c0ee1844
commit e29378b869
9 changed files with 44 additions and 45 deletions

View File

@ -3026,7 +3026,7 @@
"size": 28
},
{
"path": "sounds/sfx11B.bin",
"path": "sounds/sfxChestOpen.bin",
"start": 14558640,
"type": "midi",
"options": {

View File

@ -281,7 +281,7 @@
.equiv SFX_ITEM_SHIELD_BOUNCE, 0x118
.equiv SFX_ITEM_GLOVES_KNOCKBACK, 0x119
.equiv SFX_EM_ARMOS_ON, 0x11a
.equiv SFX_11B, 0x11b
.equiv SFX_CHEST_OPEN, 0x11b
.equiv SFX_11C, 0x11c
.equiv SFX_11D, 0x11d
.equiv SFX_EM_MOBLIN_SPEAR, 0x11e

View File

@ -247,7 +247,7 @@
.include "sounds/sfxItemShieldBounce.s"
.include "sounds/sfxItemGlovesKnockback.s"
.include "sounds/sfxEmArmosOn.s"
.include "sounds/sfx11B.s"
.include "sounds/sfxChestOpen.s"
.include "sounds/sfx11C.s"
.include "sounds/sfx11D.s"
.include "sounds/sfxEmMoblinSpear.s"

View File

@ -291,7 +291,7 @@ typedef enum {
SFX_ITEM_SHIELD_BOUNCE,
SFX_ITEM_GLOVES_KNOCKBACK,
SFX_EM_ARMOS_ON,
SFX_11B,
SFX_CHEST_OPEN,
SFX_11C,
SFX_11D,
SFX_EM_MOBLIN_SPEAR,

View File

@ -152,7 +152,7 @@ typedef struct {
u8 _6;
u8 _7;
} TileEntity;
extern TileEntity gSmallChests[];
extern TileEntity gSmallChests[8];
typedef enum {
NONE,
@ -167,7 +167,7 @@ typedef enum {
DARKNESS,
DESTRUCTIBLE_TILE,
GRASS_DROP_CHANGER,
TILE_ENTITY_C,
LOCATION_CHANGER,
TILE_ENTITY_D
} TileEntityType;

View File

@ -478,7 +478,7 @@ extern const SongHeader sfx117;
extern const SongHeader sfxItemShieldBounce;
extern const SongHeader sfxItemGlovesKnockback;
extern const SongHeader sfxEmArmosOn;
extern const SongHeader sfx11B;
extern const SongHeader sfxChestOpen;
extern const SongHeader sfx11C;
extern const SongHeader sfx11D;
extern const SongHeader sfxEmMoblinSpear;
@ -1110,7 +1110,7 @@ const Song gSongTable[] = {
[SFX_ITEM_SHIELD_BOUNCE] = { &sfxItemShieldBounce, MUSIC_PLAYER_07, MUSIC_PLAYER_07 },
[SFX_ITEM_GLOVES_KNOCKBACK] = { &sfxItemGlovesKnockback, MUSIC_PLAYER_14, MUSIC_PLAYER_14 },
[SFX_EM_ARMOS_ON] = { &sfxEmArmosOn, MUSIC_PLAYER_13, MUSIC_PLAYER_13 },
[SFX_11B] = { &sfx11B, MUSIC_PLAYER_12, MUSIC_PLAYER_12 },
[SFX_CHEST_OPEN] = { &sfxChestOpen, MUSIC_PLAYER_12, MUSIC_PLAYER_12 },
[SFX_11C] = { &sfx11C, MUSIC_PLAYER_11, MUSIC_PLAYER_11 },
[SFX_11D] = { &sfx11D, MUSIC_PLAYER_10, MUSIC_PLAYER_10 },
[SFX_EM_MOBLIN_SPEAR] = { &sfxEmMoblinSpear, MUSIC_PLAYER_0F, MUSIC_PLAYER_0F },

View File

@ -139,7 +139,7 @@ void sub_0806A550(Entity* this) {
this->frame = 0;
sub_08080964(8, 2);
gActiveScriptInfo.unk_00 |= 0x100;
SoundReq(SFX_11B);
SoundReq(SFX_CHEST_OPEN);
}
if ((this->frame & 0x80) != 0) {
this->action = 5;

View File

@ -48,7 +48,7 @@ Entity* GiveItemWithCutscene(u32 type, u32 type2, u32 delay) {
}
void ClearSmallChests(void) {
MemClear(gSmallChests, 0x40);
MemClear(gSmallChests, sizeof(gSmallChests));
}
void sub_080A7C8C(u32 pos, u32 layer) {
@ -70,7 +70,7 @@ void sub_080A7C8C(u32 pos, u32 layer) {
}
sub_0807B7D8(0x74, pos, layer);
RequestPriorityDuration(NULL, 120);
SoundReq(SFX_11B);
SoundReq(SFX_CHEST_OPEN);
}
}

View File

@ -4,6 +4,7 @@
#include "flags.h"
#include "functions.h"
#include "utils.h"
#include "object.h"
extern void sub_0804B058(EntityData* dat);
extern void sub_0801AC98();
@ -29,14 +30,13 @@ void sub_0806F704(Entity*, u32);
void sub_0805BB00(u32, u32);
static void sub_0804B290(TileEntity*);
static void sub_0804B29C(TileEntity*);
static void sub_0804B300(TileEntity*);
static void sub_0804B334(TileEntity*);
static void sub_0804B340(TileEntity*);
static void sub_0804B260(TileEntity*);
static void sub_0804B27C(TileEntity*);
static void LoadRoomVisitTile(TileEntity*);
static void LoadSmallChestTile(TileEntity*);
static void LoadBombableWallTile(TileEntity*);
static void LoadDarknessTile(TileEntity*);
static void LoadDestructibleTile(TileEntity*);
static void LoadGrassDropTile(TileEntity*);
static void LoadLocationTile(TileEntity*);
typedef struct {
u8 filler[0x20];
@ -221,7 +221,6 @@ void sub_0804B0E8(u32 arg0, u32 arg1) {
void (*func)();
// init function at index 4 of room data
func = (void (*)())GetRoomProperty(arg0, arg1, 4);
if (func != NULL) {
func();
@ -270,58 +269,58 @@ void LoadRoomTileEntities(TileEntity* list) {
for (t; t->type != 0; ++t) {
switch (t->type) {
case 1:
sub_0804B290(t);
case ROOM_VISIT_MARKER:
LoadRoomVisitTile(t);
break;
case 2:
sub_0804B29C(t);
case SMALL_CHEST:
LoadSmallChestTile(t);
break;
case 4:
sub_0804B300(t);
case BOMBABLE_WALL:
LoadBombableWallTile(t);
break;
case 7:
case MUSIC_SETTER:
gArea.pMusicIndex = t->_3;
break;
case 9:
sub_0804B334(t);
case DARKNESS:
LoadDarknessTile(t);
break;
case 10:
sub_0804B340(t);
case DESTRUCTIBLE_TILE:
LoadDestructibleTile(t);
break;
case 11:
sub_0804B260(t);
case GRASS_DROP_CHANGER:
LoadGrassDropTile(t);
break;
case 12:
sub_0804B27C(t);
case LOCATION_CHANGER:
LoadLocationTile(t);
break;
case 13:
case TILE_ENTITY_D:
gRoomVars.field_0x9 = t->_3;
break;
}
}
}
static void sub_0804B260(TileEntity* tile) {
static void LoadGrassDropTile(TileEntity* tile) {
MemCopy(&gUnk_080015BC[tile->_1], &gRoomVars.filler4[44], 0x20);
}
static void sub_0804B27C(TileEntity* tile) {
static void LoadLocationTile(TileEntity* tile) {
gArea.locationIndex = tile->_1;
sub_08054524();
}
static void sub_0804B290(TileEntity* tile) {
static void LoadRoomVisitTile(TileEntity* tile) {
SetLocalFlag(tile->_1);
}
static void sub_0804B29C(TileEntity* tile) {
static void LoadSmallChestTile(TileEntity* tile) {
TileEntity* t = gSmallChests;
u32 i = 0;
for (i = 0; i < 8; ++i, ++t) {
if (!t->_4) {
MemCopy(tile, t, sizeof(TileEntity));
if ((t->_6 & 1) && (gRoomControls.unk6 & 2) && !CheckLocalFlag(t->_1)) {
Entity* e = CreateObject(0x52, t->_1, 0);
Entity* e = CreateObject(OBJECT_52, t->_1, 0);
if (e != NULL) {
sub_0806F704(e, t->_4);
}
@ -331,7 +330,7 @@ static void sub_0804B29C(TileEntity* tile) {
}
}
static void sub_0804B300(TileEntity* tile) {
static void LoadBombableWallTile(TileEntity* tile) {
Manager24* mgr = (Manager24*)GetEmptyManager();
if (mgr != NULL) {
mgr->manager.type = 9;
@ -344,11 +343,11 @@ static void sub_0804B300(TileEntity* tile) {
}
}
static void sub_0804B334(TileEntity* tile) {
static void LoadDarknessTile(TileEntity* tile) {
sub_0805BB00(tile->_3, 1);
}
static void sub_0804B340(TileEntity* tile) {
static void LoadDestructibleTile(TileEntity* tile) {
if (CheckLocalFlag(*(u16*)&tile->_2)) {
SetTileType(*(u16*)&tile->_6, tile->_4, tile->_1);
} else if (!gRoomVars.filler_0x1) {
@ -375,5 +374,5 @@ void sub_0804B388(u32 a1, u32 a2) {
}
void sub_0804B3C4(void* arg0) {
sub_0804B29C(arg0);
LoadSmallChestTile(arg0);
}