Pic ID Problem.
Author |
Message |
Martin
|
Posted: 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
|
|
|
Martin
|
Posted: 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
|
Posted: 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
|
Posted: 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) |
|
|
|
|
|
|
|