mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-08 11:31:22 +00:00
Added support to handle canCompile flag per ProDOS file type.
This commit is contained in:
parent
991b574427
commit
10b53e0767
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* AppleCommander - An Apple ][ image utility.
|
||||
* Copyright (C) 2002 by Robert Greene
|
||||
* Copyright (C) 2002-3 by Robert Greene
|
||||
* robgreene at users.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@ -74,10 +74,12 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
private byte type;
|
||||
private String string;
|
||||
private boolean addressRequired;
|
||||
public ProdosFileType(byte type, String string, boolean addressRequired) {
|
||||
private boolean canCompile;
|
||||
public ProdosFileType(byte type, String string, boolean addressRequired, boolean canCompile) {
|
||||
this.type = type;
|
||||
this.string = string;
|
||||
this.addressRequired = addressRequired;
|
||||
this.canCompile = canCompile;
|
||||
}
|
||||
public byte getType() {
|
||||
return type;
|
||||
@ -88,6 +90,9 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
public boolean needsAddress() {
|
||||
return addressRequired;
|
||||
}
|
||||
public boolean canCompile() {
|
||||
return canCompile;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -151,7 +156,9 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
}
|
||||
boolean addressRequired = Boolean.valueOf((String) properties.get(
|
||||
"filetype." + byt + ".address")).booleanValue();
|
||||
fileTypes[i] = new ProdosFileType((byte)i, string, addressRequired);
|
||||
boolean canCompile = Boolean.valueOf((String) properties.get(
|
||||
"filetype." + byt + ".compile")).booleanValue();
|
||||
fileTypes[i] = new ProdosFileType((byte)i, string, addressRequired, canCompile);
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
@ -908,4 +915,15 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this filetype can be compiled.
|
||||
*/
|
||||
public boolean canCompile(String filetype) {
|
||||
ProdosFileType fileType = findFileType(filetype);
|
||||
if (fileType != null) {
|
||||
return fileType.canCompile();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user