/
main.c
72 lines (53 loc) · 1.24 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
#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 <tari/stagehandler.h>
#include <tari/logoscreen.h>
#include "fightscreen.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
setFileSystem("/pc");
#else
setFileSystem("/rd");
#endif
}
int main(int argc, char** argv) {
(void)argc;
(void)argv;
setGameName("DREAM FIGHT 16 A.D.");
setScreenSize(640, 480);
initTariWrapperWithDefaultFlags();
setFont("$/rd/fonts/segoe.hdr", "$/rd/fonts/segoe.pkg");
logg("Check framerate");
FramerateSelectReturnType framerateReturnType = selectFramerate();
if (framerateReturnType == FRAMERATE_SCREEN_RETURN_ABORT) {
exitGame();
}
setMainFileSystem();
setScreenAfterWrapperLogoScreen(&FightScreen);
startScreenHandling(getLogoScreenFromWrapper());
exitGame();
return 0;
}
// TODO: find out why main doesn't work
int wmain(int argc, char** argv) {
return main(argc, argv);
}