diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/shop.cpp | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/src/koopatlas/shop.cpp b/src/koopatlas/shop.cpp index ed64c8e..a39a382 100644 --- a/src/koopatlas/shop.cpp +++ b/src/koopatlas/shop.cpp @@ -127,6 +127,7 @@ dWMShop_c *dWMShop_c::build() { dWMShop_c::dWMShop_c() { layoutLoaded = false; + isHidden = true; } int dWMShop_c::onCreate() { @@ -137,7 +138,6 @@ int dWMShop_c::onCreate() { return false; currentItem = 0; - isHidden = true; static const char *brlanNames[5] = {"shop_hitButton.brlan", "shop_offButton.brlan", "shop_onButton.brlan", "shop_inWindow.brlan", "shop_outWindow.brlan"}; static const char *groupNames[20] = {"B00_Button", "B01_Button", "B02_Button", "B03_Button", "B05_Button", "B08_Button", @@ -222,6 +222,8 @@ int dWMShop_c::onExecute() { BuyItem(currentItem); } } + + shopkeep._vf1C(); } return true; @@ -235,7 +237,7 @@ int dWMShop_c::onDraw() { if (!isHidden) { layout.scheduleForDrawing(); - Vec pos = {layout.posX, layout.posY, 40000.0}; + /*Vec pos = {layout.posX, layout.posY, 10000.0}; S16Vec rot = {0,0,0}; Vec scale = {1.0, 1.0, 1.0}; matrix.translation(pos.x, pos.y, pos.z); @@ -248,7 +250,7 @@ int dWMShop_c::onDraw() { shopkeep._vf1C(); if(this->ska.isAnimationDone()) - this->ska.setCurrentFrame(0.0); + this->ska.setCurrentFrame(0.0);*/ } return true; @@ -257,30 +259,9 @@ int dWMShop_c::onDraw() { void dWMShop_c::specialDraw1() { OSReport("Lakionnnne...."); if (!isHidden) { - Vec pos = {layout.posX, layout.posY, 40000.0}; - S16Vec rot = {0,0,0}; - Vec scale = {1.0, 1.0, 1.0}; - matrix.translation(pos.x, pos.y, pos.z); - matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); - - shopkeep.setDrawMatrix(matrix); - shopkeep.setScale(&scale); - shopkeep.calcWorld(false); - shopkeep.scheduleForDrawing(); - shopkeep._vf1C(); - - if(this->ska.isAnimationDone()) - this->ska.setCurrentFrame(0.0); - } - return; -} - -void dWMShop_c::specialDraw2() { - OSReport("Lakituuu...."); - if (!isHidden) { - Vec pos = {layout.posX, layout.posY, 40000.0}; + Vec pos = {0.0f, 0.0f, 1000.0f}; S16Vec rot = {0,0,0}; - Vec scale = {1.0, 1.0, 1.0}; + Vec scale = {1.0f, 1.0f, 1.0f}; matrix.translation(pos.x, pos.y, pos.z); matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); @@ -288,10 +269,9 @@ void dWMShop_c::specialDraw2() { shopkeep.setScale(&scale); shopkeep.calcWorld(false); shopkeep.scheduleForDrawing(); - shopkeep._vf1C(); - if(this->ska.isAnimationDone()) - this->ska.setCurrentFrame(0.0); +// if(this->ska.isAnimationDone()) +// this->ska.setCurrentFrame(0.0); } return; } @@ -349,7 +329,7 @@ void dWMShop_c::LoadShopForWorld(int world) { res.data = getResource("lakitu", Lakitu[world]); nw4r::g3d::ResMdl mdl = res.GetResMdl("lakitu"); shopkeep.setup(mdl, &allocator, 0x224, 1, 0); - SetupTextures_Item(&shopkeep, 0); // 800B42B0 + SetupTextures_Item(&shopkeep, 1); // Animation Assignment (idle, notenough) nw4r::g3d::ResAnmChr anmChr = res.GetResAnmChr("idle"); |