Version 1.0 - Stable

This commit is contained in:
2026-01-06 16:59:05 +00:00
parent 8de538cc29
commit 81b497517e
9 changed files with 7038 additions and 7068 deletions
+4 -10
View File
@@ -136,14 +136,7 @@ function parseMapIni(iniText: string): TrackMapConfig {
};
}
/**
* Convert world coordinates to map pixel coordinates using AC's formula
* Trying with coordinate rotation
*/
/**
* Convert world coordinates to map pixel coordinates
* Based on working formula with potential rotation fix
*/
export function worldToMapCoords(
worldX: number,
worldY: number,
@@ -153,7 +146,8 @@ export function worldToMapCoords(
var aspectRatio = config.width / config.height;
// Add offsets to player position
console.log("config" , config);
console.log("aspectRatio:", aspectRatio);
if (aspectRatio < 1) {
worldX = worldX * aspectRatio;
} else {
@@ -167,7 +161,7 @@ export function worldToMapCoords(
x /= config.scaleFactor;
// Percentages
x = (x * 100) / (config.width);
x = (x * 100) / (config.width);
y = (y * 100) / (config.height);
return { x, y };