2017-09-10 23:05:23 +02:00
|
|
|
#ifndef GUARD_UTIL_H
|
|
|
|
#define GUARD_UTIL_H
|
|
|
|
|
|
|
|
#include "sprite.h"
|
|
|
|
|
2017-09-13 12:58:57 +02:00
|
|
|
extern const u8 gMiscBlank_Gfx[]; // unused in Emerald
|
2017-09-10 23:05:23 +02:00
|
|
|
extern const u32 gBitTable[];
|
|
|
|
|
|
|
|
u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
|
|
|
|
void StoreWordInTwoHalfwords(u16 *, u32);
|
|
|
|
void LoadWordFromTwoHalfwords(u16 *, u32 *);
|
2017-09-13 12:58:57 +02:00
|
|
|
int CountTrailingZeroBits(u32 value);
|
2017-09-10 23:05:23 +02:00
|
|
|
u16 CalcCRC16(u8 *data, s32 length);
|
2017-09-13 12:58:57 +02:00
|
|
|
u16 CalcCRC16WithTable(u8 *data, u32 length);
|
|
|
|
u32 CalcByteArraySum(const u8* data, u32 length);
|
2017-09-10 23:05:23 +02:00
|
|
|
|
|
|
|
#endif // GUARD_UTIL_H
|