mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
Finished Ve1, added permuter macros, fixed an error in Player struct (#121)
* format * format * cleanup * offsets
This commit is contained in:
parent
b435e2b63f
commit
25694f9d49
@ -514,6 +514,7 @@ void func_80095604(Player*);
|
||||
void func_80094954(Effect*);
|
||||
void func_80094BBC(Effect*);
|
||||
void func_80094D20(f32, f32);
|
||||
void func_80096A74(Player* player);
|
||||
|
||||
// fox_97F80
|
||||
void func_80098860(Plane* plane, Vec3f* point, Vec3f* normal);
|
||||
@ -531,7 +532,7 @@ void func_800A1FB0(Gfx**, u8 , u8);
|
||||
void func_800A24DC(s32);
|
||||
void func_800A26C0(void);
|
||||
void func_800A25DC(void);
|
||||
Actor* func_800A3608(s32);
|
||||
Actor* func_800A3608(ObjectId);
|
||||
|
||||
// fox_A4290
|
||||
bool func_800A3690(Vec3f*, Vec3f*, s32, Vec3f*);
|
||||
@ -611,8 +612,8 @@ void func_menu_80187520(u32, void*);
|
||||
void func_menu_8019E8D0(void);
|
||||
|
||||
void func_i1_80198414(void);
|
||||
s32 func_i1_801937F4(s32, Gfx**, Vec3f*, Vec3f*, void*);
|
||||
void func_i1_80193D64(s32, Vec3f*, void*);
|
||||
// s32 func_i1_801937F4(s32, Gfx**, Vec3f*, Vec3f*, void*);
|
||||
// void func_i1_80193D64(s32, Vec3f*, void*);
|
||||
|
||||
void func_ending_8018A96C(void);
|
||||
void func_ending_8018AAC4(void);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define RAND_FLOAT(max) (Rand_ZeroOne()*(max))
|
||||
#define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max)))
|
||||
#define RAND_FLOAT_CENTERED(width) ((Rand_ZeroOne()-0.5f)*(width))
|
||||
#define RAND_DOUBLE_CENTERED(width) ((Rand_ZeroOne()-0.5)*(width))
|
||||
#define RAND_RANGE(min, max) (((max) - (min)) * (Rand_ZeroOne() - (min) / ((min) - (max))))
|
||||
|
||||
#define RAND_FLOAT_SEEDED(max) (Rand_ZeroOneSeeded()*(max))
|
||||
@ -16,6 +17,7 @@
|
||||
#define SEGMENTED_TO_VIRTUAL(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)<<4)>>0x1C]+(((uintptr_t)(segment))&0xFFFFFF)))
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
#define SIGN_OF(x) (((x) > 0) ? 1 : ((x) == 0) ? 0 : -1)
|
||||
#define SQ(x) ((x) * (x))
|
||||
|
@ -265,8 +265,8 @@ typedef struct Player {
|
||||
/* 0x2C4 */ s32 unk_2C4;
|
||||
/* 0x2C8 */ Vec3f hit2;
|
||||
/* 0x2D4 */ Vec3f hit1;
|
||||
/* 0x2E0 */ Vec3f hit4;
|
||||
/* 0x2EC */ Vec3f hit3;
|
||||
/* 0x2E0 */ Vec3f hit3;
|
||||
/* 0x2EC */ Vec3f hit4;
|
||||
/* 0x2F8 */ Vec3f jointTable[30];
|
||||
/* 0x460 */ f32 sfxPos[3];
|
||||
/* 0x460 */ f32 sfxVel[3];
|
||||
|
@ -8,8 +8,15 @@ func_i1_80192CB0 = 0x80192CB0;
|
||||
func_i1_80192EA4 = 0x80192EA4;
|
||||
func_i1_801933B4 = 0x801933B4;
|
||||
func_i1_801935CC = 0x801935CC;
|
||||
D_i1_8019A04C = 0x8019A04C; // size:0xC type:s16 segment:ovl_i1
|
||||
D_i1_8019B6C0 = 0x8019B6C0;
|
||||
D_i1_8019A008 = 0x8019A008;
|
||||
D_i1_8019A008 = 0x8019A008; // segment:ovl_i1
|
||||
D_i1_8019A820 = 0x8019A820; // segment:ovl_i1 type:s16 size:0x198
|
||||
D_i1_8019AD2C = 0x8019AD2C; // segment:ovl_i1 size:0x28
|
||||
D_i1_8019AD5C = 0x8019AD5C; // segment:ovl_i1 type:Vec3f size:0xC
|
||||
D_i1_8019A748 = 0x8019A748; // segment:ovl_i1 size:0xD8 type:s32
|
||||
D_i1_8019A500 = 0x8019A500; // segment:ovl_i1 type:s16 size:0x44
|
||||
D_i1_8019B838 = 0x8019B838; // segment:ovl_i1 size:0x880
|
||||
|
||||
func_i2_80187B08 = 0x80187B08;
|
||||
func_i2_80188A40 = 0x80188A40;
|
||||
|
@ -777,6 +777,33 @@ D_70187B4 = 0x070187B4;
|
||||
|
||||
D_8000000_RGBA = 0x08000000;
|
||||
|
||||
D_9018BD0 = 0x09018BD0;
|
||||
D_901A4B8 = 0x0901A4B8;
|
||||
D_901BDA8 = 0x0901BDA8;
|
||||
D_901DA38 = 0x0901DA38;
|
||||
D_9024738 = 0x09024738;
|
||||
D_9024738 = 0x09024738;
|
||||
D_9018BD0 = 0x09018BD0;
|
||||
D_9010FC4 = 0x09010FC4;
|
||||
D_90150A0 = 0x090150A0;
|
||||
D_9015BB0 = 0x09015BB0;
|
||||
D_9015900 = 0x09015900;
|
||||
D_9000000 = 0x09000000;
|
||||
D_9022A20 = 0x09022A20;
|
||||
D_9021630 = 0x09021630;
|
||||
D_9015480 = 0x09015480;
|
||||
D_90007F0 = 0x090007F0;
|
||||
D_9014DF0 = 0x09014DF0;
|
||||
D_9022D80 = 0x09022D80;
|
||||
D_901E350 = 0x0901E350;
|
||||
D_901F990 = 0x0901F990;
|
||||
D_9024750 = 0x09024750;
|
||||
D_901F6D0 = 0x0901F6D0;
|
||||
D_9021900 = 0x09021900;
|
||||
D_901FC40 = 0x0901FC40;
|
||||
D_9021B80 = 0x09021B80;
|
||||
D_9013880 = 0x09013880;
|
||||
|
||||
D_9003F50 = 0x09003F50;
|
||||
D_9005C80 = 0x09005C80;
|
||||
D_900DD20 = 0x0900DD20;
|
||||
|
@ -540,7 +540,7 @@ void func_800A26C0(void) {
|
||||
}
|
||||
}
|
||||
|
||||
Actor* func_800A3608(s32 arg0) {
|
||||
Actor* func_800A3608(ObjectId objId) {
|
||||
Actor* actor = gActors;
|
||||
s32 i;
|
||||
|
||||
@ -548,7 +548,7 @@ Actor* func_800A3608(s32 arg0) {
|
||||
if (actor->obj.status == OBJ_FREE) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_INIT;
|
||||
actor->obj.id = arg0;
|
||||
actor->obj.id = objId;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
break;
|
||||
}
|
||||
|
@ -908,7 +908,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
||||
break;
|
||||
case 3:
|
||||
player->timer_224 = 20;
|
||||
func_800A668C(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z);
|
||||
func_800A668C(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z);
|
||||
if (player->form != FORM_LANDMASTER) {
|
||||
sp44.x = 0.0f;
|
||||
sp44.y = -sp34;
|
||||
@ -925,7 +925,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
||||
break;
|
||||
case 4:
|
||||
player->timer_224 = 20;
|
||||
func_800A668C(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z);
|
||||
func_800A668C(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z);
|
||||
sp44.x = 0.0f;
|
||||
sp44.y = sp34;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
@ -1117,13 +1117,13 @@ s32 func_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPo
|
||||
Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, 1);
|
||||
}
|
||||
if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) {
|
||||
var_fv0 = player->hit4.x;
|
||||
var_fv1 = player->hit4.y;
|
||||
var_fa0 = player->hit4.z;
|
||||
var_fv0 = player->hit3.x;
|
||||
var_fv1 = player->hit3.y;
|
||||
var_fa0 = player->hit3.z;
|
||||
} else {
|
||||
sp94.x = player->hit4.x - xPos;
|
||||
sp94.y = player->hit4.y - yPos;
|
||||
sp94.z = player->hit4.z - zPos;
|
||||
sp94.x = player->hit3.x - xPos;
|
||||
sp94.y = player->hit3.y - yPos;
|
||||
sp94.z = player->hit3.z - zPos;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp94, &sp88);
|
||||
var_fv0 = sp88.x + xPos;
|
||||
var_fv1 = sp88.y + yPos;
|
||||
@ -1141,13 +1141,13 @@ s32 func_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPo
|
||||
}
|
||||
if (hitboxData[-1] < HITBOX_UNK_3) {
|
||||
if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) {
|
||||
var_fv0 = player->hit3.x;
|
||||
var_fv1 = player->hit3.y;
|
||||
var_fa0 = player->hit3.z;
|
||||
var_fv0 = player->hit4.x;
|
||||
var_fv1 = player->hit4.y;
|
||||
var_fa0 = player->hit4.z;
|
||||
} else {
|
||||
sp94.x = player->hit3.x - xPos;
|
||||
sp94.y = player->hit3.y - yPos;
|
||||
sp94.z = player->hit3.z - zPos;
|
||||
sp94.x = player->hit4.x - xPos;
|
||||
sp94.y = player->hit4.y - yPos;
|
||||
sp94.z = player->hit4.z - zPos;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp94, &sp88);
|
||||
var_fv0 = sp88.x + xPos;
|
||||
var_fv1 = sp88.y + yPos;
|
||||
@ -1418,16 +1418,16 @@ s32 func_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 arg4,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
sp78.x = player->hit4.x - sp84.x;
|
||||
sp78.y = player->hit4.y - sp84.y;
|
||||
sp78.z = player->hit4.z - sp84.z;
|
||||
sp78.x = player->hit3.x - sp84.x;
|
||||
sp78.y = player->hit3.y - sp84.y;
|
||||
sp78.z = player->hit3.z - sp84.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C);
|
||||
if (func_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) {
|
||||
return 3;
|
||||
}
|
||||
sp78.x = player->hit3.x - sp84.x;
|
||||
sp78.y = player->hit3.y - sp84.y;
|
||||
sp78.z = player->hit3.z - sp84.z;
|
||||
sp78.x = player->hit4.x - sp84.x;
|
||||
sp78.y = player->hit4.y - sp84.y;
|
||||
sp78.z = player->hit4.z - sp84.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C);
|
||||
if (func_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) {
|
||||
return 4;
|
||||
@ -1490,9 +1490,9 @@ void func_800A887C(Player* player) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit1);
|
||||
sp3C.x = 0.0f;
|
||||
sp3C.z = -40.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
sp3C.z = 40.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit3);
|
||||
sp3C.z = 40.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
}
|
||||
if ((player->form == FORM_ON_FOOT) || (player->form == FORM_UNK_4)) {
|
||||
sp3C.x = 20.0f;
|
||||
@ -1503,9 +1503,9 @@ void func_800A887C(Player* player) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit1);
|
||||
sp3C.x = 0.0f;
|
||||
sp3C.z = -20.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
sp3C.z = 20.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit3);
|
||||
sp3C.z = 20.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
}
|
||||
if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE)) {
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + 180.0f) * M_DTOR, 1);
|
||||
@ -1535,9 +1535,9 @@ void func_800A887C(Player* player) {
|
||||
|
||||
sp3C.x = 0.0f;
|
||||
sp3C.y = 24.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
sp3C.y = -24.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit3);
|
||||
sp3C.y = -24.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2041,11 +2041,11 @@ void func_800A8BA4(Player* player) {
|
||||
}
|
||||
}
|
||||
if (D_80178294 != 0) {
|
||||
if (func_800A73E4(&sp94, &sp90, player->hit3.x, player->hit3.y, player->hit3.z)) {
|
||||
if (func_800A73E4(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) {
|
||||
if (gCurrentLevel == LEVEL_ZONESS) {
|
||||
player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f;
|
||||
player->unk_1F4 = 15;
|
||||
func_8007B228(player->hit3.x, sp94, player->hit3.z, 1.0f);
|
||||
func_8007B228(player->hit4.x, sp94, player->hit4.z, 1.0f);
|
||||
} else {
|
||||
if (player->unk_1F4 == 0) {
|
||||
Player_ApplyDamage(player, 4, 10);
|
||||
|
@ -1072,13 +1072,13 @@ s32 func_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPo
|
||||
return 2;
|
||||
}
|
||||
if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) {
|
||||
var_fv0 = player->hit4.x;
|
||||
var_fv1 = player->hit4.y;
|
||||
var_fa0 = player->hit4.z;
|
||||
var_fv0 = player->hit3.x;
|
||||
var_fv1 = player->hit3.y;
|
||||
var_fa0 = player->hit3.z;
|
||||
} else {
|
||||
sp94.x = player->hit4.x - xPos;
|
||||
sp94.y = player->hit4.y - yPos;
|
||||
sp94.z = player->hit4.z - zPos;
|
||||
sp94.x = player->hit3.x - xPos;
|
||||
sp94.y = player->hit3.y - yPos;
|
||||
sp94.z = player->hit3.z - zPos;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp94, &sp88);
|
||||
var_fv0 = sp88.x + xPos;
|
||||
var_fv1 = sp88.y + yPos;
|
||||
@ -1096,13 +1096,13 @@ s32 func_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPo
|
||||
return 0;
|
||||
}
|
||||
if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) {
|
||||
var_fv0 = player->hit3.x;
|
||||
var_fv1 = player->hit3.y;
|
||||
var_fa0 = player->hit3.z;
|
||||
var_fv0 = player->hit4.x;
|
||||
var_fv1 = player->hit4.y;
|
||||
var_fa0 = player->hit4.z;
|
||||
} else {
|
||||
sp94.x = player->hit3.x - xPos;
|
||||
sp94.y = player->hit3.y - yPos;
|
||||
sp94.z = player->hit3.z - zPos;
|
||||
sp94.x = player->hit4.x - xPos;
|
||||
sp94.y = player->hit4.y - yPos;
|
||||
sp94.z = player->hit4.z - zPos;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp94, &sp88);
|
||||
var_fv0 = sp88.x + xPos;
|
||||
var_fv1 = sp88.y + yPos;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,6 +16,11 @@ compiler_type = "ido"
|
||||
"RAD_TO_DEG" = "float"
|
||||
"DEG_TO_RAD" = "float"
|
||||
"NULL" = "void*"
|
||||
"RAND_F*" = "float"
|
||||
"RAND_I*" = "int"
|
||||
"RAND_D*" = "double"
|
||||
"RAND_RANGE" = "float"
|
||||
|
||||
|
||||
[decompme.compilers]
|
||||
"tools/ido-recomp/linux/cc" = "ido5.3"
|
@ -14,7 +14,7 @@
|
||||
- [0xE05990, c, fox_tr360]
|
||||
- [0xE06510, .data, fox_i1]
|
||||
- [0xE06520, .data, fox_co]
|
||||
- [0xE06880, data, sf_ve1]
|
||||
- [0xE06880, .data, sf_ve1]
|
||||
- [0xE07B90, .data, fox_tr360]
|
||||
- [0xE07C30, .rodata, fox_co]
|
||||
- [0xE07FF0, .rodata, sf_ve1]
|
||||
@ -22,7 +22,7 @@
|
||||
- [0xE083C0, .rodata, fox_tr360]
|
||||
- { start: 0xE08400, type: .bss, vram: 0x8019B6C0, name: fox_i1 }
|
||||
- { type: .bss, vram: 0x8019B6D0, name: fox_co }
|
||||
- { type: bss, vram: 0x8019B7F0, name: sf_ve1 }
|
||||
- { type: .bss, vram: 0x8019B7F0, name: sf_ve1 }
|
||||
|
||||
- name: ovl_i2
|
||||
type: code
|
||||
|
Loading…
Reference in New Issue
Block a user