Commit Graph

9409 Commits

Author SHA1 Message Date
Nathan Adams f6d0fcf822 desktop: Don't allow resizing of about and open-url dialogs 2023-05-24 23:50:48 +02:00
Nathan Adams e97d32dbc7 desktop: Recreate Player for each movie, and don't start with a Player unless a movie has been specified 2023-05-24 23:50:48 +02:00
Nathan Adams df51531de6 desktop: Move Player creation into PlayerController::new 2023-05-24 23:50:48 +02:00
Nathan Adams 6257c1218f desktop: Make PlayerController.get() return an Option, and handle that 2023-05-24 23:50:48 +02:00
Nathan Adams 2de0b5e7e0 desktop: Wrap Player in a new PlayerController 2023-05-24 23:50:48 +02:00
Nathan Adams 419330ecd5 desktop: Import utils nicer in app.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 73b8f80f57 desktop: Move parse_url and pick_file to util.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 34b1c671a8 desktop: Move --timedemo stuff to time_demo.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 91db9b1f55 desktop: Moved winit_to_ruffle_text_control, winit_to_ruffle_key_code, winit_key_to_char and get_screen_size to util.rs 2023-05-24 23:50:48 +02:00
Nathan Adams d69ffd3a46 desktop: Moved App struct to app.rs 2023-05-24 23:50:48 +02:00
Nathan Adams ff5377a8a9 desktop: Moved trace_path and parameters to Opt 2023-05-24 23:50:48 +02:00
Nathan Adams f54685d656 desktop: Move Opt into cli.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 998302aa77 desktop: Made movie optional when rendering 2023-05-24 23:50:48 +02:00
Nathan Adams a3d3230baf desktop: Turn MovieView into a custom render target 2023-05-24 23:50:48 +02:00
Nathan Adams 67fed1159c desktop: Refactor gui controller into its own file 2023-05-24 23:50:48 +02:00
Nathan Adams 9e17acdb2a desktop: Refactor movie blitting into its own file 2023-05-24 23:50:48 +02:00
Nathan Adams b9322ba93a desktop: Render game separately to UI, blit both onto surface 2023-05-24 23:50:48 +02:00
Mike Welsh 5bf43f9025 desktop: Add Open URL option 2023-05-24 23:50:48 +02:00
Mike Welsh e5a874065e desktop: Switch to loaded state immediately when no SWF running 2023-05-24 23:50:48 +02:00
Mike Welsh cac83320e4 desktop: Check if egui requests a redraw 2023-05-24 23:50:48 +02:00
Mike Welsh 83c3970003 desktop: Add About screen 2023-05-24 23:50:48 +02:00
Mike Welsh 3e150360a2 desktop: Don't show file dialog on startup 2023-05-24 23:50:48 +02:00
Mike Welsh 5efcb90293 desktop: Show menubar by holding Esc 2023-05-24 23:50:48 +02:00
Mike Welsh cb8b8d264c desktop: Implement Open menu option 2023-05-24 23:50:48 +02:00
Mike Welsh 3f878cc869 desktop: Take ownership of `EventLoop` on `App::run`
Change `App::event_loop` to an `Option` that will be taken on
`App::run` so that `App::run` can continue to call methods on
`self` later.

This is a little awkward, and better might be to remove `App::new`
and make `App:run` return `Result<!, Error>,` but `!` types are
experimental.
2023-05-24 23:50:48 +02:00
Mike Welsh c00b4bf55c desktop: Initial GUI work 2023-05-24 23:50:48 +02:00
Mike Welsh ef1125f456 desktop: Add egui crates 2023-05-24 23:50:48 +02:00
Adrian Wielgosik a1797a351d avm2: Avoid a function call on every push() 2023-05-24 23:33:09 +02:00
Aaron Hill 9a1a21ef3a avm2: Implement Stage3D.visible 2023-05-24 14:20:40 -05:00
Aaron Hill da8d5bce3c naga-agal: Fix bugs and add tests for new ops 2023-05-24 13:34:15 -05:00
Mike Welsh 3257cc44cf naga-agal: Implement m33 and m34 ops 2023-05-24 13:34:15 -05:00
Mike Welsh 35ef04eadc naga-agal: Implement kil op 2023-05-24 13:34:15 -05:00
Mike Welsh f97bb9c2f1 naga-agal: Implement log, exp, pow, ddx, ddy, min, rsq, sge ops 2023-05-24 13:34:15 -05:00
MartySVK 3be933d7c2
avm2: Stub ContextMenu.builtInItems setter (#11187) 2023-05-24 01:50:03 +00:00
iwannabethedev 1e0714aaa1 core: Fix serialization of arrays with dynamic properties. 2023-05-23 19:46:24 -05:00
iwannabethedev 83520d0daf avm2: Minor refactoring of duplicated code. 2023-05-24 02:30:52 +02:00
Aaron Hill 358beabf5a avm2: Add Matrix3D.[recompose,decompose,copyColumnTo,invert,determinant]
The Flash Player 'Matrix3D.recompose' method throws exceptions under
certain circumstances with the "quaternion" orientation style.
I haven't yet figured this out yet, so I've marked that case as a stub.

All of the implementations are based on the OpenFL code, with some
tweaks to match Flash Player's behavior.
2023-05-23 18:51:46 -05:00
Aaron Hill c53a903d35 avm2: Suppress events for selectable was_static TextFields
TextFields have a very unusual behavior - if they are selectable
and have `was_static`, they *block* the dispatch of mouse events when
they're targeted (not even the Stage will receive the event).
This only occurs when the TextField is actually targeted
(which requires mouseEnabled=true). With mouseEnabled=false,
the event will be dispatched with an ancestor as the target,
following the usual logic.

Also, TextFields now properly propagate mouse picks to
their parent if mouseEnabled=false. Previously, setting
mouseEnabled=false for a TextField made all mouse picks
cause a miss on it. This was the cause of the Turbo Kids
regression.

Fixes #10245
2023-05-23 17:57:06 -05:00
Aaron Hill cc567c4e40 agal: Correctly check vertex_input_expressions cache
We need to use the same logic that we use for `get_varying_pointer`,
since the AGAL shader can access vertex inputs in any order.
2023-05-23 17:20:29 -05:00
Crowdin Bot fe4475d553 chore: Update translations from Crowdin 2023-05-23 00:05:58 +02:00
Nathan Adams afa78ebdfe avm1: Correctly send onUnload events for movies unloaded with GetURL2 - fixes #2422 2023-05-22 23:41:41 +02:00
Aaron Hill ace87861ce avm2: Make ByteArray.readMultiByte cut string off at null byte
We already had this behavior in `readUTF` and `readUTFBytes`,
but we need it in `readMultiByte` as well.
2023-05-22 16:01:50 -05:00
nosamu 91330d4a9f desktop: Fire both KeyDown and TextControl events
Fixup for #11059, which broke left/right arrows on desktop
2023-05-22 21:24:35 +02:00
Aaron Hill b94f9f3043 avm2: Coerce function return value to declared return type
This can actually affect runtime behavior - if the return type is
declared as 'int', then an instance of a custom class will get
coerced to 0 when returned by the function.
'Plants vs Zombies Demo' relies on this - it has a function which
incorrectly returns an object instead of an array index, but the
value gets silently coerced to 0 under Flash Player.
2023-05-22 13:47:32 -05:00
renovate[bot] 5d2477fe98 chore(deps): lock file maintenance rust dependencies 2023-05-22 19:12:08 +03:00
iwannabethedev 18ea71959b tests: Add test for XML/XMLList hasSimpleContent/hasComplexContent 2023-05-22 06:17:37 -05:00
nosamu bb15c90d82 avm2: Implement XML.hasSimpleContent and hasComplexContent 2023-05-22 06:17:37 -05:00
Crowdin Bot fde4c99560 chore: Update translations from Crowdin 2023-05-22 08:51:22 +03:00
renovate[bot] b8c56a1b89 chore(deps): lock file maintenance 2023-05-22 08:12:12 +03:00
Aaron Hill 6ac4e5256d avm2: Check parent domain in export_class
The `export_class` function mirrors `export_definition`, and needs
to avoid exporting something already defined in a parent domain.
2023-05-21 17:37:54 -05:00