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

Diff of /hegemonie/Source/GameWidget.m

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

revision 1.19 by dam, Wed Sep 3 23:33:37 2003 UTC revision 1.20 by dam, Thu Sep 4 09:14:15 2003 UTC
# Line 30  Line 30 
30  #include <Foundation/NSArray.h>  #include <Foundation/NSArray.h>
31  #include <Foundation/NSProcessInfo.h>  #include <Foundation/NSProcessInfo.h>
32  #include <Foundation/NSPathUtilities.h>  #include <Foundation/NSPathUtilities.h>
33    #include <Foundation/NSBundle.h>
34  #include <AppKit/NSEvent.h>  #include <AppKit/NSEvent.h>
35    
36  #include "Common/Camera.h"  #include "Common/Camera.h"
# Line 59  Line 60 
60    
61  + (MdlModel *) model  + (MdlModel *) model
62  {  {
63    return [[MdlModel alloc]    static MdlModel *model = nil;
64             initWithContentsOfFile: @"Resources/Model/bateau.mdl"];  
65      if (!model)
66        {
67          NSString *modelPath
68            = [[NSBundle mainBundle] pathForResource: @"bateau"
69                                              ofType: @"mdl"
70                                         inDirectory: @"Data/Models"];
71    
72          model = [[MdlModel alloc] initWithContentsOfFile: modelPath];
73        }
74    
75      return model;
76  }  }
77    
78  @end  @end

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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