Commit Graph

577 Commits

Author SHA1 Message Date
RichieSams
2b2f85063a ZVISION: Clean up StringManager and SaveManager after use 2013-09-15 16:27:19 -05:00
RichieSams
d82ff7aea8 ZVISION: Create Console method to render text 2013-09-15 16:26:49 -05:00
RichieSams
c312b147fa ZVISION: Create an instance of StringManager 2013-09-15 15:01:01 -05:00
RichieSams
82ea7ca0e7 ZVISION: Create the StringManager class
This parses the XXXXX.STR files into styled fonts and phrases. The styles
and the phrases are used in the game for messages to the user and for
general purpose fonts.
2013-09-15 15:01:00 -05:00
RichieSams
05b3b170d4 ZVISION: Add more documentation for clearWorkingWindowTo555Color() 2013-09-15 15:01:00 -05:00
RichieSams
dc8c7ca2c0 ZVISION: Add RenderManager text support 2013-09-15 15:00:59 -05:00
RichieSams
c643718dae ZVISION: Clean up the TruetypeFont class and add alpha support
Remove caching. We don't render font enough to warrant it. Use
Graphics::TextAlign instead of rolling our own. Remove methods
we don't use.
2013-09-15 15:00:59 -05:00
RichieSams
f6c36aa14c ZVISION: Create an instance of the SaveManager 2013-09-15 15:00:58 -05:00
RichieSams
a2d19c7a6e ZVISION: Actually store the ZVision pointer 2013-09-15 15:00:58 -05:00
RichieSams
2900aaa90a ZVISION: Add a reminder for how inventory is accessed 2013-09-15 15:00:57 -05:00
RichieSams
5cd1d2d1c2 ZVISION: Ensure getControl always returns something 2013-09-15 15:00:57 -05:00
RichieSams
6ee253a4d8 ZVISION: Add focus support for the ScriptManager 2013-09-15 15:00:56 -05:00
RichieSams
0d78208562 ZVISION: Add focus support for Controls 2013-09-15 15:00:56 -05:00
RichieSams
259d11762d ZVISION: Add support for ActionRandom and ActionTimer
They were already implemented, they just weren't being used
2013-09-15 15:00:55 -05:00
RichieSams
36a0b666b3 ZVISION: Add better alpha support for blitting
Instead of blitting directly to the working window, we cache the alpha pixels,
then blit directly to the backbuffer instead of to the working window. This
ensures that if the alpha'd content changes, the old changes won't appear
in any new frames
2013-09-15 15:00:54 -05:00
RichieSams
3986f333ef ZVISION: Move dirty rect extension to the correct function
Source control mishap
2013-09-15 15:00:54 -05:00
RichieSams
466eba1e9f ZVISION: Fix signed/unsigned mismatch 2013-09-15 15:00:53 -05:00
RichieSams
8ba295d710 ZVISION: Add key press support to the main event loop 2013-09-15 15:00:42 -05:00
RichieSams
0eeeeded92 ZVISION: Add ScriptManager support for key press events 2013-09-15 15:00:41 -05:00
RichieSams
b50afa2b15 ZVISION: Remove unused function 2013-09-15 15:00:40 -05:00
RichieSams
752807b471 ZVISION: Add method to copy a portion of the working window to a surface 2013-09-15 15:00:32 -05:00
RichieSams
d3b6caab2f ZVISION: Remove unused key functions 2013-09-15 14:07:02 -05:00
RichieSams
c20a9ac6ae ZVISION: Add key press support to Controls 2013-09-15 14:06:11 -05:00
RichieSams
d643ca1571 ZVISION: Remove unused Console functions 2013-09-15 14:04:58 -05:00
RichieSams
0874212fa7 ZVISION: Cleanup _currentFrameBuffer during descruction 2013-09-09 11:16:46 -05:00
RichieSams
4a4330cec7 ZVISION: Cleanup the cached frame before loading the next one 2013-09-09 11:16:45 -05:00
RichieSams
f5f053d335 ZVISION: Use default dpi for font 2013-09-09 11:16:45 -05:00
RichieSams
072b852cdc ZVISION: Remove extraneous methods from TrueTypeFont 2013-09-09 11:16:44 -05:00
RichieSams
edd1a117ae ZVISION: Cache animation frames so they can be re-rendered when the background moves 2013-09-09 11:16:44 -05:00
RichieSams
9e563f0113 ZVISION: Add comments to AnimationControl::process() 2013-09-09 11:16:43 -05:00
RichieSams
077f0b2491 ZVISION: Update LeverControl to use the new RlfAnimation outputs 2013-09-09 11:16:43 -05:00
RichieSams
8354f23628 ZVISION: Add a debug assert to make sure we're not trying to render ouside the working window 2013-09-09 11:16:42 -05:00
RichieSams
31cdf227d2 ZVISION: Clip animations to the working window 2013-09-09 11:16:42 -05:00
RichieSams
3b7189993c ZVISION: Let Rlf animations output Surfaces instead of uint16 arrays 2013-09-09 11:16:41 -05:00
RichieSams
f9b9bf5b9b ZVISION: Create method for transposing a surface 2013-09-09 11:16:40 -05:00
RichieSams
a415964c6d ZVISION: Create method for clipping a rect to the working window 2013-09-09 11:16:40 -05:00
RichieSams
511cb7447e ZVISION: Create method for converting image space to working window space 2013-09-09 11:16:39 -05:00
RichieSams
c7358ed4f7 ZVISION: Create class for rendering TrueType fonts 2013-09-09 11:16:39 -05:00
RichieSams
af94158723 ZVISION: Save a thumbnail of the RenderManager backbuffer instead of the actual screen
This prevents things like the GMM being in the thumbnail
2013-09-09 11:16:38 -05:00
RichieSams
87e78e4c33 ZVISION: Create method for getting the RenderManager backbuffer 2013-09-09 11:16:38 -05:00
RichieSams
106522661c ZVISION: Create method for rendering to the working window with binary alpha 2013-09-09 11:16:37 -05:00
RichieSams
6e806e51ad ZVISION: Stop avi playback once the animation is finished 2013-09-09 11:16:37 -05:00
RichieSams
b1587f8ba0 ZVISION: Implement ActionPlayPreloadAnimation 2013-09-09 11:16:36 -05:00
RichieSams
5c3cfaa6d2 ZVISION: Implement ActionPreloadAnimation::execute() 2013-09-09 11:16:36 -05:00
RichieSams
46278f6f59 ZVISION: Implement AnimationControl
This handles playing animations asyncronously over numerous frames
2013-09-09 11:16:35 -05:00
RichieSams
6a9572670c ZVISION: Add method for getting a pointer to a Control 2013-09-09 11:16:28 -05:00
RichieSams
eeace477a0 ZVISION: Set a Puzzle as completed before executing its ResultActions 2013-09-07 18:06:20 -05:00
RichieSams
81184d342c ZVISION: Delete a Control * when removing it from _activeControls 2013-09-07 18:05:47 -05:00
RichieSams
acfa7ff3e1 ZVISION: Add scr parse line for ActionAssign
It was already implemented, just not added to the scr parsing
2013-09-07 18:05:15 -05:00
RichieSams
aea1070713 ZVISION: Allow RLF seeking without returning a frame 2013-09-07 18:04:42 -05:00
RichieSams
47ee636f05 ZVISION: Make LeverControl render to the working window instead of directly to the screen 2013-09-07 18:04:01 -05:00
RichieSams
70e75dd640 ZVISION: Make the declaration and implementation of copyRectToWorkingWindow be the same 2013-09-07 18:03:25 -05:00
RichieSams
48745ad197 ZVISION: Add dirty rectangling support for pure image rendering
Still need to add support for ResultActions and Controls that directly
use OSystem::copyRectToScreen()
2013-09-07 14:32:51 -05:00
RichieSams
2f12ac0d71 ZVISION: Fix pixel copying errors in renderRectToWorkingWindow 2013-09-07 14:07:13 -05:00
RichieSams
94268fed06 ZVISION: Update ActionSetPartialScreen to use new function name 2013-09-07 11:52:49 -05:00
RichieSams
1e1d5cafe5 ZVISION: Re-enable rendering to the backbuffer 2013-09-07 11:52:20 -05:00
RichieSams
db83d1b5e5 ZVISION: Actually use the converted color instead of the old one 2013-09-06 22:50:44 -05:00
RichieSams
558a987143 ZVISION: Fix accidental signed read from save file header 2013-09-06 22:50:43 -05:00
RichieSams
e92e3c5b0b ZVISION: Delete action_node 2013-09-06 22:50:42 -05:00
RichieSams
2840ce750e ZVISION: Save the Puzzle key, since ChangeLocation could be called
Which wipes all the puzzles
2013-09-06 22:50:42 -05:00
RichieSams
b6366a2697 ZVISION: Fix signed/unsigned mismatch 2013-09-06 22:50:34 -05:00
RichieSams
6ce62475ca ZVISION: Disable saving until it can be fixed 2013-09-06 22:29:48 -05:00
RichieSams
2dab04e14b ZVISION: Do full working window warp instead of image at a time 2013-09-06 22:29:19 -05:00
richiesams
150a4793a6 ZVISION: Initialize Location to the main menu
This ensures that the first auto save of the game will have a
useful location
2013-09-04 00:19:03 -05:00
richiesams
7ff45447ad ZVISION: Create an instance of SaveManager 2013-09-04 00:18:05 -05:00
richiesams
488484d2dc ZVISION: Implement SaveManager 2013-09-04 00:17:37 -05:00
richiesams
235620750a ZVISION: Create methods for generating save file names 2013-09-04 00:16:46 -05:00
richiesams
23ae67c777 ZVISION: Create ScriptManager _activeControls serialization methods 2013-09-04 00:16:46 -05:00
richiesams
644af30df5 ZVISION: Create ScriptManager state table serialization methods 2013-09-04 00:16:45 -05:00
richiesams
ac578bf9b7 ZVISION: Implement TimerNode serialization 2013-09-04 00:16:44 -05:00
richiesams
11bf2405f8 ZVISION: Create base methods for Control serialization 2013-09-04 00:16:36 -05:00
richiesams
b45c9e7c26 ZVISION: Create method for getting the current location 2013-09-04 00:16:27 -05:00
richiesams
9dd54a16e0 ZVISION: Remove zero valued entries in the global state table once a frame 2013-09-04 00:15:28 -05:00
richiesams
dd307c2484 ZVISION: Create method to get the current background offset 2013-09-04 00:15:19 -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
9ea91f5c9c ZVISION: Convert ZVision singleton accessors to be inline 2013-09-03 23:44:26 -05:00
richiesams
5d86eb4a4a ZVISION: Change ActionPlayAnimation::_loop refer to a count rather than a boolean
_loopCount refers to the number of times an animation should be played, where 0
corresponds to infinite.
2013-09-03 01:23:17 -05:00
richiesams
b3a3274616 ZVISION: Remove unnecessary file.open()
It's done inside readImageToSurface() and it no longer needs
to be on the heap
2013-09-03 00:39:39 -05:00
richiesams
efb0495758 ZVISION: Fix signed/unsigned mismatch 2013-09-03 00:34:01 -05:00
richiesams
98dc015dc1 ZVISION: Free the _currentBackground Surface in RenderManager destructor 2013-09-03 00:32:12 -05:00
richiesams
4d86061b57 ZVISION: Cleanup all used memory in RLF animations 2013-09-03 00:31:44 -05:00
richiesams
34dcea106a ZVISION: Cleanup _activeControls in ScriptManager destructor 2013-09-03 00:27:03 -05:00
richiesams
78d5a41cd0 ZVISION: Call Surface::free() in the cursor destructor 2013-09-03 00:26:13 -05:00
richiesams
c3fcff9612 ZVISION: Move TimerNode to it's own file 2013-09-24 13:59:40 +02:00
richiesams
f1bd8de21d ZVISION: Overload ZVision::playAnimation to support general video files 2013-09-24 13:59:40 +02:00
richiesams
2ad40edd47 ZVISION: Limit tilt movement to the size of the image
// TODO: Remove image wrapping logic for the vertical direction since this can never happen now
2013-09-24 13:59:40 +02:00
richiesams
07fdcdf312 ZVISION: Only do return pathing after the mouse is captured 2013-09-24 13:59:40 +02:00
richiesams
04bf6f79e9 ZVISION: Implement return pathing for LeverControls 2013-09-24 13:59:40 +02:00
richiesams
d2d3755009 ZVISION: Fix tilt render table comment 2013-09-24 13:59:40 +02:00
richiesams
1ad594bd30 ZVISION: Add default values for tilt options 2013-09-24 13:59:39 +02:00
richiesams
97b0d5988a ZVISION: Fix how LeverControl return routes are parsed 2013-09-24 13:59:39 +02:00
richiesams
94f350b154 ZVISION: Implement TILT RenderTable creation 2013-09-24 13:59:39 +02:00
richiesams
3c3a6bd935 ZVISION: Fix typo in point range clipping 2013-09-24 13:59:39 +02:00
richiesams
dfe143137a ZVISION: Remove extraneous TODO
After redoing the math, I now know that the algorithm requires for(x) { for(y) {}}
2013-09-24 13:59:39 +02:00
richiesams
21474d32ab ZVISION: Fix error is RenderManager backgroundOffset handling 2013-09-24 13:59:39 +02:00
richiesams
ef3e26a073 ZVISION: Fix typo in PixelFormat 2013-09-24 13:59:39 +02:00
richiesams
7d1dca9ad1 ZVISION: Implement enabled/disabled support in Controls 2013-09-24 13:59:39 +02:00
richiesams
03d3646f84 ZVISION: Remove unnecessary check if a pointer was non-NULL before deleting.
I found out that you can call delete/free/delete[] on NULL and the function's defined
behavior is to do nothing.
2013-09-24 13:59:39 +02:00
richiesams
fa578497b3 ZVISION: Use Surface::getPixels() rather than getBasePtr(0, 0)
Prevents unnecessary algebra
2013-09-24 13:59:39 +02:00
richiesams
4288c4fa0e ZVISION: Remove unnecessary pixel format switching from video code
This is part of a series of commits converting all game assets to RBG 565 from
RBG 555. The argument is that certain backends do not support RGB 555. AVI
videos are already in RGB 565, so we just need to remove the code that switched
the pixelFormat during videos.
2013-09-24 13:59:38 +02:00
richiesams
cdc4842181 ZVISION: Convert RLF animations to RBG 565
This is part of a series of commits converting all game assets to RBG 565 from
RBG 555. The argument is that certain backends do not support RGB 555.
2013-09-24 13:59:38 +02:00
richiesams
f146a0209f ZVISION: Convert image rendering to RBG 565
This is part of a series of commits converting all game assets to RBG 565 from
RBG 555. The argument is that certain backends do not support RGB 555.
2013-09-24 13:59:38 +02:00
richiesams
07770eeafb ZVISION: Convert cursors to RBG 565
This is part of a series of commits converting all game assets to RBG 565 from
RBG 555. The argument is that certain backends do not support RGB 555.
2013-09-24 13:59:38 +02:00
richiesams
94378d0644 ZVISION: Force comparison to be between signed ints and ensure CLIP happens on a signed int 2013-09-24 13:59:38 +02:00
richiesams
0271a2c59d ZVISION: Transpose is done in RenderManager::readImageToSurface(), so remove it from mutateImage 2013-09-24 13:59:38 +02:00
richiesams
c15454d7d4 ZVISION: Keep a Graphics::Surface of the current background instead of re-reading the file each time
This is both more efficient and is part of the process of converting the entire game to RBG 565
2013-09-24 13:59:38 +02:00
richiesams
a81c9a52a3 ZVISION: Fix LeverControl 'mirrored' support 2013-09-24 13:59:38 +02:00
richiesams
bb77333d4f ZVISION: Create console method for parsing ALL .scr files
Useful for putting a breakpoint at certain ResultActions/Controls to
test out different instances of them.
2013-09-24 13:59:38 +02:00
richiesams
f3514534ce ZVISION: Increase background rotation speed
This could probably still go higher. The DOS version is *very* sensitive, too sensitive.
But this is still a bit slow.
2013-08-28 16:44:42 -05:00
richiesams
f1f36e7c9d ZVISION: Add LeverControl to scr file parsing 2013-08-28 16:44:41 -05:00
richiesams
952fb83793 ZVISION: Fix: Change infndef to correct constant 2013-08-28 16:44:41 -05:00
richiesams
ce9e9a55c6 ZVISION: Fix: Store what type of animation file is used 2013-08-28 16:44:40 -05:00
richiesams
7d255c3d80 ZVISION: Fix: Signal a cursor change 2013-08-28 16:44:40 -05:00
richiesams
a1a70170d4 ZVISION: Remove RlfAnimation::getPreviousFrame()
I realized that RlfAnimations don't use B-frames, therefore, can not easily go backwards.
2013-08-28 16:44:39 -05:00
richiesams
945982c857 ZVISION: Add support for animation 'mirroring'
If an animation is 'mirrored', it doesn't have B-frames, only I-frames. However the animations are built
so the last half of the animation is the reverse of the first half
2013-08-28 16:44:39 -05:00
richiesams
3e6144970e ZVISION: Implement avi frame seeking 2013-08-28 16:44:28 -05:00
richiesams
ab18d20ead ZVISION: Fix the quadrant numbers in angle calculations
Because y increases as you go down, not up
2013-08-28 16:44:27 -05:00
richiesams
3a9b384114 ZVISION: Round to int *after* converting to degrees 2013-08-28 16:44:26 -05:00
richiesams
b317ea45fe ZVISION: Allow a angle buffer zone on *both* sides of the actual angle 2013-08-28 16:44:26 -05:00
richiesams
f60b054b49 ZVISION: Fix comment spacing 2013-08-28 16:44:25 -05:00
richiesams
da3f137b6b ZVISION: sscanf to ints before storing them in Rect coords 2013-08-28 16:44:25 -05:00
richiesams
610eb11824 ZVISION: Prevent variable shadowing 2013-08-28 16:44:24 -05:00
richiesams
84c645968c ZVISION: Remove ZVision::_mousEvents and all associated functions
Instead, pass all mouse events to ScriptManager
2013-08-28 16:44:24 -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
a1d11054b5 ZVISION: Fix signed/unsigned mismatch 2013-08-28 16:44:22 -05:00
richiesams
e32f6f7e38 ZVISION: Remove extraneous semicolon 2013-08-28 16:44:21 -05:00
richiesams
7fb024c7fc ZVISION: Change PushToggleControl to comply with new Control base class 2013-08-28 16:44:21 -05:00
richiesams
4d344cb5a8 ZVISION: Change LeverControl to comply with the new Control base class 2013-08-28 16:44:20 -05:00
richiesams
3263ab7390 ZVISION: Modify TimerNode to use Control base class 2013-08-28 16:44:20 -05:00
richiesams
93bc3570ea ZVISION: Create the default implementation for Control::enable()/disable() 2013-08-28 16:44:19 -05:00
richiesams
52af1f7f10 ZVISION: Bake ActionNode and MouseEvent into Control
This makes memory management a lot easier as well as removes the need for
multiple lists that point to the same objects. However, there will be quite a few Controls
that don't need all the functionality of ActionNode and MouseEvent, so the default
implementations are No Op.
2013-08-28 16:44:19 -05:00
richiesams
5e1215837a ZVISION: Fixed signed/unsigned mismatch 2013-08-28 16:44:18 -05:00
richiesams
ff97bb2ead ZVISION: Move PushToggleControl and LeverControl to their own files 2013-08-24 01:47:12 -05:00
richiesams
9d8243245c ZVISION: Fix signed/unsigned mismatch 2013-08-24 01:11:25 -05:00
richiesams
5ff032c27d ZVISION: Cast completeFrame and frameNumber to int so their difference can go negative 2013-08-24 01:11:10 -05:00
richiesams
af762dc417 ZVISION: Fix signed/unsigned mismatch 2013-08-24 00:32:33 -05:00
richiesams
7d48a3e4b1 ZVISION: Partially implement LeverControl 2013-08-24 00:25:55 -05:00
richiesams
a596d1241c ZVISION: Add console method to dump all .lev files 2013-08-24 00:25:21 -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
0ed7df9a36 ZVISION: Add TODO's about the verbosity of the frame decoding overflow warning 2013-08-24 00:23:44 -05:00
richiesams
d2df3eb24e ZVISION: Check if we can use getNextFrame() or getPreviousFrame() before using getFrameData() 2013-08-24 00:23:43 -05:00
richiesams
c6242e7134 ZVISION: Fix signed/unsigned mismatch 2013-08-24 00:23:43 -05:00
richiesams
6610ca1b82 ZVISION: Fix error: decrementing instead of incrementing 2013-08-24 00:23:42 -05:00
richiesams
aed38867ce ZVISION: Change variable name to match its purpose 2013-08-24 00:23:42 -05:00
richiesams
0da3d3e5eb ZVISION: Convert _mouseEvents to pointers since MouseEvent is now abstract 2013-08-24 00:23:41 -05:00
richiesams
3054489a8b ZVISION: Have PushToggleControl inherit from MouseEvent and handle the methods internally.
Rather than creating an instance of MouseEvent and passing argument around.
2013-08-24 00:23:41 -05:00
richiesams
7095e613d5 ZVISION: Keep a member variable ZVision pointer instead of passing it in every process() 2013-08-24 00:23:40 -05:00