-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2fe70b
commit b6bd727
Showing
11 changed files
with
164 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef D_A_OBJ_SMOKE_H | ||
#define D_A_OBJ_SMOKE_H | ||
|
||
#include <d/a/obj/d_a_obj_base.h> | ||
#include <m/m3d/m_anmtexsrt.h> | ||
#include <m/m3d/m_smdl.h> | ||
#include <s/s_State.hpp> | ||
#include <s/s_StateMgr.hpp> | ||
|
||
class dAcOsmoke_c : public dAcObjBase_c { | ||
public: | ||
dAcOsmoke_c() : mStateMgr(*this, sStateID::null) {} | ||
virtual ~dAcOsmoke_c() {} | ||
virtual bool createHeap() override; | ||
virtual int create() override; | ||
virtual int actorExecute() override; | ||
virtual int draw() override; | ||
virtual int doDelete() override; | ||
|
||
STATE_FUNC_DECLARE(dAcOsmoke_c, Wait); | ||
|
||
private: | ||
nw4r::g3d::ResFile mBrres; | ||
m3d::smdl_c mModel; | ||
m3d::anmTexSrt_c mTexAnm; | ||
STATE_MGR_DECLARE(dAcOsmoke_c); | ||
u8 mType; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include <d/a/obj/d_a_obj_smoke.h> | ||
|
||
static const char *const sSmokeNames1[] = { | ||
"SmokeF200", | ||
"SmokeF202", | ||
}; | ||
|
||
static const char *const sSmokeNames2[] = { | ||
"SmokeF200", | ||
"SmokeF202", | ||
}; | ||
|
||
SPECIAL_ACTOR_PROFILE(OBJ_SMOKE, dAcOsmoke_c, fProfile::OBJ_SMOKE, 0x01DB, 0, 4); | ||
|
||
STATE_DEFINE(dAcOsmoke_c, Wait); | ||
|
||
bool dAcOsmoke_c::createHeap() { | ||
mType = params & 3; | ||
mBrres = getOarcResFile(sSmokeNames1[mType]); | ||
nw4r::g3d::ResMdl mdl = mBrres.GetResMdl(sSmokeNames2[mType]); | ||
TRY_CREATE(mModel.create(mdl, &heap_allocator, 0x324)); | ||
nw4r::g3d::ResAnmTexSrt srt = mBrres.GetResAnmTexSrt(sSmokeNames1[mType]); | ||
TRY_CREATE(mTexAnm.create(mdl, srt, &heap_allocator, nullptr, 1)); | ||
return true; | ||
} | ||
|
||
int dAcOsmoke_c::create() { | ||
if (!initAllocatorWork1Heap(-1, "dAcOsmoke_c::m_allocator", 0x20)) { | ||
return 2; | ||
} | ||
|
||
mModel.setAnm(mTexAnm); | ||
updateMatrix(); | ||
mModel.setLocalMtx(worldMatrix); | ||
mStateMgr.changeState(StateID_Wait); | ||
mModel.setPriorityDraw(0x1C, 9); | ||
setBoundingBox(mVec3_c(-0.0f, -0.0f, -0.0f), mVec3_c(0.0f, 0.0f, 0.0f)); | ||
return 1; | ||
} | ||
|
||
int dAcOsmoke_c::doDelete() { | ||
return 1; | ||
} | ||
|
||
int dAcOsmoke_c::actorExecute() { | ||
mStateMgr.executeState(); | ||
mTexAnm.play(); | ||
return 1; | ||
} | ||
|
||
int dAcOsmoke_c::draw() { | ||
drawModelType1(&mModel); | ||
return 1; | ||
} | ||
|
||
void dAcOsmoke_c::initializeState_Wait() {} | ||
|
||
void dAcOsmoke_c::executeState_Wait() {} | ||
|
||
void dAcOsmoke_c::finalizeState_Wait() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters