fn entry_from_image(
		&self,
		index: u16,
		pal_offset: u8,
		foreground: u8,
		background: u8,
	) -> Result<VeraTileMapEntry, Error> {
		match self.mode {
			VeraTileMapMode::Tile2BPP | VeraTileMapMode::Tile4BPP | VeraTileMapMode::Tile8BPP => {
				Ok(VeraTileMapEntry::Tile234(index, pal_offset, 0, 0))
			}
			VeraTileMapMode::TextBPP1_16 => {
				Ok(VeraTileMapEntry::Text0(index as u8, foreground, background))
			}
			VeraTileMapMode::TextBPP1_256 => Ok(VeraTileMapEntry::Text1(index as u8, foreground)),
		}
	}
/// Return data formatted appropriately for the current map mode
Return data formatted appropriately for the current map mode
Return data formatted appropriately for the current map mode
fn entry_from_image(
		&self,
		index: u16,
		pal_offset: u8,
		foreground: u8,
		background: u8,
	) -> Result<VeraTileMapEntry, Error> {
		match self.mode {
			VeraTileMapMode::Tile2BPP | VeraTileMapMode::Tile4BPP | VeraTileMapMode::Tile8BPP => {
				Ok(VeraTileMapEntry::Tile234(index, pal_offset, 0, 0))
			}
			VeraTileMapMode::TextBPP1_16 => {
				Ok(VeraTileMapEntry::Text0(index as u8, foreground, background))
			}
			VeraTileMapMode::TextBPP1_256 => Ok(VeraTileMapEntry::Text1(index as u8, foreground)),
		}
	}
fn entry_from_image ( & self , index : u16 , pal_offset : u8 , foreground : u8 , background : u8 , ) -> Result < VeraTileMapEntry , Error > { match self . mode { VeraTileMapMode :: Tile2BPP | VeraTileMapMode :: Tile4BPP | VeraTileMapMode :: Tile8BPP => { Ok ( VeraTileMapEntry :: Tile234 ( index , pal_offset , 0 , 0 ) ) } VeraTileMapMode :: TextBPP1_16 => { Ok ( VeraTileMapEntry :: Text0 ( index as u8 , foreground , background ) ) } VeraTileMapMode :: TextBPP1_256 => Ok ( VeraTileMapEntry :: Text1 ( index as u8 , foreground ) ) , } }
Return data formatted appropriately for the current map mode
Return data formatted appropriately for the current map mode
&self
index
u16
pal_offset
u8
foreground
u8
background
u8