mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 07:55:45 +01:00
remove unneeded code
This commit is contained in:
@@ -104,19 +104,3 @@ size_t mcx_calcsize(const u8 *restrict buf) {
|
||||
size += *(buf + (i * 4) + 3);
|
||||
return (size * 0x1000) + 0x2000;
|
||||
}
|
||||
|
||||
/* an `*.mcX` contains a `0x2000` byte long table, the first `0x1000` containing
|
||||
* `0x400` entries of chunk data.
|
||||
* This chunk data is big-endian, where bytes `0xFFFFFF00` represent the `0x1000` sector offset.
|
||||
* From the start, and bytes `0x000000FF` represent the length in `0x1000` sectors. */
|
||||
void mcx_index(const u8 *restrict buf, struct mcx_chunk *restrict chunks) {
|
||||
const u32 *ptr = (u32 *)buf;
|
||||
for (uint i = 0; i < 0x400; i++) {
|
||||
u32 dat = be32toh(ptr[i]);
|
||||
chunks[i] = (struct mcx_chunk){
|
||||
.idx = (dat >> 8) * 0x1000,
|
||||
.len = (dat & 0xFF) * 0x1000,
|
||||
.time = be32toh(ptr[i + 0x400]),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user