SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
StopSceneController.cpp
1#include "Game/Scene/StopSceneController.hpp"
2#include "Game/Util.hpp"
3
4StopSceneDelayRequest::StopSceneDelayRequest() : NameObj("シーン硬直遅延発行") {
5 _C = 0;
6 _10 = 0;
7 MR::connectToScene(this, 1, -1, -1, -1);
8}
9
10StopSceneController::StopSceneController() : NameObj("StopSceneController") {
11 mDelayRequests = nullptr;
12 _10 = 0;
13
14 mDelayRequests = new NameObjGroup("シーン硬直遅延発行者の管理", 16);
15
16 for (s32 i = 0; i < 16; i++) {
18 req->initWithoutIter();
19 mDelayRequests->registerObj(req);
20 }
21}
22
23void StopSceneDelayRequest::movement() {
24 if (_10 != 0 && --_10 == 0) {
25 MR::stopScene(_C);
26 }
27}
28
29#ifdef NON_MATCHING
30void StopSceneController::requestStopScene(s32 a1) {
31 if (_10 > 0) {
32 if (_10 < a1) {
33 return;
34 }
35
36 _10 = a1;
37 }
38 else {
39 _10 = a1;
40 }
41}
42#endif
43
44// void StopSceneController::requestStopSceneDelay(s32 a1, s32 a2)
45
46void StopSceneController::movement() {
47 if (_10 > 0) {
48 _10--;
49 }
50}
51
52bool StopSceneController::isSceneStopped() const {
53 return _10 > 0;
54}
55
56StopSceneDelayRequest::~StopSceneDelayRequest() {
57
58}
59
60StopSceneController::~StopSceneController() {
61
62}
Class that can contain multiple NameObj instances stored in a group.
The most basic form of an object.
Definition NameObj.hpp:11
void initWithoutIter()
Initializes a NameObj without a JMapInfoIter instance.
Definition NameObj.cpp:41