Computer Science Canada

picture variables

Author:  noobprogrammer123 [ Tue May 18, 2004 5:09 pm ]
Post subject:  picture variables

if i have 52 different pictures (one for each card) do i have to make a variable for each one (var pic1:int) and declare each variable (pic1:=Pic.FileNew...)?

Author:  AsianSensation [ Tue May 18, 2004 5:12 pm ]
Post subject: 

depends on what you named your picture files.

I suggest name your pictures:

1.bmp
2.bmp
3.bmp
...
52.bmp

and you can declare the variables in 4 lines

code:
var picID : array 1 .. 52 of int

for rep : 1 .. 52
    picID (rep) := Pic.FileNew (intstr (rep) + ".bmp")
end for

Author:  noobprogrammer123 [ Tue May 18, 2004 5:22 pm ]
Post subject: 

what do i put when i want to draw them

Author:  Paul [ Tue May 18, 2004 5:23 pm ]
Post subject: 

code:

Pic.Draw (picID(pic#), xposition, yposition, picCopy)


: