Sprite Size
Posted: Mon Aug 23, 2004 6:11 pm
Code: Select all
Structure PB_Sprite
Sprite.l ; DirectDrawSurface7 pointer
Width.w ; Current width of the sprite (could change if ClipSprite() is used)
Height.w ; Current height of the sprite (could change if ClipSprite() is used)
Depth.w ; Sprite depth
Mode.w ; Sprite mode, as descripted in LoadSprite()
FileName.l ; Pointer on the filename, if any
RealWidth.w ; Original width of the sprite when it was loaded
RealHeight.w ; Original height of the sprite when it was loaded
ClipX.w ; X offset if ClipSprite()
ClipY.w ; Y offset if ClipSprite()
EndStructure
Code: Select all
SpriteRealWidth(#Sprite)
SpriteRealHeight(#Sprite)

Ca pourrais etre utile avec les sprites "clippés" de connaitre la taille réelle du sprite... Donc quand jme suis rendu compte qu'on trouvais ces infos dans la même structure jme suis dit que ce serais pas trop dur d'ajouter ces deux fonctions à PB...