mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
Add MOVE_NO_EFFECT and MOVE_UNUSED return values from interpret_move()
These allow for distinguishing the case where a puzzle doesn't have a use for a key from the case where it just happens to have no effect in the current state of the puzzle. These were both represented by NULL, but that now represents the case where a puzzle hasn't been updated to make the distinction yet.
This commit is contained in:
18
puzzles.h
18
puzzles.h
@ -800,12 +800,20 @@ extern const game thegame;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Special string value to return from interpret_move in the case
|
||||
* where the game UI has been updated but no actual move is being
|
||||
* appended to the undo chain. Must be declared as a non-const char,
|
||||
* but should never actually be modified by anyone.
|
||||
* Special string values to return from interpret_move.
|
||||
*
|
||||
* MOVE_UI_UPDATE is for the case where the game UI has been updated
|
||||
* but no actual move is being appended to the undo chain.
|
||||
*
|
||||
* MOVE_NO_EFFECT is for when the key was understood by the puzzle,
|
||||
* but it happens that there isn't effect, not even a UI change.
|
||||
*
|
||||
* MOVE_UNUSED is for keys that the puzzle has no use for at all.
|
||||
*
|
||||
* Each must be declared as a non-const char, but should never
|
||||
* actually be modified by anyone.
|
||||
*/
|
||||
extern char MOVE_UI_UPDATE[];
|
||||
extern char MOVE_UI_UPDATE[], MOVE_NO_EFFECT[], MOVE_UNUSED[];
|
||||
|
||||
/* A little bit of help to lazy developers */
|
||||
#define DEFAULT_STATUSBAR_TEXT "Use status_bar() to fill this in."
|
||||
|
Reference in New Issue
Block a user