Skip to content

Commit

Permalink
Add to_u16() accessor to TextEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
faithanalog committed Jan 1, 2025
1 parent 892b1d6 commit d06550a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ impl TextEntry {
pub const fn from_tile(id: u16) -> Self {
Self(id & 0b11_1111_1111)
}

/// Unwrap this value into its raw `u16` form.
#[inline]
#[must_use]
pub const fn to_u16(self) -> u16 {
self.0
}
}

#[inline]
Expand Down

0 comments on commit d06550a

Please sign in to comment.