220 |
Stone *YieldStone(GridPos p); |
Stone *YieldStone(GridPos p); |
221 |
void KillStone(GridPos p); |
void KillStone(GridPos p); |
222 |
|
|
|
#define USE_IMPULSES |
|
|
|
|
|
#if defined(USE_IMPULSES) |
|
|
// Send an impulse to position 'p' into direction dir |
|
|
// If 'p' contains a stone, on_impulse() is called for that stone |
|
|
void SendImpulse(GridPos p, Direction dir); |
|
|
|
|
|
#else |
|
|
/* Move the stone at position `p' in the specified direction `dir' |
|
|
if it is movable, and there is no stone at the new position. */ |
|
|
bool MaybeMoveStone (GridPos p, Direction dir); |
|
|
#endif |
|
|
|
|
223 |
void SwapStones (GridPos p, GridPos newp); |
void SwapStones (GridPos p, GridPos newp); |
224 |
|
|
225 |
//---------------------------------------- |
//---------------------------------------- |
236 |
void SetFloor (GridPos p, Floor* st); |
void SetFloor (GridPos p, Floor* st); |
237 |
Floor *GetFloor (GridPos p); |
Floor *GetFloor (GridPos p); |
238 |
void KillFloor (GridPos p); |
void KillFloor (GridPos p); |
239 |
|
|
240 |
|
// -------------------- |
241 |
|
// General |
242 |
|
// -------------------- |
243 |
|
|
244 |
|
// Send an impulse to position 'p' into direction dir |
245 |
|
// If 'p' contains a stone, on_impulse() is called for that stone |
246 |
|
void SendImpulse(GridPos p, Direction dir, Object *sender); |
247 |
|
|
248 |
|
Object *ImpulseSender(); // returns 0 when not called from inside on_impulse() |
249 |
|
|
250 |
} |
} |
251 |
#endif |
#endif |