1. Re: Error in truecolr.e (new version)

Karolyn Leith wrote:
> There is an error in truecolr.e in virtual_box
thanks muchly.  i had originally written the line
and box routines differently, just to get them
working, u know?  then, as i was preparing the
new documentation, i realized that the syntax of
the arguments to be passed wasn't consistent with
the syntax of the rest of the library, messing up
the 'flow'... this one got past me as i went back
to change the syntax to uphold consistency...
you'll find the corrected function below.
thanks again.

> So got anywhere in the mouse stuff? huh? huh?
heh. well, yes and no.  it's still at the same point
that it's been at for 'bout 2 weeks now.  functioning,
pretty fast, but containing a singular bug that i
just cannot squish.  if you move the mouse over to the
far right, the pointer/cursor image wraps over to the
left side and if you click while its like that, you
crash hard. so i decided to take a break on it for this
last week and work on another library, and tackling
it again with a clear head.  if i cannot get anywhere
when i return to the mouse library after a couple days,
then i'll revert the mouse routines to their most stable
version and post it as an alpha to see if i'm the only
one that is actually having the problem and if anyone
can spot the bug.

take care--Hawke'

------------------error corrected procedure follows
global procedure virtual_box(atom scr,
                           integer sx, integer sy,
                           integer ex, integer ey,
                         sequence clr, integer filled)
integer temp
sequence line
   if filled then
        if ey<sy then
                temp=ey ey=sy sy=temp
        end if
        if ex<sx then
                temp=ex ex=sx sx=temp
        end if
        line=repeat(clr,ex-sx)
        for y=sy to ey do
                virtual_pixel(scr,{sx,y},line)
        end for
   else
        virtual_line(scr,sx,sy,ex,sy,clr) --top
        virtual_line(scr,sx,ey,ex,ey,clr) --bottom
        virtual_line(scr,sx,sy,sx,ey,clr) --left
        virtual_line(scr,ex,sy,ex,ey,clr) --right
   end if
end procedure

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu