Commit graph

49 commits

Author SHA1 Message Date
richiesams
9dd54a16e0 ZVISION: Remove zero valued entries in the global state table once a frame 2013-09-04 00:15:28 -05:00
richiesams
117eea1be6 ZVISION: Allow changeLocation to be executed right away instead of next frame 2013-09-03 23:54:29 -05:00
richiesams
34dcea106a ZVISION: Cleanup _activeControls in ScriptManager destructor 2013-09-03 00:27:03 -05:00
richiesams
e3b08793dd ZVISION: Add ScriptManager mouse event handlers
This allows the main engine to pass mouse events to Controls
2013-08-28 16:44:23 -05:00
richiesams
a6b2bb7581 ZVISION: Remove ScriptManager::_activeNodes and change all iterators to iterate over _activeControls
We also change _activeControls to a List instead of a HashMap because a List should have
slightly better iteration time.
2013-08-28 16:44:23 -05:00
richiesams
b667002124 ZVISION: Update ScriptManager::enableControl()/disableControl() to fit new Control syntax 2013-08-28 16:44:22 -05:00
richiesams
a9db1e1712 ZVISION: Add note about _activeNodes 2013-08-24 00:25:01 -05:00
richiesams
fc5727c522 ZVISION: Fix memory leak
We no longer use SharedPtr
2013-08-24 00:24:43 -05:00
richiesams
2431f60c02 ZVISION: Make Control purely virtual 2013-08-24 00:23:32 -05:00
richiesams
b28d502288 ZVISION: Convert ScriptManager::_activeNodes to normal pointers instead of SharedPtrs 2013-08-24 00:01:42 -05:00
richiesams
ac7b2251bb ZVISION: Delete Puzzles from heap before clearing _activePuzzles 2013-08-20 20:55:00 -05:00
richiesams
35622827f8 ZVISION: Store the Puzzles in _activePuzzles and _globalPuzzles on the heap
This allows List::push_back() to not cause a data copy
2013-08-20 20:50:14 -05:00
richiesams
b0635edff8 ZVISION: Revert to normal pointers instead of shared pointers 2013-08-18 19:53:07 -05:00
richiesams
d26c814d1e ZVISION: Force & operator to have precedence over == operator 2013-08-18 19:53:05 -05:00
richiesams
6ee93ad5c2 ZVISION: Convert _puzzlesToCheck to a Queue instead of a Stack 2013-08-18 19:53:04 -05:00
richiesams
46ab355766 ZVISION: Allow Puzzles to have mutiple 'sets' of CriteriaEntries 2013-08-18 19:53:04 -05:00
richiesams
908e784957 ZVISION: Allow controls to be enabled or disabled 2013-08-18 19:53:03 -05:00
richiesams
c840d082ce ZVISION: Allow ONCE_PER_INST puzzles to be repeated once per room instead of once per game 2013-08-18 19:52:59 -05:00
richiesams
b22ed391fe ZVISION: Set the background position after the .scr file has been parsed so we know the RenderState 2013-08-18 19:52:54 -05:00
richiesams
0a840fa664 ZVISION: Rename 'x' variable in changeLocation to 'offset'
Since it can be in either the x or the y direction
2013-08-16 17:27:51 -05:00
richiesams
0fe3ae711a ZVISION: Add cursor and background image resets during location change 2013-08-14 11:20:23 -05:00
richiesams
39934b1da7 ZVISION: Set the initial game location (The opening video and menu) 2013-08-14 11:20:20 -05:00
richiesams
269bed7c7d ZVISION: Implement mouse event handling 2013-08-11 15:10:52 -05:00
richiesams
553a3ced68 ZVISION: Remove a verbose debug message 2013-08-11 15:06:11 -05:00
richiesams
9681d7515e ZVISION: Fix enum qualifiers 2013-08-11 15:05:38 -05:00
richiesams
9f0420e1ce ZVISION: Change the initializer list formatting to conform to how everything else is formatted 2013-08-11 15:04:46 -05:00
richiesams
309034c153 ZVISION: Stop checking puzzles if ResultAction::execute() returns false 2013-08-10 17:36:57 -05:00
richiesams
2565f96c55 ZVISION: Make ScriptManager::changeLocation delay the actual change until the end of the frame
This prevents memory corruption since changeLocation could be called in the middle of
a Puzzle list iteration and changeLocation clears all the Puzzle lists.
2013-08-10 17:31:57 -05:00
richiesams
dd11566ffd ZVISION: Move the ScriptManager update functions to a single update() function.
Then make the individual update functions private
2013-08-10 17:28:41 -05:00
richiesams
5bba509db8 ZVISION: Create a global puzzle list and parse universe.scr into it during ScriptManager::initialize() 2013-08-10 17:25:38 -05:00
richiesams
931ad00a2d ZVISION: Add StateFlag handling to Puzzle checking 2013-08-05 19:19:34 -05:00
richiesams
387bfb2806 ZVISION: Fix typo in Puzzle checking 2013-08-05 19:19:34 -05:00
richiesams
435ed16e03 ZVISION: Set the puzzle global variable after a Puzzle is completed 2013-08-05 19:19:33 -05:00
richiesams
a31a97c520 ZVISION: Add debug statements for Puzzle checking 2013-08-05 19:19:24 -05:00
richiesams
4b0015b8e9 ZVISION: Check if a key exists before returning _globalState value.
operator[] creates a key value pair if it doesn't exist. So blindly returning a value without checking if the
key exists could result in undefined behavior, depening on what the value is initialized to in its constructor
2013-08-05 00:05:25 -05:00
richiesams
11118262e4 ZVISION: Add logic to check _referenceTable Puzzles every time a globalState is changed 2013-08-04 13:33:09 -05:00
richiesams
9e996c4fec ZVISION: Convert _activeNodes and _activeControls to Lists of SharedPtr 2013-08-04 13:33:08 -05:00
richiesams
93e4f4dbf7 ZVISION: Sort using iterators instead of the actual elements
Also convert the argument to a reference instead of a pointer
2013-08-04 13:33:04 -05:00
richiesams
2faaf8488b ZVISION: Convert ResultAction pointers to SharePtr
This gets rid of the need for specific destruction as well as making the copy swap
operations in the ScriptManger _referenceTable more efficient
2013-08-04 13:33:04 -05:00
richiesams
4729641cf9 ZVISION: Fix typo in format string 2013-08-04 13:33:01 -05:00
richiesams
903e21b8af ZVISION: Initialize the iterator 2013-08-04 13:32:57 -05:00
richiesams
f1135292d0 ZVISION: Optimize integer type usages
The general thought is int is faster than int16 or byte. So if you can afford the
space, use it over int16 or byte. Also, only use int32 when you specifically need
the 32 bits.
2013-08-04 13:32:55 -05:00
richiesams
f39e1fdc43 ZVISION: Move CriteriaOperator, Criteria, and StateFlag inside the Puzzle class 2013-08-04 13:32:54 -05:00
richiesams
00eb279243 ZVISION: Create ScriptManager member function to change location 2013-08-04 13:32:53 -05:00
richiesams
48a3a1530d ZVISION: Move the criteriaMet bool outside of the loop
Only fire off the Results of ALL of the criteria are met
2013-08-04 13:32:51 -05:00
richiesams
c45a13cdd7 ZVISION: Conform to GCC spacing for template inside template 2013-08-04 13:32:18 -05:00
richiesams
24dc3e1793 ZVISION: Create ScriptManager state handling logic 2013-08-04 13:32:14 -05:00
richiesams
1710468121 ZVISION: Fix includes to use new underscore names 2013-08-04 13:31:56 -05:00
richiesams
f99d613dcb ZVISION: Rename files to use underscores instead of camelCase 2013-08-04 13:31:55 -05:00
Renamed from engines/zvision/scriptManager.cpp (Browse further)