1. Re: Newbie Alert!
- Posted by Red Knight <pampeano at rocketmail.com> Aug 01, 2000
- 395 views
Hello Paul, I can answer some of the question by rewriting your code. (Untested code) include graphics.e include image.e include get.e use_vesa(1) -- Some cards can't support some graphics mode (I can't explain why in english, i'm spanish =) ) -- and sometimes your unable to see all the screen like yours so, you can use this command to -- be able to do it (it's slower, but it works!). integer gmode gmode=graphics_mode(256) sequence run,vp vp=read_bitmap("vp.BMP") all_palette(vp[1]/4) -- Put the correct colors in the palette display_image({1,60}, (vp[2])) while get_key() = -1 do end while -- This will wait until you press a key run=read_bitmap("run.BMP") all_palette(run[1]/4) -- Put the correct colors in the palette display_image({1,1}, (run[2])) while get_key() = -1 do end while -- This will wait until you press a key I hope you can understand it now! =) To play WAV files you can use Jacques Deschene's library (I think I don't know how to spell it right, sorry) or Ectasy Sound library. The mouse routines that eu4 have as defaults (mouse.e) doesn't support resolutions higher than mode 19, so look in the archive at eu4's site, for some libraries that are capable to do it. An example of what you want to do: (Untested code) include mouse.e -- Mouse routines include graphics.e integer junk object mouse -- It muse be object, because it can be a sequence or integer junk = graphics_mode(18) while get_key() = -1 do mouse = get_mouse() -- Returns {event, x, y} if sequence(mouse) then -- If mouse is doing something if mouse[1] = LEFT_DOWN then puts(1,"Left Clicked at: "& sprintf("%3d",mouse[2]) & "," & sprintf("%3d",mouse[3])) elsif mouse[1] = RIGHT_DOWN then puts(1,"Right Clicked at: "& sprintf("%3d",mouse[2]) & "," & sprintf("%3d",mouse[3])) elsif mouse[1] = MIDDLE_DOWN then puts(1,"Middle Clicked at: "& sprintf("%3d",mouse[2]) & "," & sprintf("%3d",mouse[3])) end if end if end while junk = graphics_mode(-1) That's all. If you have some other questions, just ask. -- Best regards, ICQ Number: 3198249 Red Knight mailto:pampeano at rocketmail.com Monday, July 31, 2000, 1:44:20 AM, you wrote: PK> Hello, PK> As the above title suggests I am completely new to programming. And so, have found it very confusing. I have a few questions that I'd consider stumpers, while the seasoned programmer would PK> probably find these really simple: ... __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com