#include <OOTextureVerifierStage.h>
Definition at line 33 of file OOTextureVerifierStage.h.
◆ checkTextureNamed:inFolder:
- (void) checkTextureNamed: |
|
(NSString *) | name |
inFolder: |
|
(NSString *) | folder |
|
implementation |
Provided by category OOTextureVerifierStage(OOPrivate).
Definition at line 34 of file OOTextureVerifierStage.m.
130 :(NSString *)name inFolder:(NSString *)folder
131{
133 NSString *path =
nil;
135 NSString *displayName =
nil;
137 BOOL success;
140
141 fileScanner = [[self verifier] fileScannerStage];
146
147 if (path ==
nil)
return;
148
150 options:kOOTextureMinFilterNearest |
151 kOOTextureMinFilterNearest |
152 kOOTextureNoShrink |
153 kOOTextureNoFNFMessage |
154 kOOTextureNeverScale];
155
158 {
159 OOLog(
@"verifyOXP.texture.failed",
@"***** ERROR: image %@ could not be read.", displayName);
160 }
161 else
162 {
164
165 if (success)
166 {
169 if (pixmap.
width != rWidth || pixmap.
height != rHeight)
170 {
171 OOLog(
@"verifyOXP.texture.notPOT",
@"----- WARNING: image %@ has non-power-of-two dimensions; it will have to be rescaled (from %ux%u pixels to %ux%u pixels) at runtime.", displayName, pixmap.
width, pixmap.
height, rWidth, rHeight);
172 }
173 else
174 {
175 OOLog(
@"verifyOXP.verbose.texture.OK",
@"- %@ (%ux%u px) OK.", displayName, pixmap.
width, pixmap.
height);
176 }
177
179 }
180 else
181 {
182 OOLog(
@"verifyOXP.texture.failed",
@"***** ERROR: texture loader failed to load %@.", displayName);
183 }
184 }
185}
#define OOLog(class, format,...)
uint_fast32_t OOPixMapDimension
void OOFreePixMap(OOPixMap *ioPixMap)
#define OORoundUpToPowerOf2_PixMap
id displayNameForFile:andFolder:(NSString *file,[andFolder] NSString *folder)
NSString * pathForFile:inFolder:referencedFrom:checkBuiltIn:(NSString *file,[inFolder] NSString *folder,[referencedFrom] NSString *context,[checkBuiltIn] BOOL checkBuiltIn)
id loaderWithPath:options:(NSString *path,[options] uint32_t options)
BOOL getResult:format:originalWidth:originalHeight:(OOPixMap *result,[format] OOTextureDataFormat *outFormat,[originalWidth] uint32_t *outWidth,[originalHeight] uint32_t *outHeight)
◆ dealloc
◆ init
◆ name
◆ nameForReverseDependencyForVerifier:
+ (NSString *) nameForReverseDependencyForVerifier: |
|
(OOOXPVerifier *) | verifier |
|
◆ run
Reimplemented from OOOXPVerifierStage.
Definition at line 34 of file OOTextureVerifierStage.m.
84{
85 NSEnumerator *nameEnum =
nil;
87 NSAutoreleasePool *pool =
nil;
88
89 for (nameEnum = [
_usedTextures objectEnumerator]; (
name = [nameEnum nextObject]); )
90 {
91 pool = [[NSAutoreleasePool alloc] init];
92 [self checkTextureNamed:name inFolder:@"Textures"];
93 [pool release];
94 }
95 [_usedTextures release];
97
98
99 nameEnum = [[[[self verifier] fileScannerStage] filesInFolder:@"Images"] objectEnumerator];
100 while ((
name = [nameEnum nextObject]))
101 {
102 [self checkTextureNamed:name inFolder:@"Images"];
103 }
104}
◆ shouldRun
◆ textureNamed:usedInContext:
- (void) textureNamed: |
|
(NSString *) | name |
usedInContext: |
|
(NSString *) | context |
Definition at line 34 of file OOTextureVerifierStage.m.
107 :(NSString *)
name usedInContext:(NSString *)context
108{
110
113 [_usedTextures addObject:name];
114
115 fileScanner = [[self verifier] fileScannerStage];
116 if (![fileScanner fileExists:
name
117 inFolder:@"Textures"
118 referencedFrom:context
119 checkBuiltIn:YES])
120 {
121 OOLog(
@"verifyOXP.texture.notFound",
@"----- WARNING: texture \"%@\
" referenced in %@ could not be found in %@ or in Oolite.",
name, context, [[
self verifier] oxpDisplayName]);
122 }
123}
◆ _usedTextures
- (NSMutableSet*) _usedTextures |
|
private |
The documentation for this class was generated from the following files: