1. RE: strange thing with put_screen_char()

Thank you Rob, 
btw, I'm very interested about the speed of the differents ways to 
display a line of text on screen, in text-mode (each char. has a 
different color, so I can't use simply puts(1, txt) ).

Is put_screen_char(1,1, txt_with_attributes) faster than 
for i=1 to n do
  text_color(attributes[i])
  position(1, i)
  puts(1, txt[i])
end for

?? (I'm too lazy to make a little benchmark smile

Gwen

new topic     » topic index » view message » categorize

2. RE: strange thing with put_screen_char()

Ok,I'll answer to myself : yes it's faster !
But...I saw put_screen_char() use poke() to write to the screen, do you 
know how to write over an another char ? (like using bk_color(-1) in 
some fonts packages), I don't know how to do that with poke. If I just 
do that :

poke(#B8000, {'A',15})
poke(#B8000, {'O',4})

The second instruction will erase my white 'A' and put an red 'O' at the 
place. Is there an attribute like "transparent background color" ?

Gwen

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

3. RE: strange thing with put_screen_char()

On Wed, 21 Mar 2001, Gwen wrote:

> But...I saw put_screen_char() use poke() to write to the screen, do you 
> know how to write over an another char ? (like using bk_color(-1) in 
> some fonts packages), I don't know how to do that with poke. If I just 
> do that :
> 
> poke(#B8000, {'A',15})
> poke(#B8000, {'O',4})
> 
> The second instruction will erase my white 'A' and put an red 'O' at the 
> place. Is there an attribute like "transparent background color" ?

No. The DOS characters are displayed from a character rom, you can't 
easily change them. You can, however, use Jiri Babor's font.e program 
to display characters of your own design. It should also be possible to 
write a routine that would combine two of his characters to create a new one 
before displaying it. This also gives you a wider range of font styles and 
sizes. It does require graphics mode, however.
-- 
Regards,
Irv

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

4. RE: strange thing with put_screen_char()

I tried some text routines from Jiri, excellent !
Just one bad news for me, we can't print two char on the same place on 
the screen in text mode without erasing the first one.
Bah, that's not very important smile
thanks for your help !

Gwen

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

5. RE: strange thing with put_screen_char()

----====008BB6D2 at _ at 36973.51596811@_@151E4

Hello Gwen,
	Sounds like you are doing some stuff I was working on a couple
of months back. I used the folowing code (fragment) to make different 
colored bouncing letters pass across colored backgrounds:

  s=get_screen_char(y,x)		
  character=s[1]
  backcolor=floor(s[2]/16)
  textcolor=s[2]-backcolor*16

Hope that helps.
JOHN






----====008BB6D2 at _ at 36973.51596811@_@151E4

AA8OAAAAAAIB/w8BAAAAQwAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAEVVZm9ydW1AdG9waWNh
AAA5AAAAAAsAQDoBAAAAAwBxOgAAAAAeAPZfAQAAABMAAABFVWZvcnVtQHRvcGljYS5jb20AAAIB
AAADACYAAAAAAAsAKQAAAAAAAwAuAAAAAAADADYAAAAAAEAAOQCAQlUSELPAAR4AcAABAAAAKQAA
D7PAAQMAAIAIIAYAAAAAAMAAAAAAAABGAAAAABCFAAAAAAAACwADgAggBgAAAAAAwAAAAAAAAEYA
AAAAA4UAAAAAAAADAASACCAGAAAAAADAAAAAAAAARgAAAABShQAA8A4AAB4ABYAIIAYAAAAAAMAA
AABGAAAAADaFAAABAAAAAQAAAAAAAAAeAAuACCAGAAAAAADAAAAAAAAARgAAAAA3hQAAAQAAAAEA
AAAAAAAAHgAMgAggBgAAAAAAwAAAAAAAAEYAAAAAOIUAAAEAAAABAAAAAAAAAB4APQABAAAABQAA
AFJFOiAAAAAAAwANNP03AABo6g==

----====008BB6D2 at _ at 36973.51596811@_@151E4--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu