chore: Prefer spelling "Graphic"

This commit is contained in:
relrelb 2021-06-24 13:56:20 +03:00 committed by relrelb
parent 7b37bf6809
commit e3f1fe2004
3 changed files with 5 additions and 5 deletions

View File

@ -1137,7 +1137,7 @@ pub trait TDisplayObject<'gc>:
/// Called when this object should be replaced by a PlaceObject tag.
fn replace_with(&self, _context: &mut UpdateContext<'_, 'gc, '_>, _id: CharacterId) {
// Noop for most symbols; only shapes can replace their innards with another graphic.
// Noop for most symbols; only shapes can replace their innards with another Graphic.
}
fn object(&self) -> Avm1Value<'gc> {

View File

@ -147,7 +147,7 @@ impl<'gc> TDisplayObject<'gc> for Graphic<'gc> {
}
fn replace_with(&self, context: &mut UpdateContext<'_, 'gc, '_>, id: CharacterId) {
// Static assets like graphics can replace themselves via a PlaceObject tag with PlaceObjectAction::Replace.
// Static assets like Graphics can replace themselves via a PlaceObject tag with PlaceObjectAction::Replace.
// This does not create a new instance, but instead swaps out the underlying static data to point to the new art.
if let Some(new_graphic) = context
.library
@ -156,7 +156,7 @@ impl<'gc> TDisplayObject<'gc> for Graphic<'gc> {
{
self.0.write(context.gc_context).static_data = new_graphic.0.read().static_data;
} else {
log::warn!("PlaceObject: expected graphic at character ID {}", id);
log::warn!("PlaceObject: expected Graphic at character ID {}", id);
}
}
@ -249,7 +249,7 @@ impl<'gc> TDisplayObject<'gc> for Graphic<'gc> {
}
}
/// Static data shared between all instances of a graphic.
/// Static data shared between all instances of a Graphic.
#[allow(dead_code)]
#[derive(Collect)]
#[collect(require_static)]

View File

@ -287,7 +287,7 @@ impl<'gc> MovieLibrary<'gc> {
self.fonts.get(&descriptor).copied()
}
/// Returns the graphic with the given character ID.
/// Returns the `Graphic` with the given character ID.
/// Returns `None` if the ID does not exist or is not a `Graphic`.
pub fn get_graphic(&self, id: CharacterId) -> Option<Graphic<'gc>> {
if let Some(&Character::Graphic(graphic)) = self.characters.get(&id) {