mirror of
https://github.com/zeldaret/ss
synced 2026-09-06 10:45:42 -04:00
26af4db82d
* update from dtk-template and start work towards using clangd * include <a> -> "a" * Update build.yml * remove/add non-trivial class in union warning
38 lines
836 B
C++
38 lines
836 B
C++
#include "m/m3d/m_smdl.h"
|
|
|
|
#include "m/m3d/m3d.h"
|
|
#include "nw4r/g3d/g3d_scnmdl.h"
|
|
#include "nw4r/g3d/g3d_scnmdlsmpl.h"
|
|
|
|
|
|
namespace m3d {
|
|
|
|
smdl_c::smdl_c() {}
|
|
smdl_c::~smdl_c() {}
|
|
|
|
bool smdl_c::create(nw4r::g3d::ResMdl mdl, mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize) {
|
|
if (alloc == nullptr) {
|
|
alloc = internal::l_allocator_p;
|
|
}
|
|
|
|
u32 tmp;
|
|
if (pSize == nullptr) {
|
|
pSize = &tmp;
|
|
}
|
|
|
|
if (bufferOption != 0) {
|
|
mpScnLeaf = nw4r::g3d::ScnMdl::Construct(alloc, pSize, mdl, bufferOption, nView);
|
|
} else {
|
|
mpScnLeaf = nw4r::g3d::ScnMdlSimple::Construct(alloc, pSize, mdl, nView);
|
|
}
|
|
|
|
if (mpScnLeaf == nullptr) {
|
|
return false;
|
|
}
|
|
mpScnLeaf->SetPriorityDrawOpa(0x7f);
|
|
mpScnLeaf->SetPriorityDrawXlu(0x7f);
|
|
return true;
|
|
}
|
|
|
|
} // namespace m3d
|