From dcbeca2beb9303e6fd18b77cd8d133ea86686ea1 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Mon, 10 Jun 2019 06:00:06 +0800 Subject: fix a type --- src/teachy_tv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/teachy_tv.c b/src/teachy_tv.c index 9a0d61fa0..62d5dc4f6 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -1578,7 +1578,7 @@ void TeachyTvComputeSingleMapTileBlockFromTilesetAndMetaTiles(u8 *blockBuf, u8 * u16 TeachyTvComputePalIndexArrayEntryByMetaTile(u8 *palIndexArrayBuf, u16 metaTile) { u32 pal; - u32 i; + u16 i; int firstEntry; int temp; @@ -1595,7 +1595,7 @@ u16 TeachyTvComputePalIndexArrayEntryByMetaTile(u8 *palIndexArrayBuf, u16 metaTi { while ( 1 ) { - i = ((i + 1) << 0x10) >> 0x10; + ++i; if ( i > 0xF ) break; temp = palIndexArrayBuf[i]; @@ -1609,7 +1609,7 @@ u16 TeachyTvComputePalIndexArrayEntryByMetaTile(u8 *palIndexArrayBuf, u16 metaTi } } } - return (u16)(0xF - i); + return (0xF - i); } #ifdef NONMATCHING -- cgit v1.2.3