2018-10-20 15:30:46 +02:00
|
|
|
#include "layout.h"
|
|
|
|
#include "../vgmstream.h"
|
|
|
|
|
2018-11-01 16:41:23 +01:00
|
|
|
/* Square "VS" headered blocks */
|
2018-12-22 20:09:01 +01:00
|
|
|
void block_update_vs_square(off_t block_offset, VGMSTREAM * vgmstream) {
|
2018-10-20 15:30:46 +02:00
|
|
|
int i;
|
|
|
|
size_t block_size = 0x800;
|
|
|
|
|
|
|
|
vgmstream->current_block_offset = block_offset;
|
|
|
|
vgmstream->current_block_size = block_size - 0x20;
|
2018-12-21 22:38:48 +01:00
|
|
|
vgmstream->next_block_offset = block_offset + block_size*vgmstream->channels;
|
2018-11-01 16:41:23 +01:00
|
|
|
/* 0x08: number of remaning blocks, 0x0c: blocks left */
|
2018-10-20 15:30:46 +02:00
|
|
|
|
|
|
|
for (i = 0; i < vgmstream->channels; i++) {
|
|
|
|
vgmstream->ch[i].offset = block_offset + 0x20 + 0x800*i;
|
|
|
|
}
|
|
|
|
}
|