1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
//
// Generated by dtk
// Translation Unit: d_point_wind.cpp
//
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_point_wind.h"
#include "d/d_com_inf_game.h"
#include "d/d_kankyo_rain.h"
#include "d/d_kankyo_wether.h"
#include "SSystem/SComponent/c_lib.h"
#include "d/d_s_play.h"
/* 800CF31C-800CF398 .text set_pwind_init__12dPointWind_cFP9cM3dGCpsS */
void dPointWind_c::set_pwind_init(cM3dGCpsS* pCps) {
mpCps = pCps;
mWind.mPos = mpCps->mStart;
mWind.mDir = mpCps->mEnd;
mWind.mRadius = mpCps->mRadius;
mWind.field_0x20 = 0.0f;
mWind.mStrength = 1.0f;
dKyw_pwind_cylinder_set(&mWind);
}
/* 800CF398-800CF5C8 .text set_pwind_move__12dPointWind_cFv */
void dPointWind_c::set_pwind_move() {
f32 radScale = 1.8f;
BOOL animate = TRUE;
cXyz p0 = mpCps->mStart;
cXyz p1 = mpCps->mEnd;
cXyz dir;
dKyr_get_vectle_calc(&p0, &p1, &dir);
if (strcmp(dComIfGp_getStartStageName(), "sea") == 0 && dComIfGp_roomControl_getStayNo() == 4) {
#if VERSION == VERSION_DEMO
radScale = 11.0f + REG3_F(3);
#else
radScale = 11.0f;
#endif
animate = false;
mWind.mPos = p0 + (dir * -100.0f);
}
mWind.mDir = dir;
mWind.mRadius = mpCps->mRadius * radScale;
mWind.field_0x20 = 0.0f;
if (animate) {
cLib_addCalc(&mWind.mPos.x, mpCps->mEnd.x, 0.1f, mWind.mRadius, mWind.mRadius * 0.5f);
cLib_addCalc(&mWind.mPos.y, mpCps->mEnd.y, 0.1f, mWind.mRadius, mWind.mRadius * 0.5f);
cLib_addCalc(&mWind.mPos.z, mpCps->mEnd.z, 0.1f, mWind.mRadius, mWind.mRadius * 0.5f);
if (mWind.mPos.abs(p1) < mWind.mRadius) {
mWind.mPos.x = mpCps->mStart.x;
mWind.mPos.y = mpCps->mStart.y;
mWind.mPos.z = mpCps->mStart.z;
}
}
}
/* 800CF5C8-800CF5EC .text set_pwind_delete__12dPointWind_cFv */
void dPointWind_c::set_pwind_delete() {
dKyw_pntwind_cut(&mWind);
}
|