home *** CD-ROM | disk | FTP | other *** search
Wrap
/***********************************************************************\ Extract {PICT|FONT}, applications to extract Mac resources to separate files Copyright (C) 1993 David John Burrowes This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author, David John Burrowes, can be reached at: davidjohn@kira.net.netcom.com David John Burrowes 1926 Ivy #10 San Mateo, CA 94403-1367 \***********************************************************************/ /****************************************************************** Beginning.r Heavily modified from a TML pascal example \*****************************************************************/ #include "SysTypes.r" #include "Types.r" resource 'vers' (1) { 0x01, 0x01, release, 0x01, verUS, "1.0", "1.0, Written in Jan 1993 by David John Burrowes." }; /* Size resources */ /* I AM SURE THESE ARE BAD!!!!!!!!!!!! */ resource 'SIZE' (-1) { saveScreen, ignoreSuspendResumeEvents, enableOptionSwitch, canBackground, notMultiFinderAware, backgroundAndForeground, dontGetFrontClicks, ignoreChildDiedEvents, not32BitCompatible, reserved, reserved, reserved, reserved, reserved, reserved, reserved, 256 * 1024, 512 * 1024 }; resource 'BNDL' (128) { 'ExRS', 0, { /* array TypeArray: 2 elements */ /* [1] */ 'FREF', { /* array IDArray: 1 elements */ /* [1] */ 0, 128 }, /* [2] */ 'ICN#', { /* array IDArray: 1 elements */ /* [1] */ 0, 128 } } }; data 'FREF' (128) { $"4150 504C 0000 7F" /* APPL... */ }; resource 'ICN#' (128) { { /* array: 2 elements */ /* [1] */ $"0001 0000 0002 0000 EAF8 8BA6 8A55 5555" $"C459 D156 8A55 5555 EA55 4925 0080 0200" $"0100 0100 0200 0080 0400 0040 0800 0020" $"1000 0010 2000 0008 4000 3F04 8000 7F82" $"4000 FFC1 2001 FFE2 1001 CFF4 080F 807D" $"0403 EFFA 0201 FFFD 0100 FFFA 0080 7FFD" $"0040 1FFA 0020 021D 0010 0402 0008 0800" $"0004 1000 0002 2000 0001 4000 0000 80", /* [2] */ $"0001 0000 0003 8000 EAFF CBA6 8A5F F577" $"C45F F176 8A7F F175 EA7F F525 00FF FE00" $"01FF FF00 03FF FF80 07FF FFC0 0FFF FFE0" $"1FFF FFF0 3FFF FFF8 7FFF FFFC FFFF FFFE" $"7FFF FFFF 3FFF FFFE 1FFF FFFC 0FFF FFFF" $"07FF FFFF 03FF FFFF 01FF FFFF 00FF FFFF" $"007F FFFF 003F FE1F 001F FC07 000F F800" $"0007 F000 0003 E000 0001 C000 0000 80" } }; data 'ExRS' (0, "Owner resource") { $"00" /* . */ }; data 'TEXT' (128) { $"4578 7472 6163 7420 464F 4E54 2C20 6973" /* Extract FONT, is */ $"2061 2071 7569 636B 2026 2064 6972 7479" /* a quick & dirty */ $"2075 7469 6C69 7479 2077 6974 6820 6F6E" /* utility with on */ $"6520 7075 7270 6F73 653A 2074 6F20 6578" /* e purpose: to ex */ $"7472 6163 7420 636F 7069 6573 206F 6620" /* tract copies of */ $"7468 6520 666F 6E74 7320 2874 7970 6573" /* the fonts (types */ $"2046 4F4E 5420 2620 4E46 4E54 2920 6672" /* FONT & NFNT) fr */ $"6F6D 2061 2066 696C 652C 2061 6E64 2073" /* om a file, and s */ $"746F 7265 2074 6865 6D20 696E 2073 6570" /* tore them in sep */ $"6172 6174 6520 6E65 7720 6669 6C65 7320" /* arate new files */ $"666F 7220 436F 6E76 6572 7420 464F 4E54" /* for Convert FONT */ $"2C20 6F6E 2079 6F75 7220 4E65 5854 2C20" /* , on your NeXT, */ $"746F 206C 6174 6572 2070 726F 6365 7373" /* to later process */ $"2E0D 0D54 6F20 5573 653A 2043 686F 6F73" /* .´´To Use: Choos */ $"6520 4F70 656E 2E2E 2E20 6672 6F6D 2074" /* e Open... from t */ $"6865 2046 696C 6520 6D65 6E75 2061 6E64" /* he File menu and */ $"2073 656C 6563 7420 6120 6669 6C65 206E" /* select a file n */ $"616D 652E 2020 416C 6C20 7468 6520 666F" /* ame. All the fo */ $"6E74 7320 696E 2074 6861 7420 6669 6C65" /* nts in that file */ $"2077 696C 6C20 7468 656E 2062 6520 6578" /* will then be ex */ $"7472 6163 7465 642E 2054 7261 6E73 6665" /* tracted. Transfe */ $"7220 7468 6520 6578 7472 6163 7465 6420" /* r the extracted */ $"6669 6C65 7309 2861 7320 6269 6E61 7279" /* files˘(as binary */ $"2066 696C 6573 2920 746F 2079 6F75 7220" /* files) to your */ $"4E65 5854 2C20 616E 6420 7468 656E 2070" /* NeXT, and then p */ $"726F 6365 7373 2074 6865 6D20 7769 7468" /* rocess them with */ $"2043 6F6E 7665 7274 2046 4F4E 542E 0D0D" /* Convert FONT.´´ */ $"5365 6520 7468 6520 436F 6E76 6572 7420" /* See the Convert */ $"464F 4E54 2068 656C 7020 7769 6E64 6F77" /* FONT help window */ $"2066 6F72 206D 6F72 6520 696E 666F 2E0D" /* for more info.´ */ $"0D5C 4461 7669 6420 4A6F 686E 2042 7572" /* ´\David John Bur */ $"726F 7765 730D 6465 6174 6840 6B69 7261" /* rowes´death@kira */ $"2E6E 6574 2E6E 6574 636F 6D2E 636F 6D00" /* .net.netcom.com. */ }; data 'TEXT' (129) { $"4578 7472 6163 7420 5049 4354 2C20 6973" /* Extract PICT, is */ $"2061 2071 7569 636B 2026 2064 6972 7479" /* a quick & dirty */ $"2075 7469 6C69 7479 2077 6974 6820 6F6E" /* utility with on */ $"6520 7075 7270 6F73 653A 2074 6F20 6578" /* e purpose: to ex */ $"7472 6163 7420 636F 7069 6573 206F 6620" /* tract copies of */ $"7468 6520 696D 6167 6573 2028 7479 7065" /* the images (type */ $"2050 4943 5429 2066 726F 6D20 6120 6669" /* PICT) from a fi */ $"6C65 2C20 616E 6420 7374 6F72 6520 7468" /* le, and store th */ $"656D 2069 6E20 7365 7061 7261 7465 206E" /* em in separate n */ $"6577 2066 696C 6573 2066 6F72 2043 6F6E" /* ew files for Con */ $"7665 7274 2050 4943 542C 206F 6E20 796F" /* vert PICT, on yo */ $"7572 204E 6558 542C 2074 6F20 6C61 7465" /* ur NeXT, to late */ $"7220 7072 6F63 6573 7320 286F 7220 666F" /* r process (or fo */ $"7220 7573 6520 696E 2079 6F75 7220 6661" /* r use in your fa */ $"766F 7269 7465 2064 7261 7720 7072 6F67" /* vorite draw prog */ $"7261 6D21 292E 0D0D 546F 2055 7365 3A20" /* ram!).´´To Use: */ $"4368 6F6F 7365 204F 7065 6E2E 2E2E 2066" /* Choose Open... f */ $"726F 6D20 7468 6520 4669 6C65 206D 656E" /* rom the File men */ $"7520 616E 6420 7365 6C65 6374 2061 2066" /* u and select a f */ $"696C 6520 6E61 6D65 2E20 2041 6C6C 2074" /* ile name. All t */ $"6865 2050 4943 5473 2069 6E20 7468 6174" /* he PICTs in that */ $"2066 696C 6520 7769 6C6C 2074 6865 6E20" /* file will then */ $"6265 2065 7874 7261 6374 6564 2E20 5472" /* be extracted. Tr */ $"616E 7366 6572 2074 6865 2065 7874 7261" /* ansfer the extra */ $"6374 6564 2066 696C 6573 0928 6173 2062" /* cted files˘(as b */ $"696E 6172 7920 6669 6C65 7329 2074 6F20" /* inary files) to */ $"796F 7572 204E 6558 542C 2061 6E64 2074" /* your NeXT, and t */ $"6865 6E20 7072 6F63 6573 7320 7468 656D" /* hen process them */ $"2077 6974 6820 436F 6E76 6572 7420 5049" /* with Convert PI */ $"4354 2E0D 0D53 6565 2074 6865 2043 6F6E" /* CT.´´See the Con */ $"7665 7274 2050 4943 5420 6865 6C70 2077" /* vert PICT help w */ $"696E 646F 7720 666F 7220 6D6F 7265 2069" /* indow for more i */ $"6E66 6F2E 0D0D 5C44 6176 6964 204A 6F68" /* nfo.´´\David Joh */ $"6E20 4275 7272 6F77 6573 0D64 6561 7468" /* n Burrowes´death */ $"406B 6972 612E 6E65 742E 6E65 7463 6F6D" /* @kira.net.netcom */ $"2E63 6F6D 00" /* .com. */ }; resource 'MBAR' (128) { { /* array MenuArray: 2 elements */ /* [1] */ 128, /* [2] */ 129 } }; resource 'MENU' (128) { 128, textMenuProc, 0x7FFFFFE0, enabled, apple, { /* array: 5 elements */ /* [1] */ "A simple hacky utility", noIcon, noKey, noMark, plain, /* [2] */ "by David John Burrowes", noIcon, noKey, noMark, plain, /* [3] */ "January 1993", noIcon, noKey, noMark, plain, /* [4] */ "-", noIcon, noKey, noMark, plain, /* [5] */ "Its such a hack, it doesn't do DAs", noIcon, noKey, noMark, plain } }; resource 'MENU' (129) { 129, textMenuProc, 0x7FFFFFFD, enabled, "File", { /* array: 3 elements */ /* [1] */ "Open...", noIcon, "O", noMark, plain, /* [2] */ "-", noIcon, noKey, noMark, plain, /* [3] */ "Quit", noIcon, "Q", noMark, plain } }; resource 'ALRT' (128, locked, preload) { {58, 56, 144, 384}, 128, { /* array: 4 elements */ /* [1] */ OK, visible, sound1, /* [2] */ OK, visible, sound1, /* [3] */ OK, visible, sound1, /* [4] */ OK, visible, sound1 } }; resource 'DITL' (128, locked, preload) { { /* array DITLarray: 2 elements */ /* [1] */ {60, 254, 80, 314}, Button { enabled, "Oh" }, /* [2] */ {8, 62, 52, 319}, StaticText { disabled, "^0" } } };