Coordinate Converter(Open source)

07/10/2012 11:39 paxemuman#1
Hi, today i want to relase coordinate converter, it converts pk2(warp) coords to ingame coords and in game coords to warp coords. I decided to make this app because it seems to be useful for someone of you.
Also i invite you all to follow my new project "courageous", its a mmo/RTS game created on silkroad graphic engine, courageous was previously announced as "silkroad battle online".
Enjoy new tool and let me know if it helps you by thanks button, if you will like it in the future i will make more tools for sro.

Download:
[Only registered and activated users can see links. Click Here To Register...]

SCAN:
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
07/10/2012 17:53 Nezekan#2
I like your GUI style
07/10/2012 20:18 PortalDark#3
epic background
btw, whats the equivalent to lobyte and Hibyte on php?
07/10/2012 21:52 paxemuman#4
Quote:
Originally Posted by PortalDark View Post
epic background
btw, whats the equivalent to lobyte and Hibyte on php?
Idk you have to research on the internet or maybe someone here will answer you :)
07/11/2012 15:08 PortalDark#5
Quote:
Originally Posted by paxemuman View Post
Idk you have to research on the internet or maybe someone here will answer you :)
i had browsed the web, and i didnt found it(found C# one but i have to take a look at it)
well thnx anyway
07/11/2012 16:18 Schickl#6
low byte: variable & 128
high byte: variable & 65280

this should work fine in nearly every programming/scripting language
07/12/2012 20:24 Windrius#7
if anyone needs the formulas:
public float regionX(float x, byte sector)
{
return ((x - ((sector) - 135) * 192) * 10);
}
public float regionY(float y, byte sector)
{
return ((y - ((sector) - 92) * 192) * 10);
}
public float gameX(float x, byte sector)
{
return ((sector - 135) * 192 + (x / 10));
}
public float gameY(float y, byte sector)
{
return ((sector - 92) * 192 + (y / 10));
}
07/12/2012 23:00 ÑõÑ_Ŝŧóp#8
Quote:
Originally Posted by PortalDark View Post
epic background
btw, whats the equivalent to lobyte and Hibyte on php?
if you have a word (2 bytes)
at example : 0x0509
the high byte is 0x05,the low byte is 0x09
correct me if iam wrong?
07/13/2012 01:08 Schickl#9
Quote:
Originally Posted by ÑõÑ_Ŝŧóp View Post
if you have a word (2 bytes)
at example : 0x0509
the high byte is 0x05,the low byte is 0x09
correct me if iam wrong?
Yes


and
@PortalDark:
the one for the low byte isn't variable&128, but
variable&255

Sorry, my bad
07/13/2012 17:59 PortalDark#10
im trying to adapt code to php but im having trouble since i dont find an example on php to do so
07/13/2012 18:43 Schickl#11
Quote:
Originally Posted by PortalDark View Post
im trying to adapt code to php but im having trouble since i dont find an example on php to do so
What exactly are you trying to do?
07/13/2012 18:55 PortalDark#12
just to implement all the code into php
that includes the lobyte/hibyte/makeword stuff
07/13/2012 19:13 Schickl#13
makeword should be possible to do like this:

word = byte1;
word <<= 8;
word |= byte2;

byte1 is the high byte and byte the low byte

in php this should work as well:

word = (byte1 << 8) | byte2;

Just make sure that the byte variables contain only values a real byte variable could contain, else the result won't be right

edit:
k, the one for PHP will work in programming languages as well, without casting(I thought that you'd have to cast it, but nvm)

@PortalDark:
Just tell me what you need and I'll try to port it to PHP^^
07/13/2012 22:04 PortalDark#14
well basically, all(XD)
no, just the lobyte/hibyte/makeword
the other stuff is just formulas
08/02/2012 10:04 defragger#15
What are warp coordinates? I am playing around with a* and silkroad:
[Only registered and activated users can see links. Click Here To Register...]
But i am still wondering how these map coordinates in the upper right corner are calculated. Does anybody know something about that?