neil_tag.e

new topic     » topic index » view thread      » older message » newer message

Hello folks,

You know those times when your using neil and get a causeway error?
It's really annoying not to have a readable file telling you what went
wrong, and you can't even do things like:
   puts (1, "got this far\n")
to find out where the error occured because if the graphics mode has been
set then the text don't show.

Not to worry anymore, with that said, I present neil_tag.e.
It basically displays a picture and waits for key press.
Multiple calls to tag() staggers the picture down the screen
so you know how many times it was called.

Just include neil_tag.e
set the picture with "with_tag ("file_name.bmp")"
call "tag ()" right before or after a suspicious line of code
to see if the picture is displayed before the causeway error.

--  neil_tag.e --       BOF
--  by Lewis Townsend
--  Call with_tag ("file_name.bmp")
--  to set the tag picture.
--  Call tag () to display the tag picture
--  and wait for a keypress.

include neil.e
include get.e

sequence TAG
integer xp, yp
xp = 0 yp = 0

global procedure with_tag (sequence fn)
    TAG = load_bitmap (fn)
end procedure

global procedure tag ()
    do_command (clear_blit, TAG[1], {screen, xp, yp})
    xp += 10
    yp += 10
    if wait_key () then end if
end procedure

-- EOF

Hope this is useful,
Lewis Townsend


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu