From 389e0c154b4e5401d8ad7fb1371106c465079bb9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 3 Feb 2023 10:56:03 +0100 Subject: Clean up play.js. Use 75dpi coordinates in data. Common is_action function. Common on_action click function. Common on_tooltip function. Use cache for action elements too. Add storm/battle marker to locale. --- tools/gendata.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/gendata.js b/tools/gendata.js index 05ac486..9505548 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -123,10 +123,10 @@ let strongholds = [] function defloc(region, stronghold, type, name) { let [x, y, w, h] = boxes[name] - x = Math.round(x * scale) - y = Math.round(y * scale) - w = Math.round(w * scale) - h = Math.round(h * scale) + x = Math.floor(x * 75 / 300) + y = Math.floor(y * 75 / 300) + w = Math.ceil(w * 75 / 300) + h = Math.ceil(h * 75 / 300) locmap[name] = locales.length let vp = vp_map[type] let walls = wall_map[type] -- cgit v1.2.3