2017-09-10 21:05:23 +00:00
|
|
|
#ifndef GUARD_UTIL_H
|
|
|
|
#define GUARD_UTIL_H
|
|
|
|
|
|
|
|
#include "sprite.h"
|
|
|
|
|
2017-09-13 10:58:57 +00:00
|
|
|
extern const u8 gMiscBlank_Gfx[]; // unused in Emerald
|
2017-09-10 21:05:23 +00:00
|
|
|
extern const u32 gBitTable[];
|
|
|
|
|
|
|
|
u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
|
|
|
|
void StoreWordInTwoHalfwords(u16 *, u32);
|
|
|
|
void LoadWordFromTwoHalfwords(u16 *, u32 *);
|
2017-09-13 10:58:57 +00:00
|
|
|
int CountTrailingZeroBits(u32 value);
|
2019-04-02 16:22:39 +00:00
|
|
|
u16 CalcCRC16(const u8 *data, s32 length);
|
|
|
|
u16 CalcCRC16WithTable(const u8 *data, u32 length);
|
2017-09-13 10:58:57 +00:00
|
|
|
u32 CalcByteArraySum(const u8* data, u32 length);
|
2018-10-14 12:43:19 +00:00
|
|
|
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor);
|
2018-12-27 08:05:09 +00:00
|
|
|
void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha);
|
2018-12-24 23:10:36 +00:00
|
|
|
void CopySpriteTiles(u8 shape, u8 size, u8 *tiles, u16 *tilemap, u8 *output);
|
|
|
|
|
2017-09-10 21:05:23 +00:00
|
|
|
|
|
|
|
#endif // GUARD_UTIL_H
|