From 42f727ed9fd6c94e9e0f823ef123f7bda78e0f9a Mon Sep 17 00:00:00 2001 From: Chris Faulhaber Date: Fri, 30 Oct 2015 19:48:56 -0400 Subject: [PATCH 1/2] Add credits and link for Rogueadyn. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c83c2efc..f8fbdfb35 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ If you want to help with mapping data, click **Download ZIP** to download the re This is one of the best applications to just get stuck in with and get going somewhere. It is very well polished, has an excellent 3D model viewer. ## Saint Coinach -- Managed by: Clorifex +- Written by Rogueadyn +- GitHub: https://github.com/Rogueadyn/SaintCoinach +- Updates by Clorifex - GitHub: https://github.com/ufx/SaintCoinach # APIs From ce6124e459121231e3bd187af8737e5c1ec45b51 Mon Sep 17 00:00:00 2001 From: Chris Faulhaber Date: Fri, 30 Oct 2015 19:49:17 -0400 Subject: [PATCH 2/2] Add algorithms for converting map coordinates. --- research/map_coordinates.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 research/map_coordinates.md diff --git a/research/map_coordinates.md b/research/map_coordinates.md new file mode 100644 index 000000000..151860b24 --- /dev/null +++ b/research/map_coordinates.md @@ -0,0 +1,18 @@ +Conversion of a Level coordinate into a 2D map coordinate: +```csharp +private double ToMapCoordinate(double val) { + var c = Map.SizeFactor / 100.0; + + val *= c; + return ((41.0 / c) * ((val + 1024.0) / 2048.0)) + 1; +} +``` + +Conversion of a FishingSpot coordinate into a 2D map coordinate: +```csharp +private double ToMapCoordinate(double val) { + var c = TerritoryType.Map.SizeFactor / 100.0; + + return (41.0 / c) * ((val) / 2048.0) + 1; +} +``` \ No newline at end of file