|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
Functions | |
| int | Nitro_HasMagic (const u8 *data, size_t size, const char *magic) |
| Verifies if the buffer starts with the target 4-character magic signature. More... | |
| int | Nitro_FindSection (const u8 *data, size_t size, const char *magic, size_t *out_offset, u32 *out_size) |
| Searches for a section starting with a specific 4-character magic string. More... | |
| void | Nitro_GetPrintableMagic (const u8 *data, size_t size, char out[5]) |
| Safely reads the first 4 bytes of a buffer and formats them as a null-terminated string. More... | |
| int | Nitro_AbsInt (int value) |
| Math helper returning absolute value of an integer. More... | |
| s32 | Nitro_ReadS32LE (const u8 *p) |
| Safely reads a little-endian signed 32-bit value. More... | |
| s16 | Nitro_ReadS16LE (const u8 *p) |
| Safely reads a little-endian signed 16-bit value. More... | |
| int Nitro_AbsInt | ( | int | value | ) |
Math helper returning absolute value of an integer.
| value | Integer value. |
| int Nitro_FindSection | ( | const u8 * | data, |
| size_t | size, | ||
| const char * | magic, | ||
| size_t * | out_offset, | ||
| u32 * | out_size | ||
| ) |
Searches for a section starting with a specific 4-character magic string.
| data | Raw file data buffer. |
| size | Buffer size in bytes. |
| magic | Section magic identifier to search for (e.g. "PLTT", "CHAR"). |
| out_offset | Destination pointer to store the section start offset. |
| out_size | Destination pointer to store the section size in bytes. |
| void Nitro_GetPrintableMagic | ( | const u8 * | data, |
| size_t | size, | ||
| char | out[5] | ||
| ) |
Safely reads the first 4 bytes of a buffer and formats them as a null-terminated string.
| data | Data buffer. |
| size | Data size. |
| out | Destination char array buffer (must be at least 5 bytes). |
| int Nitro_HasMagic | ( | const u8 * | data, |
| size_t | size, | ||
| const char * | magic | ||
| ) |
Verifies if the buffer starts with the target 4-character magic signature.
| data | Data buffer pointer. |
| size | Buffer size in bytes. |
| magic | 4-character format magic string (e.g. "NCLR"). |
Safely reads a little-endian signed 16-bit value.
| p | Pointer to byte stream. |