Commit Graph

5018 Commits

Author SHA1 Message Date
Chris Midgley b6a2738dab core: support magic button labels for avm1 2021-06-13 10:46:24 -07:00
Adrian Wielgosik 7d1bd57066 avm1: Call ContextMenu.onSelect before preparing context menu items 2021-06-13 10:37:38 -07:00
relrelb 9c5b9b7072 avm1: Rewrite TObject array methods 2021-06-13 10:37:15 -07:00
Mike Welsh 3b215d6c76 core: Use swf::ClipEventFlag in stored clip event handlers
* Rename movie_clip::ClipAction to movie_clip::ClipEventHandler.
 * Store the swf::ClipEventFlag event flags that trigger the event
   directly in the event handler. Previously we split up any event
   that had multiple event flags into separate events. Now these
   can be kept as a single event.
 * Remove `MovieClip::has_button_event`, and instead store the
   union of all event flags in `MovieClip::clip_event_flags`. This
   will be useful for other cases in the future.
2021-06-11 12:54:53 -07:00
relrelb ede9650899 chore: Avoid unused_variables annotations
Instead prefix the unused variables with an underscore.
2021-06-11 16:16:53 +03:00
Daniel Jacobs e6bc34cf1c Add favicon to demo page (fix #2910) 2021-06-10 23:57:31 -07:00
Mike Welsh 5462b8a522 core: Allow MorphShapes and Texts to be replaced via PlaceObject
PR #4540 allowed shapes to replace their inner art handles via
replace PlaceObject tags. This can also happen for morph shapes and
static texts.

Add MorphShape::replace_with and Text::repalce_with. This fixes the
incorrect art in main menu buttons of Super Mario 63.
2021-06-09 23:37:38 -07:00
Mike Welsh 5135b14023 tests: Add test for PlaceObject replace 2021-06-08 19:47:16 -07:00
Mike Welsh 4fc9225e8f avm2: Only construct Shapes once
Shape objects were mistakenly being reconstructed each frame in
`Graphic::construct_frame`.
2021-06-08 19:47:16 -07:00
Mike Welsh b1318ecb01 core: PlaceObjectAction::Replace swaps out graphic handles
A `PlaceObjectAction::Replace` signals that a shape should
be swapped with a different shape. Previously we instantiated a
completely new `Graphic`, but this is incorrect; instead the
underlying shape handle should be swapped out, but the outer object
remains. This is visible in AVM2 where you can access `Shape` as
a normal display object.
2021-06-08 19:47:16 -07:00
Mike Welsh 5acc476789 tests: Add test for DefineFunction case sensitivity 2021-06-08 16:51:59 -07:00
Mike Welsh 93e83d7ad5 avm1: DefineFunction should respect case sensitivity 2021-06-08 16:51:59 -07:00
Mike Welsh 21c351fe5b swf: Change Twips::zero fn to Twips::ZERO const 2021-06-08 14:57:15 -07:00
Mike Welsh d23ea90459 swf: Change Matrix to use Fixed16 for a, b, c, d
Matrices in an SWF file store their scale/skew components in
in 16.16 format (fbits).

Split `ruffle_core::Matrix` and `swf::Matrix`. `swf::Matrix` now
stores its data as `Fixed16` instead of immediately converting to
`f32`.
2021-06-08 14:57:15 -07:00
relrelb 39decde5bc avm1: Refactor ScriptObject::get_local 2021-06-08 10:48:50 -07:00
relrelb 1c0007f34f avm1: Make TObject::get_local return Option 2021-06-08 10:48:50 -07:00
relrelb 15fa92a9fb avm1: Add TObject::set_local 2021-06-08 10:48:50 -07:00
relrelb c9d015d7c5 avm1: Cleanup some TObject methods 2021-06-08 10:48:50 -07:00
dependabot[bot] 2f1dc0cbb1 chore: Bump approx from 0.4.0 to 0.5.0
Bumps [approx](https://github.com/brendanzab/approx) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/brendanzab/approx/releases)
- [Commits](https://github.com/brendanzab/approx/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: approx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 11:30:59 -07:00
Chris Midgley 9f8885cf71 docs: correct tested node versions 2021-06-07 11:30:34 -07:00
Daniel Jacobs b52b2a64da
web: Fix wasm compile error check 2021-06-07 11:30:17 -07:00
relrelb b8eae51888 swf: Move num_colors into BitmapFormat::ColorMap8 2021-06-07 11:29:28 -07:00
relrelb 53cc9f38fc swf: Use casting instead of ToPrimitive 2021-06-07 11:29:28 -07:00
relrelb de6e2a04a4 swf: Number enum VideoCodec 2021-06-07 11:29:28 -07:00
relrelb 50a4643253 swf: Number enum VideoDeblocking 2021-06-07 11:29:28 -07:00
relrelb 636775f1e2 swf: Number enum TextGridFit 2021-06-07 11:29:28 -07:00
relrelb a45fdba4d1 swf: Number enum FontThickness 2021-06-07 11:29:28 -07:00
relrelb 88b6632188 swf: Number enum TextAlign 2021-06-07 11:29:28 -07:00
relrelb 781e3ff0cd swf: Number enum AudioCompression 2021-06-07 11:29:28 -07:00
relrelb ee14945974 swf: Number enum LineCapStyle 2021-06-07 11:29:28 -07:00
relrelb f6d04061b0 swf: Number enum GradientSpread 2021-06-07 11:29:28 -07:00
relrelb fed4facd8a swf: Number enum SoundEvent 2021-06-07 11:29:28 -07:00
relrelb 0d279a05c2 swf: Number enum BlendMode 2021-06-07 11:29:28 -07:00
relrelb 72113dbcf2 swf: Number enum Language 2021-06-07 11:29:28 -07:00
relrelb ef2e581f09 core: Use casting instead of ToPrimitive 2021-06-07 11:29:28 -07:00
relrelb ec36b4f5ab web: Ignore package-lock.json in packages 2021-06-07 11:27:30 -07:00
relrelb dbeeb42098 web: Remove package-lock.json in core 2021-06-07 11:27:30 -07:00
relrelb aee37276ec core: Replace num_enum with num_derive 2021-06-05 10:19:31 -07:00
relrelb f82faf9603 chore: Appease clippy 2021-06-05 10:16:00 -07:00
Daniel Jacobs bd2db4cca3
web: Add better error information about wasm CompileErrors 2021-06-05 10:15:34 -07:00
Chris Midgley cb601255d9 web: improve typescript types 2021-06-05 10:12:59 -07:00
dependabot[bot] 4ec31dc073 chore: Bump @wdio/mocha-framework from 7.5.3 to 7.7.2 in /web
Bumps [@wdio/mocha-framework](https://github.com/webdriverio/webdriverio) from 7.5.3 to 7.7.2.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.5.3...v7.7.2)

---
updated-dependencies:
- dependency-name: "@wdio/mocha-framework"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-02 23:28:45 -07:00
Adam Gashlin 79aabb3aa7 tests: Test attachMovie scaling 2021-06-02 23:28:24 -07:00
Adam Gashlin ba83f17ef7 core: Set init_object after first run_frame (fix #2084, #3414) 2021-06-02 23:28:24 -07:00
dependabot[bot] 6d645ab94b chore: Bump @wdio/local-runner from 7.5.4 to 7.7.0 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 7.5.4 to 7.7.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.5.4...v7.7.0)

---
updated-dependencies:
- dependency-name: "@wdio/local-runner"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 11:28:01 -07:00
dependabot[bot] f16eb3cae6 chore: Bump eslint from 7.25.0 to 7.27.0 in /web
Bumps [eslint](https://github.com/eslint/eslint) from 7.25.0 to 7.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.25.0...v7.27.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 11:27:51 -07:00
dependabot[bot] 821d68ca9d chore: Bump @wdio/static-server-service from 7.5.3 to 7.6.0 in /web
Bumps [@wdio/static-server-service](https://github.com/webdriverio/webdriverio) from 7.5.3 to 7.6.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.5.3...v7.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 09:13:40 -07:00
dependabot[bot] 6061e5c6cf chore: Bump eslint-plugin-jsdoc from 33.3.0 to 35.1.2 in /web
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 33.3.0 to 35.1.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v33.3.0...v35.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 09:13:24 -07:00
dependabot[bot] ac06d85c31 chore: Bump @typescript-eslint/eslint-plugin in /web
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.0 to 4.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 09:13:06 -07:00
dependabot[bot] 783dc59a97 chore: Bump copy-webpack-plugin from 8.1.1 to 9.0.0 in /web
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 8.1.1 to 9.0.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v8.1.1...v9.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 09:12:56 -07:00