Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-30-2001, 03:50 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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
Reply With Quote
  #2  
Old 09-30-2001, 06:53 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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
Reply With Quote
  #3  
Old 09-30-2001, 07:27 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
do (screenwidth/16)/2 will get the tiles from the left edge to the middle but where do i go from there?
Reply With Quote
  #4  
Old 09-30-2001, 07:36 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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?
Reply With Quote
  #5  
Old 09-30-2001, 07:54 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
screenheight*(((screenheight/16)-tiley)-(screenheight/16))/(screenheight/16))

shouldnt that get where the show img is in y pixels?
Reply With Quote
  #6  
Old 09-30-2001, 08:07 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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
Reply With Quote
  #7  
Old 09-30-2001, 08:19 AM
Guest
Posts: n/a
Quote:
Originally posted by Kaimetsu


You could shorten that equation quite considerably.
read your pm from me a reply to it, thanks.
Reply With Quote
  #8  
Old 09-30-2001, 08:20 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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
Reply With Quote
  #9  
Old 09-30-2001, 08:24 AM
Guest
Posts: n/a
Quote:
Originally posted by Kaimetsu


That would be easier if you cleared your PM box.
?
Reply With Quote
  #10  
Old 09-30-2001, 08:24 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Kaimetsu


That would be easier if you cleared your PM box.
haha i only gots 3 pms
Reply With Quote
  #11  
Old 09-30-2001, 08:25 AM
Guest
Posts: n/a
well i just deleted alot of old pms...
Reply With Quote
  #12  
Old 09-30-2001, 08:43 PM
Sep3kP2P Sep3kP2P is offline
Registered User
Join Date: Aug 2001
Location: CT
Posts: 183
Sep3kP2P is on a distinguished road
Send a message via ICQ to Sep3kP2P Send a message via AIM to Sep3kP2P
Unhappy =(

i dont have any =(
__________________
Sephiroth2k - Co-Owner Of Dragon Quest (Look In Profile For Website)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.