mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
En_Tanron5 (#653)
* En_Tanron5 * Stuff * PR * Fix * Use x/z instead of x/y * BSS * Merge * bss
This commit is contained in:
+6
-1
@@ -5,9 +5,14 @@
|
||||
|
||||
#define VEC_SET(V,X,Y,Z) V.x=X;V.y=Y;V.z=Z
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 x;
|
||||
/* 0x02 */ s16 z;
|
||||
} Vec2s; // size = 0x04
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
/* 0x04 */ f32 z;
|
||||
} Vec2f; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -4833,8 +4833,7 @@ beginseg
|
||||
name "ovl_En_Tanron5"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.o"
|
||||
include "build/data/ovl_En_Tanron5/ovl_En_Tanron5.data.o"
|
||||
include "build/data/ovl_En_Tanron5/ovl_En_Tanron5.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Tanron5/ovl_En_Tanron5_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
@@ -56,7 +56,7 @@ s32 func_80C0A740(BgIkninSusceil* this, GlobalContext* globalCtx) {
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
|
||||
return (D_80C0B0E8.x < offset.z) && (offset.z < D_80C0B0E8.y) && (offset.x > -240.0f) && (offset.x < D_80C0B0E4);
|
||||
return (D_80C0B0E8.x < offset.z) && (offset.z < D_80C0B0E8.z) && (offset.x > -240.0f) && (offset.x < D_80C0B0E4);
|
||||
}
|
||||
|
||||
void func_80C0A804(BgIkninSusceil* this, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: Fishing Pond Elements (Owner, Fish, Props, Effects...)
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_fishing.h"
|
||||
#include "objects/object_fish/object_fish.h"
|
||||
#include "overlays/actors/ovl_En_Kanban/z_en_kanban.h"
|
||||
|
||||
@@ -471,13 +471,13 @@ s32 func_80B25490(EnRacedog* this, Vec2f* arg1) {
|
||||
f32 temp;
|
||||
|
||||
xDistToTopFront = this->actor.world.pos.x - arg1[0].x;
|
||||
zDistToTopFront = this->actor.world.pos.z - arg1[0].y;
|
||||
zDistToTopFront = this->actor.world.pos.z - arg1[0].z;
|
||||
xDistToBottomFront = this->actor.world.pos.x - arg1[1].x;
|
||||
zDistToBottomFront = this->actor.world.pos.z - arg1[1].y;
|
||||
zDistToBottomFront = this->actor.world.pos.z - arg1[1].z;
|
||||
xDistToBottomBack = this->actor.world.pos.x - arg1[2].x;
|
||||
zDistToBottomBack = this->actor.world.pos.z - arg1[2].y;
|
||||
zDistToBottomBack = this->actor.world.pos.z - arg1[2].z;
|
||||
xDistToTopBack = this->actor.world.pos.x - arg1[3].x;
|
||||
zDistToTopBack = this->actor.world.pos.z - arg1[3].y;
|
||||
zDistToTopBack = this->actor.world.pos.z - arg1[3].z;
|
||||
|
||||
temp_f0 = ((xDistToTopFront * zDistToBottomFront) - (xDistToBottomFront * zDistToTopFront));
|
||||
temp = (((xDistToBottomFront * zDistToBottomBack) - (xDistToBottomBack * zDistToBottomFront)));
|
||||
|
||||
@@ -194,7 +194,7 @@ void func_80B708C0(EnRailSkb* this, GlobalContext* globalCtx) {
|
||||
s32 func_80B70AB4(Vec2f arg0, Vec2f arg1) {
|
||||
s32 phi_v1;
|
||||
|
||||
if ((arg1.x * arg0.y) < (arg0.x * arg1.y)) {
|
||||
if ((arg1.x * arg0.z) < (arg0.x * arg1.z)) {
|
||||
phi_v1 = 1;
|
||||
} else {
|
||||
phi_v1 = -1;
|
||||
@@ -213,9 +213,9 @@ s32 func_80B70B04(EnRailSkb* this, Vec3f pos) {
|
||||
s32 j;
|
||||
|
||||
sp60.x = this->unk_230[0].z - pos.z;
|
||||
sp60.y = this->unk_230[0].x - pos.x;
|
||||
sp60.z = this->unk_230[0].x - pos.x;
|
||||
sp58.x = this->unk_230[1].z - pos.z;
|
||||
sp58.y = this->unk_230[1].x - pos.x;
|
||||
sp58.z = this->unk_230[1].x - pos.x;
|
||||
j = 1;
|
||||
temp_s3 = func_80B70AB4(sp60, sp58);
|
||||
|
||||
@@ -229,9 +229,9 @@ s32 func_80B70B04(EnRailSkb* this, Vec3f pos) {
|
||||
}
|
||||
|
||||
sp60.x = this->unk_230[i].z - pos.z;
|
||||
sp60.y = this->unk_230[i].x - pos.x;
|
||||
sp60.z = this->unk_230[i].x - pos.x;
|
||||
sp58.x = this->unk_230[j].z - pos.z;
|
||||
sp58.y = this->unk_230[j].x - pos.x;
|
||||
sp58.z = this->unk_230[j].x - pos.x;
|
||||
|
||||
if (func_80B70AB4(sp60, sp58) != temp_s3) {
|
||||
ret = false;
|
||||
|
||||
@@ -817,7 +817,7 @@ void func_809964DC(EnSkb* this, GlobalContext* globalCtx) {
|
||||
s32 func_80996544(Vec2f arg0, Vec2f arg1) {
|
||||
s32 ret;
|
||||
|
||||
if ((arg1.x * arg0.y) < (arg0.x * arg1.y)) {
|
||||
if ((arg1.x * arg0.z) < (arg0.x * arg1.z)) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = -1;
|
||||
@@ -840,9 +840,9 @@ s32 func_80996594(EnSkb* this, GlobalContext* globalCtx) {
|
||||
worldX = this->actor.world.pos.x;
|
||||
|
||||
sp60.x = D_80997468[0].z - worldZ;
|
||||
sp60.y = D_80997468[0].x - worldX;
|
||||
sp60.z = D_80997468[0].x - worldX;
|
||||
sp58.x = D_80997468[1].z - worldZ;
|
||||
sp58.y = D_80997468[1].x - worldX;
|
||||
sp58.z = D_80997468[1].x - worldX;
|
||||
j = 1;
|
||||
temp_s2 = func_80996544(sp60, sp58);
|
||||
|
||||
@@ -856,9 +856,9 @@ s32 func_80996594(EnSkb* this, GlobalContext* globalCtx) {
|
||||
j = 0;
|
||||
}
|
||||
sp60.x = D_80997468[i].z - worldZ;
|
||||
sp60.y = D_80997468[i].x - worldX;
|
||||
sp60.z = D_80997468[i].x - worldX;
|
||||
sp58.x = D_80997468[j].z - worldZ;
|
||||
sp58.y = D_80997468[j].x - worldX;
|
||||
sp58.z = D_80997468[j].x - worldX;
|
||||
if (func_80996544(sp60, sp58) != temp_s2) {
|
||||
sp54 = false;
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,9 +5,24 @@
|
||||
|
||||
struct EnTanron5;
|
||||
|
||||
#define ENTANRON5_GET(thisx) ((thisx)->params)
|
||||
|
||||
#define ENTANRON5_0 0
|
||||
#define ENTANRON5_100 100
|
||||
#define ENTANRON5_107 107
|
||||
#define ENTANRON5_108 108
|
||||
#define ENTANRON5_110 110
|
||||
|
||||
typedef struct EnTanron5 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x60];
|
||||
/* 0x0144 */ s16 unk_144;
|
||||
/* 0x0148 */ Gfx* unk_148;
|
||||
/* 0x014C */ ColliderCylinder collider;
|
||||
/* 0x0198 */ s16 unk_198;
|
||||
/* 0x019A */ s16 unk_19A;
|
||||
/* 0x019C */ f32 unk_19C;
|
||||
/* 0x01A0 */ u8 unk_1A0;
|
||||
/* 0x01A1 */ u8 unk_1A1;
|
||||
} EnTanron5; // size = 0x1A4
|
||||
|
||||
extern const ActorInit En_Tanron5_InitVars;
|
||||
|
||||
@@ -234,7 +234,7 @@ void func_809372D0(ObjBean* this) {
|
||||
|
||||
sp34 = Math3D_Vec3fMagnitude(&actor->velocity);
|
||||
temp_f2 = D_80938FF8[this->unk_1DE].x;
|
||||
temp_f12 = D_80938FF8[this->unk_1DE].y;
|
||||
temp_f12 = D_80938FF8[this->unk_1DE].z;
|
||||
if (sp34 < (actor->speedXZ * 8.0f)) {
|
||||
temp_f2 = ((temp_f2 - 2.0f) * 0.1f) + 2.0f;
|
||||
temp_f12 *= 0.4f;
|
||||
|
||||
@@ -332,7 +332,7 @@ s32 ObjOshihiki_CheckWall(GlobalContext* globalCtx, s16 angle, f32 direction, Ob
|
||||
maxDist = maxDists[D_80918940[i]];
|
||||
|
||||
faceVtxOffset.x = (sFaceVtx[i].x * this->dyna.actor.scale.x * 10.0f) + sFaceDirection[i].x;
|
||||
faceVtxOffset.y = (sFaceVtx[i].y * this->dyna.actor.scale.y * 10.0f) + sFaceDirection[i].y;
|
||||
faceVtxOffset.y = (sFaceVtx[i].z * this->dyna.actor.scale.y * 10.0f) + sFaceDirection[i].z;
|
||||
faceVtxOffset.z = 0.0f;
|
||||
|
||||
ObjOshihiki_RotateXZ(&faceVtx, &faceVtxOffset, sn, cs);
|
||||
|
||||
@@ -159,7 +159,7 @@ s32 func_80A21370(ObjSkateblock* this, GlobalContext* globalCtx) {
|
||||
floor->bgId = BG_ACTOR_MAX;
|
||||
|
||||
sp8C.x = this->dyna.actor.world.pos.x + ((D_80A22A1C[i].x * this->dyna.actor.scale.x) + D_80A22A44[i].x);
|
||||
sp8C.z = this->dyna.actor.world.pos.z + ((D_80A22A1C[i].y * this->dyna.actor.scale.z) + D_80A22A44[i].y);
|
||||
sp8C.z = this->dyna.actor.world.pos.z + ((D_80A22A1C[i].z * this->dyna.actor.scale.z) + D_80A22A44[i].z);
|
||||
|
||||
floor->height =
|
||||
BgCheck_EntityRaycastFloor6(&globalCtx->colCtx, &floor->poly, &floor->bgId, &this->dyna.actor, &sp8C, 0.0f);
|
||||
@@ -244,7 +244,7 @@ s32 func_80A216D4(ObjSkateblock* this, GlobalContext* globalCtx, f32 arg2, Vec3f
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80A22A6C); i++) {
|
||||
spBC.x = (D_80A22A6C[i].x * this->dyna.actor.scale.x) + D_80A22A94[i].x;
|
||||
spBC.y = (D_80A22A6C[i].y * this->dyna.actor.scale.y) + D_80A22A94[i].y;
|
||||
spBC.y = (D_80A22A6C[i].z * this->dyna.actor.scale.y) + D_80A22A94[i].z;
|
||||
spBC.z = 0.0f;
|
||||
|
||||
func_80A212F0(&spD4, &spBC, sp96);
|
||||
|
||||
@@ -1719,12 +1719,6 @@ D_06004550 = 0x06004550;
|
||||
D_06000168 = 0x06000168;
|
||||
D_06000E68 = 0x06000E68;
|
||||
|
||||
// ovl_En_Tanron5
|
||||
|
||||
D_06006FD0 = 0x06006FD0;
|
||||
D_06007A88 = 0x06007A88;
|
||||
D_06007D18 = 0x06007D18;
|
||||
|
||||
// ovl_En_Test3
|
||||
|
||||
D_0600CB60 = 0x0600CB60;
|
||||
|
||||
Reference in New Issue
Block a user