Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site imagen.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!sun!saber!imagen!turner From: turner@imagen.UUCP (D'arc Angel) Newsgroups: net.micro.atari Subject: RSC dump program for ST Message-ID: <238@imagen.UUCP> Date: Wed, 5-Feb-86 09:12:44 EST Article-I.D.: imagen.238 Posted: Wed Feb 5 09:12:44 1986 Date-Received: Fri, 7-Feb-86 21:52:38 EST Distribution: net Organization: The Houses of the Holy Lines: 118 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ lineater, \~~~~~~~~~~~~~~~~~~~~~~~~~ this is a program i wrote when i was first learning the ST, it gives an ascii description of a resource file created with the resource editor. To use it you need both the .C and .H files from the editor, these are gotten by (if memory serves me correctly) selecting the 'save source' option from the menu. You should replace the #include for flibs.h and flibs.c with your own and recompile the program. It was written to run under 4.2BSD but should run on the ST. Please send all bug reports to me, flames to /dev/null. #include "stdio.h" #include "obnames.h" #include "portab.h" #include "obdefs.h" /************************************************************************/ /* */ /* INCLUDE the 2 files created by saving source from the resource */ /* editor after this comment. For example: */ /* */ /************************************************************************/ #include "flibs.c" #include "flibs.h" main() { int i,j,k; char buf1[24],buf2[24],buf3[24],buf4[24]; printf("************Resource File %s****************\n\n",pname); for(i=0; i> 24); k = (rs_object[i].ob_spec & 0x00ff0000) >> 16; if(k == 0) printf("no border,"); else if(k > 128) printf("inside border=%d,",(256-k)); else printf("outside border=%d,",k); break; case G_TEXT: case G_BOXTEXT: case G_FTEXT: case G_FBOXTEXT: printf(" "); break; case G_BUTTON: case G_STRING: case G_TITLE: printf("text='%s'",rs_strings[rs_object[i].ob_spec]); break; } /* end switch */ printf(")\n"); printf("x=%d, y=%d, width=%d, height=%d\n\n", rs_object[i].ob_x,rs_object[i].ob_y,rs_object[i].ob_width, rs_object[i].ob_height); } } dump_color(color) int color; { int bcolor,tcolor,trans,fill,icolor; bcolor = (color & 0xf000) >> 12; tcolor = (color & 0x0f00) >> 8; trans = (color & 0x0080) >> 7; fill = (color & 0x0070) >> 4; icolor = (color & 0x000f); printf("colors: border=%s,text=%s,inside=%s; mode=%d, fill=%d\n", obcolor_names[bcolor],obcolor_names[tcolor],obcolor_names[icolor], trans,fill); } -- ---- god bless Lily St. Cyr -Rocky Horror Picture Show Name: James Turner Mail: Imagen Corp. 2650 San Tomas Expressway, P.O. Box 58101 Santa Clara, CA 95052-9400 AT&T: (408) 986-9400 UUCP: ...{decvax,ucbvax}!decwrl!imagen!turner CompuServe: 76327,1575