mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-07 02:24:01 +00:00
NP3 - Mermans (#239)
Enemy: Merman (2 variants) ![image](https://github.com/Xeeynamo/sotn-decomp/assets/96613413/9e1650a6-bb8d-4c4d-889f-7479cff60724) ![image](https://github.com/Xeeynamo/sotn-decomp/assets/96613413/2bbc77c2-dcce-4fef-a546-33f9e76745a8) Scratches: https://decomp.me/scratch/8wa56 https://decomp.me/scratch/pjVr0 Co-authored-by @MottZilla
This commit is contained in:
parent
7ed0cfdf8c
commit
34b39c2497
@ -55,16 +55,22 @@ segments:
|
||||
- [0x31F68, .rodata, 3DEF4]
|
||||
- [0x31FA0, rodata]
|
||||
- [0x31FB0, rodata]
|
||||
- [0x3200C, rodata] # EntityStageNamePopup .rodata,
|
||||
- [0x32020, rodata] # EntityMerman2 .rodata, 44DCC
|
||||
- [0x32044, rodata] # EntityMerman .rodata, 44DCC
|
||||
- [0x3206C, .rodata, 490E8] # EntityBoneScimitar data
|
||||
- [0x3208C, .rodata, 4997C]
|
||||
- [0x320A0, .rodata, 49BC8]
|
||||
- [0x320B4, .rodata, 49F98] # EntityBloodyZombie data
|
||||
- [0x320DC, rodata]
|
||||
- [0x32360, rodata]
|
||||
- [0x322CC, rodata] # func_801CF254 .rodata, 4B018
|
||||
- [0x322F8, rodata] # Gurka .rodata, 4B018
|
||||
- [0x32380, rodata]
|
||||
- [0x3246C, c]
|
||||
- [0x36990, c] # Gaibon & Slogra boss
|
||||
- [0x390BC, c]
|
||||
- [0x3DEF4, c]
|
||||
- [0x44DCC, c] # Merman Entities
|
||||
- [0x490E8, c] # EntityBoneScimitar
|
||||
- [0x4997C, c]
|
||||
- [0x49BC8, c]
|
||||
|
@ -121,7 +121,7 @@ EntityLargeWaterSplash = 0x801D423C;
|
||||
EntityFallingObject2 = 0x801D4668;
|
||||
EntityUnkId3D = 0x801D4700;
|
||||
EntityLargeFallingObject = 0x801D48F8;
|
||||
EntityMerman2 = 0x801D49C4;
|
||||
EntityMermanSpawner = 0x801D49C4;
|
||||
EntityMerman = 0x801D4B20;
|
||||
EntityMermanFireball = 0x801D56D8;
|
||||
EntityFallingObject = 0x801D583C;
|
||||
|
@ -74,10 +74,11 @@ EntityStageNamePopup = 0x801C2860;
|
||||
EntitySoulStealOrb = 0x801C34E4;
|
||||
EntityEnemyBlood = 0x801C3878;
|
||||
EntityRoomForeground = 0x801C3D28;
|
||||
EntityMerman2 = 0x801C6564;
|
||||
EntityExplosion2 = 0x801C7650;
|
||||
EntityMediumWaterSplash = 0x801C7880;
|
||||
EntityLargeFallingObject = 0x801C8010;
|
||||
EntityMerman2 = 0x801C80DC;
|
||||
EntityMermanSpawner = 0x801C80DC;
|
||||
EntityMerman = 0x801C8238;
|
||||
EntityMermanExplosion = 0x801C8FEC;
|
||||
EntityBoneScimitar = 0x801C91C4;
|
||||
@ -87,3 +88,7 @@ EntityZombie = 0x801C9BC8;
|
||||
EntityZombieSpawner = 0x801C9E28;
|
||||
EntityBloodSplatter = 0x801C9F98;
|
||||
EntityBloodyZombie = 0x801CA654;
|
||||
EntityHammer = 0x801CE69C;
|
||||
EntityHammerWeapon = 0x801CF5B8;
|
||||
EntityGurkha = 0x801CF94C;
|
||||
EntityGurkhaSword = 0x801D0730;
|
||||
|
@ -129,7 +129,7 @@ typedef struct {
|
||||
/* 0x86 */ u8 nearDeath; // Slogra loses spear, Gaibon in rage mode
|
||||
/* 0x88 */ s32 speed;
|
||||
/* 0x8C */ s16 angle;
|
||||
/* 0x8E */ char pad8E[0xE];
|
||||
/* 0x8E */ char pad_8E[0xE];
|
||||
/* 0x9C */ u8 pickupFlag;
|
||||
/* 0x9D */ u8 grabedAscending;
|
||||
} ET_GaibonSlogra;
|
||||
@ -147,11 +147,36 @@ typedef struct {
|
||||
/* 0x84 */ Primitive* primFade;
|
||||
} ET_WarpRoom;
|
||||
|
||||
typedef struct {
|
||||
/* 0x7C */ char pad_0[0x8];
|
||||
/* 0x84 */ u8 timer;
|
||||
/* 0x85 */ char pad_85[0x1];
|
||||
/* 0x86 */ s8 timer2;
|
||||
/* 0x87 */ char pad_87[0x5];
|
||||
/* 0x8C */ u16 palette;
|
||||
/* 0x8E */ char pad_8E[0x12];
|
||||
/* 0xA0 */ u8 isUnderwater;
|
||||
/* 0xA1 */ u8 ignoreCol;
|
||||
} ET_Merman;
|
||||
|
||||
typedef struct {
|
||||
/* 0x7C */ struct Primitive* prim;
|
||||
/* 0x80 */ char pad_0[0x6];
|
||||
/* 0x86 */ s8 timer;
|
||||
/* 0x87 */ char pad_87[0x5];
|
||||
/* 0x8C */ s16 rotation;
|
||||
/* 0x8E */ char pad_8E[0x12];
|
||||
/* 0xA0 */ u8 isUnderwater;
|
||||
/* 0xA1 */ u8 ignoreCol;
|
||||
} ET_Merman_2;
|
||||
|
||||
typedef union {
|
||||
/* 0x7C */ ET_Generic generic;
|
||||
/* 0x7C */ ET_EquipItemDrop equipItemDrop;
|
||||
/* 0x7C */ ET_SoulStealOrb soulStealOrb;
|
||||
/* 0x7C */ ET_GaibonSlogra GS_Props;
|
||||
/* 0x7C */ ET_WarpRoom warpRoom;
|
||||
/* 0x7C */ ET_Merman merman;
|
||||
/* 0x7C */ ET_Merman_2 merman2;
|
||||
/* 0x7C */ char stub[0x40];
|
||||
} Ext;
|
@ -219,6 +219,7 @@ typedef enum { MONO_SOUND, STEREO_SOUND } soundMode;
|
||||
#define NA_SE_EN_BLOODY_ZOMBIE_HEMORRHAGE 0x749
|
||||
#define NA_SE_VO_AXE_KNIGHT_THROW 0x766
|
||||
#define NA_SE_VO_AXE_KNIGHT_SCREAM 0x767
|
||||
#define NA_SE_EV_WATER_SPLASH 0x7C2
|
||||
#define NA_SE_BO_DEFEATED 0x7D2
|
||||
#define NA_SE_PL_TELEPORT 0x8BA
|
||||
#define NA_SE_CS_BURNING_PHOTOGRAPH 0x8BE
|
@ -12,7 +12,12 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
} Unkstruct6; // size = 0x4
|
||||
} point16; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s32 x;
|
||||
/* 0x2 */ s32 y;
|
||||
} point32;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 unk0;
|
||||
|
@ -328,7 +328,7 @@ void EntityUnkId15(Entity* entity) {
|
||||
|
||||
INCLUDE_ASM("asm/us/st/dre/nonmatchings/1C7DC", func_8019E7C4);
|
||||
|
||||
bool func_8019E9F4(Unkstruct6* arg0) {
|
||||
bool func_8019E9F4(point16* arg0) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
|
@ -419,7 +419,7 @@ void func_80195B44(Entity* entity) {
|
||||
|
||||
INCLUDE_ASM("asm/us/st/mad/nonmatchings/139E0", func_80195C38);
|
||||
|
||||
bool func_80195E68(Unkstruct6* unk) {
|
||||
bool func_80195E68(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
|
@ -606,7 +606,7 @@ void EntityUnkId15(Entity* arg0) {
|
||||
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/46684", func_801C9080);
|
||||
|
||||
bool func_801C92B0(Unkstruct6* unk) {
|
||||
bool func_801C92B0(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
@ -1417,7 +1417,7 @@ void EntityLargeFallingObject(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/46684", EntityMerman2);
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/46684", EntityMermanSpawner);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/46684", EntityMerman);
|
||||
|
||||
|
@ -670,7 +670,7 @@ void func_801C08F0(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
bool func_801C0B20(Unkstruct6* unk) {
|
||||
bool func_801C0B20(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
@ -1161,352 +1161,5 @@ INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C3E14);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C4144);
|
||||
|
||||
// ID 0x2C
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C424C);
|
||||
|
||||
// EntitySplashWater
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C4DCC);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C56D8);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C5BC4);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C5F58);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C61B4);
|
||||
|
||||
s32 func_801C6458(s16 yVector) {
|
||||
s16 newY = yVector + g_CurrentEntity->posY.i.hi;
|
||||
s32 expectedResult = 0;
|
||||
Collider collider;
|
||||
Entity* newEntity;
|
||||
s32 res;
|
||||
|
||||
g_api.CheckCollision(g_CurrentEntity->posX.i.hi, newY, &collider, 0);
|
||||
res = expectedResult == (collider.unk0 & 1);
|
||||
|
||||
if (collider.unk0 & 8) {
|
||||
if (*(u8*)&g_CurrentEntity->ext.generic.unkA0 == 0) {
|
||||
newEntity = AllocEntity(&D_8007DE38, &D_8007DE38[24]);
|
||||
if (newEntity != NULL) {
|
||||
CreateEntityFromEntity(0x33, g_CurrentEntity, newEntity);
|
||||
newEntity->posY.i.hi += yVector;
|
||||
newEntity->zPriority = g_CurrentEntity->zPriority;
|
||||
}
|
||||
g_api.PlaySfx(0x7C2);
|
||||
*(u8*)&g_CurrentEntity->ext.generic.unkA0 = 1;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C6564);
|
||||
|
||||
// some sort of explosion
|
||||
void EntityExplosion2(Entity* entity, s32 arg1) {
|
||||
POLY_GT4* poly;
|
||||
s16 firstPolygonIndex;
|
||||
|
||||
if (entity->step == 0) {
|
||||
InitializeEntity(D_80180AB4);
|
||||
entity->animCurFrame = 0;
|
||||
entity->unk3C = 0;
|
||||
entity->zPriority += 4;
|
||||
if (entity->subId != 0) {
|
||||
firstPolygonIndex = g_api.AllocPrimitives(4, 2);
|
||||
if (firstPolygonIndex == -1) {
|
||||
DestroyEntity(entity);
|
||||
return;
|
||||
}
|
||||
poly = &g_PrimBuf[firstPolygonIndex];
|
||||
entity->firstPolygonIndex = firstPolygonIndex;
|
||||
*(s32*)&entity->ext.generic.unk7C.s = poly;
|
||||
entity->flags |= FLAG_FREE_POLYGONS;
|
||||
func_801D2684(poly, firstPolygonIndex);
|
||||
poly->u0 = 0;
|
||||
poly->u1 = 0x20;
|
||||
poly->tpage = 0x1A;
|
||||
poly->clut = 0x1FF;
|
||||
poly->v3 = poly->v2 = 0x20;
|
||||
poly->v1 = poly->v0 = 0;
|
||||
poly->u2 = poly->u0;
|
||||
poly->u3 = poly->u1;
|
||||
LOH(((POLY_GT4*)poly->tag)->r2) = 0x40;
|
||||
LOH(((POLY_GT4*)poly->tag)->b2) = 0x40;
|
||||
LOH(((POLY_GT4*)poly->tag)->u1) = 0;
|
||||
((POLY_GT4*)poly->tag)->b3 = 0x60;
|
||||
((POLY_GT4*)poly->tag)->x1 = (u16)entity->posX.i.hi;
|
||||
((POLY_GT4*)poly->tag)->y0 = (u16)entity->posY.i.hi;
|
||||
poly->pad2 = entity->zPriority - 4;
|
||||
poly->pad3 = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (entity->subId != 0) {
|
||||
poly = *(s32*)&entity->ext.generic.unk7C.s;
|
||||
func_801D1F38(poly);
|
||||
((POLY_GT4*)poly->tag)->b3 += 252;
|
||||
LOH(((POLY_GT4*)poly->tag)->u1) -= 128;
|
||||
if (((POLY_GT4*)poly->tag)->b3 < 16) {
|
||||
poly->pad3 = 8;
|
||||
}
|
||||
}
|
||||
|
||||
entity->ext.generic.unk84.U8.unk0++;
|
||||
if (!(entity->ext.generic.unk84.U8.unk0 % 4)) {
|
||||
entity->posY.i.hi++;
|
||||
}
|
||||
|
||||
if (AnimateEntity(D_801822B0, entity) == 0) {
|
||||
DestroyEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
void EntityMediumWaterSplash(Entity* entity) {
|
||||
Entity* newEntity;
|
||||
|
||||
if (entity->step == 0) {
|
||||
InitializeEntity(D_80180AC0);
|
||||
entity->animCurFrame = 0;
|
||||
if (entity->facing != 0) {
|
||||
entity->accelerationX = 0x20000;
|
||||
return;
|
||||
}
|
||||
entity->accelerationX = -0x20000;
|
||||
return;
|
||||
}
|
||||
AnimateEntity(D_801822A4, entity);
|
||||
MoveEntity();
|
||||
if (entity->flags & 0x100) {
|
||||
newEntity = AllocEntity(D_8007D858, &D_8007D858[MaxEntityCount]);
|
||||
if (newEntity != NULL) {
|
||||
CreateEntityFromEntity(E_EXPLOSION, entity, newEntity);
|
||||
newEntity->subId = 0;
|
||||
}
|
||||
DestroyEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", func_801C7954);
|
||||
|
||||
void func_801C7D80(Entity* self) {
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180AB4);
|
||||
self->animCurFrame = 0;
|
||||
self->unk3C = 0;
|
||||
self->flags |= 0x2000;
|
||||
self->zPriority += 4;
|
||||
}
|
||||
MoveEntity();
|
||||
self->accelerationY += 0x2800;
|
||||
if (AnimateEntity(D_801822B8, self) == 0) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
}
|
||||
|
||||
void func_801C7E18(Entity* self) {
|
||||
s8 temp; // probably !FAKE
|
||||
|
||||
switch (self->step) {
|
||||
case 0:
|
||||
InitializeEntity(D_80180A54);
|
||||
self->animSet = 2;
|
||||
self->accelerationY = -0x50000;
|
||||
self->palette = 0x8162;
|
||||
self->blendMode = 0x10;
|
||||
self->palette = 0x8018;
|
||||
self->blendMode = 0x30;
|
||||
self->unk6C = 0xA0;
|
||||
self->unk1A = 0x100;
|
||||
self->unk1C = 0x1A0;
|
||||
self->unk19 |= 3;
|
||||
self->ext.generic.unk84.S8.unk1 = 0x11;
|
||||
self->ext.generic.unk84.S8.unk0 = self->subId;
|
||||
self->unk19 |= 8;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
temp = self->ext.generic.unk84.S8.unk0 - 1;
|
||||
self->ext.generic.unk84.S8.unk0--;
|
||||
self->ext.generic.unk84.S8.unk1--;
|
||||
if (!(temp & 0xFF)) {
|
||||
self->step++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
AnimateEntity(D_801822C0, self);
|
||||
MoveEntity();
|
||||
self->accelerationY += 0x4000;
|
||||
self->unk1A += 6;
|
||||
self->unk1C -= 4;
|
||||
if (self->posY.i.hi > 256) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
if (!--self->ext.generic.unk84.U8.unk1) {
|
||||
self->accelerationY = 0;
|
||||
self->step++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (AnimateEntity(D_801822C0, self) == 0) {
|
||||
MoveEntity();
|
||||
self->accelerationY += 0x4000;
|
||||
self->unk1A += 6;
|
||||
self->unk1C -= 4;
|
||||
}
|
||||
if (self->posY.i.hi > 256) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EntityLargeFallingObject(Entity* self) {
|
||||
u8 temp_v0;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180AB4);
|
||||
self->animCurFrame = 13;
|
||||
self->ext.generic.unk84.S8.unk0 = 0x20;
|
||||
self->unk3C = 0;
|
||||
self->accelerationY = 0x1000;
|
||||
self->palette = self->subId + 0xE;
|
||||
self->unk6C = 0x80;
|
||||
self->unk19 |= 8;
|
||||
self->flags |= 0x2000;
|
||||
return;
|
||||
}
|
||||
MoveEntity();
|
||||
temp_v0 = self->ext.generic.unk84.U8.unk0 - 1;
|
||||
self->ext.generic.unk84.U8.unk0--;
|
||||
self->accelerationY += 0x1000;
|
||||
self->unk6C += 0xFE;
|
||||
if (temp_v0 == 0) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
}
|
||||
|
||||
void EntityMerman2(Entity* self) {
|
||||
Entity* newEntity;
|
||||
u16 temp_s0_2;
|
||||
u16 temp_s0;
|
||||
s32 temp2;
|
||||
s16 temp;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180A60);
|
||||
self->flags |= 0x2000;
|
||||
}
|
||||
|
||||
if (!(g_blinkTimer & 0x3F)) {
|
||||
Entity* player = &PLAYER;
|
||||
temp = g_Camera.posY.i.hi + player->posY.i.hi;
|
||||
if (temp >= 256) {
|
||||
temp_s0 = g_Camera.posX.i.hi + player->posX.i.hi;
|
||||
temp_s0_2 = 128;
|
||||
temp_s0_2 = temp_s0 - temp_s0_2 + Random();
|
||||
temp_s0 = temp_s0_2 - 64;
|
||||
if (temp_s0 <= 0x280) {
|
||||
temp2 = 496;
|
||||
newEntity = AllocEntity(&g_Entities[160], &g_Entities[170]);
|
||||
if (newEntity != 0) {
|
||||
if (Random() & 1) {
|
||||
CreateEntityFromCurrentEntity(0x32, newEntity);
|
||||
newEntity->subId = Random() & 1;
|
||||
} else {
|
||||
CreateEntityFromCurrentEntity(0x39, newEntity);
|
||||
}
|
||||
newEntity->posX.i.hi = temp_s0_2 - g_Camera.posX.i.hi;
|
||||
newEntity->posY.i.hi = temp2 - g_Camera.posY.i.hi;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/3DEF4", EntityMerman);
|
||||
|
||||
void func_801C8DF0(Entity* self) {
|
||||
Entity* entity;
|
||||
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180AD8);
|
||||
self->hitboxWidth = 6;
|
||||
self->animCurFrame = 0;
|
||||
self->hitboxHeight = 3;
|
||||
|
||||
if (self->facing != 0) {
|
||||
self->accelerationX = 0x10000 | 0x8000;
|
||||
} else {
|
||||
self->accelerationX = 0xFFFE0000 | 0x8000;
|
||||
}
|
||||
|
||||
self->unk19 = 3;
|
||||
self->unk1C = self->unk1A = 0x80;
|
||||
|
||||
entity = AllocEntity(D_8007D858, &D_8007D858[32]);
|
||||
if (entity != NULL) {
|
||||
CreateEntityFromEntity(E_UNK_15, self, entity);
|
||||
entity->ext.generic.unk94 = 4;
|
||||
entity->unk19 = 3;
|
||||
entity->zPriority = self->zPriority + 8;
|
||||
entity->unk1C = entity->unk1A = 192;
|
||||
}
|
||||
} else {
|
||||
AnimateEntity(D_80182400, self);
|
||||
MoveEntity();
|
||||
|
||||
if (self->unk1A < 0x100) {
|
||||
self->unk1C = self->unk1A += 8;
|
||||
}
|
||||
|
||||
if (self->flags & 0x100) {
|
||||
entity = AllocEntity(D_8007D858, &D_8007D858[32]);
|
||||
if (entity != NULL) {
|
||||
CreateEntityFromEntity(E_EXPLOSION, self, entity);
|
||||
entity->subId = 0;
|
||||
}
|
||||
DestroyEntity(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// some kind of falling object
|
||||
void func_801C8F54(Entity* self) {
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180ACC);
|
||||
self->animCurFrame = 0;
|
||||
self->unk3C = 0;
|
||||
self->zPriority += 4;
|
||||
self->flags |= 0x2000;
|
||||
}
|
||||
MoveEntity();
|
||||
self->accelerationY += 0x2800;
|
||||
if (AnimateEntity(D_80182414, self) == 0) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
}
|
||||
|
||||
void EntityMermanExplosion(Entity* self) {
|
||||
if (self->step == 0) {
|
||||
InitializeEntity(D_80180A54);
|
||||
self->palette = 0x82BB;
|
||||
self->animSet = 2;
|
||||
self->animCurFrame = D_80182454[self->subId];
|
||||
self->accelerationY = D_80182440[self->subId];
|
||||
self->step++;
|
||||
return;
|
||||
} else {
|
||||
self->animFrameDuration++;
|
||||
self->posY.val += self->accelerationY;
|
||||
}
|
||||
|
||||
if (!(self->animFrameDuration & 1)) {
|
||||
self->animCurFrame++;
|
||||
}
|
||||
|
||||
if (D_80182458[self->subId] < self->animFrameDuration) {
|
||||
DestroyEntity(self);
|
||||
}
|
||||
}
|
||||
|
1314
src/st/np3/44DCC.c
Normal file
1314
src/st/np3/44DCC.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,32 @@ INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CDF1C);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CDFD8);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CE04C);
|
||||
void func_801CE04C(Entity* entity, Collider* collider) {
|
||||
s16 var_s0 = 0;
|
||||
|
||||
g_api.CheckCollision(entity->posX.i.hi,
|
||||
(s16)(entity->posY.i.hi + collider->unk18), collider,
|
||||
0);
|
||||
if (collider->unk0 & 1) {
|
||||
var_s0 = 1;
|
||||
if (collider->unk0 & 0x8000) {
|
||||
if (collider->unk0 & 0x4000) {
|
||||
if (g_CurrentEntity->facing != 0) {
|
||||
var_s0 = 4;
|
||||
} else {
|
||||
var_s0 = 2;
|
||||
}
|
||||
} else {
|
||||
if (g_CurrentEntity->facing != 0) {
|
||||
var_s0 = 2;
|
||||
} else {
|
||||
var_s0 = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
entity->ext.generic.unk88.S16.unk0 = var_s0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CE120);
|
||||
|
||||
@ -92,19 +117,22 @@ INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CE3FC);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CE4CC);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CE69C);
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", EntityHammer);
|
||||
|
||||
// DECOMP_ME_WIP https://decomp.me/scratch/EpZEL // switch ordering
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CF254);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CF5B8);
|
||||
// https://decomp.me/scratch/RYIJM Matching
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", EntityHammerWeapon);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CF778);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CF7A0);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801CF94C);
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", EntityGurkha);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801D0730);
|
||||
// https://decomp.me/scratch/BBAHS Matching
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", EntityGurkhaSword);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/np3/nonmatchings/4B018", func_801D0A00);
|
||||
|
||||
|
@ -89,6 +89,34 @@ extern u16 D_801811AA[];
|
||||
extern u16 D_801811E6[];
|
||||
extern u16 D_80181204[];
|
||||
|
||||
// *** Merman properties START ***
|
||||
|
||||
extern u16 D_80181230[]; // pos TBL
|
||||
extern point32 D_80182224[]; // accel_x TBL
|
||||
extern u8 D_80182244[]; // timers
|
||||
extern s32 D_80182248; // Collision data
|
||||
extern s32 D_80182258; // Collision data
|
||||
extern u16 D_80182268; // Collision data
|
||||
extern u8 D_80182270[]; // Animation
|
||||
extern u8 D_8018227C[]; // Animation
|
||||
extern u8 D_80182294[]; // Animation
|
||||
extern u8 D_8018229C[]; // Animation
|
||||
extern point32 D_80182338[];
|
||||
extern u8 D_80182358[];
|
||||
extern s16 D_8018235C;
|
||||
extern s16 D_8018236C;
|
||||
extern s16 D_8018237C;
|
||||
extern s16 D_8018238C;
|
||||
extern u8 D_80182394[]; // animation
|
||||
extern u8 D_801823AC[]; // animation
|
||||
extern u8 D_801823BC[]; // animation
|
||||
extern u8 D_801823D0[]; // animation
|
||||
extern u8 D_801823DC[]; // animation
|
||||
extern u8 D_801823EC[]; // animation
|
||||
extern s32 D_80182418[];
|
||||
|
||||
// *** EntityMerman properties END ***
|
||||
|
||||
// *** EntitySlogra properties START ***
|
||||
|
||||
extern u16 D_80180B44[]; // Init
|
||||
|
@ -674,7 +674,7 @@ void func_801C0D08(Entity* self) {
|
||||
}
|
||||
}
|
||||
|
||||
bool func_801C0F38(Unkstruct6* unk) {
|
||||
bool func_801C0F38(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
|
@ -380,7 +380,7 @@ void func_801B8014(Entity* entity) {
|
||||
|
||||
INCLUDE_ASM("asm/us/st/st0/nonmatchings/36358", func_801B8108);
|
||||
|
||||
bool func_801B8338(Unkstruct6* unk) {
|
||||
bool func_801B8338(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
|
@ -654,7 +654,7 @@ void func_8018F928(Entity* arg0) {
|
||||
|
||||
INCLUDE_ASM("asm/us/st/wrp/nonmatchings/D020", func_8018FA1C);
|
||||
|
||||
bool func_8018FC4C(Unkstruct6* unk) {
|
||||
bool func_8018FC4C(point16* unk) {
|
||||
Collider res;
|
||||
|
||||
FallEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user