22 #ifndef MTROPOLIS_PLUGIN_MTI_H 23 #define MTROPOLIS_PLUGIN_MTI_H 25 #include "mtropolis/modifier_factory.h" 26 #include "mtropolis/modifiers.h" 27 #include "mtropolis/plugin/mti_data.h" 28 #include "mtropolis/runtime.h" 47 bool respondsToEvent(
const Event &evt)
const override;
49 void disable(
Runtime *runtime)
override;
56 #ifdef MTROPOLIS_DEBUG_ENABLE 57 SupportStatus debugGetSupportStatus()
const override {
return kSupportStatusDone; }
58 const char *debugGetTypeName()
const override {
return "Shanghai Modifier"; }
63 static const uint kNumTiles = 28;
64 static const uint kNumFaces = 26;
66 typedef uint32 BoardState_t;
68 static const uint kBoardSizeX = 13;
69 static const uint kBoardSizeY = 7;
70 static const uint kBoardSizeZ = 3;
72 struct TileCoordinate {
79 const char *getDefaultName()
const override;
83 bool boardStateHasValidMove(BoardState_t boardState)
const;
84 bool tileIsExposed(BoardState_t boardState, uint tile)
const;
85 bool tileExistsAtCoordinate(BoardState_t boardState, uint x, uint y, uint z)
const;
87 static BoardState_t boardStateBit(uint bit);
88 static BoardState_t emptyBoardState();
90 Event _resetTileSetWhen;
93 static TileCoordinate _tileCoordinates[kNumTiles];
94 int8 _tileAtCoordinate[kBoardSizeX][kBoardSizeY][kBoardSizeZ];
97 class MPEGVideoPlayer;
101 virtual void onVideoCompleted() = 0;
109 bool respondsToEvent(
const Event &evt)
const override;
111 void disable(
Runtime *runtime)
override;
115 void onVideoCompleted()
override;
118 #ifdef MTROPOLIS_DEBUG_ENABLE 119 const char *debugGetTypeName()
const override {
return "Sample Modifier"; }
125 const char *getDefaultName()
const override;
Definition: runtime.h:2409
Definition: runtime.h:1575
Definition: runtime.h:1185
Definition: runtime.h:3035
Definition: modifier_factory.h:57
Definition: modifier_factory.h:48
Definition: mti_data.h:36
Definition: mti_data.h:44
Definition: runtime.h:369
Definition: runtime.h:1307
Definition: runtime.h:2118
Definition: runtime.h:1180
Definition: algorithm.h:29
Definition: runtime.h:391