96 Commits

Author SHA1 Message Date
Eugene Sandulenko
1f21583e12
DIRECTOR: Properly process kTransNone 2022-12-02 00:32:25 +01:00
Roland van Laar
2d58f23c39 DIRECTOR: use variables instead of repeated gets
Refactor repeated getCurrentMovie en getScores calls to one per
function.
2022-10-07 13:17:41 +02:00
Scott Percival
54ff429191 DIRECTOR: Improve playback speed for all dissolve transitions 2022-09-12 15:52:18 +02:00
Scott Percival
f1db87e6d4 DIRECTOR: Improve dissolvePatternsTrans playback speed 2022-09-12 15:52:18 +02:00
Scott Percival
7de1d320a0 DIRECTOR: Add more palette transition modes 2022-09-12 15:52:18 +02:00
Scott Percival
7d4a89367e DIRECTOR: Improve transitions layer
- Transitions now appear in the debug log, including parameters and
  timing.
- Most transitions would calculate a fixed number of steps, then work
  backwards to figure out the framerate required to fit the duration.
  This approach didn't work for shorter durations, as the delay required
  for the number of steps would drag out the duration. This has been
  fixed by introducing a floor to the number of steps, so that the
  framerate is no higher than 60fps.
- Multi-pass transitions were previously calling stepTransition() on
  every blit; this would effectively redraw the entire screen ~96 times
  a step and blow out the draw time to ~44 seconds. stepTransition() is
  now called once per step.
- Blind transitions now cover the full range.
- kTransDissolveBoxySquares and kTransDissolveBoxyRects were swapped.
- kTransDissolveBoxyRects now adjusts for the viewport aspect ratio.
2022-09-12 15:52:18 +02:00
Scott Percival
671d3116ea DIRECTOR: Add palette shifting code for transitions
Fixes transitions in Lost Mind of Dr. Brain demo.
2022-09-12 15:52:18 +02:00
Scott Percival
0709bac3ab DIRECTOR: Incorporate frame delay for transitions
Subtract the time already taken to blit the frame from the delay value.
Improves playback timing on most transitions.
2022-07-23 23:49:35 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
ysj1173886760
be5134d7ca DIRECTOR: fix FPE in initTransParams 2021-08-09 20:35:45 +08:00
djsrv
88f77b53c1 DIRECTOR: Modify _vm->processEvents to handle transition events
processTransitionEvent skipped passing events to the window manager
and sent them directly to the current window, which is no good since the
event may need to go to another window. It also broke stopping
transitions on click.
2021-08-02 10:12:15 -04:00
ysj1173886760
ba990c2653 DIRECTOR: processEvent while playing transition 2021-08-02 19:34:47 +08:00
ysj1173886760
1b6f29b63a DIRECTOR: clean the surface after playing transitions 2021-07-08 02:25:11 +02:00
Roland van Laar
b7c903569c DIRECTOR: speed up transitions for debugFast
The number of steps a transition has is calculated based on the
chunksize. A larger chunksize means quicker execution with a downside
of not having pixel perfect frames.
Ensures that the chunksize is never more than sprite width and height to
avoid floating point division errors.

This is only enabled when the debugflag is used.
2021-06-22 22:41:06 +02:00
Eugene Sandulenko
e604c97607 GRAPHICS: MACGUI: Made MacDrawPixel bpp-aware 2020-08-15 16:09:20 +02:00
Eugene Sandulenko
e5e82d4cf6 DIRECTOR: Copy over PixelFormat from the WM for simpler access 2020-08-14 10:47:33 +02:00
Eugene Sandulenko
88c46aefe3 DIRECTOR: Initial code for 32bpp rendering 2020-08-14 01:10:56 +02:00
Nathanael Gentry
2a90acd0eb DIRECTOR: Offload transition handling to WM 2020-08-10 11:17:16 -04:00
Nathanael Gentry
6a69c3a81f DIRECTOR: Draw windowed transitions in right area 2020-08-10 11:15:34 -04:00
djsrv
9c537a8744 DIRECTOR: Rename Stage to more general Window
The stage and windows are the same type of thing, but the stage only
refers to one particular window.
2020-08-04 23:54:09 -04:00
Nathanael Gentry
a7426c2872 GRAPHICS: MACGUI: Eliminate window composition surface
Now there is just the composeSurface from the widget. This fixes a bug where the
inner window contents would be blitted with transparency and also eliminates a
redundant copying. Now the border and inner surfaces are composed together on demand.
2020-07-21 14:48:27 -04:00
Nathanael Gentry
b5114fc87f DIRECTOR: Fix surface memory leak in transitions 2020-07-13 13:29:54 -04:00
Nathanael Gentry
5fadd94bea DIRECTOR: Properly clip transition rectangle 2020-07-06 23:40:09 -04:00
djsrv
d8725510b6 GRAPHICS: MACGUI: Don't draw border over contents 2020-07-06 13:12:55 -04:00
Nathanael Gentry
533bab342b DIRECTOR: Fix dissolve transition calculation
Without this, rnd is never 0 and so the transition is never drawn around
point (0, 0).
2020-07-03 09:41:01 -04:00
Nathanael Gentry
4caea51387 DIRECTOR: Always finish drawing transition on quit event
This prevents an incomplete transition from messing up the display when, for
instance, you click to skip to the end of a transition.
2020-07-03 00:50:13 -04:00
Nathanael Gentry
8c68e8c73a DIRECTOR: Implement changed area transitions
No new transitions should be broken, but transitions that were broken
before (#9, 10, c. 30-36, 47-48) have not been fixed. All transitions (even
broken ones) should render only in the changed area, however.
2020-07-02 23:47:02 -04:00
Eugene Sandulenko
5186f7194b DIRECTOR: Reduce header dependency 2020-07-01 17:49:48 +02:00
Eugene Sandulenko
1aa1fe2802 DIRECTOR: Furhter decrease of header dependency 2020-07-01 17:49:48 +02:00
djsrv
5ae6c34074 DIRECTOR: Separate Movie and Cast from Score 2020-07-01 10:50:31 -04:00
Nathanael Gentry
d04934a54f DIRECTOR: Move rendering to a Stage class
This commit introduces several changes to the rendering pipeline.

 - Rather than having a window for each score that is played, there is a Stage
   in g_director that is only cleared when the upcoming stage has a different
   size. This permits transitions still clean transitions between movies.

 - Rather than relying upon general surface blitting functions, there is
   progress toward a custom blitter than makes working with inks much easier. A
	 pixelwise function, inkDrawPixel, has been introduced.

 - The mask-based approach to incremental rendering has been abandoned, as it
   caused performance issues and strange rendering bugs. Now the renderer
	 operates on a traditional list of dirty rects that must be redrawn.

 - QuickDraw shapes are more closely integrated with the renderer, and they do
    not require a temporary surface to draw.
2020-06-30 12:38:46 -04:00
Nathanael Gentry
4aaed579e1 DIRECTOR: Fix segfault in tests
I made the same omission last time I worked on the transitions...
2020-06-26 00:23:05 -04:00
Nathanael Gentry
f82c3bfa32 DIRECTOR: Remove score backSurfaces
These are replaced with more descriptive temporary surfaces that are only active
when a transition is being rendered.

Currently, transitions between movies are temporarily disabled as well. This
will be fixed soon, once there is a window for the stage that exists
independently of the score.
2020-06-26 00:18:22 -04:00
Nathanael Gentry
ba1650ac45 DIRECTOR: Don't crash on null surfaces 2020-06-24 12:49:00 -04:00
djsrv
759c53c868 DIRECTOR: LINGO: Call perFrameHook with arguments 2020-06-06 18:34:06 +02:00
Nathanael Gentry
57b69cf2c0 DIRECTOR: Move transitions to the score 2020-06-01 21:36:09 +02:00
Eugene Sandulenko
3f0dd38dbe DIRECTOR: Speed up transitions when fast mode is requested 2020-05-20 13:16:05 +02:00
Eugene Sandulenko
50b9d9a64c DIRECTOR: Fix another MSVC warning 2020-05-10 13:38:20 +02:00
Eugene Sandulenko
627c901f8f DIRECTOR: Fix MSVC warnings 2020-05-10 13:38:20 +02:00
Eugene Sandulenko
37f2275f62 GRAPHICS: MACGUI: Draw over optional mask in macDrawPixel() 2020-04-23 22:06:20 +02:00
Eugene Sandulenko
8f44cb6acf DIRECTOR: Fix code analysis issues. Some are embarrassing. 2020-04-06 21:09:13 +02:00
Eugene Sandulenko
9d98fa0f13 DIRECTOR: Fix warning 2020-04-02 14:14:12 +02:00
Eugene Sandulenko
358b4f1789 DIRECTOR: Fix warnings 2020-04-02 14:13:27 +02:00
Eugene Sandulenko
3975bca256 DIRECTOR: Added stub for changed area transitions 2020-04-02 13:58:04 +02:00
Eugene Sandulenko
bb62c305c3 DIRECTOR: Cleanup of transitions code 2020-04-02 13:58:04 +02:00
Eugene Sandulenko
5419f5a26a DIRECTOR: Clean up TransitionType enum 2020-04-01 22:29:40 +02:00
Eugene Sandulenko
f8127a731a DIRECTOR: Implement blind transitions, that completes the transitions code, yay! 2020-04-01 22:29:40 +02:00
Eugene Sandulenko
8da6b6b227 DIRECTOR: Implement kTransAlgoZoom transitions 2020-04-01 22:29:40 +02:00
Eugene Sandulenko
d91793e87e DIRECTOR: Implement kTransTypeCheckerboard transition 2020-04-01 20:40:52 +02:00
Eugene Sandulenko
f4d464dd2b DIRECTOR: Implemented strips transitions 2020-04-01 18:27:19 +02:00