Original Post
Hi,
ok i have created my Engine and my player. Now i can find out on what sprite he stays, but one prob is there. the Player scrolls with 1-800 or 1-600 because 800x600 resulotion. and the textures are 13, 10.
like this
#############
#############
#############
#############
#############
#############
#############
#############
#############
#############
ok, that one window. the prob is that i have one function that good say me that at position x,y there is a window for example.
oh that mean at position 1, 1. but my player walks as 1-800.
but i have only 13 sprites.
That the world
int World_GetContent( int x, int y )
{
char world;
world = plan[ (y * spalten) + x];
if (feld == cGrass)
return _GRASS;
else if (feld == cBahn)
return _BAHN;
else if (feld == cPlayer)
return _PLAYER;
else if (feld == cZielfeld)
return _ZIEL;
else
return _FREI;
}
now i need to convert the x,y from the player to the sprite x,y for the player the screen is 800x600 and for the sprite that 13x10. how i can convert it? Help me please
Thanks
PsYchOtroW