/[hegemonie]/hegemonie/Source/Hegemonie.m
ViewVC logotype

Diff of /hegemonie/Source/Hegemonie.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by zaral, Fri Jul 25 15:29:17 2003 UTC revision 1.2 by dam, Mon Jul 28 14:44:38 2003 UTC
# Line 22  Line 22 
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;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26