SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
RaceRail.cpp
1#include "Game/Map/RaceRail.hpp"
2#include "Game/Util.hpp"
3
4RaceRail::RaceRail(const char *pName) : NameObj(pName) {
5
6}
7
8PlayerRacer::PlayerRacer(const char *pName) : LiveActor(pName) {
9 _B0 = 0;
10 _B4 = 0;
11 mCameraInfo = 0;
12}
13
14void PlayerRacer::appear() {
15 RaceManagerFunction::startRaceImmediately();
16}
17
18void PlayerRacer::init(const JMapInfoIter &rIter) {
19 MR::connectToSceneMapObjMovement(this);
20 initRailRider(rIter);
21 mCameraInfo = MR::createActorCameraInfo(rIter);
22 MR::initActorCamera(this, rIter, &mCameraInfo);
23
24 bool usesAppear = MR::useStageSwitchReadAppear(this, rIter);
25
26 if (usesAppear) {
27 MR::syncStageSwitchAppear(this);
28 makeActorDead();
29 }
30 else {
31 makeActorAppeared();
32 }
33
34 MR::invalidateClipping(this);
35}
36
37void PlayerRacer::startRacer() {
38 MR::endActorCamera(this, mCameraInfo, true, -1);
39}
40
41// PlayerRacer::updateRacer
42
43bool PlayerRacer::goalRacer() {
44 return true;
45}
46
47void PlayerRacer::loseRacer() {
48
49}
50
51void PlayerRacer::exitRacer() {
52
53}
54
55PlayerRacer::~PlayerRacer() {
56
57}
58
59RaceRail::~RaceRail() {
60
61}
62
63void RaceRail::init(const JMapInfoIter &rIter) {
64 mPlayerRacer = new PlayerRacer("レース判定用レール");
65 mPlayerRacer->init(rIter);
66 RaceManagerFunction::entryRacerPlayer(mPlayerRacer);
67}
68
69void PlayerRacer::initRacer() {
70 AbstractRacer::initRacer();
71 MR::startBckPlayer("Watch", (char*)nullptr);
72}
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
The most basic form of an object.
Definition NameObj.hpp:11
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition RaceRail.cpp:18
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition RaceRail.cpp:63