Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630653
Main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
913 B
Referenced Files
None
Subscribers
None
Main.cpp
View Options
#include
<SDL/SDL.h>
#include
"Functions.h"
#include
"Timer.h"
#include
"Objects.h"
#include
"Globals.h"
#include
<cstdlib>
#include
<ctime>
int
main
(
int
argc
,
char
*
args
[]
)
{
if
(
init
()
==
false
)
{
return
1
;
}
if
(
load_files
()
==
false
)
{
return
1
;
}
//IGRA/////
stateID
=
STATE_MENU
;
currentState
=
new
Menu
();
//////LEVEL EDITOR////////
/*stateID = STATE_LEVEL_EDITOR;
currentState = new LevelEditor();*/
delta
.
start
();
srand
(
time
(
NULL
));
Mix_PlayMusic
(
music
,
-1
);
while
(
stateID
!=
STATE_EXIT
)
{
FPS
.
start
();
currentState
->
handle_events
();
currentState
->
logic
();
delta
.
start
();
set_camera
();
currentState
->
render
();
change_state
();
if
(
FPS
.
get_ticks
()
<
1000
/
g_FPS
)
{
SDL_Delay
(
(
1000
/
g_FPS
)
-
FPS
.
get_ticks
()
);
}
}
o_mylevels
.
save_levels
();
clean
();
return
0
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 10:01 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
131979
Default Alt Text
Main.cpp (913 B)
Attached To
Mode
R79 meandmyshadow
Attached
Detach File
Event Timeline