mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix MBG CLA textures
This commit is contained in:
parent
ce1bcf9c2c
commit
9b342f4a23
2 changed files with 4 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ class Mission {
|
|||
if (this.isClaMission) {
|
||||
Marbleland.download(this.id, (zipEntries) -> {
|
||||
if (zipEntries != null) {
|
||||
ResourceLoader.loadZip(zipEntries);
|
||||
ResourceLoader.loadZip(zipEntries, game);
|
||||
onFinish();
|
||||
} else {
|
||||
MarbleGame.canvas.pushDialog(new MessageBoxOkDlg("Failed to download mission"));
|
||||
|
|
|
|||
|
|
@ -457,13 +457,15 @@ class ResourceLoader {
|
|||
return names;
|
||||
}
|
||||
|
||||
public static function loadZip(entries:Array<haxe.zip.Entry>) {
|
||||
public static function loadZip(entries:Array<haxe.zip.Entry>, game:String) {
|
||||
zipFilesystem.clear(); // We are only allowed to load one zip
|
||||
for (entry in entries) {
|
||||
var fname = entry.fileName.toLowerCase();
|
||||
#if sys
|
||||
fname = "data/" + fname;
|
||||
#end
|
||||
if (game == 'gold')
|
||||
fname = StringTools.replace(fname, 'interiors/', 'interiors_mbg/');
|
||||
if (exists(fname))
|
||||
continue;
|
||||
Console.log("Loaded zip entry: " + fname);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue