Importing a picture
Author |
Message |
SunsFan13
|
Posted: Thu May 15, 2008 9:47 am Post subject: Importing a picture |
|
|
Hey guys, I've got no idea how to do this..
I'd like to import a picture I've made (as a title page kinda deal), then have the user press any key to continue on to the game.
Someone help me with this?
Thanks,
Chris |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tallguy
|
Posted: Thu May 15, 2008 11:49 am Post subject: RE:Importing a picture |
|
|
loop
Pic.ScreenLoad ("picname.jpg", 125, 40, picCopy)
exit when hasch
end loop
**GAME CODE**
-make sure that the picture is in the same folder as the program |
|
|
|
|
|
petree08
|
Posted: Thu May 15, 2008 12:17 pm Post subject: RE:Importing a picture |
|
|
code: |
var PicID : int
var Pauser : char
PicID := Pic.FileNew ("filename.fileype")
Pic.Draw (PicID, 1, 1, picCopy)
Pauser := getchar
|
this way is better than the above because there is no unessecary looping and your not loading a sprite over and over again, |
|
|
|
|
|
Tallguy
|
Posted: Fri May 16, 2008 10:03 am Post subject: RE:Importing a picture |
|
|
the one i posted is easier for people just getting into programming |
|
|
|
|
|
S_Grimm
|
Posted: Fri May 16, 2008 10:27 am Post subject: RE:Importing a picture |
|
|
I agree with tallguy. his is a lot easier to use. if you dont want to use the user input, then just use the Pic.ScreenLoad (............) and a delay (time). |
|
|
|
|
|
Sean
|
Posted: Fri May 16, 2008 11:35 am Post subject: Re: Importing a picture |
|
|
However the one that he is using, is constantly re-drawing the same image over and over again. Just doing it once is fine enough.
One picture drawn, not continueous, and not asking for user input. |
|
|
|
|
|
Tallguy
|
Posted: Fri May 16, 2008 12:27 pm Post subject: RE:Importing a picture |
|
|
yes, but you need to procede once 'hasch', so a loop is needed |
|
|
|
|
|
gitoxa
|
Posted: Fri May 16, 2008 1:05 pm Post subject: RE:Importing a picture |
|
|
turing is srs bzns
code: | var PicID : int := Pic.FileNew ("Picture.extension")
Pic.Draw (PicID, 50,50, picCopy)
loop
exit when hasch
end loop |
NOTE HOW THE PICTURE BEING DRAWN ISNT IN THE LOOP. I KNOW IT'S A HARD CONCEPT BUT PLEASE BEAR WITH US. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
petree08
|
Posted: Fri May 16, 2008 1:19 pm Post subject: RE:Importing a picture |
|
|
As for "easier for people starting programing"
it is probably better to teach them the right way first to avoid picking up bad coding habits |
|
|
|
|
|
|
|