mirror of
https://github.com/zeldaret/tmc
synced 2026-06-12 05:27:48 -04:00
Decompile some functions
This commit is contained in:
+1
-3
@@ -28,8 +28,6 @@ typedef struct {
|
||||
} ArmosEntity;
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u8 gUnk_02027EB4[];
|
||||
extern u8 gUnk_0200D654[];
|
||||
|
||||
extern void (*const gUnk_080CE124[])(ArmosEntity*);
|
||||
extern void (*const gUnk_080CE13C[])(ArmosEntity*);
|
||||
@@ -380,7 +378,7 @@ void sub_080306C4(ArmosEntity* this) {
|
||||
if (!var) {
|
||||
super->direction = (4 + uVar3 + ((Random() & 2) - 1) * 8) & 0x18;
|
||||
}
|
||||
if (IsTileCollision(super->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4,
|
||||
if (IsTileCollision(super->collisionLayer == 2 ? gMapTop.collisionData : gMapBottom.collisionData,
|
||||
super->x.HALF.HI + gUnk_080CE164[super->direction >> 2],
|
||||
super->y.HALF.HI + gUnk_080CE164[(super->direction >> 2) + 1], 0)) {
|
||||
super->direction = ((u8)(((uVar3 & 4) ^ 4) << 1)) | (uVar3 & 0x10);
|
||||
|
||||
@@ -30,7 +30,6 @@ void sub_080467DC(GyorgFemaleEntity*);
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
extern u8 gUnk_080B3E80[];
|
||||
extern u8 gUnk_080B37A0[];
|
||||
extern u16 gMetatileTypesTop[];
|
||||
|
||||
extern const u8 gUnk_080D1A94[];
|
||||
extern const u8 gUnk_080D1AAC[];
|
||||
@@ -249,17 +248,17 @@ NONMATCH("asm/non_matching/gyorg_female/sub_08046518.inc", void sub_08046518(voi
|
||||
u8* r6;
|
||||
u32 i;
|
||||
u16* sl;
|
||||
sl = &gMetatileTypesTop[0xFFFFBCB0];
|
||||
stack1 = &gMetatileTypesTop[0xFFFFECB0];
|
||||
stack2 = (u8*)&gMetatileTypesTop[0x00006658];
|
||||
r6 = (u8*)&gMetatileTypesTop[0xFFFFD658];
|
||||
sl = &gMapTop.metatileTypes[0xFFFFBCB0];
|
||||
stack1 = &gMapTop.metatileTypes[0xFFFFECB0];
|
||||
stack2 = (u8*)&gMapTop.metatileTypes[0x00006658];
|
||||
r6 = (u8*)&gMapTop.metatileTypes[0xFFFFD658];
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
sl += 0x40;
|
||||
stack1 += 0x40;
|
||||
for (r5 = 0; r5 < 0x10; r5++) {
|
||||
stack1[r5] = sl[r5];
|
||||
stack2[r5] = gUnk_080B37A0[gMetatileTypesTop[sl[r5]]];
|
||||
r6[r5] = gUnk_080B3E80[gMetatileTypesTop[sl[r5]]];
|
||||
stack2[r5] = gUnk_080B37A0[gMapTop.metatileTypes[sl[r5]]];
|
||||
r6[r5] = gUnk_080B3E80[gMapTop.metatileTypes[sl[r5]]];
|
||||
}
|
||||
stack2 = stack2 + 0x40;
|
||||
r6 = r6 + 0x40;
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
|
||||
extern u32 sub_0804A024(Entity*, u32, u32);
|
||||
|
||||
extern u8 gUnk_0200D654[];
|
||||
extern u8 gUnk_02027EB4[];
|
||||
|
||||
void sub_0802C18C(Entity*);
|
||||
void sub_0802C218(Entity*);
|
||||
void sub_0802C1C0(Entity*);
|
||||
@@ -317,7 +314,7 @@ bool32 sub_0802C06C(Entity* this) {
|
||||
u32 xdiff = gUnk_080CD45C[(this->direction >> 2) + 0];
|
||||
u32 ydiff = gUnk_080CD45C[(this->direction >> 2) + 1];
|
||||
|
||||
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
|
||||
u8* layer = this->collisionLayer == 2 ? gMapTop.collisionData : gMapBottom.collisionData;
|
||||
|
||||
u32 i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
@@ -340,7 +337,7 @@ bool32 sub_0802C0E8(Entity* this) {
|
||||
s32 x = this->x.HALF.HI + this->hitbox->offset_x + ptr[0] * 6;
|
||||
s32 y = this->y.HALF.HI + this->hitbox->offset_y + ptr[1] * 6;
|
||||
|
||||
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
|
||||
u8* layer = this->collisionLayer == 2 ? gMapTop.collisionData : gMapBottom.collisionData;
|
||||
u32 ret = FALSE;
|
||||
if (!sub_0806FC24(TILE(x, y), 9)) {
|
||||
if (IsTileCollision(layer, x, y, 0)) {
|
||||
|
||||
@@ -4,16 +4,13 @@
|
||||
*
|
||||
* @brief Sensor Blade Trap enemy
|
||||
*/
|
||||
|
||||
#include "enemy.h"
|
||||
#include "physics.h"
|
||||
#include "collision.h"
|
||||
#include "enemy.h"
|
||||
#include "map.h"
|
||||
#include "physics.h"
|
||||
|
||||
extern u32 sub_0804A024(Entity*, u32, u32);
|
||||
|
||||
extern u8 gUnk_02027EB4[];
|
||||
extern u8 gUnk_0200D654[];
|
||||
|
||||
void sub_0802BB10(Entity*);
|
||||
bool32 sub_0802BB2C(Entity*, u32);
|
||||
|
||||
@@ -99,7 +96,7 @@ void sub_0802BB10(Entity* this) {
|
||||
}
|
||||
|
||||
bool32 sub_0802BB2C(Entity* this, u32 param_2) {
|
||||
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
|
||||
u8* layer = this->collisionLayer == 2 ? gMapTop.collisionData : gMapBottom.collisionData;
|
||||
const s8* ptr = &gUnk_080CD3DC[param_2 >> 2];
|
||||
return IsTileCollision(layer, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user