Mike Welsh
87158647d1
core: Implement keyPress button events
2019-12-24 03:06:03 -08:00
dependabot-preview[bot]
9211c7ac05
build(deps): bump structopt from 0.3.5 to 0.3.6
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.5 to 0.3.6.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.5...v0.3.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-22 22:54:14 +00:00
Nathan Adams
9000451d58
core: Implemented Mouse.show() & Mouse.hide()
2019-12-22 14:33:46 -08:00
Nathan Adams
3fd79a6982
chore: Rename GliumInputBackend -> WinitInputBackend
2019-12-21 19:08:06 -08:00
Nathan Adams
856a2f2910
desktop: Implemented glium based input handler for Key.isDown
2019-12-21 19:08:06 -08:00
Nathan Adams
eedc4bbe24
core: Added Input backend, currently unimplemented, for polling user input
2019-12-21 19:08:06 -08:00
dependabot-preview[bot]
f58827f3de
build(deps): bump cpal from 0.10.0 to 0.11.0
...
Bumps [cpal](https://github.com/rustaudio/cpal ) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/rustaudio/cpal/releases )
- [Changelog](https://github.com/RustAudio/cpal/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rustaudio/cpal/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 18:31:40 +00:00
dependabot-preview[bot]
251fb01572
build(deps): bump jpeg-decoder from 0.1.17 to 0.1.18
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases )
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/image-rs/jpeg-decoder/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 18:21:42 +00:00
dependabot-preview[bot]
7fce29e006
build(deps): bump winit from 0.20.0-alpha4 to 0.20.0-alpha5
...
Bumps [winit](https://github.com/rust-windowing/winit ) from 0.20.0-alpha4 to 0.20.0-alpha5.
- [Release notes](https://github.com/rust-windowing/winit/releases )
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/winit/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-10 07:25:47 +00:00
dependabot-preview[bot]
86c0fa327b
build(deps): bump jpeg-decoder from 0.1.16 to 0.1.17
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.1.16 to 0.1.17.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases )
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/image-rs/jpeg-decoder/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 17:39:42 +00:00
Mike Welsh
1a1cdfa757
desktop: Allow audio creation to fail
...
Switch to NullAudioBackend if CpalAudioBackend fails to initialize.
(This happens on my laptop which doesn't have an audio device!)
2019-11-30 20:08:34 -08:00
Nathan Adams
d1b73582ce
core: Add feature `avm_debug` that toggles tracing avm actions and stack history
2019-11-29 12:59:45 -08:00
dependabot-preview[bot]
112411aa7a
build(deps): bump structopt from 0.3.4 to 0.3.5
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.4 to 0.3.5.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.4...v0.3.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 10:53:04 +00:00
dependabot-preview[bot]
7382d19b63
build(deps): bump image from 0.21.3 to 0.22.3
...
Bumps [image](https://github.com/image-rs/image ) from 0.21.3 to 0.22.3.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.21.3...v0.22.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 17:16:50 +00:00
dependabot-preview[bot]
24009d4f4a
build(deps): bump structopt from 0.2.18 to 0.3.4
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.2.18 to 0.3.4.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.2.18...v0.3.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-20 19:01:18 +00:00
dependabot-preview[bot]
0e8d86a419
build(deps): bump env_logger from 0.6.2 to 0.7.1
...
Bumps [env_logger](https://github.com/sebasmagri/env_logger ) from 0.6.2 to 0.7.1.
- [Release notes](https://github.com/sebasmagri/env_logger/releases )
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sebasmagri/env_logger/compare/v0.6.2...v0.7.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-20 18:49:16 +00:00
Mike Welsh
a205586332
chore: Bump lyon to 0.14.2, fix #77
2019-11-18 15:49:28 -08:00
Mike Welsh
07cc28dc9d
desktop: Resize window to match movie dimensions
2019-11-18 18:33:54 -05:00
Mike Welsh
70a3096dbb
desktop: Use ControlFlow::WaitUntil in winit 0.20
...
Fix frame timing with to prevent busy-waiting with the new control
flow behavior in winit 0.20.
2019-11-18 18:33:54 -05:00
Mike Welsh
6178dd9ef1
desktop: Fix Windows audio initialization due to winit changes
...
The Windows build was erroring immediately when trying to
initialize cpal because of changes in winit 0.20:
https://github.com/RustAudio/cpal/pull/348
Moved the cpal initialization to a separate thread to work around
this issue.
2019-11-18 18:33:54 -05:00
Mike Welsh
09b6c086d6
chore: Squelch unneeded_filed_pattern warning
2019-11-17 17:36:21 -05:00
Mike Welsh
63b5587762
chore: Bump glium to 0.26-alpha5
2019-11-17 17:36:21 -05:00
Mike Welsh
e3d0d9031d
core: Handle empty JPEGTables tags ( fix #116 )
2019-11-11 17:08:08 -05:00
Mike Welsh
97edbc98df
core: Bump winit, glutin, glium versions
2019-11-11 14:06:41 -05:00
Mike Welsh
7d98c87a33
desktop: Implement event sound envelopes
2019-10-30 19:26:19 -07:00
Mike Welsh
e08a735799
desktop: Use SeekSamples to account for MP3 encoder delay
2019-10-29 23:36:51 -07:00
Mike Welsh
1a7959b96d
audio: Initial syncing of stream sound to MovieClip timeline
2019-10-29 23:36:51 -07:00
Mike Welsh
33c0bbd0ce
desktop: Fix incorrect rendering of bitmaps w/ color transforms
...
The premultiplied alpha was not properly considered when there was
a color transform on a bitmap. Now the shader unmultiplies the
alpha before applying the color transform, and the remultiplies it.
2019-10-29 00:03:29 -07:00
Mike Welsh
35be57553e
desktop: Improve animation sync
...
The timing on desktop was causing the movie to run too slow,
causing it to get out of sync. Now it should run at the correct
speed.
2019-10-28 21:05:18 -07:00
Mike Welsh
eaea6aaf20
audio: Fix audio for ADPCM stream sounds
...
When a stream sound uses ADPCM compression, the ADPCM header is
included in each SoundStreamBlock (as opposed to stream sounds
in the other formats). This header wasn't being parsed, resulting
in corrupted audio (see https://homestarrunner.com/main12.swf ).
2019-10-28 02:51:46 -07:00
Nathan Adams
59d39d6572
Added a bulk swf scanning tool
2019-10-11 16:37:15 -07:00
Mike Welsh
4aec120ffb
core: Add Bitmap display object
...
Converts the Bitmap character to a proper display object. This can
be instantiated directly in a PlaceObject tag in SWFv9 movies,
compared to the previous versions which indirectly references
bitmaps from Shape tags.
2019-10-11 16:33:58 -07:00
Mike Welsh
fcfcf0407d
core: Fix stop sound events
2019-09-27 13:50:03 -07:00
Mike Welsh
af163d9183
core: Support start, stop, event sounds in audio backend
...
Event sounds on the timeline in Flash have a "sync" setting,
which allows them to stop other sounds or only play if the
sound is not already playing.
2019-09-27 13:50:03 -07:00
Mike Welsh
6247d5d027
chore: Remove deprecated clippy lint
2019-09-26 12:24:59 -07:00
Mike Welsh
547da84c9c
core: Add stop_all_sounds to audio backend
...
Implemented in web and desktop.
2019-09-19 00:47:05 -07:00
Mike Welsh
e052a70a5a
desktop: Support looping and start/end points for event sounds
...
Renamed `AudioBackend::play_sound` to `start_sound`, and this
also takes a `SoundInfo` parameter with the event sound settings
from the SWF file.
Desktop now obeys the loop and start/end point settings. Envelopes
are still TODO.
2019-09-19 00:47:05 -07:00
Mike Welsh
9c8721c127
core: Drop rodio and use only cpal for audio backend
...
Drop the rodio dependency and directly use cpal for the audio
backend. Use the sample crate for audio mixing and resampling.
2019-09-19 00:47:05 -07:00
Mike Welsh
82c1116c42
chore: cargo fmt
2019-09-16 20:37:11 -07:00
David Wendt
4250015420
Add query support for desktop and resolve some TODOs
2019-09-16 20:04:30 -07:00
David Wendt
f00e938299
Clean up unused functionality in preparation of a PR.
2019-09-16 20:04:30 -07:00
David Wendt
65586cbcf5
Allow SWFs to open websites from the desktop
2019-09-16 20:04:30 -07:00
David Wendt
0f9db1744b
Add a backend for controlling the enclosing web browser.
2019-09-16 20:04:30 -07:00
Mike Welsh
df8177d2e1
destkop: Fix garbage colors in gradients
...
Gradients could render with uninitialzied memory (usually colors
from previous gradients). Now the interpolation value is clamped
in the shader to prevent out-of-bounds access of the gradient
colors array.
This will be cleaned up further when the rendering backend
switches to gfx-rs.
2019-09-10 22:50:23 -07:00
Mike Welsh
37063b4a96
desktop: Clear stencil buffer when overflowing stencil mask
2019-09-09 20:42:08 -05:00
Mike Welsh
8fcee704c0
chore: cargo fmt
2019-09-09 20:42:08 -05:00
Mike Welsh
28f0ce3c83
Mask work
2019-09-09 20:42:08 -05:00
Mike Welsh
35652ae87e
chore: Update dependencies
...
Run cargo update. Remove git dependency on jpeg-decoder (the latest
version was published to crates.io). Update swf-rs to latest to
disable smoothing in SWFv7 and lower (addresses #28 ).
2019-08-29 14:57:12 -07:00
Mike Welsh
f41470129d
desktop: Skip path on tessellation error
...
lyon vomits a lot on various tessellations. Previously this would
bail out immediately for the entire shape, resulting in missing art.
Now we just skip that particular path, and the rest of the shape
should get tessellated as normal.
2019-08-26 18:06:10 -07:00
Mike Welsh
6a5c5ab1df
chore: Add rustfmt.toml and rustfmt pass
2019-08-26 16:38:48 -07:00
Mike Welsh
6499df988f
desktop: Respect bitmap smooth/repeat settings
...
Addresses #28 .
2019-08-24 10:59:34 -05:00
Mike Welsh
324a410cb1
render: Properly render premultiplied alpha bitmaps
2019-08-22 15:24:50 -07:00
Mike Welsh
9cbeacd7b2
core: Transform mouse coordinates from viewport to stage
2019-08-19 22:27:38 -07:00
Mike Welsh
637588fae5
core: Store view matrix in player
...
Player is now in charge of scaling/cropping/translating the content
to fit the viewport size supplied by the frontend.
Added backend::render::Letterbox, which stores the margin sizes
for letter/pillarboxing.
2019-08-19 22:27:38 -07:00
Mike Welsh
0143d9716e
core: Button work
2019-08-19 22:27:38 -07:00
Mike Welsh
9d962fd634
core: Improve button support
2019-08-19 22:27:38 -07:00
Mike Welsh
ce606cece8
core: Re-enable AVM1
2019-08-19 22:27:37 -07:00
Mike Welsh
4666d211a7
core: Add dyn to fix Rust 1.37 warnings
...
Omitting dyn on trait objects now emits a warning, so add missing
dyn where necessary.
2019-08-15 13:54:20 -07:00
Mike Welsh
4c6395bd83
core: Use latest git branch for jpeg-decoder
...
The current version of jpeg-decoder on crates.io (0.1.15) panics
when encountering a valid JPEG marker of length 2. Some SWF files
contained JPEGs with a COM segment of length 2. This is fixed
on the master branch of jpeg-decoder.
2019-08-14 23:19:10 -07:00
Mike Welsh
746b9d8518
core: Support for DefineBitsJPEG3/4
...
TODO: Pull out all JPEG decoding into core, remove jpeg-decoder
dependency from backend crates.
2019-08-12 16:44:49 -07:00
Mike Welsh
a3998b657b
core: Remove invalid JPEG data from DefineBitsJPEG
...
DefineBitsJPEG tags can have some extraneous bytes inside the
stream. Splice these out when decoding the JPEG.
TODO: Docs say this should only happen for SWF versions before 8?
2019-08-12 15:45:40 -07:00
Mike Welsh
23db688e6f
core: Add DefineBitsLossless decoding function
...
Pulled out the code for decoding DefinieBitsLossless tags into
backend::render::define_bits_lossless_to_rgba. Switch to libflate
for zlib decoding.
2019-08-12 15:45:40 -07:00
Mike Welsh
2bfc8767d0
desktop: Add letterbox to viewport
...
Add getters to Player to allow access to the type Renderer.
Letter/pillarboxes added as window resized.
2019-08-11 18:07:02 -07:00
Mike Welsh
af2287a658
desktop: Add letterbox to viewport
...
Add getters to Player to allow access to the type Renderer.
Letter/pillarboxes added as window resized.
2019-08-10 10:18:32 -07:00
Mike Welsh
24fc403e06
core: Make player generic over backend
2019-08-09 22:34:15 -07:00
Mike Welsh
3edc3c3d3e
web: Disable auto-play, add click-to-play
2019-08-09 14:50:20 -07:00
Mike Welsh
e64e306137
Rework audio to allow for streaming decoding
2019-08-08 15:59:32 -07:00
Mike Welsh
725cdae6c5
Begin AVM1 cleanup
2019-08-08 15:58:45 -07:00
Mike Welsh
ce5faefe1f
Work
2019-08-08 15:57:10 -07:00
Mike Welsh
3d81ba5eb6
Update lyon to 0.13.3
2019-07-10 21:04:59 -07:00
Mike Welsh
fd8f58c6c2
Work
2019-07-10 21:04:59 -07:00
Lucas Baizer
1521fb0bc1
Allow gradients with more than 8 colors
2019-06-28 10:14:09 -07:00
Mike Welsh
ba36435711
desktop: Pass pixel coordinates to lyon
...
Lyon seems sensitive to overflow on large coordinates, so passing
twips resulting in overflow panics on very large shapes.
Avoid panics on tessellation failure: instead, return an empty
mesh and log an error.
2019-05-17 18:51:53 -07:00
Mike Welsh
3cefeeba6a
Use twips for internal calculations
...
Switch from pixels to twips for internal calculations. swf crate
was updated to add a Twips wrapper-type. Ruffle will use this type
internally for transforms and shapes. This fixes some precision
errors in rendering (see heroes_of_cybertron.swf) and will match
what the Flash Player does internally more closely. (e.g.
DisplayObject x and y will be quantized to 1/20 pixel units). It
is up to the renderer to convert units from twip space to pixels
when rendering.
2019-05-17 13:40:56 -07:00
Mike Welsh
af33b8538e
desktop: Better event sounds
2019-05-09 17:43:53 -07:00
Mike Welsh
62ae3b0c46
Rename project
2019-05-08 09:46:19 -07:00
Mike Welsh
1a4734896d
Event sounds and text on web
2019-05-05 15:55:27 -07:00
Mike Welsh
e56a16ea82
Fix hole tesselation
2019-05-04 13:58:54 -07:00
Mike Welsh
2480469c2c
First pass of static text
2019-05-04 11:45:11 -07:00
Mike Welsh
1dfedae485
Add some button functionality
2019-05-03 11:44:12 -07:00
Mike Welsh
5b09bc7de1
Add audio backend for desktop
2019-05-03 02:33:58 -07:00
Mike Welsh
884b7c915a
Gradients on desktop
2019-05-02 22:09:25 -07:00
Mike Welsh
6e8082f01b
Reorganized backend structure
2019-05-02 19:56:17 -07:00
Mike Welsh
d6e68dd43e
Add initial AVM1 implementation
2019-05-01 17:46:49 -07:00
Mike Welsh
cdde17f360
Color transforms
2019-04-30 23:05:16 -07:00
Mike Welsh
ded41dffb0
work
2019-04-30 17:46:32 -07:00
Mike Welsh
eb6c23d967
Work
2019-04-30 01:53:21 -07:00
Mike Welsh
ee64cc77bc
Reforactor
2019-04-27 23:08:59 -07:00
Mike Welsh
2609d8c00d
Shapes on glium backend
2019-04-27 20:58:33 -07:00
Mike Welsh
b7ac6dc2ce
Refactor
2019-04-27 18:15:43 -07:00