-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
79 lines (57 loc) · 1.33 KB
/
main.c
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <tari/framerateselectscreen.h>
#include <tari/pvr.h>
#include <tari/physics.h>
#include <tari/file.h>
#include <tari/drawing.h>
#include <tari/log.h>
#include <tari/wrapper.h>
#include <tari/system.h>
#include "gamescreen.h"
#include "titlescreen.h"
#include "continuescreen.h"
#include "congratsscreen.h"
#include "gameoverscreen.h"
#include "gamestate.h"
#include "system.h"
#include "logoscreen.h"
#ifdef DREAMCAST
KOS_INIT_FLAGS(INIT_DEFAULT);
extern uint8 romdisk[];
KOS_INIT_ROMDISK(romdisk);
#endif
void exitGame() {
shutdownTariWrapper();
#ifdef DEVELOP
abortSystem();
#else
returnToMenu();
#endif
}
void setMainFileSystem() {
#ifdef DEVELOP
setGameBaseFileSystem("/pc");
#else
setGameBaseFileSystem("/rd");
#endif
resetToGameBaseFileSystem();
}
int main(int argc, char** argv) {
setGameName("FISTS OF JUSTICE");
setScreenSize(320, 240);
initTariWrapperWithDefaultFlags();
logg("Check framerate");
FramerateSelectReturnType framerateReturnType = selectFramerate();
if (framerateReturnType == FRAMERATE_SCREEN_RETURN_ABORT) {
exitGame();
}
setMainFileSystem();
resetGameState();
setCurrentLevelName("level4");
startScreenHandling(&LogoScreen);
exitGame();
return (1);
}
// TODO: find out why main doesn't work
int wmain(int argc, char** argv) {
return main(argc, argv);
}