SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
ResourceHolder.hpp
1#pragma once
2
3#include "Game/System/ResourceInfo.hpp"
4#include "Game/Animation/BckCtrl.hpp"
5#include <JSystem/JKernel/JKRHeap.hpp>
6#include <JSystem/JKernel/JKRArchive.hpp>
7#include <JSystem/JKernel/JKRFileFinder.hpp>
8
9class MaterialAnmBuffer;
10class J3DModelData;
11
12typedef const char* ArchiveName;
13
14namespace {
15 const char* sModelExt[2] = { ".bdl", ".bmd"};
16 const char* sMotionExt[2] = { ".bck", ".bca" };
17 const char* sBtkExt = ".btk";
18 const char* sBpkExt = ".bpk";
19 const char* sBtpExt = ".btp";
20 const char* sBlkExt = ".blk";
21 const char* sBrkExt = ".brk";
22 const char* sBasExt = ".bas";
23 const char* sBmtExt = ".bmt";
24 const char* sBvaExt = ".bva";
25 const char* sBanmtExt = ".banmt";
26};
27
29public:
30 ResourceHolder(JKRArchive &);
31
32 const char* getMotionName(u32) const;
33 bool isExistMaterialAnm() const;
34 void newMaterialAnmBuffer(J3DModelData *);
35 void newBckCtrl();
36
37 void initializeArc(JKRArchive &);
38 static JKRFileFinder* getFindFinder(JKRArchive *, const char *);
39 u32 initEachResTable(ResTable **, JKRArchive *, const ArchiveName *);
40
41 void mount(JKRArchive *, char *);
42
43 ResTable* mModelResTable; // _0
44 ResTable* mMotionResTable; // _4
45 ResTable* mBtkResTable; // _8
46 ResTable* mBpkResTable; // _C
47 ResTable* mBtpResTable; // _10
48 ResTable* mBlkResTable; // _14
49 ResTable* mBrkResTable; // _18
50 ResTable* mBasResTable; // _1C
51 ResTable* mBmtResTable; // _20
52 ResTable* mBvaResTable; // _24
53 ResTable* mBanmtResTable; // _28
54 ResTable* mFileInfoTable; // _2C
55 ResTable mDefaultTable; // _30
56 MaterialAnmBuffer* mMaterialBuf; // _38
57 BckCtrl* mBckCtrl; // _3C
58 void* mBackupMaterialData; // _40
59 JKRArchive* mArchive; // _44
60 JKRHeap* mHeap; // _48
61 u32 _4C;
62};