summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-20 16:59:39 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 18:39:37 +0200
commitce78446a80136970f3207dc3f8c44346c72db01b (patch)
tree6e0060dee78ca16e760796e384fe021dd67f3456
parentb9d20567cc13d55784c218dfe1209920f525a9fb (diff)
downloadtime-of-crisis-ce78446a80136970f3207dc3f8c44346c72db01b.tar.gz
Tweak layouts.
-rw-r--r--play.js81
-rw-r--r--tools/boxes.svg12
2 files changed, 50 insertions, 43 deletions
diff --git a/play.js b/play.js
index 6a00a29..b6aa855 100644
--- a/play.js
+++ b/play.js
@@ -180,7 +180,7 @@ const BOXES = {
"Mare Orientale XY": [ 1480, 1160, 60, 60 ],
"Mare Occidentale XY": [ 720, 900, 60, 60 ],
"Oceanus Atlanticus XY": [ 180, 500, 60, 60 ],
- "Nomads XY": [ 520, 1480, 60, 60 ],
+ "Nomads XY": [ 520, 1460, 60, 60 ],
"Sassanids XY": [ 2440, 820, 60, 60 ],
"Goths XY": [ 2020, 360, 60, 60 ],
"Alamanni XY": [ 1540, 280, 60, 60 ],
@@ -239,6 +239,14 @@ const LAYOUT_HOMELAND = [
[ 0, -1 ],
]
+const LAYOUT_ALAMANNI = [
+ [ 0, 0 ],
+ [ -1, 0 ],
+ [ -2, 0 ],
+ [ -2, 1 ],
+ [ -2, -1 ],
+]
+
const LAYOUT_SASSANIDS = [
[ 0, 0 ],
[ -1, 0 ],
@@ -257,10 +265,13 @@ const LAYOUT_SASSANIDS = [
const LAYOUT_NOMADS = [
[ 0, 0 ],
[ 1, 0 ],
- [ 2, 0 ],
- [ 3, 0 ],
[ 4, 0 ],
[ 5, 0 ],
+ [ -1, -1 ],
+ [ 2, 0 ],
+ [ 3, 0 ],
+ [ -2, -1 ],
+ [ -3, -1 ],
[ 0, 1 ],
]
@@ -281,8 +292,8 @@ const LAYOUT_ITALIA = [
const LAYOUT_ASIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
[ -1, -1 ],
+ [ 0, -1 ],
[ 1, -1 ],
[ 1, -2 ],
[ 0, -2 ],
@@ -293,14 +304,14 @@ const LAYOUT_ASIA = [
const LAYOUT_GALLIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
- [ 1, -1 ],
- [ -2, 0 ],
[ 2, 0 ],
[ 2, -1 ],
- [ 0, -2 ],
+ [ 2, -2 ],
+ [ -2, 0 ],
+ [ 1, -1 ],
[ 1, -2 ],
+ [ 0, -1 ],
+ [ 0, -2 ],
[ -1, 3 ],
]
@@ -315,31 +326,25 @@ const LAYOUT_MACEDONIA = [
]
const LAYOUT_PANNONIA = [
- [ 0, -1 ],
- [ -1, -1 ],
- [ -2, -1 ],
- [ -3, -1 ],
- [ -4, -1 ],
- [ 1, -1 ],
- [ -1, -2 ],
- [ -2, -2 ],
- [ -3, -2 ],
- [ -4, -2 ],
- [ -5, -2 ],
+ [ -3.5, -1.4 ],
+ [ -2.5, -1.4 ],
+ [ -1.5, -1.4 ],
+ [ -0.5, -1.4 ],
+ [ +0.5, -1.4 ],
+ [ -4.5, -1.4 ],
[ -1, 0 ],
[ 1, 0 ],
]
const LAYOUT_THRACIA = [
+ [ -2, -1 ],
+ [ -2, -2 ],
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
[ 1, -1 ],
- [ -2, -1 ],
- [ -2, -2 ],
- [ -3, -2 ],
[ -2, -3 ],
+ [ 0, -1 ],
+ [ -1, -1 ],
[ -1, -2 ],
]
@@ -378,16 +383,17 @@ const LAYOUT_AFRICA = [
const LAYOUT_HISPANIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
- [ 1, -1 ],
- [ -2, 0 ],
[ 2, 0 ],
- [ -2, -1 ],
+ [ 3, -1 ],
+ [ -2, 0 ],
[ 2, -1 ],
- [ 0, -2 ],
+ [ 1, -1 ],
+ [ 0, -1 ],
+ [ -1, -1 ],
[ -1, -2 ],
+ [ 0, -2 ],
[ 1, -2 ],
+ [ -1, 3 ],
]
const LAYOUT_BRITANNIA = [
@@ -406,9 +412,9 @@ const LAYOUT_BRITANNIA = [
const LAYOUT_GALATIA = [
[ -1, 0 ],
[ 1, 0 ],
+ [ 1, -1 ],
[ 0, -1 ],
[ -1, -1 ],
- [ 1, -1 ],
[ 1, -2 ],
[ 0, -2 ],
[ -1, -2 ],
@@ -418,9 +424,9 @@ const LAYOUT_GALATIA = [
const LAYOUT_SYRIA = [
[ -1, 0 ],
[ 1, 0 ],
+ [ 1, -1 ],
[ 0, -1 ],
[ -1, -1 ],
- [ 1, -1 ],
[ -2, 0 ],
[ 2, 0 ],
[ -2, -1 ],
@@ -446,7 +452,7 @@ const LAYOUT_PATTERN = [
LAYOUT_GALATIA,
LAYOUT_SYRIA,
- LAYOUT_HOMELAND,
+ LAYOUT_ALAMANNI,
LAYOUT_HOMELAND,
LAYOUT_HOMELAND,
LAYOUT_NOMADS,
@@ -730,13 +736,14 @@ function layout_stack(id, list, region, in_capital) {
y -= 30
if (!in_capital) {
+ let step = (region < 12) ? 80 : 100
let sc = stack_count[region]
if (sc >= LAYOUT_PATTERN[region].length)
sc = LAYOUT_PATTERN[region].length - 1
- let xo = LAYOUT_PATTERN[region][sc][0] * 80
- let yo = LAYOUT_PATTERN[region][sc][1] * 80
+ let xo = LAYOUT_PATTERN[region][sc][0] * step
+ let yo = LAYOUT_PATTERN[region][sc][1] * step
if (stack_count[region] > sc)
- xo += (stack_count[region] - sc) * 80
+ xo += (stack_count[region] - sc) * step
x += xo
y += yo
stack_count[region] += 1
diff --git a/tools/boxes.svg b/tools/boxes.svg
index d5aa730..6d7a190 100644
--- a/tools/boxes.svg
+++ b/tools/boxes.svg
@@ -40,7 +40,7 @@
inkscape:window-height="480"
id="namedview6"
showgrid="true"
- inkscape:zoom="0.63591382"
+ inkscape:zoom="0.56786857"
inkscape:cx="1692.2778"
inkscape:cy="1133.1474"
inkscape:current-layer="svg4"
@@ -52,11 +52,11 @@
<image
sodipodi:absref="/home/tor/src/rally/public/time-of-crisis/map75.png"
xlink:href="../map75.png"
- style="display:inline;image-rendering:pixelated"
- width="2550"
- height="1650"
+ sodipodi:insensitive="true"
id="image2"
- sodipodi:insensitive="true" />
+ height="1650"
+ width="2550"
+ style="display:inline;image-rendering:pixelated" />
<rect
style="fill:#e60000;fill-opacity:0.325203;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.581301"
id="rect873"
@@ -324,7 +324,7 @@
width="60"
height="60"
x="520"
- y="1480"
+ y="1460"
ry="1.4651496"
inkscape:label="Nomads XY" />
<rect