Skip to content

Instantly share code, notes, and snippets.

@RichieSams
Created July 9, 2013 18:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save RichieSams/5959662 to your computer and use it in GitHub Desktop.
Structure of Puzzle in ZEngine
/** Criteria for a Puzzle result to be fired */
struct Criteria {
/** The key of a global state */
uint32 key;
/**
* What we're comparing the value of the global state against
* This can either be a pure value or it can be the key of another global state
*/
uint32 argument;
/** How to do the comparison */
CriteriaOperator criteriaOperator;
/** Whether 'argument' is the id of a global state (true) or a pure value (false) */
bool isArgumentAnId;
};
struct Puzzle {
uint32 key;
Common::List<Criteria> criteriaList;
Common::List<ResultAction *> resultActions;
byte flags;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment