Well, just for fun I decided to make a function of it that could just be called, exept that at the sprite location ( x and Y ) it gives 295 and 711 ( the start position ) instead of 444 and something else. Here is my code so far:
void Iso_SpriteToScreen ( int IsoSprite, int IsoImage, int IsoSpriteX, int IsoSpriteY, int IsoWidth, int IsoHeight )
{
float ScreenWidth = IsoWidth/100;
float ScreenHeight = IsoHeight/100;
float PropScreenWidth = dbScreenWidth () /ScreenWidth ;
float PropScreenHeight = dbScreenHeight () / ScreenHeight ;
float ScreenReducX = IsoWidth/dbScreenWidth ();
float ScreenReducY = IsoHeight/dbScreenHeight ();
float SpriteX = IsoSpriteX/ ScreenReducX;
float SpriteY = IsoSpriteY/ ScreenReducY;
dbSprite ( IsoSprite, SpriteX, SpriteY, IsoImage );
dbStretchSprite ( IsoSprite, PropScreenWidth , PropScreenHeight );
}
And here is were I call it:
dbLoadImage ( "Data\\PressSpacebartoEnter.png", 10 );
Iso_SpriteToScreen ( 10,10, 295,711,1280,1024 );
What it should do is divide the screen props were the image was made for ( 1280 x 1024 ) with the new screen props ( 800 x 600 ) it gives the factor of which the screen reduces. Then I divide the sprite position ( lets say the X, thats 295 ) by the reducing of the screen ( 1.6 ) and that should give me 184.375. But the sprite is located at its original 295. So what is going wrong when calculating??
Thanks for all the help you guys already gave me and for sticking with me till here.
Isocadia