Merge branch 'master' into linux

This commit is contained in:
T. Joseph Carter 2017-11-15 18:25:23 -08:00
commit 234f1485f2
4 changed files with 28 additions and 24 deletions

2
.gitignore vendored
View File

@ -16,3 +16,5 @@ TestImage.*
.settings/org.eclipse.jdt.core.prefs
build/ACBuild.properties
build/AppleCommander.preferences
*.o
*.lst

View File

@ -10,10 +10,13 @@
; Assemble this code with the cc65 toolchain:
;
; cl65 AppleCommander-boot.s -t none --start-addr $0800
; cl65 -t none --start-addr 0x0800 -l AppleCommander-boot.lst AppleCommander-boot.s
; then copy resulting AppleCommander-boot to:
; .../src/com/webcodepro/applecommander/storage/AppleCommander-boot.dump
;
; Note that this command will hexdump a useful format for pasting and testing...
; hexdump -e '"08%02.2_ax:" 16/1 "%02x " "\n"' AppleCommander-boot
;
; Define as ASCII string with no attributes
.macro asc Arg
@ -144,16 +147,15 @@ SETUP:
ROTATE:
TXA
JSR CALCADDR
LDY #0
LDY #39
LDA (ADDR),Y
PHA
SHIFT:
INY
LDA (ADDR),Y
DEY
STA (ADDR),Y
LDA (ADDR),Y
INY
CPY #39
STA (ADDR),Y
DEY
BNE SHIFT
PLA
STA (ADDR),Y
@ -198,7 +200,7 @@ DATA2:
;
MESSAGE:
asccr "APPLECOMMANDER CREATED THIS DISK"
asccr "VISIT APPLECOMMANDER.SF.NET"
asccr "VISIT APPLECOMMANDER.GITHUB.IO"
.byte $8d
asc "INSERT ANOTHER DISK AND PRESS ANY KEY"
.byte $00

View File

@ -49,8 +49,7 @@ public abstract class AppleImage {
public static AppleImage create(int width, int height) {
String[] classes = {
"ImageIoImage", "SunJpegImage", "SwtImage" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Class<?> constructorArgType = AppleImage.class;
Class<?>[] constructorArgClasses = new Class[] { AppleImage.class };
Class[] constructorArgClasses = new Class[] { int.class, int.class };
Object[] constructorArgs = new Object[] {
new Integer(width), new Integer(height) };
for (int i=0; i<classes.length; i++) {
@ -58,8 +57,9 @@ public abstract class AppleImage {
Class<?> appleImageClass = Class.forName(
"com.webcodepro.applecommander.storage.filters.imagehandlers." //$NON-NLS-1$
+ classes[i]);
Constructor constructor =
constructorArgType.getConstructor(constructorArgClasses);
Constructor<?> constructor =
appleImageClass.getConstructor(constructorArgClasses);
AppleImage appleImage = (AppleImage)
constructor.newInstance(constructorArgs);
return appleImage;