#ifndef __KOOPATLAS_SHOP_H #define __KOOPATLAS_SHOP_H #include "koopatlas/core.h" class dWMShop_c : public dBase_c { public: static dWMShop_c *build(); static dWMShop_c *instance; dWMShop_c(); int onCreate(); int onDelete(); int onExecute(); int onDraw(); void specialDraw1(); bool layoutLoaded; m2d::EmbedLayout_c layout; bool visible; int selected, lastTopRowChoice; int shopKind; enum Animation { SHOW_ALL = 0, HIDE_ALL = 1, ACTIVATE_BUTTON = 2, // 3, 4, 5, 6, 7 DEACTIVATE_BUTTON = 8, // 9, 10, 11, 12, 13 }; enum ItemTypes { MUSHROOM = 0, FIRE_FLOWER, ICE_FLOWER, PENGUIN, PROPELLER, MINI_SHROOM, STARMAN, HAMMER, ONE_UP, COINS, ITEM_TYPE_COUNT }; enum _Constants { ITEM_COUNT = 12, }; static const ItemTypes Inventory[10][12]; nw4r::lyt::TextBox *Title, *TitleShadow, *CoinCount, *CoinCountShadow, *BackText, *BuyText; class ShopModel_c { public: mHeapAllocator_c allocator; nw4r::g3d::ResFile res; m3d::mdl_c model; m3d::anmChr_c animation; float x, y; void setupItem(float x, float y, ItemTypes type); void setupLakitu(int id); void execute(); void draw(); void playAnim(const char *name, float rate); }; ShopModel_c *itemModels; ShopModel_c *lakituModel; void show(int shopNumber); void loadModels(); void deleteModels(); void buyItem(int item); dStateWrapper_c state; USING_STATES(dWMShop_c); DECLARE_STATE(Hidden); DECLARE_STATE(ShowWait); DECLARE_STATE(ButtonActivateWait); DECLARE_STATE(Wait); DECLARE_STATE(HideWait); }; #endif