Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 picture variables
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
noobprogrammer123




PostPosted: 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...)?
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Tue May 18, 2004 5:12 pm   Post subject: (No 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
noobprogrammer123




PostPosted: Tue May 18, 2004 5:22 pm   Post subject: (No subject)

what do i put when i want to draw them
Paul




PostPosted: Tue May 18, 2004 5:23 pm   Post subject: (No subject)

code:

Pic.Draw (picID(pic#), xposition, yposition, picCopy)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: