| 1 | #include "System/RootTask.h" |
|---|---|
| 2 | |
| 3 | #include <heap/seadHeapMgr.h> |
| 4 | |
| 5 | #include "Library/Memory/HeapUtil.h" |
| 6 | |
| 7 | #include "System/GameSystem.h" |
| 8 | |
| 9 | RootTask::RootTask(const sead::TaskConstructArg& constructArg) |
| 10 | : sead::Task(constructArg, "RootTask") {} |
| 11 | |
| 12 | void RootTask::enter() {} |
| 13 | |
| 14 | void RootTask::calc() { |
| 15 | if (!mGameSystem) { |
| 16 | sead::ScopedCurrentHeapSetter heapSetter(al::getStationedHeap()); |
| 17 | mGameSystem = new GameSystem(); |
| 18 | mGameSystem->init(); |
| 19 | } |
| 20 | mGameSystem->movement(); |
| 21 | } |
| 22 | |
| 23 | void RootTask::draw() { |
| 24 | if (mGameSystem) |
| 25 | mGameSystem->drawMain(); |
| 26 | } |
| 27 |