
-----------------------------------
SunsFan13
Thu May 15, 2008 9:47 am

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

-----------------------------------
Tallguy
Thu May 15, 2008 11:49 am

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
Thu May 15, 2008 12:17 pm

RE:Importing a picture
-----------------------------------

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
Fri May 16, 2008 10:03 am

RE:Importing a picture
-----------------------------------
the one i posted is easier for people just getting into programming

-----------------------------------
S_Grimm
Fri May 16, 2008 10:27 am

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
Fri May 16, 2008 11:35 am

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.


var PicID : int := Pic.FileNew ("Picture.extension")

Pic.Draw (PicID, 50,50, picCopy)


One picture drawn, not continueous, and not asking for user input.

-----------------------------------
Tallguy
Fri May 16, 2008 12:27 pm

RE:Importing a picture
-----------------------------------
yes, but you need to procede once 'hasch', so a loop is needed

-----------------------------------
gitoxa
Fri May 16, 2008 1:05 pm

RE:Importing a picture
-----------------------------------
turing is srs bzns
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.

-----------------------------------
petree08
Fri May 16, 2008 1:19 pm

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
