1. binding a program containing bitmaps

Hi All,
 
this is a nortice that may help in binding a program containing bitmaps as
constant,
that I have tried in 2 versions, both working correctly with the interpreter:
 
1. 
--from: Sequencer.e
--( C)2001 by Andrea Cini.
--Recreates a file converted to a Eu sequence with Sequencer.exw
constant H_splash =
{
#42,#4D,#36,#0C,#00,#00,#00,#00,#00,#00,#36,#00,#00,#00,#28,#00,#00,#00...
}

 
2. 
-- by me, for much more compact code (75% less)
constant H_splash =
{
"BMH¯"&1&0&0&0&0&0&"6"&0&0&0&"("&0&0&0&"ã"&1&0&0&"L"&0&0...
}

 
results:
the code works correctly too with the interpreter, but cannot be binded or
shrouded, 'cause the (0) chartacter reveals to be an illegal character.
shrouding and binding seem also right, but the compiled version doesn't run: it
gets a "line too long" error at run time.
The solution is in putting the zero characters in a normal, not HEX format:

{
#42,#4D,#48,#AF,#01,0,0,0,0,0,#36,0,0,0...
}

 
Hope this can be useful :o)
 
Antonio Alessi

new topic     » topic index » view message » categorize

2. Re: binding a program containing bitmaps

Why only 0 in not-HEX?
If you put every number in HEX, each element is ALWAYS 3 characters (#xx).
If you put every number in not-HEX, each element is 1, 2 or 3 characters.

Either way, all numbers in not-HEX is always more compact (unless all numbers
are >99).

--
tommy online: http://users.pandora.be/tommycarlier
Euphoria Message Board: http://uboard.proboards32.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu