diff options
Diffstat (limited to 'test/bin/test_file_read.c')
-rw-r--r-- | test/bin/test_file_read.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index df93395..b3357ce 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,22 +16,19 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - - - char* filename = "slime.bin"; + char* filename = "tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ return;//error } - int sprite_size = (16 * 16); fseek(fp, 0, SEEK_END); - int _size = ftell(fp)/sprite_size; - rewind(fp); + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[sprite_size]; - fread(data,1,sprite_size,fp); + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); printData(data); } |