Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   pixel 2 board (https://forums.graalonline.com/forums/showthread.php?t=13358)

btedji 09-30-2001 03:50 AM

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

btedji 09-30-2001 06:53 AM

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

btedji 09-30-2001 07:27 AM

do (screenwidth/16)/2 will get the tiles from the left edge to the middle but where do i go from there?

btedji 09-30-2001 07:36 AM

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?

btedji 09-30-2001 07:54 AM

screenheight*(((screenheight/16)-tiley)-(screenheight/16))/(screenheight/16))

shouldnt that get where the show img is in y pixels?

btedji 09-30-2001 08:07 AM

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

09-30-2001 08:19 AM

Quote:

Originally posted by Kaimetsu


You could shorten that equation quite considerably.

read your pm from me a reply to it, thanks.

btedji 09-30-2001 08:20 AM

Quote:

Originally posted by Kaimetsu


You could shorten that equation quite considerably.

i was thinking that too but i was too lazy at the moment

09-30-2001 08:24 AM

Quote:

Originally posted by Kaimetsu


That would be easier if you cleared your PM box.

?

btedji 09-30-2001 08:24 AM

Quote:

Originally posted by Kaimetsu


That would be easier if you cleared your PM box.

haha i only gots 3 pms

09-30-2001 08:25 AM

well i just deleted alot of old pms...

Sep3kP2P 09-30-2001 08:43 PM

=(
 
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.