mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-05 18:57:17 -04:00
match hasu, kaeru, add rodata comment
This commit is contained in:
+187
-1
@@ -11,6 +11,192 @@
|
||||
#include "m_rcp.h"
|
||||
#include "ac_gyoei.h"
|
||||
|
||||
/*
|
||||
just some shorthand; D(v) == double, F(v) == float
|
||||
NOTE: sometimes something is used as a double, but has
|
||||
the truncated precision of a float. you'll see `D(0.71f)`
|
||||
|
||||
@467 F(2.0f);
|
||||
@468 F(0.0f);
|
||||
@469 D(0.5); // sqrtf
|
||||
@470 D(3.0); // sqrtf
|
||||
@471 F(0.5f);
|
||||
@472 F(1.0f);
|
||||
@526 F(0.025f);
|
||||
@527 F(0.1f);
|
||||
@528 F(0.005f);
|
||||
@529 F(110.0f);
|
||||
@530 F(60.0f);
|
||||
@555 F(45.0f);
|
||||
@556 F(180.0f);
|
||||
@557 F(5.0f);
|
||||
@568 D(4294967296.0); // 0x1_00_00_00_00, number of ints?
|
||||
@570 D(4503601774854144.0);
|
||||
@587 F(0.8f);
|
||||
@588 F(0x10000 / 360.f); // deg2short
|
||||
@603 F(1.2f);
|
||||
@665 D(0.8f); // double cut at float precision
|
||||
@666 F(0.05f);
|
||||
@697 F(10.0f);
|
||||
@698 F(20.0f);
|
||||
@699 F(40.0f);
|
||||
@791 F(0.04f);
|
||||
@792 F(0.75f);
|
||||
@793 F(0.01f);
|
||||
@836 F(75.0f);
|
||||
@837 F(7.5f);
|
||||
@838 F(0.7f);
|
||||
@839 F(0.2f);
|
||||
@840 F(3.0f);
|
||||
@920 D(0.9f); // double cut at float precision
|
||||
@921 D(0.6f); // double cut at float precision
|
||||
@974 F(0.125f);
|
||||
@975 F(2.5f);
|
||||
@976 F(-10.0f);
|
||||
@1066 D(0.75);
|
||||
@1067 F(0.4f);
|
||||
@1068 F(0.25f);
|
||||
@1069 F(0.9f);
|
||||
@1070 F(-0.3f);
|
||||
@1071 F(0.3f);
|
||||
@1072 F(-0.5f);
|
||||
@1099 F(65.0f);
|
||||
@1100 F(0.15f);
|
||||
@1101 F(15.0f);
|
||||
@1145 F(4.0f);
|
||||
@1146 F(0.6f);
|
||||
@1147 F(-0.2f);
|
||||
@1315 F(1.5f);
|
||||
@1344 F(1.25f);
|
||||
@1475 F(-12.0f);
|
||||
@1556 F(0.03f);
|
||||
@1557 F(0.003f);
|
||||
@1558 F(0.02f);
|
||||
@1559 F(6.0f);
|
||||
@1598 F(0.0054931640625f);
|
||||
@1599 F(120.0f);
|
||||
@1680 D(0.7f); // double cut at float precision
|
||||
@1711 F(0.08f);
|
||||
@1712 F(0.001f);
|
||||
@1957 F(0.002f);
|
||||
@1958 D(0.95f); // double cut at float precision
|
||||
@1997 F(55.0f);
|
||||
@2301 F(6.5f);
|
||||
@2377 F(0.0025f);
|
||||
@2593 F(0.0035f);
|
||||
@2594 F(0.35f);
|
||||
@2850 F(-0.05f);
|
||||
@2851 F(-0.1f);
|
||||
@2906 D(0.85f); // double cut at float precision
|
||||
@2937 F(0.0005f);
|
||||
@2938 F(0.0001f);
|
||||
@3066 F(1400.0f);
|
||||
@3228 F(32749.0f);
|
||||
@3229 F(25.0f);
|
||||
@3230 D(10.0);
|
||||
@3391 F(0.045f);
|
||||
@3475 F(0.008f);
|
||||
@3476 D(0.97f); // double cut at float precision
|
||||
@3706 F(9.0f);
|
||||
@3707 F(7.0f);
|
||||
@3708 F(8.0f);
|
||||
@3752 F(1.75f);
|
||||
@4106 F(5461.0f);
|
||||
@4261 F(0.035f);
|
||||
@4262 F(0.07f);
|
||||
@4470 F(80.0f);
|
||||
@4626 F(0.16f);
|
||||
@4774 F(35.0f);
|
||||
@4775 F(90.0f);
|
||||
@4929 F(115.0f);
|
||||
@5269 F(85.0f);
|
||||
@5270 F(114.5f);
|
||||
@5325 F(-1.3f);
|
||||
@5573 F(70.0f);
|
||||
@5574 F(100.0f);
|
||||
@5655 F(130.0f);
|
||||
@6315 F(50.0f);
|
||||
@6403 F(450.0f);
|
||||
@6505 F(31.25f);
|
||||
@6506 F(22.5f);
|
||||
@6507 F(0.95f);
|
||||
@6583 F(430.0f);
|
||||
@6584 F(530.0f);
|
||||
@6800 F(-0.025f);
|
||||
@6801 F(-0.01f);
|
||||
@6874 F(0.015f);
|
||||
@6875 F(0.06f);
|
||||
@6876 F(-90.0f);
|
||||
@6877 F(-180.0f);
|
||||
@7119 F(225.0f);
|
||||
@7120 F(185.0f);
|
||||
@7531 F(91.0f);
|
||||
@7611 F(1.1f);
|
||||
@7612 F(1.3f);
|
||||
@7652 F(1500.0f);
|
||||
@7653 F(1700.0f);
|
||||
@7768 D(0.925f); // double cut at float precision
|
||||
@7769 D(0.895f); // double cut at float precision
|
||||
@7841 D(0.945f); // double cut at float precision
|
||||
@7929 F(0.0625f);
|
||||
@7930 D(0.7100000381469727);
|
||||
@7931 D(0.965f); // double cut at float precision
|
||||
@7932 D(0.975f); // double cut at float precision
|
||||
@8130 F(300.0f);
|
||||
@8131 F(-0.15f);
|
||||
@8234 F(53.0f);
|
||||
@8327 F(-3.0f);
|
||||
@8410 F(-45.0f);
|
||||
@8411 D(0.99f); // double cut at float precision
|
||||
@8418 F(-1.2f);
|
||||
@8451 F(0.99f);
|
||||
@8478 F(58.0f);
|
||||
@8726 F(12.0f);
|
||||
@8727 F(13.0f);
|
||||
@8807 F(453.9f);
|
||||
@8808 F(116.0f);
|
||||
@8809 F(250.4f);
|
||||
@8810 F(-1.5f);
|
||||
@8811 F(-2.0f);
|
||||
@8883 F(-32.6f);
|
||||
@8884 F(-26.6f);
|
||||
@8885 F(-1.0f);
|
||||
@8886 F(-4.0f);
|
||||
@8887 F(-2.3f);
|
||||
@8888 F(-13.7f);
|
||||
@8889 F(-7.7f);
|
||||
@8890 F(-32.3f);
|
||||
@8949 float arr[2] = { 430.0f, 530.f };
|
||||
@9156 F(-20.0f);
|
||||
@9157 F(1000.0f);
|
||||
@9158 F(-25.0f);
|
||||
@9159 F(-1000.0f);
|
||||
@9160 F(-5.0f);
|
||||
@9247 F(-17.5f);
|
||||
@9248 F(76.0f);
|
||||
@9352 F(54.0f);
|
||||
@9353 F(189.0f);
|
||||
@9354 F(14.0f);
|
||||
@9355 F(32768.0f);
|
||||
@9356 F(21.0f);
|
||||
@9567 F(3.4028234663852886e+38f);
|
||||
@9693 F(320.0f);
|
||||
@9694 F(360.0f);
|
||||
@9695 F(560.0f);
|
||||
@9785 F(720.0f);
|
||||
@10190 F(0.9800000190734863f);
|
||||
@10191 F(160.0f);
|
||||
@10226 F(350.0f);
|
||||
@10227 F(650.0f);
|
||||
@10228 F(215.0f);
|
||||
@10240 F(1274.0f);
|
||||
@10241 F(4369.0f);
|
||||
@10353 F(240.0f);
|
||||
@10417 F(340.0f);
|
||||
@10418 F(580.0f);
|
||||
@10419 F(200.0f);
|
||||
*/
|
||||
|
||||
// found useful macros
|
||||
#define MY_MAX(a, b) (((a) >= (b)) ? (a) : (b))
|
||||
#define MY_CLAMP(v, l, h) MIN(MY_MAX((l), (v)), (h))
|
||||
@@ -927,7 +1113,7 @@ void Museum_Fish_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
for (j = 0; j < 14; j++) {
|
||||
cKF_SkeletonInfo_R_play(&actor->prvKusa[j]._00);
|
||||
if (kusa_group_tbl[j] == 2) {
|
||||
add_calc2(&actor->prvKusa[j]._540.x, -2.25f, 1.75f, 1.75f);
|
||||
add_calc2(&actor->prvKusa[j]._540.x, -4.0f, 0.5f, 0.5f);
|
||||
add_calc_short_angle2(&actor->prvKusa[j]._538.y, DEG2SHORT_ANGLE(3.5f), CALC_EASE2(0.1f), 22, 4);
|
||||
} else {
|
||||
actor->prvKusa[j]._540.x *= 0.9f;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// pretty sure all the floats in this file are correct
|
||||
|
||||
f32 Rnd_EX_f(f32 v) {
|
||||
f32 rand1 = RANDOM2_F(2);
|
||||
f32 rand2 = RANDOM_F(1);
|
||||
@@ -397,7 +399,7 @@ void mfish_ground_peck_process_init(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex
|
||||
void mfish_ground_peck_process(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) {
|
||||
xyz_t p = suisou_pos[actor->_630];
|
||||
xyz_t_sub(&p, &actor->_5A0, &p);
|
||||
actor->_5F4 = ((actor->init_data._08 * 0.3f + 64.0f) - (MAX(ABS(p.x), ABS(p.z)) * 0.15f)) - actor->init_data._0C;
|
||||
actor->_5F4 = ((actor->init_data._08 * 0.3f + 65.0f) - (MAX(ABS(p.x), ABS(p.z)) * 0.15f)) - actor->init_data._0C;
|
||||
xyz_t_mult_v(&actor->_5DC, 0.1f);
|
||||
|
||||
if (actor->_5A0.y > actor->_5F4 + actor->init_data._0C + 4.0f) {
|
||||
@@ -505,7 +507,7 @@ void mfish_onefish_ct(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) {
|
||||
GAME_PLAY* game = (GAME_PLAY*)gamex;
|
||||
YET_SKELETON* s = &actor->_38;
|
||||
cKF_SkeletonInfo_R_ct(&s->_00, s->_54C, s->_550[0], &s->_4F0, &s->_514);
|
||||
cKF_SkeletonInfo_R_init_standard_repeat_speedsetandmorph(&s->_00, s->_550[0], NULL, 1.875f, 0.0f);
|
||||
cKF_SkeletonInfo_R_init_standard_repeat_speedsetandmorph(&s->_00, s->_550[0], NULL, 1.0f, 0.0f);
|
||||
actor->_626 = actor->init_data._2C + (s16)(actor->init_data._2E * fqrand());
|
||||
actor->_628 = actor->_626;
|
||||
actor->_60C.x = DEG2SHORT_ANGLE(0);
|
||||
@@ -774,7 +776,7 @@ void Museum_Fish_DonkoBGCheck(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) {
|
||||
Museum_Fish_objchk_pos_set(actor, gamex);
|
||||
// asm 17C
|
||||
a = (+00.0f + p.x);
|
||||
b = (-45.5f + p.x);
|
||||
b = (-45.0f + p.x);
|
||||
d = (-17.5f + p.z);
|
||||
c = (+45.0f + p.z);
|
||||
|
||||
@@ -1383,7 +1385,6 @@ void mfish_get_flow_vec(xyz_t* pos, MUSEUM_FISH_PRIVATE_DATA* actor, GAME* game)
|
||||
}
|
||||
|
||||
s16 mfish_get_escape_angle(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* game) {
|
||||
// int ret;
|
||||
s16 v1 = atans_table(actor->_594->_5A0.z - actor->_5A0.z, actor->_594->_5A0.x - actor->_5A0.x);
|
||||
s16 v = actor->_60C.y - v1;
|
||||
if (ABS(v) < DEG2SHORT_ANGLE(90)) {
|
||||
|
||||
@@ -135,7 +135,7 @@ void mfish_kaseki_mv(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* game) {
|
||||
actor->_5A0.x += actor->_5D0;
|
||||
actor->_5A0.z += actor->_5D8;
|
||||
mfish_onefish_mv(actor, game);
|
||||
actor->_38._00.frame_control.speed = actor->_5E8 * 0.74f + 0.25f;
|
||||
actor->_38._00.frame_control.speed = actor->_5E8 * 0.75f + 0.25f;
|
||||
mfish_body_wind_anime_play(actor, game);
|
||||
Museum_Fish_BGCheck(actor, game);
|
||||
if (actor->_5A0.y < 55.0f - actor->init_data._04) {
|
||||
|
||||
Reference in New Issue
Block a user