View Single Post
  #1  
Old 08-16-2008, 12:53 AM
Devenio Devenio is offline
Scripter
Devenio's Avatar
Join Date: Dec 2006
Posts: 28
Devenio is on a distinguished road
Tiles covertion to Image formula! [help?]

Example..
Image/Tile | ingame x,y| image x,y
black tile | 8,39 | 384,112
pics1.png | 15,255 | 2048,512

NPC Code:

//Forumla
temp.tile = tiles[int(mousex),int(mousey)];
temp.tx = BLAH;
temp.ty = BLAH;

//Display of tile
showimg( 200, "pics1.png", screenwidth/2, screenheight/2);
changeimgvis( 200, 4);
changeimgpart( 200, temp.tx, temp.ty, 16, 16);



Basically I need help figuring out what I need to put in temp.tx and temp.ty to get the correct coords to get the image to display the tile the mouse is over.

I've been trying to do this for 2 days now, and I just can't figure out the correct formula ... So could anyone help me ..
__________________

"Two things are infinite: the universe and human stupidity, and I'm not sure about the the universe.." -Einstein


Reply With Quote