22 |
*/ |
*/ |
23 |
|
|
24 |
#include <Foundation/NSAutoreleasePool.h> |
#include <Foundation/NSAutoreleasePool.h> |
25 |
|
#include <Foundation/NSRunLoop.h> |
26 |
|
|
27 |
#include "Interface/UiSdl.h" |
#include "Interface/UiSdl.h" |
28 |
#include "Interface.h" |
#include "Interface.h" |
29 |
|
|
30 |
int main () |
@class NSDate; |
31 |
|
|
32 |
|
int |
33 |
|
main (int argc, char **argv) |
34 |
{ |
{ |
35 |
CREATE_AUTORELEASE_POOL (pool); |
CREATE_AUTORELEASE_POOL (pool); |
36 |
|
|
37 |
UiSdl *sdl |
UiSdl *sdl |
38 |
= [[UiSdl alloc] initWithScreenSize: NSMakeSize (1024.0f, 768.0f)]; |
= [[UiSdl alloc] initWithScreenWidth: 1024 |
39 |
|
screenHeight: 768]; |
40 |
|
|
41 |
Interface *interface = [[Interface alloc] init]; |
Interface *interface = [[Interface alloc] init]; |
42 |
[sdl setDelegate: interface]; |
[sdl setDelegate: interface]; |
|
|
|
|
[sdl mainLoop]; |
|
|
|
|
43 |
|
|
44 |
|
/* FIXME - should understand why runloop doesn't loop without events */ |
45 |
|
[NSTimer scheduledTimerWithTimeInterval: 0.1 |
46 |
|
target: nil |
47 |
|
selector: nil |
48 |
|
userInfo: nil |
49 |
|
repeats: YES]; |
50 |
|
|
51 |
|
[[NSRunLoop currentRunLoop] run]; |
52 |
|
|
53 |
RELEASE(pool); |
RELEASE(pool); |
54 |
|
|
55 |
return EXIT_SUCCESS; |
return EXIT_SUCCESS; |