-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCApp_OnInit.cpp
More file actions
33 lines (23 loc) · 754 Bytes
/
CApp_OnInit.cpp
File metadata and controls
33 lines (23 loc) · 754 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
//==============================================================================
#include "CApp.h"
//==============================================================================
bool CApp::OnInit()
{
if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
{
return false;
}
if( TTF_Init() == -1 )
{
return false;
}
if((Surf_Display = SDL_SetVideoMode(WWIDTH, WHEIGHT, 32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL)
{
return false;
}
SDL_WM_SetCaption("GameLearning", "PlusPlus");
SDL_EnableKeyRepeat(1, SDL_DEFAULT_REPEAT_INTERVAL / 3);
CAppStateManager::SetActiveAppState(APPSTATE_INTRO);
return true;
}
//==============================================================================