diff --git a/core/macros/src/lib.rs b/core/macros/src/lib.rs index e25ef24e3..67f9802f8 100644 --- a/core/macros/src/lib.rs +++ b/core/macros/src/lib.rs @@ -7,7 +7,8 @@ use syn::{ TraitItem, Visibility, }; -/// `enum_trait_object` will define an enum whose variants each implement a trait. +/// Define an enum whose variants each implement a trait. +/// /// It can be used as faux-dynamic dispatch. This is used as an alternative to a /// trait object, which doesn't get along with GC'd types. /// diff --git a/core/src/backend/audio/decoders.rs b/core/src/backend/audio/decoders.rs index 32d1ff5eb..bef947620 100644 --- a/core/src/backend/audio/decoders.rs +++ b/core/src/backend/audio/decoders.rs @@ -97,6 +97,8 @@ impl Decoder for Box { } } +/// Audio stream decoder. +/// /// A "stream" sound is a sound that has its data distributed across `SoundStreamBlock` tags, /// one per each frame of a MovieClip. The sound is synced to the MovieClip's timeline, and will /// stop/seek as the MovieClip stops/seeks. @@ -144,6 +146,8 @@ impl Iterator for StandardStreamDecoder { } } +/// ADPCM stream decoder. +/// /// Stream sounds encoded with ADPCM have an ADPCM header in each `SoundStreamBlock` tag, unlike /// other compression formats that remain the same as if they were a single sound clip. /// Therefore, we must recreate the decoder with each `SoundStreamBlock` to parse the additional @@ -482,6 +486,7 @@ impl Read for SubstreamTagReader { } /// Create a new decoder that reads data from a shared `Substream` instance. +/// /// This works similarly to `make_stream_decoder` but using the new buffer /// infrastructure that will eventually replace SWF-specific streaming. /// @@ -537,6 +542,8 @@ impl Iterator for StandardSubstreamDecoder { } } +/// ADPCM substream decoder. +/// /// Stream sounds encoded with ADPCM have an ADPCM header in each `SoundStreamBlock` tag, unlike /// other compression formats that remain the same as if they were a single sound clip. /// Therefore, we must recreate the decoder with each `SoundStreamBlock` to parse the additional diff --git a/core/src/events.rs b/core/src/events.rs index 2c9e04236..ed77322bc 100644 --- a/core/src/events.rs +++ b/core/src/events.rs @@ -617,11 +617,13 @@ impl From for KeyCode { } } -/// Key codes for SWF4 keyPress button handlers. These are annoyingly different than -/// `Key.isDown` key codes. +/// Key codes for SWF4 keyPress button handlers. +/// +/// These are annoyingly different than `Key.isDown` key codes. +/// /// TODO: After 18, these are mostly ASCII... should we just use u8? How are different -/// keyboard layouts/languages handled? -/// SWF19 pp. 198-199 +/// keyboard layouts/languages handled? +/// SWF19 pp. 198-199 #[derive(Debug, PartialEq, Eq, Copy, Clone, FromPrimitive, ToPrimitive)] pub enum ButtonKeyCode { Unknown = 0, diff --git a/core/src/external.rs b/core/src/external.rs index 2df04aeef..1fb323ec0 100644 --- a/core/src/external.rs +++ b/core/src/external.rs @@ -15,6 +15,7 @@ use gc_arena::Collect; use std::collections::BTreeMap; /// An intermediate format of representing shared data between ActionScript and elsewhere. +/// /// Regardless of the capabilities of both sides, all data will be translated to this potentially /// lossy format. Any recursion or additional metadata in ActionScript will not be translated. #[derive(Debug, Clone, PartialEq)] diff --git a/render/src/commands.rs b/render/src/commands.rs index 6e84dd563..06a616a85 100644 --- a/render/src/commands.rs +++ b/render/src/commands.rs @@ -27,6 +27,7 @@ pub trait CommandHandler { } /// Holds either a normal BlendMode, or the shader for BlendMode.SHADER. +/// /// We cannot store the `PixelBenderShaderHandle` directly in `ExtendedBlendMode`, /// since we need to remember the shader even if the blend mode is changed /// to something else (so that the shader will still be used if we switch back) diff --git a/render/src/pixel_bender.rs b/render/src/pixel_bender.rs index e86668379..dc110e132 100644 --- a/render/src/pixel_bender.rs +++ b/render/src/pixel_bender.rs @@ -272,10 +272,11 @@ pub enum PixelBenderShaderArgument<'a> { }, } -/// An image input. This accepts both an owned BitmapHandle, -/// and a borrowed texture (used when applying a filter to -/// a texture that we don't have ownership of, and therefore -/// cannot construct a BitmapHandle for). +/// An image input. +/// +/// This accepts both an owned BitmapHandle, and a borrowed texture +/// (used when applying a filter to a texture that we don't have +/// ownership of, and therefore cannot construct a BitmapHandle for). #[derive(Debug, Clone)] pub enum ImageInputTexture<'a> { Bitmap(BitmapHandle), diff --git a/swf/src/types.rs b/swf/src/types.rs index 10ad28644..931061dd7 100644 --- a/swf/src/types.rs +++ b/swf/src/types.rs @@ -1785,7 +1785,8 @@ pub type DoAction<'a> = &'a [u8]; pub type JpegTables<'a> = &'a [u8]; -/// `ProductInfo` contains information about the software used to generate the SWF. +/// Contains information about the software used to generate the SWF. +/// /// Not documented in the SWF19 reference. Emitted by mxmlc. /// See #[derive(Clone, Debug, Eq, PartialEq)]