From 9740087441fa2f5b0655c7065f891686c8579cb0 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 10 Aug 2013 17:07:27 -0500 Subject: ZVISION: Add documentation for the ResultAction base class --- engines/zvision/actions.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines') diff --git a/engines/zvision/actions.h b/engines/zvision/actions.h index 76db25adf0..b75ca8bdad 100644 --- a/engines/zvision/actions.h +++ b/engines/zvision/actions.h @@ -36,9 +36,21 @@ namespace ZVision { // Forward declaration of ZVision. This file is included before ZVision is declared class ZVision; +/** + * The base class that represents any action that a Puzzle can take. + * This class is purely virtual. + */ class ResultAction { public: virtual ~ResultAction() {} + /** + * This is called by the script system whenever a Puzzle's criteria are found to be true. + * It should execute any necessary actions and return a value indicating whether the script + * system should continue to test puzzles. In 99% of cases this will be 'true'. + * + * @param engine A pointer to the base engine so the ResultAction can access all the necessary methods + * @return Should the script system continue to test any remaining puzzles (true) or immediately break and go on to the next frame (false) + */ virtual bool execute(ZVision *engine) = 0; }; -- cgit v1.2.3