1 2 #ifndef _STAGESELECT_H 3 #define _STAGESELECT_H 4 5 #define NUM_TELEPORTER_SLOTS 8 6 7 struct Teleporter_Slot 8 { 9 int slotno; // which slot # this is (first param to PS+) 10 int scriptno; // which script is run when selected (2nd param to PS+) 11 }; 12 13 class TB_StageSelect 14 { 15 public: 16 TB_StageSelect(); 17 18 void ResetState(); 19 void SetVisible(bool enable); 20 21 void SetSlot(int slotno, int scriptno); 22 void ClearSlots(); 23 bool GetSlotByIndex(int index, int *slotno_out=NULL, int *scriptno_out=NULL); 24 int CountActiveSlots(); 25 26 bool IsVisible(); 27 void Draw(); 28 29 private: 30 void HandleInput(); 31 void MoveSelection(int dir); 32 void UpdateText(); 33 34 bool fVisible; 35 int fSlots[NUM_TELEPORTER_SLOTS]; // scripts used for slots 36 37 int fWarpY; 38 39 int fSelectionIndex; 40 int fSelectionFrame; 41 42 bool fLastButtonDown; 43 bool fMadeSelection; 44 }; 45 46 47 #endif 48