1. strange thing with put_screen_char()

Hi !

I was playing with put_screen_char, no problem, until now (why, I don't 
know). voici : 
---
include get.e
include graphics.e
include image.e

integer temp
temp=graphics_mode(3)
put_screen_char(1, 1, {'A', 152, 'Z', 131}) 
temp=wait_key()
temp=graphics_mode(-1)
---
this sounds 'normal' no ?
But it gives me an error, talking about slices ends past end ... :

--
image.e:337 in procedure put_screen_char() 
slice ends past end of sequence (160 > 4) 
    line = 1
    column = 1
    char_attr = {65'A',152,90'Z',131}
    scr_addr = 753664
    vc = {1,3,25,80'P',0,0,32' ',8}
    overflow = -156

.. called from D:\EBOCEIXA\JEU\TEMP.EX:6 
--

Strange !!
Hardware problem maybe ? 

Gwen

new topic     » topic index » view message » categorize

2. Re: strange thing with put_screen_char()

Gwen writes:
> But it gives me an error, talking about slices 
> ends past end ... :

This is a known bug.
The test in put_screen_char() should be:

     if overflow > 0 then   -- correct

not:

     if overflow then   -- wrong

Please correct your copy of image.e
It will be corrected this way in 2.3.
Not many people use this routine.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

3. Re: strange thing with put_screen_char()

Hello Gwen,

I would suggest Jiri Babor's site to find direct screen writes in text mode.
Jiri also has a fantastic fonts packge for vga thats really fast aswell.

I know the vga fonts come with transparentcy but not sure about
the text mode version although you could get around this with a little
effort. Also, try Putsxy an ROM Font which can be found on Jiri's site.

Euman

----- Original Message -----
From: "Gwen" <mb11363 at chello.be>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, March 21, 2001 07:52
Subject: 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

4. Re: strange thing with put_screen_char()

Hi Gwen,

> 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

Try please

----------------------
include image.e

set_active_page(0)
position(11,25)
puts(1,"||||||| sad ---> smile")
set_active_page(1)
position(11,25)
puts(1,"\\\\\\\\\\\\\\ sad ---> smile")---keep \\ to take \
set_active_page(2)
position(11,25)
puts(1,"------- sad ---> smile")
set_active_page(3)
position(11,25)
puts(1,"/////// sad ---> smile")

while get_key()=-1 do
set_display_page(0)
set_display_page(1)
set_display_page(2)
set_display_page(3)
end while
------------------------------------


Regards,
Igor Kachan
kinz at peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu