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

Username:   Password: 
 RegisterRegister   
 Pic ID Problem.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Martin




PostPosted: Wed May 21, 2003 3:30 pm   Post subject: Pic ID Problem.

code:

type Unit :
    record
        intNumber : int

        strName : string
        strMovementType : string (1)
        intMovement : int
        intExp : int
        intLevel : int
        intFoodUpkeep, intGoldUpkeep, intManaUpkeep : int
        intMaxHealth, intCurrentHealth : int
        intAttack, intDefense : int
        intCost : int

        previous, next : pointer to Unit %Double linked list
    end record

var unit : Unit

loop
    put "Unit name:" ..
    get unit.strName : *
    if File.Exists ("Chars\\" + unit.strName + " 3x1.bmp") then
        put "Exists"
        var pic := Pic.FileNew ("Chars\\" + unit.strName + " 3x1.bmp")
        Pic.Draw (pic, 250, 350, picCopy)
    else
        put "Doesn't Exist"
    end if

end loop

The above should never crash. But it does, for SOME pictures. Anyone have any idea why?
Sponsor
Sponsor
Sponsor
sponsor
Martin




PostPosted: Wed May 21, 2003 3:40 pm   Post subject: (No subject)

I think I've figured it out. It has something to do with the size of the picture. Some of my pictures are 700 or so bytes, the others 3 kb. It crashes on the 700 byte ones.
Martin




PostPosted: Wed May 21, 2003 3:42 pm   Post subject: (No subject)

Figured it out. You have to save your bitmaps into 24 bit type for them to work with turing. All done talking to myself for now:D
Asok




PostPosted: Wed May 21, 2003 4:15 pm   Post subject: (No subject)

that's the same with OpenGL sprites. (remembers hell week of figuring out why a sprite wouldn't work)
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: