-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
46 lines (39 loc) · 707 Bytes
/
main.c
File metadata and controls
46 lines (39 loc) · 707 Bytes
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
#include "src/autoload.h"
int main(int argc, char **argv)
{
srand ( time(NULL) );
iniciarAllegro();
iniciarBackground();
inciarMenu();
iniciaBloco();
iniciaNave();
iniciarExplosoes();
iniciaAsteroids();
inciarTiros();
// loop principal
while(jogando)
{
while(menu && !nave_game_over && jogando)
{
carregaEventosMenu();
}
while(!menu && !nave_game_over && jogando)
{
carregaEventos();
}
while(!menu && nave_game_over && jogando)
{
carregaEventos();
}
}
// execuções de finalizações
finalizaBackground();
finalizaMenu();
finalizaBloco();
finalizaNave();
finalizaAsteroids();
finalizaTiro();
finalizaExplosao();
finalizaAllegro();
return 0;
}