From 8419186410fbae7e52f8ad8f18780eba1cc2c38a Mon Sep 17 00:00:00 2001 From: Stephen Simpson Date: Wed, 19 Oct 2011 16:32:03 -0500 Subject: added anmTexSrt to Ramboo --- src/bossRamboo.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/bossRamboo.cpp b/src/bossRamboo.cpp index 6bc7e51..d37baf6 100644 --- a/src/bossRamboo.cpp +++ b/src/bossRamboo.cpp @@ -24,6 +24,9 @@ class daRamboo_c : public dEn_c { m3d::anmChr_c anmWaitB; m3d::anmChr_c anmShayB; + nw4r::g3d::ResAnmTexSrt resTexSrt; + m3d::anmTexSrt_c fogSrt; + int timer; int ytimer; char Hiding; @@ -152,6 +155,13 @@ void daRamboo_c::setupModels() { nw4r::g3d::ResAnmChr anmChrF = this->resFile.GetResAnmChr("shay_teresaB_wait"); ret = this->anmWaitB.setup(mdlC, anmChrF, &this->allocator, 0); + nw4r::g3d::ResAnmTexSrt anmSrt = this->resFile.GetResAnmTexSrt("fog"); + this->resTexSrt = anmSrt; + //setup(ResMdl mdl, ResAnmTexSrt anmSrt, mAllocator* allocator, void* NULL, int count); + ret = this->fogSrt.setup(mdl, anmSrt, &this->allocator, 0, 1); + //setEntryByte34(char toSet, int which); + this->fogSrt.setEntryByte34(0, 0); + allocator.unlink(); } @@ -209,6 +219,15 @@ int daRamboo_c::onCreate() { this->fogModel.bindAnim(&this->anmFog, 0.0); this->anmFog.setUpdateRate(1.0); + nw4r::g3d::ResAnmTexSrt anmSrt = this->resFile.GetResAnmTexSrt("fog"); + //bindEntry(mdl_c* model, ResAnmTexSrt anmSrt, int which, int playState?); + this->fogSrt.bindEntry(&this->fogModel, anmSrt, 0, 1); + this->fogModel.bindAnim(&this->fogSrt, 1.0); + //setFrameForEntry(float frame, int which); + this->fogSrt.setFrameForEntry(1.0, 0); + //setUpdateRateForEntry(float rate, int which); + this->fogSrt.setUpdateRateForEntry(1.0, 0); + OSReport("Setting the State"); doStateChange(&StateID_Grow); @@ -230,6 +249,10 @@ int daRamboo_c::onExecute() { if(this->anmFog.isAnimationDone()) this->anmFog.setCurrentFrame(0.0); + this->fogSrt.process(); + if(this->fogSrt.isEntryAnimationDone(0)) + this->fogSrt.setFrameForEntry(1.0, 0); + if (this->aPhysics.result1 == 1) { char PlayerID = NearestPlayer(this); dStageActor_c *Player = GetSpecificPlayerActor(PlayerID); -- cgit v1.2.3