summaryrefslogtreecommitdiff
path: root/src/KingSystem/Resource/resResource.cpp
blob: f9069a09be384c343f17957b97149a8980228f7e (plain)
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
#include "KingSystem/Resource/resResource.h"

namespace ksys::res {

Resource::Resource() = default;

Resource::~Resource() = default;

Context* Resource::getContext() const {
    return mContext;
}

void Resource::setContext(Context* context) {
    mContext = context;
}

void Resource::onDestroy() {
    onDestroy_();
}

bool Resource::parse(Context*, sead::Heap* heap) {
    return parse_(mRawData, mRawSize, heap);
}

bool Resource::finalize() {
    finalize_();
    return true;
}

bool Resource::finishParsing(Context*) {
    const bool ret = finishParsing_();
    mContext = nullptr;
    return ret;
}

bool Resource::m7() {
    return m7_();
}

}  // namespace ksys::res