-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
51 lines (40 loc) · 809 Bytes
/
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
#include <intuition/intuition.h>
#include "framework/runstate.h"
#include "framework/screen.h"
#include "palette.h"
#include "ProjectWindow.h"
#define SCR_WIDTH 640
#define SCR_HEIGHT 512
static struct NewScreen newScreen = {
0,0,SCR_WIDTH,SCR_HEIGHT,2,
0,3,
HIRES|LACE,
CUSTOMSCREEN,
NULL,
"FracIDE Map Editor",
NULL,
NULL
};
int main(void) {
int errorCode;
FrameworkWindow *projectWindow;
if(!initGlobalScreen(&newScreen)) {
errorCode = -1;
goto error;
}
initPalette(getGlobalViewPort());
projectWindow = newProjectWindow();
if(!projectWindow) {
errorCode = -2;
goto error_closeScreen;
}
runMainLoop(projectWindow);
closeScreen:
closeGlobalScreen();
done:
return 0;
error_closeScreen:
closeGlobalScreen();
error:
return errorCode;
}