Re: I give up, help? :)
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Mar 01, 1999
- 429 views
> Anyone care to lend a hand to an idiot in need? ;) Well, as you'll > soon be finding out, I'm very new to euphoria. I recently downloaded the > neil graphics files, and while the demos run fine on my computer, after > days of trying, I can't seem to make it work on my own. > Again I apologize for taking up space with what I assume will turn out > to be a simple problem, but for some reason I just can't seem to get > this right. Here's what I've tried(running as .ex) using the d2105a.bmp > included with the Dos tutorial by David Gay. The bmp is 189x189 16 > color, though I've failed with all levels of color :) Here's what I > clumsily put together.....can anyone tell me what I'm doing wrong, or > show me how to only load/display an image using neil.e? Oh, and I'm > using the 2.1 alpha of euphoria. include neil.e include keyread.e include get.e if gfx_mode(640,480,16) then puts(1, "error: unsupported graphics mode\n") -- error message abort(1) -- quit end if object my_bitmap my_bitmap = load_bitmap("d2105a.bmp") if atom(my_bitmap) then puts(1, "error: loading bitmap\n") abort(1) end if -- my_bitmap loaded correctly, so it will be a sequence containing: -- a virtual screen handle -- the width of the screen -- the height of the screen atom my_screen my_screen = virtual_screen(640,480) -- do_command works two ways: -- if the second argument is an atom (a virtual screen handle), -- it copies the whole bitmap -- else it is a sequence containing: -- a virtual screen handle -- x position -- y position -- width -- height -- and it copies a (width,height) sized bitmap located at (x,y) -- so, do_command(screen_blit, my_bitmap[1], {screen,0,0}) -- will work, and do_command(screen_blit, {my_bitmap[1],0,0,my_bitmap[2],my_bitmap[3]}, {screen,0,0}) -- will do the same thing. -- if you don't need to use the size of the bitmap, you can change it -- to just the virtual screen handle with my_bitmap = my_bitmap[1] -- after loading it successfully, and then do_command(screen_blit, my_bitmap, {screen,0,0}) -- will work just fine. while get_key() != 'q' do end while restore_mode() > Again, sorry to be a bother so soon after joining the list. No problem, that's what we're here for _______ ______ _______ ______ [ _ \[ _ ][ _ _ ][ _ ] [/| [_] |[/| [_\][/ | | \][/| [_\] | ___/ | _] | | | _] [\| [/] [\| [_/] [\| |/] [\| [_/] [_____] [______] [_____] [______] xseal at harborside.com ICQ:13466657 http://www.harborside.com/home/x/xseal/euphoria/ !!! Try out my new Running Robot raytraced animation !!!