From Adam Dawes · 1996-04-08 17:10 · #75549 in AMOS_ECHO
In reply to Re: Screen - Title bar = What I want! by Joseph Walton
Hi Joseph!
AD>> I assumed that the amigaguide.datatype would be a subclass of
AD>> text.datatype?
JW> No, they're completely different.
Ah, that might explain it then. :)
[signature]
AD>> What do you mean by a straight character-mapping of d?
JW> I mean is it outputting one character for every character stored in the
JW> array 'd'.
Oh, ISWYM now. :) Not exactly, it is (as you guessed below) using some compression..
JW> Right! Are you just compressing the spaces? But why are you assigning
JW> the fifth element of 's' after its declaration? You could shave a
JW> coupld of bytes off there...
I can't remember exactly (it's /months/ since I coded it), but I think:
(a) 'cos I didn't know how to make the string continue off the end of the line at the time, and (b) 'cos leaving it there made all the lines exactly the right length. :)
#include <stdio.h>/*Adam Dawes,ad32@brighton.ac.uk,Adam Dawes@2:441/93.5*/
int main(){char d[]="DEICEHIBEAHAJBJBJAJIAEFFHAHJAHJAHJHJIECHAHKGHFGHCGII"
,s[]=" /-)| \\_",*p=d,c;s[5]=10;while (*p){c=*p++^=64;if(c<5)for(;c>0;c--)
putchar(*s);else putchar(*(s+c-4));}return(0);}/*C sig by Adam Dawes '95*/
--- Spot 1.3a #1051
* Origin: Flora amanita: Indigenous to Meso-Amer, Flora (2:441/93.5)