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

Username:   Password: 
 RegisterRegister   
 A revolving car...
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Cervantes




PostPosted: Fri May 28, 2004 4:36 pm   Post subject: (No subject)

sorry that's my fault. I've never done graphics like this, the last animation i did was oh-so-long-ago Laughing

Pic.ScreenLoad is a lot slower, however, since it displays the pic straight from the file (I assume that makes it slower). It would be best if we can find a way to still use Pic.Draw. just need to get around that bug.

about 10 minutes later

well, looks like we're going to have to use arrays. if you don't already know arrays, check out a tutorial or two.
using your code:
code:

const X := maxx div 2 - 50
const Y := maxy div 2 - 50
var picCounter : int := 1

var picID : array 1 .. 10 of int
for i : 1 .. 10
    picID (i) := Pic.FileNew ("pic" + intstr (i) + ".bmp")
end for
%------------------------------------------------------

loop
    cls
    Pic.Draw (picID (picCounter), X, Y, picCopy)
    if picCounter >= 10 then
        picCounter := 1
    else
        picCounter += 1
    end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
DonQuixote




PostPosted: Fri May 28, 2004 9:54 pm   Post subject: (No subject)

Thank you Cervantes!
That shortened the code even more (thus more efficient = my teacher happy)
Thanx for giving me the link to the arrays... it REALLY helped!!!
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 2 of 2  [ 17 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: