41 Commits

Author SHA1 Message Date
RichieSams
39a8243c69 ZVISION: Remove Vector2 class
Originally, the render table needed int32 (x, y) coords, so I created a copy of
Common::Point that used int32. After some code changes, the render table
reverted to int16 coords. Therefore, this class is unnessessary since
Common::Point uses int16 coords.
2013-10-04 09:20:32 -05:00
RichieSams
bad28dc158 ZVISION: Standardize includes order and format
Format is:
common/scummsys.h    (Only if a .cpp file)

header file for this file (Only if a .cpp file)

zengine includes

other includes, grouped by module
2013-10-02 09:10:00 -05:00
RichieSams
ffaffa2bc4 ZVISION: Convert all for-loops to use pre-increment instead of post-increment 2013-10-02 09:09:53 -05:00
RichieSams
dfb37fb2f0 ZVISION: Remove CLIPs from mutateImage
Due to the math of the Panorama/Tilt, all pixel offsets are going to be closer
to the center of the image. Also, mutateImage is now being called on a
finished buffer, rather than an image at a time. Therefore, it no longer has to
handle image wrapping. Thus, there is no case in which a pixel offset would
be outside the image bounds.
2013-09-24 17:34:34 -05:00
RichieSams
9fefed67f4 ZVISION: Fix signed/unsigned mismatch 2013-09-22 15:11:38 -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
b6366a2697 ZVISION: Fix signed/unsigned mismatch 2013-09-06 22:50:34 -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
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
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
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
eafd6608cf ZVISION: Change the CLIP template argument to match the type of the indicies 2013-08-18 19:52:58 -05:00
richiesams
f1d44bdf8c ZVISION: Protect against indicies that are more than an imageWidth/Height from the actual image dimensions 2013-08-18 19:52:57 -05:00
richiesams
acea03a9cd ZVISION: Allow RenderTable indicies to be negative 2013-08-18 19:52:56 -05:00
richiesams
e769164f79 ZVISION: Render images by specifying a destination and then clipping
Instead of specifying a subRect. This also reverts the code that rendered to a
backbuffer and then did a full backbuffer warp. Wrapping is done in the RenderTable
2013-08-18 19:52:53 -05:00
richiesams
08a8ab885b ZVISION: Apply panorama/tilt warping after all images have been rendered to a backbuffer
This makes wrapped warping much easier as well as allowing changeLocation offsets to
work properly
2013-08-15 14:15:48 -05:00
richiesams
c0305d9534 ZVISION: Rename variables and add comments to clarify the math behind panorama warping 2013-08-15 14:15:30 -05:00
richiesams
8d57880c51 ZVISION: Clip coords outside the working window 2013-08-14 11:20:21 -05:00
richiesams
1dcc56f7d2 ZVISION: Slight function name change to increase clarity 2013-08-14 11:20:20 -05:00
richiesams
a3315037ff ZVISION: Create methods for converting screen coords to image coords 2013-08-11 13:44:23 -05:00
richiesams
c828074df9 ZVISION: Remove extraneous comments 2013-08-04 13:33:12 -05:00
richiesams
3fd5a8ab5a ZVISION: Offset the RenderTable index by the normalized coords, not the subRect coords 2013-08-04 13:33:11 -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
2063cb711d ZVISION: Add 'reverse' to _tiltOptions and _panoramaOptions to handle Control options 2013-08-04 13:32:51 -05:00
richiesams
cf9790a9d6 ZVISION: Create mutators for _tiltOptions 2013-08-04 13:32:49 -05:00
Filippos Karapetis
032afd3c1a ZVISION: Fix compilation 2013-08-04 13:32:48 -05:00
richiesams
e076d8e52f ZVISION: Change default panorama FoV to 27 degrees
This is to match Marisa Chan's implementation. Images at this FoV also look better.
2013-08-04 13:32:47 -05:00
richiesams
8f3e27cbd0 ZVISION: Fix closing braces on generateTiltLookupTable 2013-08-04 13:32:46 -05:00
richiesams
0e4e6ee9bf ZVISION: Create methods for altering panoramaOptions and create console commands for them 2013-08-04 13:32:46 -05:00
richiesams
5376aa7b3c ZVISION: Move generating the RenderTable to outside setRenderState
This allows the panorama/tilt options to mutated without having to generate the table multiple times.
2013-08-04 13:32:45 -05:00
richiesams
48b9741f41 ZVISION: Rename Point template class to Vector2
Also remove templating
2013-08-04 13:32:44 -05:00
richiesams
f8bc82080a ZVISION: Create function for mixing two RGB<555> colors 2013-08-04 13:32:43 -05:00
richiesams
4acdf5b7d5 ZVISION: Convert panoramaOptions and tiltOptions to floats 2013-08-04 13:32:43 -05:00
richiesams
a23970bbc6 ZVISION: Convert RenderTable to only storing (x,y) offsets instead of absolute postions.
This allows the destRectangle to be offset within the RenderTable
2013-08-04 13:32:42 -05:00
richiesams
34b3a78898 ZVISION: Fix error causing image discontinutities
The width and height were swapped when passed to the class constructor.
2013-08-04 13:32:41 -05:00
richiesams
3d223e2123 ZVISION: Modify the RenderTable panorama math to account for panoramas being transposed 2013-08-04 13:32:39 -05:00
richiesams
cd51b646f3 ZVISION: Create a class for handling all render table logic
Aka, creating the lookup tables, storing the current render state, and eventually doing
the image mutations.
2013-08-04 13:32:33 -05:00