sovereignx/include/util.h
hedara90 e4c81ba6e0
Removed all instances of gBitTable[x] (#5123)
* Replaced all the gBitTable[X] usages with 1 << X, and cleaned up script output

* Fixed failed merge in online viewer

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-17 10:28:09 -05:00

20 lines
751 B
C

#ifndef GUARD_UTIL_H
#define GUARD_UTIL_H
#include "sprite.h"
extern const u8 gMiscBlank_Gfx[]; // unused in Emerald
u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
int CountTrailingZeroBits(u32 value);
u16 CalcCRC16(const u8 *data, s32 length);
u16 CalcCRC16WithTable(const u8 *data, u32 length);
u32 CalcByteArraySum(const u8 *data, u32 length);
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u32 blendColor);
void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha);
void CopySpriteTiles(u8 shape, u8 size, u8 *tiles, u16 *tilemap, u8 *output);
#endif // GUARD_UTIL_H