#!/usr/local/bin/perl # From ogre@netcom.com Mon Jul 17 11:05:13 1995 # Return-Path: ogre@netcom.com # Received: from s1.msi.umn.edu (root@s1.msi.umn.edu [128.101.24.1]) by everest.ee.umn.edu (8.6.12/8.6.10) with ESMTP id LAA12370 for ; Mon, 17 Jul 1995 11:05:11 -0500 # Received: from reed.edu (root@reed.edu [134.10.2.45]) by s1.msi.umn.edu (8.6.10/8.6.9) with SMTP id KAA08642 for ; Mon, 17 Jul 1995 10:59:41 -0500 # Received: from ohgrr.netcom.com [ogre@192.100.81.129 via rfc1413] # by reed.edu (/\oo/\ Smail3.1.29.1 #29.5) # id ; Mon, 17 Jul 95 08:54 PDT # Received: (from ogre@localhost) by ohgrr.netcom.com (8.6.9/8.6.9) id IAA21103; Mon, 17 Jul 1995 08:53:21 -0700 # Date: Mon, 17 Jul 1995 08:53:21 -0700 # From: Joe Rumsey # Message-Id: <199507171553.IAA21103@ohgrr.netcom.com> # To: paradise-workers@reed.edu # Subject: netrektoxbm # Comments: Hyperbole mail buttons accepted, v03.19.01. # Status: RO # # # On the retro side of graphics, I just dug up some old 3-d looking # bitmaps tyoud made a year or so ago('cuz he just posted that he # deleted 'em when someone asked where they were. And I save # everything :) # # They're in the old Rx.Cx format, but I wanted to try 'em out in TT # (since I use a TT in mono mode as my regular client anyway), so I # needed .xbm format. # # I'm also finally getting around to learning perl, so this made a # good little project. Here's the result :) # # # netrektoxbm - convert paradise style Rx.Cx files back to .xbm format # # Usage - netrektoxbm inputfile > outputfile.xbm # while(<>) { $bitmap = join($bitmap, $_); } @bitmap = unpack("C972", $bitmap); printf("#define width 20\n#define height 320\n"); printf("static char bits[] = {\n"); for($i=12; $i < $#bitmap + 1;) { print(" "); for($j=0; $j < 12 ; $j++, $i++) { printf("0x%02x,",$bitmap[$i]); } print("\n"); } print("};");