I'm totaly losing my mind here. I can not understand why this basic operation doesn't work...
I'm making a 2D game with sprites and I'm trying to make it so that the sprite's sizes adjust to the screen resolution. So first I get the screen resolution and put it in a variable. My sprites are 800x600 pixels big. So first I want to size the sprite to be the same in height as the screen resolution, and then I size the width accrodingly. (so scaling is the obvious choice)
//global
int disp_width = GetSystemMetrics(0);
int disp_height = GetSystemMetrics(1);
height_adj=disp_height/600;
//in a function
dbSprite(302,0,0,5);
float scale=100*height_adj;
dbScaleSprite(302,100*height_adj);
Nothing happens! The sprite doesn't scale. in my case my screen height is 900 so the number is 1.5 so if I put in scale=100*1.5 it works fine. Since when can't you save a value into a variable with multiplying? what the christ?!