mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-24 14:29:29 +00:00
added a const
This commit is contained in:
parent
42985fb8e7
commit
2e36653775
|
@ -19,6 +19,7 @@ public abstract class HiResImage extends AbstractFile
|
||||||
{ "Paintworks Packed SHR Image", "Packed Super Hi-Res Image",
|
{ "Paintworks Packed SHR Image", "Packed Super Hi-Res Image",
|
||||||
"Super Hi-Res Image (Apple Preferred Format)", "Packed QuickDraw II PICT File",
|
"Super Hi-Res Image (Apple Preferred Format)", "Packed QuickDraw II PICT File",
|
||||||
"Packed Super Hi-Res 3200 color image" };
|
"Packed Super Hi-Res 3200 color image" };
|
||||||
|
static final int COLOR_TABLE_SIZE = 32;
|
||||||
|
|
||||||
// ---- ---- ------ -------------------------------------- ------------------------
|
// ---- ---- ------ -------------------------------------- ------------------------
|
||||||
// File Type Aux Name Description
|
// File Type Aux Name Description
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class SHRPictureFile2 extends HiResImage
|
||||||
|
|
||||||
colorTables = new ColorTable[16];
|
colorTables = new ColorTable[16];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
colorTables[i] = new ColorTable (i, this.buffer, 32256 + i * 32);
|
colorTables[i] = new ColorTable (i, this.buffer, 32256 + i * COLOR_TABLE_SIZE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class SHRPictureFile2 extends HiResImage
|
||||||
colorTables = new ColorTable[200];
|
colorTables = new ColorTable[200];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
{
|
{
|
||||||
colorTables[i] = new ColorTable (i, this.buffer, 4 + i * 32);
|
colorTables[i] = new ColorTable (i, this.buffer, 4 + i * COLOR_TABLE_SIZE);
|
||||||
colorTables[i].reverse ();
|
colorTables[i].reverse ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public class SHRPictureFile2 extends HiResImage
|
||||||
|
|
||||||
colorTables = new ColorTable[16];
|
colorTables = new ColorTable[16];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
colorTables[i] = new ColorTable (i, buffer, 32256 + i * 32);
|
colorTables[i] = new ColorTable (i, buffer, 32256 + i * COLOR_TABLE_SIZE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ public class SHRPictureFile2 extends HiResImage
|
||||||
|
|
||||||
colorTables = new ColorTable[16];
|
colorTables = new ColorTable[16];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
colorTables[i] = new ColorTable (i, buffer, 32256 + i * 32);
|
colorTables[i] = new ColorTable (i, buffer, 32256 + i * COLOR_TABLE_SIZE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -164,11 +164,11 @@ public class SHRPictureFile2 extends HiResImage
|
||||||
failureReason = "Buffer should be 38,400 bytes";
|
failureReason = "Buffer should be 38,400 bytes";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int maxTables = (buffer.length - 3200) / 32;
|
int maxTables = (buffer.length - 3200) / COLOR_TABLE_SIZE;
|
||||||
colorTables = new ColorTable[maxTables];
|
colorTables = new ColorTable[maxTables];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
{
|
{
|
||||||
colorTables[i] = new ColorTable (i, buffer, 32000 + i * 32);
|
colorTables[i] = new ColorTable (i, buffer, 32000 + i * COLOR_TABLE_SIZE);
|
||||||
colorTables[i].reverse ();
|
colorTables[i].reverse ();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user