pub struct CodeTable { /* private fields */ }
Expand description
Represent a complete [code_table.bin
] file.
Implementations§
Source§impl CodeTable
impl CodeTable
Sourcepub fn new_from_file<F: Read + Seek>(
file: F,
) -> Result<Self, CodeTableDecodeError>
pub fn new_from_file<F: Read + Seek>( file: F, ) -> Result<Self, CodeTableDecodeError>
Create a new CodeTable
from a reader open on a code_table.bin
Sourcepub fn add_missing(&mut self)
pub fn add_missing(&mut self)
Add the three 0xcf00, 0xcf02, 0xcfff code, missing from the standard [code_table.bin
]
(control for rubi/overtext)
Sourcepub fn generate_code_to_text(&self) -> CodeToText<'_>
pub fn generate_code_to_text(&self) -> CodeToText<'_>
Generate a CodeToText
object, allowing to transform an encoded text to a String
with human readable placeholder.
Sourcepub fn generate_text_to_code(&self) -> TextToCode<'_>
pub fn generate_text_to_code(&self) -> TextToCode<'_>
Generate a TextToCode
object, allowing to transform a human-readable string (generated by a CodeToText
) into a
binary text readable by the game (it first need to be put inside a message container (see the pmd_message
crate) then
into a farc file (see pmd_farc
crate). The pmdtranslate
crate contain command line and a complete exemple for those case.
Sourcepub fn entries(&self) -> &Vec<CodeTableEntryFile>
pub fn entries(&self) -> &Vec<CodeTableEntryFile>
Return a list of all the entries in this file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeTable
impl RefUnwindSafe for CodeTable
impl Send for CodeTable
impl Sync for CodeTable
impl Unpin for CodeTable
impl UnwindSafe for CodeTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more