Skip to content

Make AVM1 and AVM2 optional features #6750

@Herschel

Description

@Herschel

It would be nice if AVM1 and AVM2 were optional features/subcrates that could be disabled. This would give us better code organization and allow for omitting the VMs when not needed. For example, a Flash game released on Steam would only need one of the AVMs. The AVMs could also potentially run on their own, useful for testing. It may also be helpful when implementing AVM1Movie loading in AVM2.

Necessary TODOs:

  • Improve workspace organization so that AVM1/AVM2 code is untangled from the core player code.
    • Probably involves lifting more lower level types into a types crate or similar.
    • AVM1 in particular might be difficult because it is tied much more closely to the Flash display list.
  • Better discipline in instantiating only the necessary data for the given VM.
    • Currently the player sloppily instantiates both a bunch of AVM1 and AVM2 stuff, even though only one VM is active at any time (excluding Loader).

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-cleanupGeneral improvement of the code base

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions