|
|
| version 1.4, 2003/11/13 18:17:42 | version 1.6, 2004/03/02 23:23:06 |
|---|---|
| Line 12 | Line 12 |
| #include "np2opening.h" | #include "np2opening.h" |
| static PicHandle getbmp(FSSpec fsc, Rect* srt) { | static PicHandle getbmp(FSSpec fsc, Rect* srt) { |
| PicHandle pict = NULL; | PicHandle pict = NULL; |
| GraphicsImportComponent gi; | GraphicsImportComponent gi; |
| Line 42 bool getResourceFile(const char* name, F | Line 41 bool getResourceFile(const char* name, F |
| CFURLRef url = NULL; | CFURLRef url = NULL; |
| FSRef fsr; | FSRef fsr; |
| bool ret = false; | bool ret = false; |
| CFStringRef str = CFSTRj(name); | |
| url=CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTRj(name), NULL, NULL); | if (!str) return (false); |
| url=CFBundleCopyResourceURL(CFBundleGetMainBundle(), str, NULL, NULL); | |
| CFRelease(str); | |
| if (url) { | if (url) { |
| if (CFURLGetFSRef(url, &fsr)) { | if (CFURLGetFSRef(url, &fsr)) { |
| if (FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, fsc, NULL) == noErr) { | if (FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, fsc, NULL) == noErr) { |