2018-02-27 06:03:23 +01:00
|
|
|
#ifndef GUARD_ROULETTE_UTIL_H
|
|
|
|
#define GUARD_ROULETTE_UTIL_H
|
|
|
|
|
2018-12-31 23:09:45 +01:00
|
|
|
#include "roulette.h"
|
|
|
|
|
2018-12-25 18:02:41 +01:00
|
|
|
struct PulseBlendSettings
|
2018-12-08 18:56:59 +01:00
|
|
|
{
|
2018-12-25 18:02:41 +01:00
|
|
|
u16 blendColor;
|
|
|
|
u16 paletteOffset;
|
|
|
|
u8 numColors;
|
|
|
|
u8 delay;
|
|
|
|
u8 numFadeCycles;
|
|
|
|
s8 maxBlendCoeff:4;
|
|
|
|
s8 fadeType:2;
|
|
|
|
s8 restorePaletteOnUnload:1;
|
2018-12-08 18:56:59 +01:00
|
|
|
s8 unk7_7:1;
|
|
|
|
};
|
|
|
|
|
2018-12-25 18:02:41 +01:00
|
|
|
struct PulseBlendPalette
|
2018-12-08 18:56:59 +01:00
|
|
|
{
|
2018-12-25 18:02:41 +01:00
|
|
|
u8 paletteSelector;
|
|
|
|
u8 blendCoeff:4;
|
|
|
|
u8 fadeDirection:1;
|
2018-12-08 18:56:59 +01:00
|
|
|
s8 unk1_5:1;
|
2018-12-25 18:02:41 +01:00
|
|
|
s8 available:1;
|
|
|
|
u32 inUse:1;
|
|
|
|
u8 delayCounter;
|
|
|
|
u8 fadeCycleCounter;
|
|
|
|
struct PulseBlendSettings pulseBlendSettings;
|
2018-12-08 18:56:59 +01:00
|
|
|
};
|
|
|
|
|
2018-12-25 18:02:41 +01:00
|
|
|
struct PulseBlend
|
2018-02-27 06:03:23 +01:00
|
|
|
{
|
2018-12-25 18:02:41 +01:00
|
|
|
u16 usedPulseBlendPalettes;
|
|
|
|
struct PulseBlendPalette pulseBlendPalettes[16];
|
2018-02-27 06:03:23 +01:00
|
|
|
};
|
|
|
|
|
2018-12-25 18:02:41 +01:00
|
|
|
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
|
|
|
void InitPulseBlend(struct PulseBlend *);
|
|
|
|
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
|
|
|
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
|
|
|
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
|
|
|
void UpdatePulseBlend(struct PulseBlend *);
|
2018-12-08 18:56:59 +01:00
|
|
|
void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
|
|
|
|
void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
|
2018-12-31 23:09:45 +01:00
|
|
|
void task_tutorial_controls_fadein(struct UnkStruct0 *r0);
|
|
|
|
void sub_8151678(struct UnkStruct0 *r0);
|
|
|
|
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2);
|
|
|
|
void sub_8151A9C(struct UnkStruct0 *r0, u16 r1);
|
2018-02-27 06:03:23 +01:00
|
|
|
|
|
|
|
#endif // GUARD_ROULETTE_UTIL_H
|