-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgame_mgr.cpp
More file actions
executable file
·40 lines (32 loc) · 938 Bytes
/
game_mgr.cpp
File metadata and controls
executable file
·40 lines (32 loc) · 938 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
#include <allegro.h>
#include "game_mgr.h"
#define FULLSCREEN 1
#ifdef FULLSCREEN
#define GFXOPENARG GFX_AUTODETECT
#else
#define GFXOPENARG GFX_AUTODETECT_WINDOWED
#endif
volatile int InterruptTimer::timing_counter;
void GameManager::Init()
{
allegro_init(); // Initialise Allegro
InterruptTimer::init();
set_color_depth(8); // Combien de bitplan
install_keyboard(); // Installe le clavier
// GP TODO? THROW EXCEPTION?
install_sound(DIGI_AUTODETECT , MIDI_AUTODETECT , NULL);
set_gfx_mode( GFXOPENARG, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0, 0 ); // test ecran
}
void GameManager::Shutdown()
{
remove_sound();
InterruptTimer::shutdown();
allegro_exit();
}
void GameManager::Run(GameSequence *aSeq)
{
while(aSeq)
{
aSeq=aSeq->run();
}
}