mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
More roulette doc
This commit is contained in:
parent
b40cee540e
commit
868f831167
@ -483,7 +483,7 @@ $(ROULETTEGFXDIR)/roulette_tilt.4bpp: $(ROULETTEGFXDIR)/shroomish.4bpp \
|
|||||||
$(ROULETTEGFXDIR)/tailow.4bpp
|
$(ROULETTEGFXDIR)/tailow.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(ROULETTEGFXDIR)/board_icons.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \
|
$(ROULETTEGFXDIR)/wheel_icons.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \
|
||||||
$(ROULETTEGFXDIR)/azurill.4bpp \
|
$(ROULETTEGFXDIR)/azurill.4bpp \
|
||||||
$(ROULETTEGFXDIR)/skitty.4bpp \
|
$(ROULETTEGFXDIR)/skitty.4bpp \
|
||||||
$(ROULETTEGFXDIR)/makuhita.4bpp
|
$(ROULETTEGFXDIR)/makuhita.4bpp
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
#ifndef GUARD_ROULETTE_H
|
#ifndef GUARD_ROULETTE_H
|
||||||
#define GUARD_ROULETTE_H
|
#define GUARD_ROULETTE_H
|
||||||
|
|
||||||
struct UnkStruct1
|
void PlayRoulette(void);
|
||||||
{
|
|
||||||
u16 var00;
|
|
||||||
u16 var02;
|
|
||||||
u8 var04;
|
|
||||||
u8 var05;
|
|
||||||
u8 var06;
|
|
||||||
s8 var07_0:5;
|
|
||||||
s8 var07_5:2;
|
|
||||||
s8 var07_7:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct UnkStruct3
|
|
||||||
{
|
|
||||||
u8 var00_0:7;
|
|
||||||
u8 var00_7:1;
|
|
||||||
u8 var01;
|
|
||||||
s8 var02;
|
|
||||||
s8 var03;
|
|
||||||
struct UnkStruct1 var04;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct UnkStruct0
|
|
||||||
{
|
|
||||||
u8 var00;
|
|
||||||
u8 var01;
|
|
||||||
u16 var02; //flag for each UnkStruct3
|
|
||||||
struct UnkStruct3 var04[0x10];
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GUARD_ROULETTE_H
|
#endif // GUARD_ROULETTE_H
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#ifndef GUARD_ROULETTE_UTIL_H
|
#ifndef GUARD_ROULETTE_UTIL_H
|
||||||
#define GUARD_ROULETTE_UTIL_H
|
#define GUARD_ROULETTE_UTIL_H
|
||||||
|
|
||||||
#include "roulette.h"
|
|
||||||
|
|
||||||
struct PulseBlendSettings
|
struct PulseBlendSettings
|
||||||
{
|
{
|
||||||
u16 blendColor;
|
u16 blendColor;
|
||||||
@ -35,6 +33,36 @@ struct PulseBlend
|
|||||||
struct PulseBlendPalette pulseBlendPalettes[16];
|
struct PulseBlendPalette pulseBlendPalettes[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct UnkStruct1
|
||||||
|
{
|
||||||
|
u16 var00;
|
||||||
|
u16 var02;
|
||||||
|
u8 var04;
|
||||||
|
u8 var05;
|
||||||
|
u8 var06;
|
||||||
|
s8 var07_0:5;
|
||||||
|
s8 var07_5:2;
|
||||||
|
s8 var07_7:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct UnkStruct3
|
||||||
|
{
|
||||||
|
u8 var00_0:7;
|
||||||
|
bool8 active:1;
|
||||||
|
u8 var01;
|
||||||
|
s8 var02;
|
||||||
|
s8 var03;
|
||||||
|
struct UnkStruct1 var04;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct UnkStruct0
|
||||||
|
{
|
||||||
|
u8 var00;
|
||||||
|
u8 var01;
|
||||||
|
u16 var02; //flag for each UnkStruct3
|
||||||
|
struct UnkStruct3 var04[0x10];
|
||||||
|
};
|
||||||
|
|
||||||
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
||||||
void InitPulseBlend(struct PulseBlend *);
|
void InitPulseBlend(struct PulseBlend *);
|
||||||
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||||
|
1597
src/roulette.c
1597
src/roulette.c
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@ void sub_8151678(struct UnkStruct0 *r0)
|
|||||||
|
|
||||||
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2)
|
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2)
|
||||||
{
|
{
|
||||||
if (!(r1 < 16) || (r0->var04[r1].var00_7))
|
if (!(r1 < 16) || (r0->var04[r1].active))
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
|
||||||
r0->var04[r1].var04.var00 = r2->var00;
|
r0->var04[r1].var04.var00 = r2->var00;
|
||||||
@ -29,7 +29,7 @@ u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2)
|
|||||||
r0->var04[r1].var04.var07_5 = r2->var07_5;
|
r0->var04[r1].var04.var07_5 = r2->var07_5;
|
||||||
r0->var04[r1].var04.var07_7 = r2->var07_7;
|
r0->var04[r1].var04.var07_7 = r2->var07_7;
|
||||||
r0->var04[r1].var00_0 = 0;
|
r0->var04[r1].var00_0 = 0;
|
||||||
r0->var04[r1].var00_7 = 1;
|
r0->var04[r1].active = TRUE;
|
||||||
r0->var04[r1].var02 = 0;
|
r0->var04[r1].var02 = 0;
|
||||||
r0->var04[r1].var01 = 0;
|
r0->var04[r1].var01 = 0;
|
||||||
if (r0->var04[r1].var04.var07_7 < 0)
|
if (r0->var04[r1].var04.var07_7 < 0)
|
||||||
@ -44,7 +44,7 @@ u8 sub_8151710(struct UnkStruct0 *r0, u8 r1)
|
|||||||
{
|
{
|
||||||
if (r1 >= 16)
|
if (r1 >= 16)
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
if (!r0->var04[r1].var00_7)
|
if (!r0->var04[r1].active)
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
|
||||||
memset(&r0->var04[r1], 0, sizeof(r0->var04[r1]));
|
memset(&r0->var04[r1], 0, sizeof(r0->var04[r1]));
|
||||||
@ -154,16 +154,16 @@ void task_tutorial_controls_fadein(struct UnkStruct0 *r0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8151A48(struct UnkStruct0 *r0, u16 r1)
|
void sub_8151A48(struct UnkStruct0 *r0, u16 flags)
|
||||||
{
|
{
|
||||||
u8 i = 0;
|
u8 i = 0;
|
||||||
|
|
||||||
r0->var00++;
|
r0->var00++;
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if ((r1 >> i) & 1)
|
if ((flags >> i) & 1)
|
||||||
{
|
{
|
||||||
if (r0->var04[i].var00_7)
|
if (r0->var04[i].active)
|
||||||
{
|
{
|
||||||
r0->var02 |= 1 << i;
|
r0->var02 |= 1 << i;
|
||||||
r0->var04[i].var00_0 = 1;
|
r0->var04[i].var00_0 = 1;
|
||||||
@ -172,7 +172,7 @@ void sub_8151A48(struct UnkStruct0 *r0, u16 r1)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8151A9C(struct UnkStruct0 *r0, u16 r1)
|
void sub_8151A9C(struct UnkStruct0 *r0, u16 flags)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
@ -180,9 +180,9 @@ void sub_8151A9C(struct UnkStruct0 *r0, u16 r1)
|
|||||||
{
|
{
|
||||||
if ((r0->var02 >> i) & 1)
|
if ((r0->var02 >> i) & 1)
|
||||||
{
|
{
|
||||||
if (r0->var04[i].var00_7)
|
if (r0->var04[i].active)
|
||||||
{
|
{
|
||||||
if ((r1 >> i) & 1)
|
if ((flags >> i) & 1)
|
||||||
{
|
{
|
||||||
u32 offset = r0->var04[i].var04.var02;
|
u32 offset = r0->var04[i].var04.var02;
|
||||||
u16 *faded = &gPlttBufferFaded[offset];
|
u16 *faded = &gPlttBufferFaded[offset];
|
||||||
@ -199,14 +199,14 @@ void sub_8151A9C(struct UnkStruct0 *r0, u16 r1)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (r1 == 0xFFFF)
|
if (flags == 0xFFFF)
|
||||||
{
|
{
|
||||||
r0->var00 = 0;
|
r0->var00 = 0;
|
||||||
r0->var02 = 0;
|
r0->var02 = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r0->var02 = r0->var02 & ~r1;
|
r0->var02 = r0->var02 & ~flags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user