![]() |
pixel 2 board
how would you change pixel coordinates to board coordinates in situations where the viewing area doesnt start at 0,0
i know you might say board*16=pixels but the situation where 0,0 pixels is not equal to 0,0 on the board doesnt work that way |
i am making a in game tile editor, and the tile selector is on image level 4 but tile editing is done with board coordinates
|
do (screenwidth/16)/2 will get the tiles from the left edge to the middle but where do i go from there?
|
if the tile xy for the upper left corner of the viewable screen is 30,30 and you multiply it by 16 that would get you 480*480 but if the resolution of the graal screen is 640*480 the pixel y would be at the bottom but the tiley is at the top, do you see my problem?
|
screenheight*(((screenheight/16)-tiley)-(screenheight/16))/(screenheight/16))
shouldnt that get where the show img is in y pixels? |
im good at math
that was basically taking the percentage of the window from the top tile to the tile being used and using that to figure out the show img position |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
well i just deleted alot of old pms...
|
=(
i dont have any =(
|
| All times are GMT +2. The time now is 08:37 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.