SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
GlaringLightArea.cpp
1#include "Game/AreaObj/GlaringLightArea.hpp"
2#include "Game/AudioLib/AudSoundObject.hpp"
3#include "Game/Util/SoundUtil.hpp"
4
5GlaringLightAreaMgr::GlaringLightAreaMgr(s32 type, const char *pName) : AreaObjMgr(type, pName) {
6
7}
8
9GlaringLightArea::GlaringLightArea(int type, const char *pName) : AreaObj(type, pName) {
10 mSound = nullptr;
11 mPos.x = 0.0f;
12 mPos.y = 0.0f;
13 mPos.z = 0.0f;
14}
15
16GlaringLightArea::~GlaringLightArea() {
17
18}
19
20GlaringLightAreaMgr::~GlaringLightAreaMgr() {
21
22}
23
25 AreaObj::init(rIter);
26
27 TVec3f pos;
28 MR::calcCylinderPos(&pos, this);
29
30 mPos.x = pos.x;
31 mPos.y = pos.y;
32 mPos.z = pos.z;
33
34 mSound = new AudSoundObject(&mPos, 4, MR::getCurrentHeap());
35
36 if (isValidSwitchA()) {
37 MR::connectToSceneAreaObj(this);
38 }
39}
40
41void GlaringLightArea::movement() {
42 if (isOnSwitchA()) {
43 bool bVar1 = false;
44
45 if (mValid && _15 && mAwake) {
46 bVar1 = true;
47 }
48
49 if (!bVar1) {
50 MR::startSoundObject(mSound, "SE_OJ_RAY_START");
51 }
52
53 mValid = true;
54 }
55 else {
56 mValid = false;
57 }
58
59 mSound->process();
60}
61
62const char *GlaringLightArea::getManagerName() const {
63 return "GlaringLightArea";
64}
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition AreaObj.cpp:41
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.