-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
59 lines (45 loc) · 1.14 KB
/
main.cpp
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
#include <allegro/allegro.h>
#include <stdio.h>
#include <math.h>
#include "common.h"
#include "cube.h"
#include "game.h"
#include "logic.h"
#include "gfx_system.h"
#include "gfx_elements.h"
#include "gfx_sprite.h"
#include "dev_intro.h"
#include "gfx_font.h"
#include "underwater_level.h"
#include "gui.h"
#include "title_screen.h"
#include "audio.h"
extern volatile int globalTickCount;
extern volatile int gameTickCount;
extern BITMAP* pageOne,*pageTwo,*pageThree;
Game_t currentGame;
void main( void )
{
int index=0,linkSize = 0;
GFX_SYS_SetVideoMode( ¤tGame , 640 , 480 , 16 , c_false );
G_Init( ¤tGame );
TS_LoadTitleScreen();
//int songHandle = AUD_LoadSong( "content/audio/music/GAME_TITLE1.MID" , c_true );
int songHandle = AUD_LoadSong( "content/audio/music/GAME_TITLE.MP3" , c_true );
AUD_FadeOutSong( songHandle );
AUD_PlaySong( songHandle );
while( !key[ KEY_ESC ] )
{
TS_DistortScreen2();
TS_DrawScreen();
}
key[ KEY_ESC ] = 0;
AUD_StopSong( songHandle );
while( !key[ KEY_ESC ] )
{
linkSize = G_RunLogic( ¤tGame );
G_Delay( ¤tGame );
}
G_ShutDown( ¤tGame );
}
END_OF_MAIN();