NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
smdl.cpp
1#include <game/mLib/m_3d.hpp>
2#include <lib/nw4r/g3d/scn_mdl.hpp>
3
4m3d::smdl_c::smdl_c() {}
5
6m3d::smdl_c::~smdl_c() {}
7
8bool m3d::smdl_c::create(nw4r::g3d::ResMdl resMdl, mAllocator_c *allocator, ulong bufferOption, int viewCount, size_t *objSize) {
9 if (allocator == nullptr) {
10 allocator = internal::l_allocator_p;
11 }
12
13 size_t size;
14 if (objSize == nullptr) {
15 objSize = &size;
16 }
17
18 if (bufferOption != 0) {
19 mpScn = nw4r::g3d::ScnMdl::Construct(allocator, objSize, resMdl, bufferOption, viewCount);
20 } else {
21 mpScn = nw4r::g3d::ScnMdlSimple::Construct(allocator, objSize, resMdl, viewCount);
22 }
23
24 if (mpScn == nullptr) {
25 return false;
26 }
27
28 mpScn->SetPriorityDrawOpa(127);
29 mpScn->SetPriorityDrawXlu(127);
30
31 return true;
32}