Make the received rom buffer const

This commit is contained in:
Renato Rotenberg
2023-02-06 20:36:40 -03:00
parent c3eadb01b1
commit 6be7c3e34a
8 changed files with 33 additions and 32 deletions
+2 -2
View File
@@ -26,12 +26,12 @@ static void blt_image_to_atlas( rgba *img, int i, int w, int h, uint8_t *outText
}
}
void load_mario_textures_from_rom( uint8_t *rom, uint8_t *outTexture )
void load_mario_textures_from_rom( const uint8_t *rom, uint8_t *outTexture )
{
memset( outTexture, 0, 4 * ATLAS_WIDTH * ATLAS_HEIGHT );
mio0_header_t head;
uint8_t *in_buf = rom + MARIO_TEX_ROM_OFFSET;
const uint8_t *in_buf = rom + MARIO_TEX_ROM_OFFSET;
mio0_decode_header( in_buf, &head );
uint8_t *out_buf = malloc( head.dest_size );