Bought the Esenthel MMO (source code) and trying to go through the code step by step and understand it all.
But I'm not sure if I understand what the intro file does or why it's there.
This is what is written in it:
Code:
/******************************************************************************/
State StateIntro(UpdateIntro, DrawIntro, InitIntro, ShutIntro);
/******************************************************************************/
bool InitIntro()
{
return true;
}
void ShutIntro()
{
}
/******************************************************************************/
bool UpdateIntro()
{
if(StateActive.time()>3 || Kb.bp(KB_ESC))StateSelectServer.set(1);
return true;
}
void DrawIntro()
{
D.clear(BLACK);
D.text (0, 0, "Intro");
}
/******************************************************************************/
UpdateIntro, If I understand correct checks if Intro is active and if it's been active for more than 3 (milliseconds?) OR if the esc key is pressed then SelectServer is enabled.
The part inside DrawIntro is only showed for 3 ms which is practically impossible for the human eye to see anything.
So why does the Intro exist at all?
Why not just enable SelectServer from main instead the same way main enabled Intro ( StateIntro.set(); ).