-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.h
63 lines (54 loc) · 1.12 KB
/
intro.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef intro_h
#define intro_h
#include "input.h"
#include "helperfuncs.h"
#include "commonvars.h"
#include "printfuncs.h"
#include "intro.h"
#define FRAMEDELAY 10 * FRAMESCALE
int frames = 0;
int ay;
void initIntro()
{
frames = 0;
setBlockTilesAsBackground();
ay = SCREENHEIGHT;
}
void intro()
{
if (gameState == gsInitIntro)
{
initIntro();
gameState -= gsInitDiff;
}
frames++;
clear_screen(backgroundColor);
if (frames < FRAMEDELAY)
{
printMessage((16-12) >> 1, 4, "WILLEMS DAVY");
}
else
{
if (frames < FRAMEDELAY *2)
{
printMessage((16-8) >> 1, 4, "PRESENTS");
}
else
{
set_bkg_tiles(0, ay, titlescreenMap);
if(ay > 0)
{
ay -= 10/FRAMESCALE;
}
else
{
gameState = gsInitTitle;
}
}
}
if ((gamepad_button_a() == 1) || (gamepad_button_b() == 1))
{
gameState = gsInitTitle;
}
}
#endif