Use PACKBITS macros

This commit is contained in:
Zane Kaminski 2020-07-15 02:24:45 -04:00
parent 27f3f5c947
commit b8baa72a5c
2 changed files with 10 additions and 10 deletions

16
rdisk.c
View File

@ -11,7 +11,7 @@
#ifdef RDISK_COMPRESS_ICON
#include <Quickdraw.h>
const char const RDiskIconCompressed[92] = {
-1 * (76 - 1), 0b00000000, /*
PackBits_Repeat(76), 0b00000000, /*
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
@ -31,9 +31,9 @@ const char const RDiskIconCompressed[92] = {
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000, */
-1 * (4 - 1), 0b11111111, /*
PackBits_Repeat(4), 0b11111111, /*
0b11111111, 0b11111111, 0b11111111, 0b11111111, */
(40 - 1),
PackBits_Literal(40),
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b10000000, 0b00000000, 0b00000000, 0b00000001,
0b10001111, 0b00011110, 0b00111100, 0b01111001,
@ -44,12 +44,12 @@ const char const RDiskIconCompressed[92] = {
0b11000000, 0b00000000, 0b00000000, 0b00000001,
0b01010101, 0b01010101, 0b11010101, 0b01010101,
0b01111111, 0b11111111, 0b01111111, 0b11111111,
-1 * (12 - 1), 0b00000000, /*
PackBits_Repeat(12), 0b00000000, /*
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000, */
-1 * (76 - 1), 0b00000000, /*
PackBits_Repeat(76), 0b00000000, /*
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
@ -69,7 +69,7 @@ const char const RDiskIconCompressed[92] = {
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000, */
-1 * (32 - 1), 0b11111111, /*
PackBits_Repeat(32), 0b11111111, /*
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
@ -78,10 +78,10 @@ const char const RDiskIconCompressed[92] = {
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111, */
(8 - 1),
PackBits_Literal(8),
0b01111111, 0b11111111, 0b11111111, 0b11111111,
0b01111111, 0b11111111, 0b11111111, 0b11111111,
-1 * (12 - 1), 0b00000000, /*
PackBits_Repeat(12), 0b00000000, /*
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000, */

View File

@ -35,14 +35,14 @@ void RDiskBreak() = { 0xA9FF };
typedef void (*RDiskCopy_t)(Ptr, Ptr, unsigned long);
//#define RDISK_COMPRESS_ICON
//#define RDISK_COMPRESS_ICON_ENABLE
typedef struct RDiskStorage_s {
DrvSts2 status;
char initialized;
char installed;
char postBoot;
Ptr ramdisk;
#ifdef RDISK_COMPRESS_ICON
#ifdef RDISK_COMPRESS_ICON_ENABLE
char icon[285];
#endif
} RDiskStorage_t;