diff options
author | Treeki <treeki@gmail.com> | 2012-07-26 06:03:40 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-07-26 06:03:40 +0200 |
commit | 939761342c63abfd5cab49106d6f5a367528d0bd (patch) | |
tree | 5a89fc5c32db76c703060cdde5ea1ec9f3e73e07 | |
parent | be36e213f86dd1c27618b751ede25b2e89df6757 (diff) | |
download | kamek-939761342c63abfd5cab49106d6f5a367528d0bd.tar.gz kamek-939761342c63abfd5cab49106d6f5a367528d0bd.zip |
oh well.
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/core.cpp | 2 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 3 | ||||
-rw-r--r-- | src/koopatlas/shop.cpp | 40 | ||||
-rw-r--r-- | src/koopatlas/shop.h | 1 |
4 files changed, 13 insertions, 33 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index bce31b1..50308a0 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -257,7 +257,7 @@ bool WMInit_SetupExtra(void *ptr) { // it is created in dScKoopatlas_c::onCreate SpammyReport("creating SHOP\n"); - wm->shop = (dWMShop_c*)CreateParentedObject(WM_SHOP, wm, 0, 0); + wm->shop = (dWMShop_c*)CreateParentedObject(WM_SHOP, wm, 0, 2); SpammyReport("SetupExtra done\n"); diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 3b592d2..a945662 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -67,7 +67,8 @@ void dWMPathManager_c::setup() { SpammyReport("done\n"); for (int i = 0; i < pathLayer->nodeCount; i++) - pathLayer->nodes[i]->setupNodeExtra(); + if (pathLayer->nodes[i]->type == dKPNode_s::LEVEL) + pathLayer->nodes[i]->setupNodeExtra(); } static u8 *PathAvailabilityData = 0; 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"); diff --git a/src/koopatlas/shop.h b/src/koopatlas/shop.h index b4281b7..eca02d1 100644 --- a/src/koopatlas/shop.h +++ b/src/koopatlas/shop.h @@ -17,7 +17,6 @@ class dWMShop_c : public dActor_c { int onExecute(); int onDraw(); void specialDraw1(); - void specialDraw2(); bool layoutLoaded; m2d::EmbedLayout_c layout; |