mirror of
https://github.com/FireEmblemUniverse/fireemblem8u.git
synced 2025-02-19 20:43:16 +00:00
review eventfade
This commit is contained in:
parent
fda61a755e
commit
2babae45ec
@ -68,8 +68,8 @@ struct EventFadeSt {
|
||||
} BITPACKED;
|
||||
|
||||
void EventFadefx_Loop(struct ProcEventFade * proc);
|
||||
void sub_80127C4(void);
|
||||
void sub_8012824(void);
|
||||
void EventStartFade(void);
|
||||
void EventEndFade(void);
|
||||
void NewEventFadefx(u16 speed, u32 mask, u16 r, u16 g, u16 b, ProcPtr parent);
|
||||
void StartEventWarpAnim_ret(ProcPtr parent, s16 x, s16 y, s8 kind, s8 flag);
|
||||
s8 EventWarpAnimExists_ret(void);
|
||||
|
@ -37,7 +37,7 @@ void EventFadefx_Loop(struct ProcEventFade * proc)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80127C4(void)
|
||||
void EventStartFade(void)
|
||||
{
|
||||
u8 i;
|
||||
struct EventFadeSt * st;
|
||||
@ -54,7 +54,7 @@ void sub_80127C4(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8012824(void)
|
||||
void EventEndFade(void)
|
||||
{
|
||||
u8 i;
|
||||
struct EventFadeSt * st;
|
||||
|
@ -756,39 +756,38 @@ u8 Event18_ColorFade(struct EventEngineProc * proc)
|
||||
u16 g = proc->pEventCurrent[4];
|
||||
u16 b = proc->pEventCurrent[5];
|
||||
|
||||
switch (subcode)
|
||||
switch (subcode) {
|
||||
case EVSUBCMD_STARTFADE:
|
||||
EventStartFade();
|
||||
return EVC_ADVANCE_YIELD;
|
||||
|
||||
case EVSUBCMD_ENDFADE:
|
||||
EventEndFade();
|
||||
return EVC_ADVANCE_YIELD;
|
||||
|
||||
case EVSUBCMD_FADECOLORS:
|
||||
{
|
||||
case 0:
|
||||
sub_80127C4();
|
||||
return EVC_ADVANCE_YIELD;
|
||||
s8 i;
|
||||
|
||||
case 1:
|
||||
sub_8012824();
|
||||
return EVC_ADVANCE_YIELD;
|
||||
if (EVENT_IS_SKIPPING(proc) || (proc->evStateBits & EV_STATE_FADEDIN))
|
||||
speed = 0;
|
||||
|
||||
case 2:
|
||||
mask = 0;
|
||||
|
||||
for (i = size; i > 0; --i)
|
||||
{
|
||||
s8 i;
|
||||
|
||||
if (EVENT_IS_SKIPPING(proc) || (proc->evStateBits & EV_STATE_FADEDIN))
|
||||
speed = 0;
|
||||
|
||||
mask = 0;
|
||||
|
||||
for (i = size; i > 0; --i)
|
||||
{
|
||||
s8 tmp = start;
|
||||
mask = mask | (1 << tmp);
|
||||
start = tmp + 1;
|
||||
}
|
||||
|
||||
NewEventFadefx(speed, mask, r, g, b, proc);
|
||||
|
||||
return EVC_ADVANCE_YIELD;
|
||||
s8 tmp = start;
|
||||
mask = mask | (1 << tmp);
|
||||
start = tmp + 1;
|
||||
}
|
||||
|
||||
default:
|
||||
return EVC_ERROR;
|
||||
NewEventFadefx(speed, mask, r, g, b, proc);
|
||||
|
||||
return EVC_ADVANCE_YIELD;
|
||||
}
|
||||
|
||||
default:
|
||||
return EVC_ERROR;
|
||||
|
||||
} // switch (subcode)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user