diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-02-03 10:56:03 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:39 +0100 |
commit | 389e0c154b4e5401d8ad7fb1371106c465079bb9 (patch) | |
tree | 7d7344c1cbddf5fff5b3923f963f34860f05b755 /tools/gendata.js | |
parent | c966b60ead383f7de2b74af1822f15858a10e405 (diff) | |
download | nevsky-389e0c154b4e5401d8ad7fb1371106c465079bb9.tar.gz |
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.
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 8 |
1 files changed, 4 insertions, 4 deletions
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] |