Commit Graph
6866 Commits
Author SHA1 Message Date
Vincent Pelletier 5ab94de318 TINYGL: Avoid unneeded calls in writePixel. 2017-04-26 13:11:00 +00:00
Vincent Pelletier f8ef0b2261 GRIM: Draw to buffer before storing display
Fixes save game screenshots with TinyGL: without this, the screenshot
content is the menu at the time user confirmed the save, and not the
original scene.
This is consistent with OpenGL behaviour, where framebuffer-reading
operations implicitly call glFlush.
2017-04-25 11:31:49 +00:00
Vincent Pelletier fc37fabf0d TINYGL: Fix assertion failure during EMI intro video.
This is a regression introduced by
commit 6a63f544f0
    TINYGL: Avoid duplicating gl_transform_to_viewport.
2017-04-25 00:58:24 +00:00
Vincent Pelletier 2a1ab0a622 TINYGL: Do not queue invisible draw calls.
When dirty rectangles are enabled, we know at this point whether a draw
operation will have any effect on screen. Do not queue it if it will not.
2017-04-23 12:30:00 +00:00
Vincent Pelletier bf319b5437 TINYGL: Cache and clip dirty rect on all DrawCall subclasses.
getDirtyRegion will be called twice on each DrawCall instance, so make
repeated work as short as possible.
2017-04-23 12:30:00 +00:00
Vincent Pelletier 6a63f544f0 TINYGL: Avoid duplicating gl_transform_to_viewport.
Replace local implementation by always setting GLVertex zp property.
Replace pointInsideVolume by clip_code, allowing to properly handle
polygons whose vertices are all off-screen but still have a part visible.
Also, replace 2-pixels offset with a more accurate bounding box
computation.
2017-04-23 12:30:00 +00:00
Vincent Pelletier 50c5aef6e5 Revert "TINYGL: Reuse renderRect instead of accessing fb size."
This reverts commit ec418a9769.
2017-04-23 12:25:58 +00:00
Vincent Pelletier ec418a9769 TINYGL: Reuse renderRect instead of accessing fb size. 2017-04-23 12:03:52 +00:00
Vincent Pelletier 064bd1d47b fixup! TINYGL: ClearBufferDrawCall should obey its parameters.
Fixes an undeclared property error.
2017-04-23 11:54:53 +00:00
Vincent Pelletier 6087492dbd TINYGL: Simplify setting & disabling scissors. 2017-04-23 10:35:04 +00:00
Vincent Pelletier e1de3407f1 TINYGL: Make scissors follow Common::Rect semantics.
As per Common::Rect data model, right and bottom border are excluded, so:
- Make FrameBuffer::scissorPixel reject bottom & right borders.
- Update bounding rectangle definition for dirty rectangle operations
  ClearBufferDrawCall::getDirtyRegion is already correct.
- zblit was almost following, except for an off-by-one mistake.
2017-04-23 10:35:04 +00:00
Vincent Pelletier 3acde7d900 TINYGL: static-ify zdirtyrect.cpp 2017-04-23 10:35:04 +00:00
Vincent Pelletier 2fb2d87dc9 TINYGL: Skip drawing when there is no dirty rectangle 2017-04-23 10:35:04 +00:00
Vincent Pelletier 72389d23df TINYGL: Simplify _drawCallAllocator switch & reset. 2017-04-23 10:35:04 +00:00
Vincent Pelletier 580578fa20 TINYGL: Containment is just a special case of intersection. 2017-04-23 10:35:04 +00:00
Vincent Pelletier 3f4a22354e TINYGL: Remove redundant condition.
Empty call queue condition is tested in contained "for" loop already.
2017-04-23 10:35:04 +00:00
Vincent Pelletier 5cbdabb69d TINYGL: Continue comparing past first divergence
It is common that the same number of calls are done in the same order, so
do not stop comparing after the first divergence. This saves a significant
number of dirty rectangle in crowded scenes, like sets cn and bi where a few
calls may differ in the middle of call sequence, but later calls would stay
the same.
As a consequence, move current-frame-has-fewer-calls handling to its own
loop.
Also, factorise and extend code appending dirty rectangles.
Also, skip conseutive identical rectangles.
2017-04-23 10:35:04 +00:00
Vincent Pelletier ce97ff4e8f TINYGL: ClearBufferDrawCall should obey its parameters.
Given dirty rectangle may cover more buffer area than what it was told to
clear.
2017-04-23 10:35:04 +00:00
Vincent Pelletier cc42d5cb24 TINYGL: Fix scissor testing in ztriangle.
When dirty rectangles are enabled, fixes drawing outside (below) set scissor
rectangle.
y and pp1 must stay consistent for scissor testing to be relevant. y is
already incremented along with pp1, and pp1 does not get re-assigned on
part == 2, so do not set y either.
2017-04-23 10:35:04 +00:00
Vincent Pelletier a3a6218060 GRIM: Avoid writing to buffer directly. 2017-04-23 01:44:51 +00:00
Vincent Pelletier c29ce01ff5 Merge pull request #1334 from vpelletier/tinygl_drawarrays
TINYGL: Implement tglDrawArrays.
2017-04-23 01:44:29 +00:00
Vincent Pelletier 500803fc38 TINYGL: Implement tglDrawArrays. 2017-04-22 16:42:14 +00:00
Vincent Pelletier 0b823ac2e9 TINYGL: Expose array functions outside of TinyGL namespace.
And prefix them with "tgl" instead of "gl", as in header.
2017-04-22 16:42:14 +00:00
Bastien Bouclet f11e25f129 MYST3: Don't crash when myst3.dat is not found
Fixes #1333.
2017-04-20 17:38:56 +02:00
Dries Harnie d834d8c02f Merge pull request #1331 from vpelletier/android_backport_openUrl
ANDROID: Apply a few missed backports
2017-04-20 07:43:49 +02:00
Vincent Pelletier f8c3dc085c ANDROID: Apply a few missed backports
These make ResidualVM crash on application initialisation.
2017-04-19 11:00:15 +00:00
Bastien Bouclet 192b85af32 MYST3: Use a full 3D intersection test for hotspots
Cube hotspots are now fully accurate when compared to the original engine.
Fixes #1329.
2017-04-17 08:52:36 +02:00
Bastien Bouclet c421e8305c MYST3: Add a script patch for the water effects in room LEOF
Fixes #1330.
2017-04-15 06:56:42 +02:00
Bastien Bouclet 2632f11c8a MYST3: Minor cleanup 2017-04-14 06:20:52 +02:00
Bastien Bouclet 62fb8d2875 MYST3: Fix incorrect logic in the ifOneVarSetInRange opcode
The test was never true due to in incorrect precondition check

Fixes #1328.
2017-04-10 19:13:44 +02:00
Bastien Bouclet 1d4c9b7d36 MYST3: Add missing peg sound effect in the pinball puzzle
Fixes #1328.
2017-04-10 19:11:00 +02:00
Bastien Bouclet ce9637dee2 Merge pull request #1326 from firesock/stark-opfade
STARK: Implement opFadeScene
2017-04-08 17:17:16 +02:00
Awad Mackie 54cdb8053a STARK: Implement opFadeScene 2017-04-08 14:30:13 +01:00
Bastien Bouclet 35b371daf2 Merge pull request #1327 from criezy/macosx-icon
BUILD: Add back icon for MacOS X bundle
2017-04-03 18:57:48 +02:00
Thierry Crozat e987550d03 BUILD: Add back icon in MacOS X Info.plist file
This was removed, I assume by mistake, in commit 9ba9c69b that sync'ed
the code with ScummVM.
2017-04-02 18:54:18 +01:00
Bastien Bouclet c7e75552ef STARK: Implement the fast forward mode
Used to skip animations. Does not behave exactly as the original due to
frame timing being incorrect in ResidualVM.

Fixes #1324.
2017-03-25 18:31:12 +01:00
Bastien Bouclet 76b7bdc2fc STARK: Implement opSoundChange, sound volume and pan fading 2017-03-21 21:22:51 +01:00
Bastien Bouclet 5d27096e53 STARK: Fix the last frame of Smacker animations not being displayed
As a side effect, fix a lot of graphic glitches where script execution
would resume too late, resulting in inconsistent graphics being drawn for one
frame.
2017-03-19 10:06:52 +01:00
Bastien Bouclet 6d6822666e STARK: Don't crash when decompiling a script referencing an unloaded location 2017-03-19 09:16:26 +01:00
Bastien Bouclet ca32ebef74 STARK: Further simplify actor models in-memory representation 2017-03-19 08:30:25 +01:00
Bastien Bouclet 6ef37506d6 MYST3: Fix the md5 for the Spanish v1.2 version 2017-02-17 05:27:03 +01:00
Bastien Bouclet 5770534c74 MYST3: Add detection for v1.2 German and Italian
Thanks to goodoldgeorge. See #1323.
2017-02-16 13:18:37 +01:00
Bastien Bouclet 4591d0c2c4 MYST3: Add detection for v1.2 German and Italian
Thanks to andrews05. Fixes #1323.
2017-02-15 20:14:04 +01:00
Bastien Bouclet 61edb671cb STARK: Load actor model into a format that's easier to render
As a result less OpenGL bindings need to be changed when rendering.
2017-01-29 10:44:09 +01:00
Bastien Bouclet c58b58685f STARK: Plug a memory leak 2017-01-29 10:41:34 +01:00
Bastien Bouclet b347af84e9 GUI: Restore lost ResidualVM specific code
Fixes saving the GFX renderer in the options dialog.
The code was lost during the last sync with ScummVM.
2017-01-24 20:01:41 +01:00
Bastien Bouclet bc84594bec STARK: Fix misformatted include 2017-01-02 19:50:32 +01:00
Bastien Bouclet 74704d522a STARK: Implement lipsync 2017-01-02 19:48:24 +01:00
Bastien Bouclet 36145d304d COMMON: Improve the accuracy of the VSync feature comment 2016-12-04 14:20:23 +01:00
Bastien Bouclet 026e96cbf2 Merge pull request #1316 from bgK/vsync
Allow to control V-Sync
2016-12-04 09:18:52 +01:00