Replace float with f32

This commit is contained in:
Ryan Dwyer
2019-12-24 22:59:00 +10:00
parent 95102b8ee5
commit 7312362c46
25 changed files with 254 additions and 254 deletions
+59 -59
View File
@@ -19501,10 +19501,10 @@ glabel func0f02e6dc
/* f02e99c: 00000000 */ sll $zero,$zero,0x0
);
void func0f02e9a0(struct chrdata *chr, float arg1)
void func0f02e9a0(struct chrdata *chr, f32 arg1)
{
float limit = 127;
float fsleep;
f32 limit = 127;
f32 fsleep;
chrStopFiring(chr);
chr->actiontype = ACT_STAND;
@@ -19711,7 +19711,7 @@ glabel func0f02ec94
/* f02ed24: 00000000 */ sll $zero,$zero,0x0
);
void func0f02ed28(struct chrdata *chr, float arg1)
void func0f02ed28(struct chrdata *chr, f32 arg1)
{
func0f02e9a0(chr, arg1);
chr->act_stand.unk040 = 1;
@@ -25335,7 +25335,7 @@ glabel func0f0338e0
/* f033f9c: 00000000 */ sll $zero,$zero,0x0
);
float chrGetShield(struct chrdata *chr)
f32 chrGetShield(struct chrdata *chr)
{
return chr->cshield;
}
@@ -32938,7 +32938,7 @@ bool chrTryKneel(struct chrdata *chr)
return false;
}
bool func0f03af44(struct chrdata *chr, u32 anim_id, float fstartframe, float fendframe, u8 flags, u32 transition, float result)
bool func0f03af44(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendframe, u8 flags, u32 transition, f32 result)
{
if (func0f039a18(chr)) {
func0f030ff8(chr, anim_id, fstartframe, fendframe, flags, transition, result);
@@ -36675,7 +36675,7 @@ glabel func0f03e45c
/* f03e534: 00000000 */ sll $zero,$zero,0x0
);
void func0f03e538(struct chrdata *chr, float arg1)
void func0f03e538(struct chrdata *chr, f32 arg1)
{
if (chr->unk2d4) {
chr->unk2d4->unkb0 = arg1;
@@ -36684,7 +36684,7 @@ void func0f03e538(struct chrdata *chr, float arg1)
}
}
float func0f03e578(struct chrdata *chr)
f32 func0f03e578(struct chrdata *chr)
{
if (chr->unk2d4) {
return chr->unk2d4->unka4;
@@ -36693,7 +36693,7 @@ float func0f03e578(struct chrdata *chr)
return func0001ae44(chr->unk020);
}
void func0f03e5b0(struct chrdata *chr, float arg1)
void func0f03e5b0(struct chrdata *chr, f32 arg1)
{
if (chr->unk2d4) {
chr->unk2d4->unka4 = arg1;
@@ -41377,11 +41377,11 @@ glabel func0f042808
/* f0429d4: 00000000 */ sll $zero,$zero,0x0
);
void func0f0429d8(struct chrdata *chr, float arg1, float arg2)
void func0f0429d8(struct chrdata *chr, f32 arg1, f32 arg2)
{
struct position *pos = chrGetTargetPosition(chr);
float distance = func0f096750(pos->coord.x - chr->pos->coord.x, pos->coord.z - chr->pos->coord.z);
float value = func0001afe8(arg2, distance, arg1);
f32 distance = func0f096750(pos->coord.x - chr->pos->coord.x, pos->coord.z - chr->pos->coord.z);
f32 value = func0001afe8(arg2, distance, arg1);
func0f03e538(chr, value);
}
@@ -48123,7 +48123,7 @@ glabel func0f048a84
/* f048b48: 46006006 */ mov.s $f0,$f12
);
float chrGetAngleToTarget(struct chrdata *chr)
f32 chrGetAngleToTarget(struct chrdata *chr)
{
struct position *pos = chrGetTargetPosition(chr);
return func0f048a84(chr, &pos->coord);
@@ -48597,46 +48597,46 @@ glabel func0f04911c
/* f0491c4: 27bd0018 */ addiu $sp,$sp,0x18
);
float chrGetDistanceToTarget(struct chrdata *chr)
f32 chrGetDistanceToTarget(struct chrdata *chr)
{
struct position *targetpos = chrGetTargetPosition(chr);
return positionGetDistanceToPosition(chr->pos, targetpos);
}
// Redundant function - it's the same as above
float chrGetDistanceToTarget2(struct chrdata *chr)
f32 chrGetDistanceToTarget2(struct chrdata *chr)
{
struct position *targetpos = chrGetTargetPosition(chr);
return positionGetDistanceToPosition(chr->pos, targetpos);
}
float chrGetDistanceToCurrentPlayer(struct chrdata *chr)
f32 chrGetDistanceToCurrentPlayer(struct chrdata *chr)
{
return positionGetDistanceToPosition(chr->pos, g_Vars.currentplayer->targetpos);
}
float positionGetDistanceToPosition(struct position *a, struct position *b)
f32 positionGetDistanceToPosition(struct position *a, struct position *b)
{
float xdiff = a->coord.x - b->coord.x;
float ydiff = a->coord.y - b->coord.y;
float zdiff = a->coord.z - b->coord.z;
f32 xdiff = a->coord.x - b->coord.x;
f32 ydiff = a->coord.y - b->coord.y;
f32 zdiff = a->coord.z - b->coord.z;
return sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff);
}
float positionGetLateralDistanceToPosition(struct position *a, struct position *b)
f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b)
{
float xdiff = a->coord.x - b->coord.x;
float zdiff = a->coord.z - b->coord.z;
f32 xdiff = a->coord.x - b->coord.x;
f32 zdiff = a->coord.z - b->coord.z;
return sqrtf(xdiff * xdiff + zdiff * zdiff);
}
float chrGetDistanceToPad(struct chrdata *chr, s32 pad_id)
f32 chrGetDistanceToPad(struct chrdata *chr, s32 pad_id)
{
struct position *pos = chr->pos;
float xdiff, ydiff, zdiff;
float distance = 0;
f32 xdiff, ydiff, zdiff;
f32 distance = 0;
struct pad pad;
pad_id = chrResolvePadId(chr, pad_id);
@@ -48707,12 +48707,12 @@ glabel chrGetSameFloorDistanceToPad
// Matches, but commented because it puts rodata out of order. Will be safe to
// uncomment once all functions either above or below it which contain rodata
// have been decompiled.
//float chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id)
//f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id)
//{
// struct position *pos = chr->pos;
// float xdiff, ydiff, zdiff, ydiff_absolute;
// f32 xdiff, ydiff, zdiff, ydiff_absolute;
// struct pad pad;
// float ret;
// f32 ret;
//
// pad_id = chrResolvePadId(chr, pad_id);
// padUnpack(pad_id, 2, &pad);
@@ -48735,29 +48735,29 @@ glabel chrGetSameFloorDistanceToPad
// return ret;
//}
float chrGetDistanceToCoord(struct chrdata *chr, struct coord *coord)
f32 chrGetDistanceToCoord(struct chrdata *chr, struct coord *coord)
{
float xdiff = coord->x - chr->pos->coord.x;
float ydiff = coord->y - chr->pos->coord.y;
float zdiff = coord->z - chr->pos->coord.z;
f32 xdiff = coord->x - chr->pos->coord.x;
f32 ydiff = coord->y - chr->pos->coord.y;
f32 zdiff = coord->z - chr->pos->coord.z;
return sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff);
}
float chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord)
f32 chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord)
{
float xdiff = coord->x - chr->pos->coord.x;
float zdiff = coord->z - chr->pos->coord.z;
f32 xdiff = coord->x - chr->pos->coord.x;
f32 zdiff = coord->z - chr->pos->coord.z;
return sqrtf(xdiff * xdiff + zdiff * zdiff);
}
float chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id)
f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id)
{
struct position *pos = chr->pos;
float xdiff, zdiff;
f32 xdiff, zdiff;
struct pad pad;
float distance = 0;
f32 distance = 0;
pad_id = chrResolvePadId(chr, pad_id);
if (pad_id >= 0) {
@@ -48770,20 +48770,20 @@ float chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id)
return distance;
}
float chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord)
f32 chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord)
{
float xdiff = coord->x - chr->pos->coord.x;
float ydiff = coord->y - chr->pos->coord.y;
float zdiff = coord->z - chr->pos->coord.z;
f32 xdiff = coord->x - chr->pos->coord.x;
f32 ydiff = coord->y - chr->pos->coord.y;
f32 zdiff = coord->z - chr->pos->coord.z;
return xdiff * xdiff + ydiff * ydiff + zdiff * zdiff;
}
float coordGetSquaredDistanceToCoord(struct coord *a, struct coord *b)
f32 coordGetSquaredDistanceToCoord(struct coord *a, struct coord *b)
{
float xdiff = a->x - b->x;
float ydiff = a->y - b->y;
float zdiff = a->z - b->z;
f32 xdiff = a->x - b->x;
f32 ydiff = a->y - b->y;
f32 zdiff = a->z - b->z;
return xdiff * xdiff + ydiff * ydiff + zdiff * zdiff;
}
@@ -49373,28 +49373,28 @@ glabel positionGetIndexByChrId
/* f049cac: 00000000 */ sll $zero,$zero,0x0
);
float chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num)
f32 chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num)
{
struct position *pos1 = chr1->pos;
struct chrdata *chr2 = chrFindById(chr1, chr2num);
float distance = 0;
f32 distance = 0;
if (chr2 && chr2->pos) {
float xdiff = chr2->pos->coord.x - pos1->coord.x;
float ydiff = chr2->pos->coord.y - pos1->coord.y;
float zdiff = chr2->pos->coord.z - pos1->coord.z;
f32 xdiff = chr2->pos->coord.x - pos1->coord.x;
f32 ydiff = chr2->pos->coord.y - pos1->coord.y;
f32 zdiff = chr2->pos->coord.z - pos1->coord.z;
distance = sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff);
}
return distance;
}
float chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id)
f32 chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id)
{
struct position *targetpos = chrGetTargetPosition(chr);
float xdiff, ydiff, zdiff;
f32 xdiff, ydiff, zdiff;
struct pad pad;
float distance = 0;
f32 distance = 0;
pad_id = chrResolvePadId(chr, pad_id);
if (pad_id >= 0) {
@@ -50100,12 +50100,12 @@ glabel func0f04a674
/* f04a768: 00000000 */ sll $zero,$zero,0x0
);
bool func0f04a76c(struct chrdata *chr, float distance)
bool func0f04a76c(struct chrdata *chr, f32 distance)
{
return func0f04a79c(0, chr, distance);
}
bool func0f04a79c(u8 chrnum, struct chrdata *chr, float distance)
bool func0f04a79c(u8 chrnum, struct chrdata *chr, f32 distance)
{
return func0f04a848(chrnum, chr, distance, &chr->pos->coord, &chr->pos->room);
}
@@ -50979,7 +50979,7 @@ bool chrSpawnAtPad(struct chrdata *basechr, s32 body, s32 head, s32 pad_id, u8 *
s32 resolved_pad_id = chrResolvePadId(basechr, pad_id);
struct pad pad;
s16 room[2];
float fvalue;
f32 fvalue;
padUnpack(resolved_pad_id, 0x46, &pad);
fvalue = func0f096750(pad.look.x, pad.look.z);
room[0] = pad.room;
@@ -50991,7 +50991,7 @@ bool chrSpawnAtPad(struct chrdata *basechr, s32 body, s32 head, s32 pad_id, u8 *
bool chrSpawnAtChr(struct chrdata *basechr, s32 body, s32 head, u32 chrnum, u8 *ailist, u32 flags)
{
struct chrdata *chr = chrFindById(basechr, chrnum);
float fvalue;
f32 fvalue;
if (1) {
fvalue = func0f03e45c(chr);
+47 -47
View File
@@ -110,13 +110,13 @@ const u32 var7f1a9d88[] = {0x7f05b140};
const u32 var7f1a9d8c[] = {0x7f05b184};
const u32 var7f1a9d90[] = {0x461c4000};
const float var7f1a9d94[] = {3500};
const float var7f1a9d98[] = {30999.9};
const float var7f1a9d9c[] = {3000};
const float var7f1a9da0[] = {3000};
const float var7f1a9da4[] = {0.1};
const float var7f1a9da8[] = {0.4};
const float var7f1a9dac[] = {0.4};
const f32 var7f1a9d94[] = {3500};
const f32 var7f1a9d98[] = {30999.9};
const f32 var7f1a9d9c[] = {3000};
const f32 var7f1a9da0[] = {3000};
const f32 var7f1a9da4[] = {0.1};
const f32 var7f1a9da8[] = {0.4};
const f32 var7f1a9dac[] = {0.4};
/**
* @cmd 0000
@@ -574,8 +574,8 @@ glabel ai000b
// struct chrdata *chr = NULL;
// s32 startframe = cmd[5] | (cmd[4] << 8);
// s32 endframe = cmd[7] | (cmd[6] << 8);
// float fstartframe;
// float fendframe;
// f32 fstartframe;
// f32 fendframe;
//
// if (g_Vars.chrdata) {
// chr = chrFindById(g_Vars.chrdata, cmd[10]);
@@ -596,7 +596,7 @@ glabel ai000b
// }
//
// if (chr && chr->unk020) {
// float result = 1.0 / cmd[11];
// f32 result = 1.0 / cmd[11];
//
// if (g_Vars.in_cutscene) {
// if (startframe != 0xfffe) {
@@ -2260,7 +2260,7 @@ bool ai0051(void)
bool aiIfDistanceToTargetLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * (float)10;
f32 distance = (cmd[3] | (cmd[2] << 8)) * (f32)10;
if (chrGetDistanceToTarget(g_Vars.chrdata) < distance) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -2277,7 +2277,7 @@ bool aiIfDistanceToTargetLessThan(void)
bool aiIfDistanceToTargetGreaterThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * (float)10;
f32 distance = (cmd[3] | (cmd[2] << 8)) * (f32)10;
if (chrGetDistanceToTarget(g_Vars.chrdata) > distance) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -2507,7 +2507,7 @@ glabel aiIfChrDistanceToPadGreaterThan
bool aiIfDistanceToChrLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float cutoff = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 cutoff = (cmd[3] | (cmd[2] << 8)) * 10.0f;
if (chrGetDistanceToChr(g_Vars.chrdata, cmd[4]) < cutoff) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]);
@@ -2524,7 +2524,7 @@ bool aiIfDistanceToChrLessThan(void)
bool aiIfDistanceToChrGreaterThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float cutoff = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 cutoff = (cmd[3] | (cmd[2] << 8)) * 10.0f;
if (chrGetDistanceToChr(g_Vars.chrdata, cmd[4]) > cutoff) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]);
@@ -2541,7 +2541,7 @@ bool aiIfDistanceToChrGreaterThan(void)
bool ai0058(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
if (func0f04a76c(g_Vars.chrdata, distance)) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -3320,7 +3320,7 @@ bool aiDestroyObject(void)
func0f129900(entity->pos, &entity->pos->coord, &entity->pos->room, 3, 0);
func0f12e714(entity->pos, 0x16);
} else {
float damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f;
f32 damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f;
func0f0852ac(obj, damage, &obj->pos->coord, 0x22, -1);
}
}
@@ -4211,7 +4211,7 @@ bool aiIfDifficultyGreaterThan(void)
return false;
}
float func0f16cdec(void);
f32 func0f16cdec(void);
/**
* @cmd 0079
@@ -4219,8 +4219,8 @@ float func0f16cdec(void);
bool aiIfUptimeLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float target = (float)(cmd[3] | (cmd[2] << 8));
float uptime = func0f16cdec();
f32 target = (f32)(cmd[3] | (cmd[2] << 8));
f32 uptime = func0f16cdec();
if (uptime < target) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -4237,8 +4237,8 @@ bool aiIfUptimeLessThan(void)
bool aiIfUptimeGreaterThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float target = (float)(cmd[3] | (cmd[2] << 8));
float uptime = func0f16cdec();
f32 target = (f32)(cmd[3] | (cmd[2] << 8));
f32 uptime = func0f16cdec();
if (uptime > target) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -4471,7 +4471,7 @@ bool aiIfAlertnessLessThanRandom(void)
bool aiSetHearDistance(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) / 1000.0f;
f32 distance = (cmd[3] | (cmd[2] << 8)) / 1000.0f;
g_Vars.chrdata->hearingscale = distance;
g_Vars.aioffset += 4;
@@ -5439,7 +5439,7 @@ bool aiIfTimerStopped(void)
bool aiIfTimerGreaterThanRandom(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float timer = chrGetTimer(g_Vars.chrdata);
f32 timer = chrGetTimer(g_Vars.chrdata);
if (g_Vars.chrdata->random < timer) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
@@ -5642,7 +5642,7 @@ bool aiHideCountdownTimer(void)
bool aiSetCountdownTimerValue(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float seconds = cmd[3] | (cmd[2] << 8);
f32 seconds = cmd[3] | (cmd[2] << 8);
countdownTimerSetValue(seconds * 60);
g_Vars.aioffset += 4;
@@ -5694,7 +5694,7 @@ bool aiIfCountdownTimerStopped(void)
bool aiIfCountdownTimerLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float value = cmd[3] | (cmd[2] << 8);
f32 value = cmd[3] | (cmd[2] << 8);
if (countdownTimerGetValue() < value * 60) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -5711,7 +5711,7 @@ bool aiIfCountdownTimerLessThan(void)
bool aiIfCountdownTimerGreaterThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float value = cmd[3] | (cmd[2] << 8);
f32 value = cmd[3] | (cmd[2] << 8);
if (countdownTimerGetValue() > value * 60) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -6585,7 +6585,7 @@ bool ai00d1(void)
bool ai00d2(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float thing1 = cmd[4] | (cmd[3] << 8);
f32 thing1 = cmd[4] | (cmd[3] << 8);
u16 thing2 = cmd[6] | (cmd[5] << 8);
s32 audio_id = func0f0927d4(thing1, 400, 2500, 3000, 32767);
@@ -8652,7 +8652,7 @@ bool aiIfChrTarget(void)
bool ai0109(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[4] | (cmd[3] << 8)) * 10.0f;
f32 distance = (cmd[4] | (cmd[3] << 8)) * 10.0f;
if (func0f04a79c(cmd[2], g_Vars.chrdata, distance)) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]);
@@ -8669,7 +8669,7 @@ bool ai0109(void)
bool ai010a(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[4] | (cmd[3] << 8)) * 10.0f;
f32 distance = (cmd[4] | (cmd[3] << 8)) * 10.0f;
u16 thing = cmd[6] | (cmd[5] << 8);
if (func0f04a7dc(cmd[2], g_Vars.chrdata, distance, thing)) {
@@ -11035,7 +11035,7 @@ glabel ai0137
);
// Mismatches due to position of rodata. This function uses literal 3500, while
// others below in this file use const float arrays, but const float arrays are
// others below in this file use const f32 arrays, but const f32 arrays are
// placed in .rodata before all literals.
//bool ai0137(void)
//{
@@ -11090,7 +11090,7 @@ bool ai0139(void)
*/
bool aiSetChrPresetToUnalertedTeammate(void)
{
float closest_distance = var7f1a9d98[0];
f32 closest_distance = var7f1a9d98[0];
s16 candidate_chrnum = -1;
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
s16 *chrnums = teamGetChrIds(g_Vars.chrdata->team);
@@ -11113,7 +11113,7 @@ bool aiSetChrPresetToUnalertedTeammate(void)
(g_Vars.chrdata->squadron == chr->squadron || g_Vars.chrdata->squadron == 0xff) &&
g_Vars.chrdata->chrnum != chr->chrnum) {
float distance = chrGetDistanceToChr(g_Vars.chrdata, chr->chrnum);
f32 distance = chrGetDistanceToChr(g_Vars.chrdata, chr->chrnum);
if (distance < closest_distance &&
(distance < 100.0f * (s32)cmd[2] || cmd[2] == 0) &&
@@ -11996,7 +11996,7 @@ bool aiIfY(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct chrdata *chr = NULL;
float cutoff_y = ((cmd[4] | (cmd[3] << 8)) << 16) >> 16;
f32 cutoff_y = ((cmd[4] | (cmd[3] << 8)) << 16) >> 16;
if (cmd[2] == CHR_TARGET && g_Vars.hovdata) {
struct heliobj *heli = func0f07adf4(&g_Vars.hovdata->base);
@@ -12189,10 +12189,10 @@ bool ai0170(void)
bool aiIfDistanceToGunLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
float xdiff = 0;
float ydiff = 0;
float zdiff = 0;
f32 distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 xdiff = 0;
f32 ydiff = 0;
f32 zdiff = 0;
if (g_Vars.chrdata->gungroundpos) {
xdiff = g_Vars.chrdata->pos->coord.x - g_Vars.chrdata->gungroundpos->coord.x;
@@ -12827,10 +12827,10 @@ glabel aiIfObjectDistanceToPadLessThan
//bool aiIfObjectDistanceToPadLessThan(void)
//{
// u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
// float distance = (float)(cmd[4] | (cmd[3] << 8)) * 10;
// float xdiff;
// float ydiff;
// float zdiff;
// f32 distance = (f32)(cmd[4] | (cmd[3] << 8)) * 10;
// f32 xdiff;
// f32 ydiff;
// f32 zdiff;
// s32 pad_id = (cmd[6] | (cmd[5] << 8)) & 0xffff;
// struct defaultobj *obj = objFindByTagId(cmd[2]);
// struct pad pad;
@@ -13197,7 +13197,7 @@ bool aiIfTargetYDifferenceLessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct position *pos = chrGetTargetPosition(g_Vars.chrdata);
float diff = pos->coord.y - g_Vars.chrdata->pos->coord.y;
f32 diff = pos->coord.y - g_Vars.chrdata->pos->coord.y;
if (diff < 0) {
diff = 0 - diff;
@@ -13218,7 +13218,7 @@ bool aiIfTargetYDifferenceLessThan(void)
bool ai01aa(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float a = var7f1a9d9c[0];
f32 a = var7f1a9d9c[0];
func0f0056f4(
g_Vars.currentplayer->targetpos->room,
@@ -13924,7 +13924,7 @@ bool aiChrBeginOrEndTeleport(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
u16 pad_id = cmd[3] | (cmd[2] << 8);
float fvalue = var7f1a9da8[0];
f32 fvalue = var7f1a9da8[0];
struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[4]);
s32 a;
u32 playernum;
@@ -13974,7 +13974,7 @@ bool aiIfChrTeleportFullWhite(void)
struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[3]);
u32 prevplayernum = g_Vars.currentplayernum;
s32 a;
float fvalue;
f32 fvalue;
s32 b;
s32 c;
@@ -14717,7 +14717,7 @@ bool aiMiscellaneous(void)
bool aiIfDistanceToTarget2LessThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
if (chrGetDistanceToTarget2(g_Vars.chrdata) < distance) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
@@ -14734,7 +14734,7 @@ bool aiIfDistanceToTarget2LessThan(void)
bool aiIfDistanceToTarget2GreaterThan(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
float distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
f32 distance = (cmd[3] | (cmd[2] << 8)) * 10.0f;
if (chrGetDistanceToTarget2(g_Vars.chrdata) > distance) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
+2 -2
View File
@@ -49110,12 +49110,12 @@ bool countdownTimerIsHidden(void)
return g_CountdownTimerVisible < 1;
}
void countdownTimerSetValue(float frames)
void countdownTimerSetValue(f32 frames)
{
g_CountdownTimerValue = frames;
}
float countdownTimerGetValue(void)
f32 countdownTimerGetValue(void)
{
return g_CountdownTimerValue;
}
+4 -4
View File
@@ -10096,7 +10096,7 @@ glabel func0f0bb2e8
/* f0bb31c: 00000000 */ sll $zero,$zero,0x0
);
void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, float arg3)
void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, f32 arg3)
{
g_Vars.currentplayer->unk02d8 = arg0;
g_Vars.currentplayer->unk02dc = arg1;
@@ -10104,7 +10104,7 @@ void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, float arg3)
g_Vars.currentplayer->unk02e4 = arg3;
}
void func0f0bb350(float arg0, s32 arg1, s32 arg2, s32 arg3, float arg4)
void func0f0bb350(f32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4)
{
g_Vars.currentplayer->unk02e8 = 0;
g_Vars.currentplayer->unk02ec = arg0;
@@ -10118,7 +10118,7 @@ void func0f0bb350(float arg0, s32 arg1, s32 arg2, s32 arg3, float arg4)
g_Vars.currentplayer->unk030c = arg4;
}
void func0f0bb3c8(float arg0, float arg1)
void func0f0bb3c8(f32 arg0, f32 arg1)
{
func0f0bb350(arg0,g_Vars.currentplayer->unk02d8, g_Vars.currentplayer->unk02dc, g_Vars.currentplayer->unk02e0, arg1);
}
@@ -10218,7 +10218,7 @@ glabel func0f0bb42c
/* f0bb578: 00000000 */ sll $zero,$zero,0x0
);
void func0f0bb57c(float arg0, float arg1)
void func0f0bb57c(f32 arg0, f32 arg1)
{
struct chrdata *chr = g_Vars.currentplayer->targetpos->chr;
+1 -1
View File
@@ -33,7 +33,7 @@ s32 func0f176044(s32 arg0, s32 arg1, s32 arg2, s32 arg3)
return arg0;
}
void func0f176058(float arg0)
void func0f176058(f32 arg0)
{
// empty
}
+34 -34
View File
@@ -5,19 +5,19 @@
struct chrdata *chrFindById(struct chrdata *data, u32 chrnum);
struct chrdata *chrFindByLiteralId(s32 chrnum);
float chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id);
float chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num);
float chrGetDistanceToCoord(struct chrdata *chr, struct coord *coord);
float chrGetDistanceToCurrentPlayer(struct chrdata *chr);
float chrGetDistanceToPad(struct chrdata *chr, s32 pad_id);
float chrGetDistanceToTarget(struct chrdata *chr);
float chrGetDistanceToTarget2(struct chrdata *chr);
float chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord);
float chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id);
float chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id);
float chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord);
f32 chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num);
f32 chrGetDistanceToCoord(struct chrdata *chr, struct coord *coord);
f32 chrGetDistanceToCurrentPlayer(struct chrdata *chr);
f32 chrGetDistanceToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetDistanceToTarget(struct chrdata *chr);
f32 chrGetDistanceToTarget2(struct chrdata *chr);
f32 chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord);
f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord);
struct position *chrGetTargetPosition(struct chrdata *chr);
float chrGetTimer(struct chrdata *chr);
f32 chrGetTimer(struct chrdata *chr);
bool chrHasFlag(struct chrdata *chr, u32 flag, u8 bank);
bool chrHasFlagById(struct chrdata *ref, u32 chrnum, u32 flag, u32 bank);
bool chrHasHiddenFlag00000002(struct chrdata *chr);
@@ -33,7 +33,7 @@ void chrSetStageFlag(struct chrdata *chr, u32 flag);
void chrUnsetFlags(struct chrdata *chr, u32 flags, u8 bank);
void chrUnsetFlagsById(struct chrdata *ref, u32 chrnum, u32 flags, u32 bank);
void chrUnsetStageFlag(struct chrdata *chr, u32 flag);
float coordGetSquaredDistanceToCoord(struct coord *a, struct coord *b);
f32 coordGetSquaredDistanceToCoord(struct coord *a, struct coord *b);
void decrementByte(u8 *dst, u8 amount);
u32 func0f01e050(void);
u32 func0f01e250(void);
@@ -42,7 +42,7 @@ u32 func0f01e5d8(void);
u32 func0f01e6a4(void);
u32 func0f01e7bc(void);
u32 func0f01e7f4(void);
u32 func0f01f264(struct chrdata *chr, struct coord *coord, s16 *room, float arg3, s32 arg4);
u32 func0f01f264(struct chrdata *chr, struct coord *coord, s16 *room, f32 arg3, s32 arg4);
u32 func0f020538(void);
u32 func0f020598(void);
u32 func0f0205a4(void);
@@ -134,11 +134,11 @@ u32 func0f02e3dc(void);
u32 func0f02e4f8(void);
u32 func0f02e550(void);
u32 func0f02e684(void);
void func0f02e6dc(struct chrdata *chr, float arg1);
void func0f02e9a0(struct chrdata *chr, float arg1);
void func0f02e6dc(struct chrdata *chr, f32 arg1);
void func0f02e9a0(struct chrdata *chr, f32 arg1);
void func0f02eabc(struct chrdata *chr);
u32 func0f02ec94(struct chrdata *chr);
void func0f02ed28(struct chrdata *chr, float arg1);
void func0f02ed28(struct chrdata *chr, f32 arg1);
void chrStop(struct chrdata *chr);
void func0f02ed88(struct chrdata *chr);
void chrKneel(struct chrdata *chr);
@@ -165,7 +165,7 @@ u32 func0f030584(void);
u32 chrAttackWalk(void);
u32 func0f030a40(void);
u32 chrAttackRoll(void);
void func0f030ff8(struct chrdata *chr, u32 anim_id, float fstartframe, float fendframe, u8 flags, u32 transition, float result);
void func0f030ff8(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendframe, u8 flags, u32 transition, f32 result);
void func0f03119c(struct chrdata *chr);
u32 func0f031254(void);
u32 func0f031384(void);
@@ -178,7 +178,7 @@ u32 func0f033654(void);
u32 func0f0336a8(void);
u32 func0f033728(void);
u32 func0f0338e0(void);
float chrGetShield(struct chrdata *chr);
f32 chrGetShield(struct chrdata *chr);
u32 func0f033fa8(void);
u32 func0f034080(void);
u32 func0f034124(void);
@@ -261,7 +261,7 @@ bool func0f03adf4(struct chrdata *chr);
bool func0f03ae48(struct chrdata *chr);
bool func0f03ae9c(struct chrdata *chr);
bool chrTryKneel(struct chrdata *chr);
bool func0f03af44(struct chrdata *chr, u32 anim_id, float fstartframe, float fendframe, u8 flags, u32 transition, float result);
bool func0f03af44(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendframe, u8 flags, u32 transition, f32 result);
u32 func0f03afac(struct chrdata *chr);
u32 func0f03b1e0(struct chrdata *chr);
bool func0f03b5f0(struct chrdata *chr, s32 pad_id);
@@ -290,10 +290,10 @@ void func0f03e094(struct chrdata *chr);
u32 func0f03e0e4(void);
u32 func0f03e1a8(void);
u32 func0f03e29c(void);
float func0f03e45c(struct chrdata *chr);
void func0f03e538(struct chrdata *chr, float arg1);
float func0f03e578(struct chrdata *chr);
void func0f03e5b0(struct chrdata *chr, float arg1);
f32 func0f03e45c(struct chrdata *chr);
void func0f03e538(struct chrdata *chr, f32 arg1);
f32 func0f03e578(struct chrdata *chr);
void func0f03e5b0(struct chrdata *chr, f32 arg1);
u32 func0f03e5f0(void);
u32 func0f03e754(void);
u32 func0f03e788(void);
@@ -316,7 +316,7 @@ u32 func0f041e48(void);
u32 func0f04262c(void);
u32 func0f04279c(void);
void func0f042808(struct chrdata *chr);
void func0f0429d8(struct chrdata *chr, float arg1, float arg2);
void func0f0429d8(struct chrdata *chr, f32 arg1, f32 arg2);
u32 func0f042a40(void);
u32 func0f042ffc(void);
u32 func0f0433e0(void);
@@ -351,8 +351,8 @@ u32 func0f0482cc(void);
u32 func0f048398(void);
bool chrSawTargetRecently(struct chrdata *chr);
bool chrHeardTargetRecently(struct chrdata *chr);
float func0f048a84(struct chrdata *chr, struct coord *coord);
float chrGetAngleToTarget(struct chrdata *chr);
f32 func0f048a84(struct chrdata *chr, struct coord *coord);
f32 chrGetAngleToTarget(struct chrdata *chr);
u32 func0f048b78(void);
u32 func0f048cc0(void);
u32 func0f048dcc(void);
@@ -374,17 +374,17 @@ u32 func0f04a2d4(void);
u32 func0f04a37c(void);
u32 func0f04a4ec(struct chrdata *chr, s32 arg1);
u32 func0f04a674(struct chrdata *chr, s32 arg1);
bool func0f04a76c(struct chrdata *chr, float distance);
bool func0f04a79c(u8 chrnum, struct chrdata *chr, float distance);
bool func0f04a7dc(u8 arg0, struct chrdata *chr, float distance, s32 arg3);
bool func0f04a848(u8 chrnum, struct chrdata *chr, float distance, struct coord *coord, s16 *room);
bool func0f04a76c(struct chrdata *chr, f32 distance);
bool func0f04a79c(u8 chrnum, struct chrdata *chr, f32 distance);
bool func0f04a7dc(u8 arg0, struct chrdata *chr, f32 distance, s32 arg3);
bool func0f04a848(u8 chrnum, struct chrdata *chr, f32 distance, struct coord *coord, s16 *room);
bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype);
void chrSetChrPresetByChrnum(struct chrdata *chr, s32 chrnum, s32 chrpreset);
void chrSetPadPresetByChrnum(struct chrdata *chr, s32 chrnum, s32 pad_id);
u32 func0f04ad08(struct chrdata *chr);
u32 func0f04aeb0(void);
u32 func0f04af84(void);
bool chrSpawnAtCoord(s32 body, s32 head, struct coord *coord, s16 *room, float arg4, u8 *ailist, u32 flags);
bool chrSpawnAtCoord(s32 body, s32 head, struct coord *coord, s16 *room, f32 arg4, u8 *ailist, u32 flags);
bool chrSpawnAtPad(struct chrdata *chr, s32 body, s32 head, s32 pad, u8 *ailist, u32 flags);
bool chrSpawnAtChr(struct chrdata *basechr, s32 body, s32 head, u32 chrnum, u8 *ailist, u32 flags);
u32 func0f04b658(struct chrdata *chr);
@@ -415,9 +415,9 @@ u32 func0f04e418(void);
u32 getNumChrs(void);
void incrementByte(u8 *dst, u8 amount);
s32 chrResolvePadId(struct chrdata *chr, s32 pad_id);
float positionGetDistanceToPosition(struct position *a, struct position *b);
f32 positionGetDistanceToPosition(struct position *a, struct position *b);
u32 positionGetIndexByChrId(struct chrdata *chr, s32 chrnum);
float positionGetLateralDistanceToPosition(struct position *a, struct position *b);
f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b);
void func0f01e760(void);
#endif
+1 -1
View File
@@ -46,7 +46,7 @@ u32 func0f004604(void);
u32 func0f004c6c(void);
u32 func0f00505c(void);
u32 func0f0053d0(void);
void func0f0056f4(s32 room1, struct coord *coord1, s32 room2, struct coord *coord2, s32 arg4, float *arg5, s32 arg6);
void func0f0056f4(s32 room1, struct coord *coord1, s32 room2, struct coord *coord2, s32 arg4, f32 *arg5, s32 arg6);
u32 func0f005bb0(void);
#endif
+6 -6
View File
@@ -7,11 +7,11 @@ void alarmActivate(void);
void alarmDeactivate(void);
bool alarmIsActive(void);
bool audioPlayFromWorldPosition(s8 channel_id, s16 audio_id, s32 volumemaybe, struct position *pos, s32 arg4, s32 arg5);
float countdownTimerGetValue(void);
f32 countdownTimerGetValue(void);
bool countdownTimerIsHidden(void);
bool countdownTimerIsRunning(void);
void countdownTimerSetRunning(bool running);
void countdownTimerSetValue(float frames);
void countdownTimerSetValue(f32 frames);
void countdownTimerSetVisible(u32 flag, bool show);
void countdownTimerTick(void);
u32 func0f066310(struct position *pos, u32 arg1);
@@ -169,7 +169,7 @@ u32 func0f07b038(struct heliobj *heli);
void func0f07b078(struct heliobj *heli);
bool heliSetField90(struct defaultobj *obj, u32 value);
u32 func0f07b0f4(struct heliobj *heli);
float heliGetTimer(struct heliobj *heli);
f32 heliGetTimer(struct heliobj *heli);
u32 func0f07b158(void);
u32 func0f07b164(void);
u32 func0f07b290(struct heliobj *heli, u32 arg1);
@@ -221,7 +221,7 @@ u32 func0f085050(void);
u32 func0f085194(void);
u32 func0f0851ec(void);
u32 func0f085270(void);
void func0f0852ac(struct defaultobj *obj, float damage, struct coord *coord, s32 arg3, s32 arg4);
void func0f0852ac(struct defaultobj *obj, f32 damage, struct coord *coord, s32 arg3, s32 arg4);
u32 func0f0859a0(void);
u32 func0f085e00(void);
u32 func0f085eac(void);
@@ -352,7 +352,7 @@ u32 func0f092420(void);
u32 func0f092484(void);
u32 func0f092610(void);
u32 func0f0926bc(struct position *pos, u32 arg1, u32 arg2);
s32 func0f0927d4(float arg0, float arg1, float arg2, float arg3, s16 arg4);
s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4);
s32 func0f092914(s32 arg0);
u32 func0f09294c(void);
u32 func0f092a98(void);
@@ -363,7 +363,7 @@ u32 func0f093508(void);
u32 func0f093630(void);
u32 func0f093790(void);
u32 func0f0938ec(void);
void func0f0939f8(s32 arg0, struct position *pos, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, float arg9, s32 arg10, s32 arg11, float arg12, float arg13, float arg14);
void func0f0939f8(s32 arg0, struct position *pos, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14);
void func0f0942d0(s32 channel);
u32 func0f0943bc(s32 channel);
bool audioPlayFromWorldPosition2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct position *pos, u32 arg4, s32 arg5, s32 arg6, s32 arg7);
+1 -1
View File
@@ -3,7 +3,7 @@
#include <ultra64.h>
#include "types.h"
float func0f096750(float x, float z);
f32 func0f096750(f32 x, f32 z);
u32 func0f096890(void);
u32 func0f096910(void);
u32 func0f096964(void);
+4 -4
View File
@@ -105,12 +105,12 @@ u32 func0f0baf38(void);
u32 func0f0baf84(void);
u32 func0f0bb04c(void);
u32 func0f0bb2e8(void);
void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, float arg3);
void func0f0bb350(float arg0, s32 arg1, s32 arg2, s32 arg3, float arg4);
void func0f0bb3c8(float arg0, float arg1);
void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, f32 arg3);
void func0f0bb350(f32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4);
void func0f0bb3c8(f32 arg0, f32 arg1);
bool func0f0bb3fc(void);
u32 func0f0bb42c(void);
void func0f0bb57c(float arg0, float arg1);
void func0f0bb57c(f32 arg0, f32 arg1);
u32 func0f0bb5ec(void);
u32 func0f0bb69c(void);
u32 func0f0bb814(void);
+1 -1
View File
@@ -12,7 +12,7 @@ u32 func0f16598c(void);
u32 func0f165c4c(void);
u32 func0f165ee4(void);
u32 func0f165eec(void);
void func0f1660a4(float arg0);
void func0f1660a4(f32 arg0);
u32 func0f1664a0(void);
u32 func0f1666c8(void);
u32 func0f1666f8(void);
+1 -1
View File
@@ -66,7 +66,7 @@ u32 func0f16cda8(void);
u32 func0f16cdc8(void);
u32 func0f16cdd4(void);
u32 func0f16cde0(void);
float func0f16cdec(void);
f32 func0f16cdec(void);
u32 func0f16cdf8(void);
u32 func0f16ce10(void);
u32 func0f16ce3c(void);
+1 -1
View File
@@ -36,7 +36,7 @@ struct g_vars {
/*000040*/ u32 unk000040;
/*000044*/ u32 unk000044;
/*000048*/ u32 unk000048;
/*00004c*/ float countdowntimerstep; // probably a generic lastframems field
/*00004c*/ f32 countdowntimerstep; // probably a generic lastframems field
/*000050*/ u32 unk000050;
/*000054*/ u32 unk000054;
/*000058*/ u32 unk000058;
+1 -1
View File
@@ -3,6 +3,6 @@
#include <ultra64.h>
#include "types.h"
float scaleTo1(float *x, float *y, float *z);
f32 scaleTo1(f32 *x, f32 *y, f32 *z);
#endif
+1 -1
View File
@@ -33,7 +33,7 @@ u32 func00010360(void);
u32 func0001036c(void);
u32 func000104a0(void);
u32 func00010718(void);
s32 func00010904(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, float arg5, s32 arg6, s32 arg7);
s32 func00010904(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7);
u32 func00010ae4(void);
void func00010db0(s32 room_id);
void func00010de0(s32 room_id);
+5 -5
View File
@@ -23,13 +23,13 @@ u32 func0001abc4(void);
u32 func0001ad0c(void);
u32 func0001ad34(void);
u32 func0001ad5c(void);
float func0001ae44(struct chr020 *chr020);
void func0001ae90(struct chr020 *chr020, float arg1);
f32 func0001ae44(struct chr020 *chr020);
void func0001ae90(struct chr020 *chr020, f32 arg1);
u32 func0001af58(void);
u32 func0001af64(void);
u32 func0001af80(void);
u32 func0001af98(void);
float func0001afe8(float arg0, float distance, float arg2);
f32 func0001afe8(f32 arg0, f32 distance, f32 arg2);
u32 func0001b07c(void);
u32 func0001b0e8(void);
u32 func0001b3bc(void);
@@ -52,8 +52,8 @@ u32 func0001ce64(void);
u32 func0001cebc(void);
u32 func0001d13c(struct chr020 *chr020);
u32 func0001d15c(void);
float func0001d17c(struct chr020 *chr020);
float func0001d1a0(struct chr020 *chr020);
f32 func0001d17c(struct chr020 *chr020);
f32 func0001d1a0(struct chr020 *chr020);
u32 func0001d218(void);
u32 func0001d260(void);
u32 func0001d288(void);
+1 -1
View File
@@ -21,7 +21,7 @@ u32 func00033c30(void);
u32 func00033cf0(void);
u32 func00033db0(void);
u32 func00033dd8(void);
void func00033e50(s32 arg0, s32 arg1, float arg2);
void func00033e50(s32 arg0, s32 arg1, f32 arg2);
u32 func00033ec4(void);
u32 func00033f08(void);
u32 func00033f24(void);
+1 -1
View File
@@ -5,6 +5,6 @@
u32 func0004a360(void);
u32 func0004a460(void);
float sqrtf(float value);
f32 sqrtf(f32 value);
#endif
+1 -1
View File
@@ -4,6 +4,6 @@
#include "types.h"
u32 func00050090(void);
void func000500e4(u32 *ptr, float arg1, float arg2, float arg3);
void func000500e4(u32 *ptr, f32 arg1, f32 arg2, f32 arg3);
#endif
+1 -1
View File
@@ -24,7 +24,7 @@ extern u32 var80067b30;
extern u32 var80067b78;
extern u32 g_CountdownTimerVisible;
extern bool g_CountdownTimerRunning;
extern float g_CountdownTimerValue;
extern f32 g_CountdownTimerValue;
extern u32 g_StageFlags;
extern struct audiodefinition audiodefinitions[];
+2 -2
View File
@@ -25,7 +25,7 @@ extern struct menu_dialog menudialog_mpquickteam;
extern s32 g_Difficulty;
extern s16 g_FadeNumFrames;
extern float fade80084058;
extern f32 fade80084058;
extern u32 g_FadePrevColor;
extern u32 g_FadeColor;
extern u16 fade80084064;
@@ -54,7 +54,7 @@ extern struct stagethinglist stagethinglist_22f1c;
extern struct bodytableentry bodytable[];
extern u32 var8007dae4;
extern u32 var8007db80;
extern float var8007db84;
extern f32 var8007db84;
extern u32 var8007db88;
extern u32 var8007db94;
extern u32 var8007dba0;
+73 -73
View File
@@ -6,9 +6,9 @@
#define bool u32
struct coord {
float x;
float y;
float z;
f32 x;
f32 y;
f32 z;
};
struct weaponobj;
@@ -77,12 +77,12 @@ struct pad {
/*0x0c*/ struct coord look;
/*0x18*/ struct coord up;
/*0x24*/ struct coord normal;
/*0x30*/ float xmin;
/*0x34*/ float xmax;
/*0x38*/ float ymin;
/*0x3c*/ float ymax;
/*0x40*/ float zmin;
/*0x44*/ float zmax;
/*0x30*/ f32 xmin;
/*0x34*/ f32 xmax;
/*0x38*/ f32 ymin;
/*0x3c*/ f32 ymax;
/*0x40*/ f32 zmin;
/*0x44*/ f32 zmax;
/*0x48*/ s32 room;
/*0x4c*/ s16 unk4c;
/*0x4e*/ s16 unk4e;
@@ -120,7 +120,7 @@ struct chr020_20 {
/*0x68*/ u32 unk68;
/*0x6c*/ u32 unk6c;
/*0x70*/ u32 unk70;
/*0x74*/ float unk74;
/*0x74*/ f32 unk74;
};
struct chr020 {
@@ -191,10 +191,10 @@ struct chr2d4 {
/*0x9c*/ u8 unk9c_06 : 1;
/*0x9c*/ u8 unk9c_07 : 1;
/*0xa0*/ u32 unka0;
/*0xa4*/ float unka4;
/*0xa4*/ f32 unka4;
/*0xa8*/ u32 unka8;
/*0xac*/ u32 unkac;
/*0xb0*/ float unkb0;
/*0xb0*/ f32 unkb0;
};
struct act_stand {
@@ -205,15 +205,15 @@ struct act_stand {
/*0x3c*/ u32 unk03c;
/*0x40*/ u32 unk040;
/*0x44*/ u32 unk044;
/*0x48*/ float unk048;
/*0x48*/ f32 unk048;
/*0x4c*/ s8 unk04c;
};
struct act_die {
/*0x2c*/ u32 unk02c;
/*0x30*/ float unk030;
/*0x34*/ float unk034;
/*0x38*/ float unk038;
/*0x30*/ f32 unk030;
/*0x34*/ f32 unk034;
/*0x38*/ f32 unk038;
};
struct act_dead {
@@ -320,23 +320,23 @@ struct chrdata {
/*0x0ac*/ u32 unk0ac;
/*0x0b0*/ u32 sumground;
/*0x0b4*/ u32 manground;
/*0x0b8*/ float ground;
/*0x0b8*/ f32 ground;
/*0x0bc*/ struct coord fallspeed;
/*0x0c8*/ struct coord prevpos;
/*0x0d4*/ u32 lastwalk60;
/*0x0d8*/ u32 lastmoveok60;
/*0x0dc*/ float visionrange;
/*0x0dc*/ f32 visionrange;
/*0x0e0*/ s32 lastseetarget60;
/*0x0e4*/ u32 lastvisibletarg;
/*0x0e8*/ void *unk0e8;
/*0x0ec*/ u16 lastshooter;
/*0x0ee*/ u16 timeshooter;
/*0x0f0*/ float hearingscale;
/*0x0f0*/ f32 hearingscale;
/*0x0f4*/ s32 lastheartarget60;
/*0x0f8*/ u32 shadecol;
/*0x0fc*/ u32 nextcol;
/*0x100*/ float damage;
/*0x104*/ float maxdamage;
/*0x100*/ f32 damage;
/*0x104*/ f32 maxdamage;
/*0x108*/ u8 *ailist;
/*0x10c*/ u16 aioffset;
/*0x10e*/ s16 aireturnlist;
@@ -367,15 +367,15 @@ struct chrdata {
/*0x154*/ u32 aimuprshoulder;
/*0x158*/ u32 aimupback;
/*0x15c*/ u32 aimsideback;
/*0x160*/ float aimendlshoulder;
/*0x164*/ float aimendrshoulder;
/*0x168*/ float aimendback;
/*0x16c*/ float aimendsideback;
/*0x160*/ f32 aimendlshoulder;
/*0x164*/ f32 aimendrshoulder;
/*0x168*/ f32 aimendback;
/*0x16c*/ f32 aimendsideback;
/*0x170*/ struct attachment *weapons_held[2];
/*0x178*/ u32 unk178;
/*0x17c*/ s8 fireslot[2];
/*0x17e*/ s16 target; // index into g_Vars.positions
/*0x180*/ float cshield;
/*0x180*/ f32 cshield;
/*0x184*/ u8 cmnum;
/*0x185*/ u8 cmnum2;
/*0x186*/ u8 cmnum3;
@@ -486,7 +486,7 @@ struct defaultobj {
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x18*/ void *unk18; // probably same struct as chrdata->unk020
/*0x1c*/ float realrot[9];
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden; // most significant nibble is the playernum who holds the obj
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
@@ -500,7 +500,7 @@ struct defaultobj {
struct doorobj { // objtype 0x01
struct defaultobj base;
/*0x5c*/ float unk5c;
/*0x5c*/ f32 unk5c;
/*0x60*/ u32 unk60;
/*0x64*/ u32 unk64;
/*0x68*/ u32 unk68;
@@ -508,8 +508,8 @@ struct doorobj { // objtype 0x01
/*0x70*/ u32 unk70;
/*0x74*/ u32 lockbits;
/*0x78*/ u32 unk78;
/*0x7c*/ float speed;
/*0x80*/ float unk80;
/*0x7c*/ f32 speed;
/*0x80*/ f32 unk80;
/*0x84*/ s8 state;
/*0x88*/ u32 unk88;
/*0x8c*/ u32 unk8c;
@@ -555,7 +555,7 @@ struct weaponobj { // objtype 0x08
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x18*/ u32 unk18;
/*0x1c*/ float realrot[9];
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
@@ -580,7 +580,7 @@ struct singlemonitorobj { // objtype 0x0a
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x18*/ u32 unk18;
/*0x1c*/ float realrot[9];
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
@@ -629,7 +629,7 @@ struct liftobj { // objtype 30
/*0x68*/ u32 unk68;
/*0x6c*/ u32 unk6c;
/*0x70*/ u32 unk70;
/*0x74*/ float unk74;
/*0x74*/ f32 unk74;
};
struct heliobj {
@@ -693,8 +693,8 @@ struct player {
/*0x0068*/ u32 unk0068;
/*0x006c*/ u32 unk006c;
/*0x0070*/ u32 unk0070;
/*0x0074*/ float unk0074;
/*0x0078*/ float unk0078;
/*0x0074*/ f32 unk0074;
/*0x0078*/ f32 unk0078;
/*0x007c*/ u32 unk007c;
/*0x0080*/ u32 unk0080;
/*0x0084*/ u32 unk0084;
@@ -709,7 +709,7 @@ struct player {
/*0x00a8*/ u32 unk00a8;
/*0x00ac*/ u32 unk00ac;
/*0x00b0*/ u32 unk00b0;
/*0x00b4*/ float unk00b4;
/*0x00b4*/ f32 unk00b4;
/*0x00b8*/ u32 unk00b8;
/*0x00bc*/ struct position *targetpos;
/*0x00c0*/ u32 unk00c0;
@@ -762,10 +762,10 @@ struct player {
/*0x017c*/ u32 unk017c;
/*0x0180*/ u32 unk0180;
/*0x0184*/ u32 unk0184;
/*0x0188*/ float unk0188;
/*0x018c*/ float unk018c;
/*0x0190*/ float unk0190;
/*0x0194*/ float unk0194;
/*0x0188*/ f32 unk0188;
/*0x018c*/ f32 unk018c;
/*0x0190*/ f32 unk0190;
/*0x0194*/ f32 unk0194;
/*0x0198*/ u32 unk0198;
/*0x019c*/ u32 unk019c;
/*0x01a0*/ u32 unk01a0;
@@ -849,17 +849,17 @@ struct player {
/*0x02d8*/ u32 unk02d8;
/*0x02dc*/ u32 unk02dc;
/*0x02e0*/ u32 unk02e0;
/*0x02e4*/ float unk02e4;
/*0x02e8*/ float unk02e8;
/*0x02ec*/ float unk02ec;
/*0x02e4*/ f32 unk02e4;
/*0x02e8*/ f32 unk02e8;
/*0x02ec*/ f32 unk02ec;
/*0x02f0*/ u32 unk02f0;
/*0x02f4*/ u32 unk02f4;
/*0x02f8*/ u32 unk02f8;
/*0x02fc*/ u32 unk02fc;
/*0x0300*/ u32 unk0300;
/*0x0304*/ u32 unk0304;
/*0x0308*/ float unk0308;
/*0x030c*/ float unk030c;
/*0x0308*/ f32 unk0308;
/*0x030c*/ f32 unk030c;
/*0x0310*/ u32 unk0310;
/*0x0314*/ u32 unk0314;
/*0x0318*/ u32 unk0318;
@@ -2419,9 +2419,9 @@ struct player {
/*0x1b60*/ u32 unk1b60;
/*0x1b64*/ u32 unk1b64;
/*0x1b68*/ u32 unk1b68;
/*0x1b6c*/ float unk1b6c;
/*0x1b70*/ float unk1b70;
/*0x1b74*/ float unk1b74;
/*0x1b6c*/ f32 unk1b6c;
/*0x1b70*/ f32 unk1b70;
/*0x1b74*/ f32 unk1b74;
/*0x1b78*/ u32 unk1b78;
/*0x1b7c*/ u32 unk1b7c;
/*0x1b80*/ u32 unk1b80;
@@ -2484,11 +2484,11 @@ struct stagesetup {
};
struct inventory_menupos {
float x;
float y;
float z;
float rotation;
float size;
f32 x;
f32 y;
f32 z;
f32 rotation;
f32 size;
};
struct inventory_typee {
@@ -2551,11 +2551,11 @@ struct weapon {
/*0x1c*/ struct inventory_ammo *pri_ammo;
/*0x20*/ struct inventory_ammo *sec_ammo;
/*0x24*/ struct inventory_typee *eptr;
/*0x28*/ float sway;
/*0x2c*/ float leftright;
/*0x30*/ float updown;
/*0x34*/ float frontback;
/*0x38*/ float unk38;
/*0x28*/ f32 sway;
/*0x2c*/ f32 leftright;
/*0x30*/ f32 updown;
/*0x34*/ f32 frontback;
/*0x38*/ f32 unk38;
/*0x3c*/ struct inventory_typef *fptr;
/*0x40*/ s8 *gptr;
/*0x44*/ u16 shortname;
@@ -2593,8 +2593,8 @@ struct cheatspec {
struct bodytableentry {
u16 unk00;
u16 bodyfileid;
float unk04;
float unk08;
f32 unk04;
f32 unk08;
u32 unk0c;
u16 handfileid;
};
@@ -2611,9 +2611,9 @@ struct stagetableentry {
u16 padsfileid;
u16 setupfileid;
u16 mpsetupfileid;
float unk14;
float unk18;
float unk1c;
f32 unk14;
f32 unk18;
f32 unk1c;
u16 unk20;
u8 unk22;
s8 unk23;
@@ -2622,7 +2622,7 @@ struct stagetableentry {
s16 unk2c;
u16 unk2e;
u16 unk30;
float unk34;
f32 unk34;
};
struct mpweaponset {
@@ -2696,9 +2696,9 @@ struct sun {
u8 red;
u8 green;
u8 blue;
float x;
float y;
float z;
f32 x;
f32 y;
f32 z;
u16 texture_size;
u16 orb_size;
};
@@ -2750,13 +2750,13 @@ struct sky {
u8 clouds_r;
u8 clouds_g;
u8 clouds_b;
float clouds_scale;
f32 clouds_scale;
u16 unk20;
u8 water_enabled;
u8 water_r;
u8 water_g;
u8 water_b;
float water_scale;
f32 water_scale;
u16 water_type;
u32 unk30;
u32 unk34;
@@ -2831,10 +2831,10 @@ struct audiodefinition {
};
struct audioconfig {
float unk00;
float unk04;
float unk08;
float unk0c;
f32 unk00;
f32 unk04;
f32 unk08;
f32 unk0c;
u32 unk10;
s32 unk14;
u32 unk18;
+3 -3
View File
@@ -2,12 +2,12 @@
#include "types.h"
#include "library/library_4a360.h"
void scaleTo1(float *x, float *y, float *z)
void scaleTo1(f32 *x, f32 *y, f32 *z)
{
float hyp = sqrtf(*x * *x + *y * *y + *z * *z);
f32 hyp = sqrtf(*x * *x + *y * *y + *z * *z);
if (hyp > 0.0f) {
float hyp2 = 1.0f / hyp;
f32 hyp2 = 1.0f / hyp;
*x = *x * hyp2;
*y = *y * hyp2;
*z = *z * hyp2;
+1 -1
View File
@@ -15163,7 +15163,7 @@ u32 var80069900 = 0x00000000;
u32 g_CountdownTimerVisible = 1; // 80069904
bool g_CountdownTimerRunning = false; // 80069908
float g_CountdownTimerValue = 0; // 8006990c
f32 g_CountdownTimerValue = 0; // 8006990c
u32 var80069910 = 0x00000000;
u32 var80069914 = 0x00000000;
+2 -2
View File
@@ -5672,7 +5672,7 @@ u32 var8007db74 = 0x00000000;
u32 var8007db78 = 0x00000000;
u32 var8007db7c = 0x00000000;
u32 var8007db80 = 0x00000000;
float var8007db84 = 1;
f32 var8007db84 = 1;
u32 var8007db88 = 0x00000000;
u32 var8007db8c = 0x00000000;
u32 var8007db90 = 0x00000000;
@@ -9594,7 +9594,7 @@ u32 var80084050 = 0x00000000;
s16 g_FadeNumFrames = 0;
// 80084058
float fade80084058 = -1;
f32 fade80084058 = -1;
u32 g_FadePrevColor = 0;
u32 g_FadeColor = 0;