Commits

shl...@e1d6cbc8-cfd4-0310-8545-d6a54eb4f7ba  committed 6a58fe1

Got the source to compile with IBMJava2-1.4.1.

  • Participants
  • Parent commits ca7a1d4

Comments (0)

Files changed (9)

File source/java/source/Makefile

 # that
 #
 
-
-
 COMPILE = javac
 
-CFLAGS = -g
+CFLAGS = -g -sourcepath . -deprecation
 
 LOADERS = MikMod/Loaders/MOD_Loader.class \
-	MikMod/Loaders/S3M_Loader.class \
+        MikMod/Loaders/S3M_Loader.class \
         MikMod/Loaders/M15_Loader.class \
         MikMod/Loaders/UNI_Loader.class \
         MikMod/Loaders/MTM_Loader.class \
         MikMod/Drivers/NS_Driver.class  \
         MikMod/Drivers/Native_Driver.class
 
-OBJS =  MikMod/clMainBase.class \
+OBJS =  MikMod/MMIO/MMIO.class \
+        MikMod/clMainBase.class \
         MikMod/MUniTrk/clMUniTrk.class \
         MikMod/MLoader/clMLoader.class  \
-	MikMod/clDisplayBase.class \
-        MikMod/MMIO/MMIO.class \
-	MikMod/UNIMOD.class \
+        MikMod/clDisplayBase.class \
+        MikMod/UNIMOD.class \
         MikMod/INSTRUMENT.class \
         MikMod/SAMPLE.class \
         MikMod/ENVPT.class \
         MikMod/curmod.class \
-	MikMod/clLOADER.class \
+        MikMod/clLOADER.class \
         $(LOADERS)
 
 
 MIKCVT_OBJS = MikMod/clMDriverBase.class \
-	MikMod/clMikCvtMain.class \
+        MikMod/clMikCvtMain.class \
         MikCvtApp.class
 
 
 
 MIKMOD_OBJS = MikMod/ENVPR.class MikMod/AUDTMP.class MikMod/VINFO.class \
-	MikMod/UI/myUI.class MikMod/MDriver/clMDriver.class MikMod/Display/clDisplay.class \
-	MikMod/clMain.class MikMod/MPlayer/clMPlayer.class MikMod/Virtch/clVirtch.class \
+        MikMod/UI/myUI.class MikMod/MDriver/clMDriver.class MikMod/Display/clDisplay.class \
+        MikMod/clMain.class MikMod/MPlayer/clMPlayer.class MikMod/Virtch/clVirtch.class \
         MikMod/clDRIVER.class \
         $(DRIVERS) \
         MikModApp.class
 
 mikcvt: $(OBJS) $(MIKCVT_OBJS)
 
-mikmod: $(OBJS) $(MIKMOD_OBJS) native_driver
+# mikmod: $(OBJS) $(MIKMOD_OBJS) native_driver
+mikmod: $(OBJS) $(MIKMOD_OBJS)

File source/java/source/MikMod/Loaders/MTM_Loader.java

 
 
 class MTMHEADER{
-        byte id[];                            /* MTM file marker */
+	byte id[];                            /* MTM file marker */
 	short version;                          /* upper major, lower nibble minor version number */
 	byte  songname[];                     /* ASCIIZ songname */
 	short numtracks;                        /* number of tracks saved */
 
 
         
-}
+}

File source/java/source/MikMod/Loaders/XM_Loader.java

 	int packsize;                 /* (word) Packed patterndata size */
 }
 
-class MTMNOTE{
-	short a,b,c;
-}
-
-
 public class XM_Loader extends clLOADER
 {
 	public XMNOTE [] xmpat;

File source/java/source/MikMod/MLoader/clMLoader.java

 
                 if((d=new byte[len+1])!=null){
                     for(t=0;t<len;t++)
-                        d[t]=(s[t]>=0 && s[t]<32) ? ' ': s[t];
+                    {
+                        d[t]=((s[t]>=0 && s[t]<32) ? ((byte)' '): s[t]);
+                    }
                     d[t]=0;
                 }
                 String sPtr = new String(d, 0, 0, len);
         }
 }
 
-}
+}

File source/java/source/MikMod/MMIO/MMIO.java

 Portability:
 All systems - all compilers
 
-*/
-package MikMod.MMIO;
-
-import java.io.*;
-import MikMod.*;
-//import MikMod.clMainBase;
-
+*/
+package MikMod.MMIO;
 
-public class MMIO extends Object
-{
-	public MikMod.clMainBase m_;
-
-	public String myerr;
-	public String myerr_file;
-
-	protected int _mm_iobase;
-
-	public final int SEEK_SET = 0;
-	public final int SEEK_CUR = 1;
-        public final int SEEK_END = 2;
+import java.io.*;
+import MikMod.*;
+//import MikMod.clMainBase;
+
+
+public class MMIO extends Object
+{
+	public MikMod.clMainBase m_;
+
+	public String myerr;
+	public String myerr_file;
+
+	protected int _mm_iobase;
+
+	public final int SEEK_SET = 0;
+	public final int SEEK_CUR = 1;
+        public final int SEEK_END = 2;
 
         public final int EOF = -1;
 
 
 
 public int _mm_fseek(RandomAccessFile stream, int offset, int whence) 
-{
+{
 	try {
         if (whence == SEEK_SET)
             stream.seek(offset+_mm_iobase);
             stream.seek(stream.getFilePointer()+offset);
         else  // SEEK_END
             stream.seek(stream.length()+offset);
-        return 0;
-	}
-	catch(IOException ioe1)
-	{
-		return 0;
+        return 0;
+	}
+	catch(IOException ioe1)
+	{
+		return 0;
 	}
 	/*return fseek(stream,
 				 (whence==SEEK_SET) ? offset+_mm_iobase : offset,
 }
 
 public int _mm_ftell(RandomAccessFile stream)	 
-{
+{
 	try {
 		//return ftell(stream)-_mm_iobase;
-		return (int)(stream.getFilePointer() - _mm_iobase);
-	}
-	catch(IOException ioe1)
-	{
-		return -1;
+		return (int)(stream.getFilePointer() - _mm_iobase);
+	}
+	catch(IOException ioe1)
+	{
+		return -1;
 	}
 }
 
 }
 
 public void _mm_write_SBYTE(byte data,RandomAccessFile fp)	 
-{
+{
 	try {
         //fputc(data,fp);
         byte buf[] = new byte[1];
         buf[0] = data;
-        fp.write(buf,0,1);
-	}
-	catch(IOException ioe1)
-	{
+        fp.write(buf,0,1);
+	}
+	catch(IOException ioe1)
+	{
 	}
 }
 
 public void _mm_write_UBYTE(short data,RandomAccessFile fp)	 
-{
+{
 	try {
         //fputc(data,fp);
         byte buf[] = new byte[1];
         buf[0] = (data>127) ? ((byte)(data-256)) : ((byte)data);
-        fp.write(buf,0,1);
-	}
-	catch(IOException ioe1)
-	{
+        fp.write(buf,0,1);
+	}
+	catch(IOException ioe1)
+	{
 	}
 }
 
-public void _mm_write_M_UWORD(int data,RandomAccessFile fp)
-	 
+public void _mm_write_M_UWORD(int data,RandomAccessFile fp)
+	 
 {
 	_mm_write_UBYTE((short)((data>>8)&0xff),fp);
 	_mm_write_UBYTE((short)(data&0xff),fp);
 }
 
-public void _mm_write_I_UWORD(int data,RandomAccessFile fp)
-	 
+public void _mm_write_I_UWORD(int data,RandomAccessFile fp)
+	 
 {
 	_mm_write_UBYTE((short)(data&0xff),fp);
 	_mm_write_UBYTE((short)((data>>8)&0xff),fp);
 }
 
-public void _mm_write_M_SWORD(short data,RandomAccessFile fp)
-	 
+public void _mm_write_M_SWORD(short data,RandomAccessFile fp)
+	 
 {
         _mm_write_M_UWORD((data<0)?(((int)data)+0x10000):data,fp);
 }
 
-public void _mm_write_I_SWORD(short data,RandomAccessFile fp)
-	 
+public void _mm_write_I_SWORD(short data,RandomAccessFile fp)
+	 
 {
 	_mm_write_I_UWORD((data<0)?(((int)data)+0x10000):data,fp);
 }
 
-public void _mm_write_M_ULONG(int data,RandomAccessFile fp)
-	 
+public void _mm_write_M_ULONG(int data,RandomAccessFile fp)
+	 
 {
 	_mm_write_M_UWORD((data>>16)&0xffff,fp);
 	_mm_write_M_UWORD(data&0xffff,fp);
 }
 
-public void _mm_write_I_ULONG(int data,RandomAccessFile fp)
-	 
+public void _mm_write_I_ULONG(int data,RandomAccessFile fp)
+	 
 {
 	_mm_write_I_UWORD(data&0xffff,fp);
 	_mm_write_I_UWORD((data>>16)&0xffff,fp);
 }
 
-public void _mm_write_M_SLONG(int data,RandomAccessFile fp)
-	 
+public void _mm_write_M_SLONG(int data,RandomAccessFile fp)
+	 
 {
 	_mm_write_M_ULONG(data,fp);
 }
 
-public void _mm_write_I_SLONG(int data,RandomAccessFile fp)
+public void _mm_write_I_SLONG(int data,RandomAccessFile fp)
 	 
 {
 	_mm_write_I_ULONG(data,fp);
 public void _mm_write_I_ULONGS (int buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ _mm_write_I_ULONG(buffer[pos++],fp); number--; } }
 
 
-public byte _mm_read_SBYTE(RandomAccessFile fp)
+public byte _mm_read_SBYTE(RandomAccessFile fp)
 {
-	//return(fgetc(fp));
-	try
+	//return(fgetc(fp));
+	try
 	{
         byte buf[] = new byte[1];
         fp.read(buf,0,1);
-        return buf[0];
-	}
-	catch(IOException ioe1)
-	{
-		return -1;
+        return buf[0];
+	}
+	catch(IOException ioe1)
+	{
+		return -1;
 	}
 }
 
-public short _mm_read_UBYTE(RandomAccessFile fp)
+public short _mm_read_UBYTE(RandomAccessFile fp)
 	 
-{
-	try
+{
+	try
 	{
     //return(fgetc(fp));
-    return (short)fp.read();
-	}
-	catch (IOException ioe1)
-	{
-		return -1;
+    return (short)fp.read();
+	}
+	catch (IOException ioe1)
+	{
+		return -1;
 	}
 }
 
-public int _mm_read_M_UWORD(RandomAccessFile fp)
+public int _mm_read_M_UWORD(RandomAccessFile fp)
 	 
 {
 	int result=((int)_mm_read_UBYTE(fp))<<8;
 	return result;
 }
 
-public int _mm_read_I_UWORD(RandomAccessFile fp)
+public int _mm_read_I_UWORD(RandomAccessFile fp)
 	 
 {
 	int result=_mm_read_UBYTE(fp);
 	return result;
 }
 
-public short _mm_read_M_SWORD(RandomAccessFile fp)
+public short _mm_read_M_SWORD(RandomAccessFile fp)
 	 
 {
 	short result=(short)(_mm_read_UBYTE(fp)<<8);
 	//return((short)_mm_read_M_UWORD(fp));
 }
 
-public short _mm_read_I_SWORD(RandomAccessFile fp)
+public short _mm_read_I_SWORD(RandomAccessFile fp)
 	 
 {
         short result = _mm_read_UBYTE(fp);
 	//return((short)_mm_read_I_UWORD(fp));
 }
 
-public int _mm_read_M_ULONG(RandomAccessFile fp)
+public int _mm_read_M_ULONG(RandomAccessFile fp)
 	 
 {
 	int result=((int)_mm_read_M_UWORD(fp))<<16;
 	return result;
 }
 
-public int _mm_read_I_ULONG(RandomAccessFile fp)
+public int _mm_read_I_ULONG(RandomAccessFile fp)
 	 
 {
 	int result=_mm_read_I_UWORD(fp);
 	return result;
 }
 
-public int _mm_read_M_SLONG(RandomAccessFile fp)
+public int _mm_read_M_SLONG(RandomAccessFile fp)
 	 
 {
 	return((int)_mm_read_M_ULONG(fp));
 }
 
-public int _mm_read_I_SLONG(RandomAccessFile fp)
+public int _mm_read_I_SLONG(RandomAccessFile fp)
 	 
 {
 	return((int)_mm_read_I_ULONG(fp));
 }
-
-// isEOF is basically a utility function to catch all the
-// IOExceptions from the dependandt functions.
-// It's also make the code look more like the original
-// C source because it corresponds to feof.
-public boolean isEOF(RandomAccessFile fp)
-{
-	try {
-		return (fp.getFilePointer() < fp.length());
-	}
-	catch (IOException ioe1)
-	{
-		return true;
-	}
-}
+
+// isEOF is basically a utility function to catch all the
+// IOExceptions from the dependandt functions.
+// It's also make the code look more like the original
+// C source because it corresponds to feof.
+public boolean isEOF(RandomAccessFile fp)
+{
+	try {
+		return (fp.getFilePointer() < fp.length());
+	}
+	catch (IOException ioe1)
+	{
+		return true;
+	}
+}
 
 
 public boolean _mm_read_str(byte buffer[],int number,RandomAccessFile fp) 	 
-{
+{
 	try {
         //fread(buffer,1,number,fp);
         fp.read(buffer,0,number);
         //return !feof(fp);
-        return !isEOF(fp);
-	}
-	catch(IOException ioe1)
-	{
-		return false;
+        return !isEOF(fp);
 	}
-}
+	catch(IOException ioe1)
+	{
+		return false;
+	}
+}
 
 public boolean _mm_read_SBYTES (byte buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ buffer[pos++]=_mm_read_SBYTE(fp); number--; } return !isEOF(fp); }
 public boolean _mm_read_UBYTES2 (short buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ buffer[pos++]=_mm_read_UBYTE(fp); number--; } return !isEOF(fp); }
 public boolean _mm_read_M_ULONGS (int buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ buffer[pos++]=_mm_read_M_ULONG(fp); number--; } return !isEOF(fp); }
 public boolean _mm_read_I_SLONGS (int buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ buffer[pos++]=_mm_read_I_SLONG(fp); number--; } return !isEOF(fp); }
 public boolean _mm_read_I_ULONGS (int buffer[], int number, RandomAccessFile fp)  { int pos=0; while(number>0){ buffer[pos++]=_mm_read_I_ULONG(fp); number--; } return !isEOF(fp); }
-
-
-}
+
+
+}

File source/java/source/MikMod/MPlayer/clMPlayer.java

 
 public int GetPeriod(short note,int c2spd)
 {
-	if((pf.flags&m_.MUniTrk.UF_XMPERIODS) != 0){
-		return ((pf.flags&m_.MUniTrk.UF_LINEAR) != 0) ? getlinearperiod(note,c2spd) : getlogperiod(note,c2spd);
+	if((pf.flags&MikMod.MUniTrk.clMUniTrk.UF_XMPERIODS) != 0){
+		return ((pf.flags&MikMod.MUniTrk.clMUniTrk.UF_LINEAR) != 0) ? getlinearperiod(note,c2spd) : getlogperiod(note,c2spd);
 	}
 	return(getoldperiod(note,c2spd));
 }
 
 		switch(c){
 
-			case m_.MUniTrk.UNI_NOTE:
+			case MikMod.MUniTrk.clMUniTrk.UNI_NOTE:
 				note=m_.MUniTrk.UniGetByte();
 
 				if(note==96){                   /* key off ? */
 				}
 				break;
 
-			case m_.MUniTrk.UNI_INSTRUMENT:
+			case MikMod.MUniTrk.clMUniTrk.UNI_INSTRUMENT:
 				inst=m_.MUniTrk.UniGetByte();
 				if(inst>=pf.numins) break;             /* <- safety valve */
 
 
 		switch(c){
 
-			case m_.MUniTrk.UNI_NOTE:
-			case m_.MUniTrk.UNI_INSTRUMENT:
+			case MikMod.MUniTrk.clMUniTrk.UNI_NOTE:
+			case MikMod.MUniTrk.clMUniTrk.UNI_INSTRUMENT:
 				m_.MUniTrk.UniSkipOpcode(c);
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT0:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT0:
 				DoPTEffect0(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT1:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT1:
 				dat=m_.MUniTrk.UniGetByte();
 				if(dat!=0) a.slidespeed=(int)dat<<2;
 				if(vbtick != 0) a.tmpperiod-=a.slidespeed;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT2:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT2:
 				dat=m_.MUniTrk.UniGetByte();
 				if(dat!=0) a.slidespeed=(int)dat<<2;
 				if(vbtick != 0) a.tmpperiod+=a.slidespeed;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT3:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT3:
 				dat=m_.MUniTrk.UniGetByte();
 				a.kick=false;                              /* temp XM fix */
 				if(dat!=0){
 				a.ownper=1;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT4:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT4:
 				dat=m_.MUniTrk.UniGetByte();
 				if((dat&0x0f) != 0) a.vibdepth=(short)(dat&0xf);
 				if((dat&0xf0) != 0) a.vibspd=(short)((dat&0xf0)>>2);
 				a.ownper=1;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT5:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT5:
 				dat=m_.MUniTrk.UniGetByte();
 				a.kick=false;
 				DoToneSlide();
 				a.ownper=1;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT6:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT6:
 				dat=m_.MUniTrk.UniGetByte();
 				DoVibrato();
 				DoVolSlide(dat);
 				a.ownper=1;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT7:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT7:
 				dat=m_.MUniTrk.UniGetByte();
 				if((dat&0x0f) != 0) a.trmdepth=(short)(dat&0xf);
 				if((dat&0xf0) != 0) a.trmspd=(short)((dat&0xf0)>>2);
 				a.ownvol=1;
 				break;
 
-                        case m_.MUniTrk.UNI_PTEFFECT8:
-                                dat=m_.MUniTrk.UniGetByte();
-                                if(mp_panning){
-                                        a.panning=dat;
-                                        pf.panning[mp_channel]=dat;
-                                }
-                                break;
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT8:
+				dat=m_.MUniTrk.UniGetByte();
+				if(mp_panning){
+					a.panning=dat;
+					pf.panning[mp_channel]=dat;
+				}
+				break;
 
-			case m_.MUniTrk.UNI_PTEFFECT9:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECT9:
 				dat=m_.MUniTrk.UniGetByte();
 				if(dat != 0) a.soffset=(int)dat<<8;       /* <- 0.43 fix.. */
 				a.start=a.soffset;
 				if(a.start>a.s.length) a.start=a.s.length;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTA:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTA:
 				DoVolSlide(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTB:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTB:
 				dat=m_.MUniTrk.UniGetByte();
 				if(patdly2 != 0) break;
 				if(dat<mp_sngpos) break; /* avoid eternal looping */
 				posjmp=3; 
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTC:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTC:
 				dat=m_.MUniTrk.UniGetByte();
 				if(vbtick != 0) break;
 				if(dat>64) dat=64;
 				a.tmpvolume=(byte)dat;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTD:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTD:
 				dat=m_.MUniTrk.UniGetByte();
 				if(patdly2 != 0) break;
 				{
 				posjmp=3;
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTE:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTE:
 				DoEEffects(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_PTEFFECTF:
+			case MikMod.MUniTrk.clMUniTrk.UNI_PTEFFECTF:
 				dat=m_.MUniTrk.UniGetByte();
 
 				if((vbtick != 0) || (patdly2 != 0)) break;
 				}
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTD:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTD:
 				DoS3MVolSlide(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTE:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTE:
 				DoS3MSlideDn(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTF:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTF:
 				DoS3MSlideUp(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTI:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTI:
 				DoS3MTremor(m_.MUniTrk.UniGetByte());
 				a.ownvol=1;
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTQ:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTQ:
 				DoS3MRetrig(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTA:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTA:
 				DoS3MSpeed(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_S3MEFFECTT:
+			case MikMod.MUniTrk.clMUniTrk.UNI_S3MEFFECTT:
 				DoS3MTempo(m_.MUniTrk.UniGetByte());
 				break;
 
-			case m_.MUniTrk.UNI_XMEFFECTA:
+			case MikMod.MUniTrk.clMUniTrk.UNI_XMEFFECTA:
 				DoXMVolSlide(m_.MUniTrk.UniGetByte());
 				break;
 
-                        case m_.MUniTrk.UNI_XMEFFECTG:
+                        case MikMod.MUniTrk.clMUniTrk.UNI_XMEFFECTG:
                                 globalvolume=(byte)m_.MUniTrk.UniGetByte();
                                 break;
 
-                        case m_.MUniTrk.UNI_XMEFFECTH:
+                        case MikMod.MUniTrk.clMUniTrk.UNI_XMEFFECTH:
                                 DoXMGlobalSlide(m_.MUniTrk.UniGetByte());
                                 break;
 
-			case m_.MUniTrk.UNI_XMEFFECTP:
+			case MikMod.MUniTrk.clMUniTrk.UNI_XMEFFECTP:
 				DoXMPanSlide(m_.MUniTrk.UniGetByte());
 				break;
 
 
 				mp_channel=(short)t;
 				a=mp_audio[t];
-                                //a.row = (tr<pf.numtrk) ? m_.MUniTrk.UniFindRow(pf.tracks[tr],mp_patpos) : ((short*)null);
+                                //a.row = (tr<pf.numtrk) ? MikMod.MUniTrk.clMUniTrk.UniFindRow(pf.tracks[tr],mp_patpos) : ((short*)null);
                                 if (tr<pf.numtrk)
                                 {
                                     a.row = pf.tracks[tr];
 
 				switch(ui_result)
 					{
-					case m_.UI.UI_DELETE_MARKED:
+					case MikMod.UI.myUI.UI_DELETE_MARKED:
 						/*if(!m_.cur_mod.deleted)
 							break;
 						if(!unlink(m_.cur_mod.filename))
 						m_.Display.display_all(); */
 						/* FALL THROUGH */
 
-					case m_.UI.UI_NEXT_SONG:
+					case MikMod.UI.myUI.UI_NEXT_SONG:
 						m_.MDriver.MD_PatternChange();
 						m_.MPlayer.play_current=false;
 						break;
-					case m_.UI.UI_PREVIOUS_SONG: /* if halfway through mod restart it, if
+
+                    case MikMod.UI.myUI.UI_PREVIOUS_SONG: /* if halfway through mod restart it, if
 							          beginning jump to the previous one */
-						if ((m_.UI.count_song < m_.UI.SMALL_DELAY) && (m_.optind>1) )
+						if ((m_.UI.count_song < MikMod.UI.myUI.SMALL_DELAY) && 
+                            (m_.optind>1) )
 						{
 							m_.optind-=2;
 							m_.MPlayer.play_current=false;
 						m_.UI.count_song=0;
 						m_.MDriver.MD_PatternChange();
 						break;
-					case m_.UI.UI_QUIT:
+					case MikMod.UI.myUI.UI_QUIT:
 						m_.MDriver.MD_PatternChange();
 						quit=true;
 						break;
-					case m_.UI.UI_JUMP_TO_NEXT_PATTERN:
+					case MikMod.UI.myUI.UI_JUMP_TO_NEXT_PATTERN:
 						m_.MDriver.MD_PatternChange();
 						MP_NextPosition();
 						break;
-					case m_.UI.UI_JUMP_TO_PREV_PATTERN:
+					case MikMod.UI.myUI.UI_JUMP_TO_PREV_PATTERN:
 						m_.MDriver.MD_PatternChange();
-						if (m_.UI.count_pattern < m_.UI.SMALL_DELAY) /* near start of pattern? */
+						if (m_.UI.count_pattern < MikMod.UI.myUI.SMALL_DELAY) /* near start of pattern? */
 							MP_PrevPosition();
 						else
 							MP_RestartPosition();
 						m_.UI.count_pattern=0;
 						break;
-					case m_.UI.UI_PAUSE:
+					case MikMod.UI.myUI.UI_PAUSE:
 						pause_flag=~pause_flag;
 						if(pause_flag==127)
 						{
 						}
 						break;
 
-					case m_.UI.UI_SPEED_UP:
+					case MikMod.UI.myUI.UI_SPEED_UP:
 						if ((old_bpm*(speed_constant+0.05))<=255)
 							speed_constant+=0.05;
 						break;
-					case m_.UI.UI_SLOW_DOWN:
+					case MikMod.UI.myUI.UI_SLOW_DOWN:
 						if ((old_bpm*(speed_constant-0.05))>10)
 							speed_constant-=0.05;
 						break;
-					case m_.UI.UI_NORMAL_SPEED:
+					case MikMod.UI.myUI.UI_NORMAL_SPEED:
 						speed_constant=(float)1.0;
 						break;
-					case m_.UI.UI_VOL_UP:
+					case MikMod.UI.myUI.UI_VOL_UP:
 						if(mp_volume<250)
 							mp_volume+=5;
 						break;
-					case m_.UI.UI_VOL_DOWN:
+					case MikMod.UI.myUI.UI_VOL_DOWN:
 						if(mp_volume>5)
 							mp_volume-=5;
 						break;
 
-					case m_.UI.UI_NORMAL_VOL:
+					case MikMod.UI.myUI.UI_NORMAL_VOL:
 						mp_volume=100;
 						break;
 
-					case m_.UI.UI_MARK_DELETED:
+					case MikMod.UI.myUI.UI_MARK_DELETED:
 						if(!m_.cur_mod.deleted)
 							m_.cur_mod.deleted=true;
 						else if (m_.cur_mod.deleted==true)
 						m_.Display.display_all();
 						break;
 
-					case m_.UI.UI_SELECT_STEREO:
+					case MikMod.UI.myUI.UI_SELECT_STEREO:
 						m_.MDriver.md_mode |= m_.DMODE_STEREO;
 						reinit_audio=true;
 						break;
 
-					case m_.UI.UI_SELECT_MONO:
+					case MikMod.UI.myUI.UI_SELECT_MONO:
 						m_.MDriver.md_mode &= ~m_.DMODE_STEREO;
 						reinit_audio=true;
 						break;
 
-					case m_.UI.UI_SELECT_INTERP:
+					case MikMod.UI.myUI.UI_SELECT_INTERP:
 						m_.MDriver.md_mode |= m_.DMODE_INTERP;
 						reinit_audio=true;
 						break;
 
-					case m_.UI.UI_SELECT_NONINTERP:
+					case MikMod.UI.myUI.UI_SELECT_NONINTERP:
 						m_.MDriver.md_mode &= ~m_.DMODE_INTERP;
 						reinit_audio=true;
 						break;
 
-					case m_.UI.UI_SELECT_8BIT:
+					case MikMod.UI.myUI.UI_SELECT_8BIT:
 						m_.MDriver.md_mode &= ~m_.DMODE_16BITS;
 						reinit_audio=true;
 						break;
 
-					case m_.UI.UI_SELECT_16BIT:
+					case MikMod.UI.myUI.UI_SELECT_16BIT:
 						m_.MDriver.md_mode |= m_.DMODE_16BITS;
 						reinit_audio=true;
 						break;
                     // m_.MDriver.MD_VoiceSetPanning(t,(a.panning) & 0xFF);
 		}
 
-		if((pf.flags & m_.MUniTrk.UF_LINEAR) != 0)
+		if((pf.flags & MikMod.MUniTrk.clMUniTrk.UF_LINEAR) != 0)
 			m_.MDriver.MD_VoiceSetFrequency((short)t,GetFreq2(a.period));
 		else
 			m_.MDriver.MD_VoiceSetFrequency((short)t,(3579546<<2)/a.period);
 
 
 
-}
+}

File source/java/source/MikMod/MUniTrk/clMUniTrk.java

         all known effects:
     */
 
-    public final short UNI_NOTE=1;
-    public final short UNI_INSTRUMENT=2;
-    public final short UNI_PTEFFECT0=3;
-    public final short UNI_PTEFFECT1=4;
-    public final short UNI_PTEFFECT2=5;
-    public final short UNI_PTEFFECT3=6;
-    public final short UNI_PTEFFECT4=7;
-    public final short UNI_PTEFFECT5=8;
-    public final short UNI_PTEFFECT6=9;
-    public final short UNI_PTEFFECT7=10;
-    public final short UNI_PTEFFECT8=11;
-    public final short UNI_PTEFFECT9=12;
-    public final short UNI_PTEFFECTA=13;
-    public final short UNI_PTEFFECTB=14;
-    public final short UNI_PTEFFECTC=15;
-    public final short UNI_PTEFFECTD=16;
-    public final short UNI_PTEFFECTE=17;
-    public final short UNI_PTEFFECTF=18;
-    public final short UNI_S3MEFFECTA=19;
-    public final short UNI_S3MEFFECTD=20;
-    public final short UNI_S3MEFFECTE=21;
-    public final short UNI_S3MEFFECTF=22;
-    public final short UNI_S3MEFFECTI=23;
-    public final short UNI_S3MEFFECTQ=24;
-    public final short UNI_S3MEFFECTT=25;
-    public final short UNI_XMEFFECTA=26;
-    public final short UNI_XMEFFECTG=27;
-    public final short UNI_XMEFFECTH=28;
-    public final short UNI_XMEFFECTP=29;
+    public static final short UNI_NOTE=1;
+    public static final short UNI_INSTRUMENT=2;
+    public static final short UNI_PTEFFECT0=3;
+    public static final short UNI_PTEFFECT1=4;
+    public static final short UNI_PTEFFECT2=5;
+    public static final short UNI_PTEFFECT3=6;
+    public static final short UNI_PTEFFECT4=7;
+    public static final short UNI_PTEFFECT5=8;
+    public static final short UNI_PTEFFECT6=9;
+    public static final short UNI_PTEFFECT7=10;
+    public static final short UNI_PTEFFECT8=11;
+    public static final short UNI_PTEFFECT9=12;
+    public static final short UNI_PTEFFECTA=13;
+    public static final short UNI_PTEFFECTB=14;
+    public static final short UNI_PTEFFECTC=15;
+    public static final short UNI_PTEFFECTD=16;
+    public static final short UNI_PTEFFECTE=17;
+    public static final short UNI_PTEFFECTF=18;
+    public static final short UNI_S3MEFFECTA=19;
+    public static final short UNI_S3MEFFECTD=20;
+    public static final short UNI_S3MEFFECTE=21;
+    public static final short UNI_S3MEFFECTF=22;
+    public static final short UNI_S3MEFFECTI=23;
+    public static final short UNI_S3MEFFECTQ=24;
+    public static final short UNI_S3MEFFECTT=25;
+    public static final short UNI_XMEFFECTA=26;
+    public static final short UNI_XMEFFECTG=27;
+    public static final short UNI_XMEFFECTH=28;
+    public static final short UNI_XMEFFECTP=29;
 
     /*
             Unimod flags
     */
     
-    public final int UF_XMPERIODS =  1;               /* if set use XM periods/finetuning */
-    public final int UF_LINEAR    =  2;               /* if set use LINEAR periods */
+    public static final int UF_XMPERIODS =  1;               /* if set use XM periods/finetuning */
+    public static final int UF_LINEAR    =  2;               /* if set use LINEAR periods */
 
         
 
 	public int lastp;			/* holds index to the previous row (needed for compressing) */
 
 
-protected final int BUFPAGE = 128;            /* smallest unibuffer size */
-protected final int TRESHOLD = 16;
+protected static final int BUFPAGE = 128;            /* smallest unibuffer size */
+protected static final int TRESHOLD = 16;
 
 /* unibuffer is increased by BUFPAGE
   bytes when unipc reaches unimax-TRESHOLD */
         unibuf=null;
 }
 
-}
+}

File source/java/source/MikMod/UI/myUI.java

 
 public class myUI extends Object
 {
-public final int BASE_UI = 10;
-public final int UI_NEXT_SONG =   (BASE_UI);            /* load next song */
+public static final int BASE_UI = 10;
+public static final int UI_NEXT_SONG =   (BASE_UI);            /* load next song */
 
-public final int UI_RESTART =(BASE_UI + 1);          /* restart current song. Not
+public static final int UI_RESTART =(BASE_UI + 1);          /* restart current song. Not
 					     quite jump to 0 */
-public final int UI_PREVIOUS_SONG =(BASE_UI + 2);    /* load previous song */
+public static final int UI_PREVIOUS_SONG =(BASE_UI + 2);    /* load previous song */
 
-public final int UI_LOAD_SONG =(BASE_UI + 3);        /* load song. Name as value */
-public final int UI_SET_BPM =(BASE_UI + 4);          /* set beat per minute to value */
+public static final int UI_LOAD_SONG =(BASE_UI + 3);        /* load song. Name as value */
+public static final int UI_SET_BPM =(BASE_UI + 4);          /* set beat per minute to value */
 
-public final int UI_JUMP_TO_NEXT_PATTERN= (BASE_UI + 5);  /* jump to pattern */
-public final int UI_RESTART_PATTERN= (BASE_UI + 7);  /* jump to pattern */
-public final int UI_JUMP_TO_PREV_PATTERN= (BASE_UI + 7);  /* jump to pattern */
+public static final int UI_JUMP_TO_NEXT_PATTERN= (BASE_UI + 5);  /* jump to pattern */
+public static final int UI_RESTART_PATTERN= (BASE_UI + 7);  /* jump to pattern */
+public static final int UI_JUMP_TO_PREV_PATTERN= (BASE_UI + 7);  /* jump to pattern */
 
-public final int UI_QUIT= (BASE_UI + 6);             /* need I say more ? */
-public final int UI_DISPLAY= (BASE_UI + 7);          /* status of scrolling window:
+public static final int UI_QUIT= (BASE_UI + 6);             /* need I say more ? */
+public static final int UI_DISPLAY= (BASE_UI + 7);          /* status of scrolling window:
 					     true or false */
-public final int UI_PAUSE= (BASE_UI + 8);             /* need I say more ? */
+public static final int UI_PAUSE= (BASE_UI + 8);             /* need I say more ? */
 
-public final int UI_SPEED_UP= (BASE_UI + 9);             /* raise the speed */
-public final int UI_SLOW_DOWN= (BASE_UI + 10);         /* slow down */
-public final int UI_NORMAL_SPEED= (BASE_UI + 11);      /* return to normal */
+public static final int UI_SPEED_UP= (BASE_UI + 9);             /* raise the speed */
+public static final int UI_SLOW_DOWN= (BASE_UI + 10);         /* slow down */
+public static final int UI_NORMAL_SPEED= (BASE_UI + 11);      /* return to normal */
 
-public final int UI_VOL_UP= (BASE_UI + 12);             /* raise the volume */
-public final int UI_VOL_DOWN= (BASE_UI + 13);         /* quieten down */
-public final int UI_NORMAL_VOL= (BASE_UI + 14);      /* return to normal */
+public static final int UI_VOL_UP= (BASE_UI + 12);             /* raise the volume */
+public static final int UI_VOL_DOWN= (BASE_UI + 13);         /* quieten down */
+public static final int UI_NORMAL_VOL= (BASE_UI + 14);      /* return to normal */
 
-public final int UI_MARK_DELETED= (BASE_UI + 15); /* mark mod for deletion */
-public final int UI_DELETE_MARKED= (BASE_UI + 16); /* delete MARKED mods, ignore otherwise */
+public static final int UI_MARK_DELETED= (BASE_UI + 15); /* mark mod for deletion */
+public static final int UI_DELETE_MARKED= (BASE_UI + 16); /* delete MARKED mods, ignore otherwise */
 
-public final int UI_SELECT_MONO= (BASE_UI + 17);	/* additions for changing of audio */
-public final int UI_SELECT_STEREO= (BASE_UI + 18); /* paramaters on the fly */
+public static final int UI_SELECT_MONO= (BASE_UI + 17);	/* additions for changing of audio */
+public static final int UI_SELECT_STEREO= (BASE_UI + 18); /* paramaters on the fly */
 
-public final int UI_SELECT_INTERP= (BASE_UI + 19);
-public final int UI_SELECT_NONINTERP= (BASE_UI + 20);
+public static final int UI_SELECT_INTERP= (BASE_UI + 19);
+public static final int UI_SELECT_NONINTERP= (BASE_UI + 20);
 
-public final int UI_SELECT_8BIT= (BASE_UI + 21);
-public final int UI_SELECT_16BIT= (BASE_UI + 22);
+public static final int UI_SELECT_8BIT= (BASE_UI + 21);
+public static final int UI_SELECT_16BIT= (BASE_UI + 22);
 
-public final int SMALL_DELAY = 15;
+public static final int SMALL_DELAY = 15;
 
 
 	public clMain m_;
    return m_.MPlayer.ui_result;
    }
 
-}
+}

File source/java/source/MikMod/clMain.java

 	*/
 
 
-	NS_Driver cl_drv_nos = new NS_Driver(this);
-	MDriver.MD_RegisterDriver(cl_drv_nos);
-	Raw_Driver cl_drv_raw = new Raw_Driver(this);
-        MDriver.MD_RegisterDriver(cl_drv_raw);
-        Native_Driver cl_drv_native = new Native_Driver(this);
-        MDriver.MD_RegisterDriver(cl_drv_native);
-	
+    NS_Driver cl_drv_nos = new NS_Driver(this);
+    MDriver.MD_RegisterDriver(cl_drv_nos);
+    Raw_Driver cl_drv_raw = new Raw_Driver(this);
+    MDriver.MD_RegisterDriver(cl_drv_raw);
+    /*
+     * Commenting out so we won't depend on the native extension.
+    Native_Driver cl_drv_native = new Native_Driver(this);
+    MDriver.MD_RegisterDriver(cl_drv_native);
+    */
+
 
 
 
 	return 1;
 }
 
-}
+}