mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-06 10:53:42 +00:00
More spriting stuff.
Reviewed by me.
This commit is contained in:
@@ -49,15 +49,6 @@ function CPImageInBundle(aFilename, aSize, aBundle)
|
||||
return [[CPImage alloc] initWithContentsOfFile:[aBundle pathForResource:aFilename]];
|
||||
}
|
||||
|
||||
@implementation CPBundle (CPImageAdditions)
|
||||
|
||||
- (CPString)pathForResource:(CPString)aFilename
|
||||
{
|
||||
return [self resourcePath] + '/' + aFilename;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPImage
|
||||
|
||||
@@ -99,8 +99,15 @@
|
||||
}
|
||||
|
||||
- (CPString)pathForResource:(CPString)aFilename
|
||||
{
|
||||
return [self resourcePath] + '/' + aFilename;
|
||||
{console.log("?!!!!!!!");
|
||||
var path = [self resourcePath] + '/' + aFilename,
|
||||
mappedPath = _URIMap["Resources/" + aFilename];//path];
|
||||
console.log("~!THE MAPPED PATH FOR " + path + " IS " + mappedPath);
|
||||
|
||||
if (mappedPath)
|
||||
return mappedPath;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
- (CPDictionary)infoDictionary
|
||||
|
||||
@@ -499,6 +499,7 @@ BundleTask.prototype.defineSourceTasks = function()
|
||||
filedir (staticPath, [compiledPlatformSource]);
|
||||
|
||||
// FIXME: how do we non flatten?
|
||||
// dir in common
|
||||
replacedFiles.push(flattensSources ? FILE.basename(aFilename) : FILE.relative(sourcesPath, aFilename));
|
||||
}, this);
|
||||
|
||||
|
||||
@@ -69,7 +69,9 @@ function objj_bundle()
|
||||
{
|
||||
this.path = NULL;
|
||||
this.info = NULL;
|
||||
|
||||
|
||||
this._URIMap = { };
|
||||
|
||||
this.__address = _objj_generateObjectHash();
|
||||
}
|
||||
|
||||
@@ -577,6 +579,7 @@ var OBJJUnrecognizedFormatException = "OBJJUnrecognizedFormatException";
|
||||
|
||||
var STATIC_MAGIC_NUMBER = "@STATIC",
|
||||
MARKER_PATH = "p",
|
||||
MARKER_URI = "u",
|
||||
MARKER_CODE = "c",
|
||||
MARKER_BUNDLE = "b",
|
||||
MARKER_TEXT = "t",
|
||||
@@ -618,7 +621,10 @@ function objj_decompile(aString, bundle)
|
||||
objj_files[file.path] = file;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case MARKER_URI: bundle._URIMap[text] = stream.getString();
|
||||
break;
|
||||
|
||||
case MARKER_BUNDLE: var bundlePath = DIRECTORY(bundle.path) + '/' + text;
|
||||
|
||||
file.bundle = objj_getBundleWithPath(bundlePath);
|
||||
|
||||
Reference in New Issue
Block a user