summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--anim/door_close.json448
-rw-r--r--draw/anim.cpp6
-rw-r--r--draw/anim.hpp3
-rw-r--r--draw/wall.cpp2
-rw-r--r--src/anim-atlas.cpp22
-rw-r--r--src/anim-atlas.hpp2
6 files changed, 238 insertions, 245 deletions
diff --git a/anim/door_close.json b/anim/door_close.json
index 0f12f793..5b5d8e85 100644
--- a/anim/door_close.json
+++ b/anim/door_close.json
@@ -6,1125 +6,1125 @@
{
"frames": [
{
- "ground": "52 x 50",
+ "ground": "67 x 58",
"offset": "0 x 0",
"size": "55 x 50"
},
{
- "ground": "52 x 50",
+ "ground": "67 x 58",
"offset": "55 x 0",
"size": "55 x 49"
},
{
- "ground": "52 x 50",
+ "ground": "67 x 58",
"offset": "110 x 0",
"size": "55 x 49"
},
{
- "ground": "53 x 50",
+ "ground": "67 x 57",
"offset": "165 x 0",
"size": "55 x 49"
},
{
- "ground": "53 x 50",
+ "ground": "67 x 57",
"offset": "220 x 0",
"size": "55 x 49"
},
{
- "ground": "53 x 49",
+ "ground": "68 x 57",
"offset": "275 x 0",
"size": "56 x 49"
},
{
- "ground": "53 x 49",
+ "ground": "68 x 56",
"offset": "331 x 0",
"size": "56 x 48"
},
{
- "ground": "54 x 49",
+ "ground": "68 x 56",
"offset": "387 x 0",
"size": "56 x 48"
},
{
- "ground": "54 x 48",
+ "ground": "68 x 55",
"offset": "443 x 0",
"size": "57 x 47"
},
{
- "ground": "54 x 47",
+ "ground": "69 x 55",
"offset": "500 x 0",
"size": "57 x 46"
},
{
- "ground": "55 x 47",
+ "ground": "69 x 54",
"offset": "557 x 0",
"size": "57 x 46"
},
{
- "ground": "55 x 46",
+ "ground": "69 x 53",
"offset": "614 x 0",
"size": "58 x 45"
},
{
- "ground": "55 x 45",
+ "ground": "69 x 52",
"offset": "672 x 0",
"size": "58 x 44"
},
{
- "ground": "55 x 44",
+ "ground": "70 x 51",
"offset": "730 x 0",
"size": "58 x 43"
},
{
- "ground": "55 x 43",
+ "ground": "70 x 50",
"offset": "788 x 0",
"size": "58 x 42"
},
{
- "ground": "55 x 42",
+ "ground": "69 x 49",
"offset": "846 x 0",
"size": "58 x 41"
},
{
- "ground": "55 x 41",
+ "ground": "69 x 48",
"offset": "904 x 0",
"size": "58 x 40"
},
{
- "ground": "55 x 41",
+ "ground": "69 x 48",
"offset": "962 x 0",
"size": "57 x 40"
},
{
- "ground": "54 x 41",
+ "ground": "69 x 48",
"offset": "1019 x 0",
"size": "57 x 40"
},
{
- "ground": "54 x 41",
+ "ground": "68 x 48",
"offset": "1076 x 0",
"size": "57 x 41"
},
{
- "ground": "53 x 40",
+ "ground": "68 x 48",
"offset": "1133 x 0",
"size": "56 x 42"
},
{
- "ground": "52 x 40",
+ "ground": "67 x 48",
"offset": "1189 x 0",
"size": "55 x 43"
},
{
- "ground": "51 x 40",
+ "ground": "65 x 48",
"offset": "1244 x 0",
"size": "53 x 45"
},
{
- "ground": "49 x 40",
+ "ground": "64 x 48",
"offset": "1297 x 0",
"size": "52 x 46"
},
{
- "ground": "48 x 40",
+ "ground": "62 x 48",
"offset": "1349 x 0",
"size": "50 x 47"
},
{
- "ground": "46 x 40",
+ "ground": "60 x 48",
"offset": "1399 x 0",
"size": "48 x 48"
},
{
- "ground": "43 x 40",
+ "ground": "58 x 48",
"offset": "1447 x 0",
"size": "46 x 49"
},
{
- "ground": "41 x 40",
+ "ground": "55 x 48",
"offset": "1493 x 0",
"size": "44 x 50"
},
{
- "ground": "38 x 40",
+ "ground": "53 x 48",
"offset": "1537 x 0",
"size": "41 x 51"
},
{
- "ground": "36 x 40",
+ "ground": "50 x 48",
"offset": "1578 x 0",
"size": "38 x 52"
},
{
- "ground": "32 x 40",
+ "ground": "47 x 48",
"offset": "1616 x 0",
"size": "35 x 53"
},
{
- "ground": "30 x 40",
+ "ground": "44 x 48",
"offset": "1651 x 0",
"size": "32 x 53"
},
{
- "ground": "27 x 40",
+ "ground": "41 x 48",
"offset": "1683 x 0",
"size": "29 x 54"
},
{
- "ground": "24 x 40",
+ "ground": "38 x 48",
"offset": "1712 x 0",
"size": "27 x 54"
},
{
- "ground": "21 x 40",
+ "ground": "36 x 48",
"offset": "1739 x 0",
"size": "24 x 54"
},
{
- "ground": "19 x 40",
+ "ground": "33 x 48",
"offset": "1763 x 0",
"size": "21 x 54"
},
{
- "ground": "16 x 40",
+ "ground": "30 x 48",
"offset": "1784 x 0",
"size": "18 x 54"
},
{
- "ground": "14 x 41",
+ "ground": "28 x 48",
"offset": "1802 x 0",
"size": "16 x 54"
},
{
- "ground": "14 x 41",
+ "ground": "28 x 48",
"offset": "1818 x 0",
"size": "16 x 54"
},
{
- "ground": "14 x 41",
+ "ground": "28 x 48",
"offset": "1834 x 0",
"size": "16 x 54"
},
{
- "ground": "14 x 41",
+ "ground": "28 x 48",
"offset": "1850 x 0",
"size": "16 x 54"
},
{
- "ground": "14 x 41",
+ "ground": "28 x 49",
"offset": "1866 x 0",
"size": "18 x 54"
},
{
- "ground": "13 x 41",
+ "ground": "28 x 49",
"offset": "1884 x 0",
"size": "20 x 53"
},
{
- "ground": "13 x 41",
+ "ground": "28 x 49",
"offset": "1904 x 0",
"size": "21 x 53"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "1925 x 0",
"size": "23 x 52"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "1948 x 0",
"size": "24 x 52"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "1972 x 0",
"size": "26 x 52"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "1998 x 0",
"size": "27 x 52"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "2025 x 0",
"size": "28 x 51"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "2053 x 0",
"size": "29 x 51"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 49",
"offset": "2082 x 0",
"size": "29 x 51"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "2111 x 0",
"size": "30 x 50"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "2141 x 0",
"size": "30 x 50"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "2171 x 0",
"size": "31 x 50"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "2202 x 0",
"size": "31 x 50"
}
],
- "ground": "938 x 712",
+ "ground": "1070 x 779",
"name": "n"
},
{
"frames": [
{
- "ground": "-11 x 62",
+ "ground": "3 x 69",
"offset": "0 x 54",
"size": "23 x 52"
},
{
- "ground": "-11 x 62",
+ "ground": "3 x 69",
"offset": "23 x 54",
"size": "23 x 52"
},
{
- "ground": "-11 x 62",
+ "ground": "3 x 69",
"offset": "46 x 54",
"size": "23 x 52"
},
{
- "ground": "-11 x 62",
+ "ground": "3 x 69",
"offset": "69 x 54",
"size": "23 x 53"
},
{
- "ground": "-11 x 62",
+ "ground": "4 x 69",
"offset": "92 x 54",
"size": "22 x 53"
},
{
- "ground": "-11 x 62",
+ "ground": "4 x 70",
"offset": "114 x 54",
"size": "21 x 53"
},
{
- "ground": "-11 x 63",
+ "ground": "4 x 70",
"offset": "135 x 54",
"size": "21 x 53"
},
{
- "ground": "-11 x 63",
+ "ground": "4 x 70",
"offset": "156 x 54",
"size": "20 x 53"
},
{
- "ground": "-11 x 63",
+ "ground": "4 x 70",
"offset": "176 x 54",
"size": "19 x 53"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 70",
"offset": "195 x 54",
"size": "18 x 54"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 70",
"offset": "213 x 54",
"size": "17 x 54"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 70",
"offset": "230 x 54",
"size": "15 x 54"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 71",
"offset": "245 x 54",
"size": "14 x 54"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 71",
"offset": "259 x 54",
"size": "12 x 54"
},
{
- "ground": "-10 x 63",
+ "ground": "4 x 71",
"offset": "271 x 54",
"size": "10 x 54"
},
{
- "ground": "-9 x 63",
+ "ground": "6 x 71",
"offset": "281 x 54",
"size": "9 x 54"
},
{
- "ground": "-7 x 63",
+ "ground": "7 x 71",
"offset": "290 x 54",
"size": "9 x 54"
},
{
- "ground": "-5 x 63",
+ "ground": "10 x 70",
"offset": "299 x 54",
"size": "10 x 54"
},
{
- "ground": "-2 x 63",
+ "ground": "12 x 70",
"offset": "309 x 54",
"size": "12 x 54"
},
{
- "ground": "0 x 63",
+ "ground": "14 x 70",
"offset": "321 x 54",
"size": "14 x 54"
},
{
- "ground": "3 x 62",
+ "ground": "17 x 70",
"offset": "335 x 54",
"size": "17 x 54"
},
{
- "ground": "5 x 62",
+ "ground": "19 x 69",
"offset": "352 x 54",
"size": "19 x 53"
},
{
- "ground": "7 x 61",
+ "ground": "22 x 69",
"offset": "371 x 54",
"size": "21 x 53"
},
{
- "ground": "9 x 60",
+ "ground": "24 x 68",
"offset": "392 x 54",
"size": "24 x 52"
},
{
- "ground": "12 x 60",
+ "ground": "26 x 67",
"offset": "416 x 54",
"size": "26 x 52"
},
{
- "ground": "14 x 59",
+ "ground": "29 x 66",
"offset": "442 x 54",
"size": "28 x 51"
},
{
- "ground": "17 x 57",
+ "ground": "31 x 65",
"offset": "470 x 54",
"size": "31 x 50"
},
{
- "ground": "19 x 56",
+ "ground": "33 x 63",
"offset": "501 x 54",
"size": "33 x 49"
},
{
- "ground": "20 x 55",
+ "ground": "35 x 62",
"offset": "534 x 54",
"size": "34 x 48"
},
{
- "ground": "22 x 53",
+ "ground": "36 x 61",
"offset": "568 x 54",
"size": "36 x 47"
},
{
- "ground": "23 x 52",
+ "ground": "38 x 59",
"offset": "604 x 54",
"size": "37 x 45"
},
{
- "ground": "24 x 51",
+ "ground": "39 x 58",
"offset": "641 x 54",
"size": "38 x 44"
},
{
- "ground": "25 x 49",
+ "ground": "40 x 56",
"offset": "679 x 54",
"size": "39 x 42"
},
{
- "ground": "26 x 47",
+ "ground": "40 x 55",
"offset": "718 x 54",
"size": "40 x 41"
},
{
- "ground": "26 x 46",
+ "ground": "40 x 53",
"offset": "758 x 54",
"size": "40 x 39"
},
{
- "ground": "26 x 44",
+ "ground": "40 x 52",
"offset": "798 x 54",
"size": "40 x 38"
},
{
- "ground": "25 x 43",
+ "ground": "40 x 50",
"offset": "838 x 54",
"size": "40 x 36"
},
{
- "ground": "25 x 43",
+ "ground": "40 x 50",
"offset": "878 x 54",
"size": "40 x 38"
},
{
- "ground": "25 x 43",
+ "ground": "39 x 50",
"offset": "918 x 54",
"size": "40 x 39"
},
{
- "ground": "25 x 43",
+ "ground": "39 x 50",
"offset": "958 x 54",
"size": "40 x 41"
},
{
- "ground": "24 x 42",
+ "ground": "38 x 50",
"offset": "998 x 54",
"size": "39 x 42"
},
{
- "ground": "23 x 42",
+ "ground": "37 x 50",
"offset": "1037 x 54",
"size": "39 x 43"
},
{
- "ground": "22 x 42",
+ "ground": "37 x 50",
"offset": "1076 x 54",
"size": "38 x 44"
},
{
- "ground": "21 x 42",
+ "ground": "36 x 50",
"offset": "1114 x 54",
"size": "38 x 45"
},
{
- "ground": "20 x 42",
+ "ground": "35 x 50",
"offset": "1152 x 54",
"size": "37 x 46"
},
{
- "ground": "19 x 42",
+ "ground": "34 x 50",
"offset": "1189 x 54",
"size": "36 x 46"
},
{
- "ground": "19 x 42",
+ "ground": "33 x 50",
"offset": "1225 x 54",
"size": "36 x 47"
},
{
- "ground": "18 x 42",
+ "ground": "32 x 50",
"offset": "1261 x 54",
"size": "35 x 47"
},
{
- "ground": "17 x 42",
+ "ground": "31 x 50",
"offset": "1296 x 54",
"size": "34 x 48"
},
{
- "ground": "16 x 42",
+ "ground": "30 x 50",
"offset": "1330 x 54",
"size": "34 x 48"
},
{
- "ground": "15 x 42",
+ "ground": "30 x 50",
"offset": "1364 x 54",
"size": "33 x 49"
},
{
- "ground": "15 x 42",
+ "ground": "29 x 50",
"offset": "1397 x 54",
"size": "32 x 49"
},
{
- "ground": "14 x 42",
+ "ground": "29 x 50",
"offset": "1429 x 54",
"size": "32 x 49"
},
{
- "ground": "14 x 42",
+ "ground": "28 x 50",
"offset": "1461 x 54",
"size": "32 x 49"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "1493 x 54",
"size": "31 x 50"
}
],
- "ground": "938 x 712",
+ "ground": "1070 x 779",
"name": "e"
},
{
"frames": [
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "0 x 108",
"size": "37 x 46"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "37 x 108",
"size": "37 x 46"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "74 x 108",
"size": "37 x 46"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "111 x 108",
"size": "37 x 45"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "148 x 108",
"size": "37 x 45"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "185 x 108",
"size": "38 x 45"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "223 x 108",
"size": "38 x 44"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "261 x 108",
"size": "38 x 44"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "299 x 108",
"size": "38 x 44"
},
{
- "ground": "-20 x 30",
+ "ground": "-6 x 38",
"offset": "337 x 108",
"size": "39 x 43"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "376 x 108",
"size": "39 x 42"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "415 x 108",
"size": "39 x 41"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "454 x 108",
"size": "40 x 41"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "494 x 108",
"size": "40 x 40"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "534 x 108",
"size": "40 x 39"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "574 x 108",
"size": "40 x 37"
},
{
- "ground": "-20 x 31",
+ "ground": "-6 x 38",
"offset": "614 x 108",
"size": "40 x 37"
},
{
- "ground": "-20 x 32",
+ "ground": "-5 x 40",
"offset": "654 x 108",
"size": "40 x 38"
},
{
- "ground": "-19 x 34",
+ "ground": "-5 x 41",
"offset": "694 x 108",
"size": "40 x 39"
},
{
- "ground": "-19 x 35",
+ "ground": "-5 x 42",
"offset": "734 x 108",
"size": "40 x 41"
},
{
- "ground": "-19 x 36",
+ "ground": "-4 x 44",
"offset": "774 x 108",
"size": "39 x 42"
},
{
- "ground": "-18 x 38",
+ "ground": "-4 x 45",
"offset": "813 x 108",
"size": "39 x 43"
},
{
- "ground": "-18 x 39",
+ "ground": "-3 x 47",
"offset": "852 x 108",
"size": "38 x 45"
},
{
- "ground": "-18 x 41",
+ "ground": "-3 x 48",
"offset": "890 x 108",
"size": "37 x 46"
},
{
- "ground": "-17 x 42",
+ "ground": "-3 x 49",
"offset": "927 x 108",
"size": "35 x 47"
},
{
- "ground": "-17 x 43",
+ "ground": "-2 x 50",
"offset": "962 x 108",
"size": "34 x 48"
},
{
- "ground": "-16 x 44",
+ "ground": "-2 x 51",
"offset": "996 x 108",
"size": "32 x 49"
},
{
- "ground": "-16 x 45",
+ "ground": "-2 x 52",
"offset": "1028 x 108",
"size": "30 x 50"
},
{
- "ground": "-16 x 46",
+ "ground": "-1 x 53",
"offset": "1058 x 108",
"size": "27 x 51"
},
{
- "ground": "-15 x 47",
+ "ground": "-1 x 54",
"offset": "1085 x 108",
"size": "25 x 52"
},
{
- "ground": "-15 x 47",
+ "ground": "-1 x 55",
"offset": "1110 x 108",
"size": "22 x 53"
},
{
- "ground": "-15 x 48",
+ "ground": "0 x 55",
"offset": "1132 x 108",
"size": "20 x 53"
},
{
- "ground": "-14 x 48",
+ "ground": "0 x 56",
"offset": "1152 x 108",
"size": "17 x 54"
},
{
- "ground": "-14 x 49",
+ "ground": "0 x 56",
"offset": "1169 x 108",
"size": "15 x 54"
},
{
- "ground": "-14 x 49",
+ "ground": "0 x 56",
"offset": "1184 x 108",
"size": "12 x 54"
},
{
- "ground": "-14 x 49",
+ "ground": "1 x 56",
"offset": "1196 x 108",
"size": "9 x 54"
},
{
- "ground": "-11 x 49",
+ "ground": "3 x 56",
"offset": "1205 x 108",
"size": "9 x 54"
},
{
- "ground": "-9 x 48",
+ "ground": "5 x 56",
"offset": "1214 x 108",
"size": "10 x 54"
},
{
- "ground": "-6 x 48",
+ "ground": "8 x 56",
"offset": "1224 x 108",
"size": "12 x 54"
},
{
- "ground": "-4 x 48",
+ "ground": "10 x 55",
"offset": "1236 x 108",
"size": "14 x 54"
},
{
- "ground": "-2 x 48",
+ "ground": "12 x 55",
"offset": "1250 x 108",
"size": "16 x 54"
},
{
- "ground": "0 x 47",
+ "ground": "14 x 55",
"offset": "1266 x 108",
"size": "18 x 53"
},
{
- "ground": "2 x 47",
+ "ground": "16 x 54",
"offset": "1284 x 108",
"size": "20 x 53"
},
{
- "ground": "3 x 46",
+ "ground": "18 x 54",
"offset": "1304 x 108",
"size": "21 x 53"
},
{
- "ground": "5 x 46",
+ "ground": "19 x 53",
"offset": "1325 x 108",
"size": "23 x 53"
},
{
- "ground": "6 x 46",
+ "ground": "20 x 53",
"offset": "1348 x 108",
"size": "24 x 52"
},
{
- "ground": "8 x 45",
+ "ground": "22 x 52",
"offset": "1372 x 108",
"size": "26 x 52"
},
{
- "ground": "9 x 45",
+ "ground": "23 x 52",
"offset": "1398 x 108",
"size": "27 x 52"
},
{
- "ground": "10 x 44",
+ "ground": "24 x 51",
"offset": "1425 x 108",
"size": "28 x 51"
},
{
- "ground": "11 x 44",
+ "ground": "25 x 51",
"offset": "1453 x 108",
"size": "29 x 51"
},
{
- "ground": "11 x 43",
+ "ground": "26 x 51",
"offset": "1482 x 108",
"size": "29 x 51"
},
{
- "ground": "12 x 43",
+ "ground": "26 x 50",
"offset": "1511 x 108",
"size": "30 x 50"
},
{
- "ground": "12 x 43",
+ "ground": "27 x 50",
"offset": "1541 x 108",
"size": "30 x 50"
},
{
- "ground": "13 x 43",
+ "ground": "27 x 50",
"offset": "1571 x 108",
"size": "31 x 50"
},
{
- "ground": "13 x 42",
+ "ground": "27 x 50",
"offset": "1602 x 108",
"size": "31 x 50"
}
],
- "ground": "938 x 712",
+ "ground": "1070 x 779",
"name": "s"
},
{
"frames": [
{
- "ground": "29 x 26",
+ "ground": "44 x 33",
"offset": "0 x 162",
"size": "23 x 53"
},
{
- "ground": "29 x 26",
+ "ground": "44 x 33",
"offset": "23 x 162",
"size": "23 x 53"
},
{
- "ground": "29 x 26",
+ "ground": "43 x 33",
"offset": "46 x 162",
"size": "23 x 53"
},
{
- "ground": "29 x 26",
+ "ground": "43 x 33",
"offset": "69 x 162",
"size": "23 x 53"
},
{
- "ground": "28 x 26",
+ "ground": "42 x 33",
"offset": "92 x 162",
"size": "22 x 53"
},
{
- "ground": "27 x 26",
+ "ground": "42 x 33",
"offset": "114 x 162",
"size": "21 x 53"
},
{
- "ground": "27 x 26",
+ "ground": "41 x 33",
"offset": "135 x 162",
"size": "21 x 53"
},
{
- "ground": "26 x 26",
+ "ground": "40 x 33",
"offset": "156 x 162",
"size": "20 x 53"
},
{
- "ground": "25 x 26",
+ "ground": "39 x 33",
"offset": "176 x 162",
"size": "19 x 53"
},
{
- "ground": "24 x 26",
+ "ground": "38 x 33",
"offset": "195 x 162",
"size": "18 x 54"
},
{
- "ground": "22 x 26",
+ "ground": "37 x 33",
"offset": "213 x 162",
"size": "17 x 54"
},
{
- "ground": "21 x 26",
+ "ground": "35 x 33",
"offset": "230 x 162",
"size": "15 x 54"
},
{
- "ground": "19 x 26",
+ "ground": "34 x 33",
"offset": "245 x 162",
"size": "14 x 54"
},
{
- "ground": "17 x 26",
+ "ground": "32 x 33",
"offset": "259 x 162",
"size": "12 x 54"
},
{
- "ground": "15 x 26",
+ "ground": "30 x 33",
"offset": "271 x 162",
"size": "10 x 54"
},
{
- "ground": "13 x 26",
+ "ground": "28 x 33",
"offset": "281 x 162",
"size": "9 x 54"
},
{
- "ground": "11 x 26",
+ "ground": "26 x 33",
"offset": "290 x 162",
"size": "9 x 54"
},
{
- "ground": "10 x 26",
+ "ground": "24 x 33",
"offset": "299 x 162",
"size": "10 x 54"
},
{
- "ground": "9 x 26",
+ "ground": "24 x 33",
"offset": "309 x 162",
"size": "12 x 54"
},
{
- "ground": "9 x 26",
+ "ground": "24 x 34",
"offset": "321 x 162",
"size": "14 x 54"
},
{
- "ground": "9 x 26",
+ "ground": "24 x 34",
"offset": "335 x 162",
"size": "17 x 54"
},
{
- "ground": "9 x 27",
+ "ground": "24 x 34",
"offset": "352 x 162",
"size": "19 x 53"
},
{
- "ground": "9 x 27",
+ "ground": "24 x 34",
"offset": "371 x 162",
"size": "21 x 53"
},
{
- "ground": "9 x 27",
+ "ground": "24 x 34",
"offset": "392 x 162",
"size": "24 x 52"
},
{
- "ground": "9 x 27",
+ "ground": "24 x 35",
"offset": "416 x 162",
"size": "26 x 52"
},
{
- "ground": "9 x 27",
+ "ground": "24 x 35",
"offset": "442 x 162",
"size": "28 x 51"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 35",
"offset": "470 x 162",
"size": "30 x 50"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 35",
"offset": "500 x 162",
"size": "33 x 49"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 35",
"offset": "533 x 162",
"size": "34 x 48"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 35",
"offset": "567 x 162",
"size": "36 x 47"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 36",
"offset": "603 x 162",
"size": "37 x 45"
},
{
- "ground": "9 x 28",
+ "ground": "23 x 36",
"offset": "640 x 162",
"size": "38 x 44"
},
{
- "ground": "9 x 29",
+ "ground": "23 x 36",
"offset": "678 x 162",
"size": "39 x 42"
},
{
- "ground": "9 x 29",
+ "ground": "23 x 36",
"offset": "717 x 162",
"size": "39 x 41"
},
{
- "ground": "9 x 29",
+ "ground": "24 x 36",
"offset": "756 x 162",
"size": "40 x 40"
},
{
- "ground": "9 x 29",
+ "ground": "24 x 36",
"offset": "796 x 162",
"size": "40 x 38"
},
{
- "ground": "9 x 29",
+ "ground": "24 x 36",
"offset": "836 x 162",
"size": "40 x 37"
},
{
- "ground": "10 x 30",
+ "ground": "24 x 37",
"offset": "876 x 162",
"size": "40 x 38"
},
{
- "ground": "10 x 32",
+ "ground": "24 x 39",
"offset": "916 x 162",
"size": "40 x 39"
},
{
- "ground": "10 x 33",
+ "ground": "25 x 40",
"offset": "956 x 162",
"size": "40 x 40"
},
{
- "ground": "11 x 34",
+ "ground": "25 x 41",
"offset": "996 x 162",
"size": "39 x 42"
},
{
- "ground": "11 x 35",
+ "ground": "25 x 43",
"offset": "1035 x 162",
"size": "39 x 43"
},
{
- "ground": "11 x 36",
+ "ground": "26 x 44",
"offset": "1074 x 162",
"size": "38 x 44"
},
{
- "ground": "12 x 37",
+ "ground": "26 x 45",
"offset": "1112 x 162",
"size": "38 x 45"
},
{
- "ground": "12 x 38",
+ "ground": "26 x 45",
"offset": "1150 x 162",
"size": "37 x 46"
},
{
- "ground": "12 x 39",
+ "ground": "26 x 46",
"offset": "1187 x 162",
"size": "36 x 46"
},
{
- "ground": "12 x 40",
+ "ground": "27 x 47",
"offset": "1223 x 162",
"size": "36 x 47"
},
{
- "ground": "12 x 40",
+ "ground": "27 x 47",
"offset": "1259 x 162",
"size": "35 x 47"
},
{
- "ground": "13 x 41",
+ "ground": "27 x 48",
"offset": "1294 x 162",
"size": "34 x 48"
},
{
- "ground": "13 x 41",
+ "ground": "27 x 48",
"offset": "1328 x 162",
"size": "34 x 48"
},
{
- "ground": "13 x 41",
+ "ground": "27 x 49",
"offset": "1362 x 162",
"size": "33 x 49"
},
{
- "ground": "13 x 42",
+ "ground": "27 x 49",
"offset": "1395 x 162",
"size": "32 x 49"
},
{
- "ground": "13 x 42",
+ "ground": "27 x 49",
"offset": "1427 x 162",
"size": "32 x 49"
},
{
- "ground": "13 x 42",
+ "ground": "27 x 49",
"offset": "1459 x 162",
"size": "32 x 50"
},
{
- "ground": "13 x 42",
+ "ground": "28 x 50",
"offset": "1491 x 162",
"size": "31 x 50"
}
],
- "ground": "938 x 712",
+ "ground": "1070 x 779",
"name": "w"
}
],
diff --git a/draw/anim.cpp b/draw/anim.cpp
index 0e913d08..1a02ad93 100644
--- a/draw/anim.cpp
+++ b/draw/anim.cpp
@@ -23,12 +23,12 @@ std::array<UnsignedShort, 6> anim_mesh::make_index_array()
}};
}
-void anim_mesh::draw(tile_shader& shader, const anim_atlas& atlas, const anim_frame& frame, local_coords xy)
+void anim_mesh::draw(tile_shader& shader, const anim_atlas& atlas, rotation r, std::size_t frame, local_coords xy)
{
const auto center = Vector3(xy.x, xy.y, 0.f) * TILE_SIZE;
- const auto pos = atlas.frame_quad(center, frame);
+ const auto pos = atlas.frame_quad(center, r, frame);
_positions_buffer.setSubData(0, pos);
- const auto texcoords = atlas.texcoords_for_frame(frame);
+ const auto texcoords = atlas.texcoords_for_frame(r, frame);
_vertex_buffer.setSubData(0, texcoords);
shader.draw(_mesh);
}
diff --git a/draw/anim.hpp b/draw/anim.hpp
index 85c73bcb..04fd92c8 100644
--- a/draw/anim.hpp
+++ b/draw/anim.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "local-coords.hpp"
+#include "scenery.hpp"
#include <array>
#include <Corrade/Containers/ArrayViewStl.h>
#include <Magnum/Magnum.h>
@@ -20,7 +21,7 @@ using anim_frame = Serialize::anim_frame;
struct anim_mesh final
{
anim_mesh();
- void draw(tile_shader& shader, const anim_atlas& atlas, const anim_frame& frame, local_coords pos);
+ void draw(tile_shader& shader, const anim_atlas& atlas, rotation r, std::size_t frame, local_coords xy);
private:
struct vertex_data final { Vector2 texcoords; };
diff --git a/draw/wall.cpp b/draw/wall.cpp
index 353925f6..9bcfe9d4 100644
--- a/draw/wall.cpp
+++ b/draw/wall.cpp
@@ -79,7 +79,7 @@ void wall_mesh::draw(tile_shader& shader, chunk& c)
f = 0;
frame.frame = (scenery::frame_t)std::min(f, a.atlas->info().nframes - 1);
#endif
- _anim_mesh.draw(shader, *a.atlas, a.atlas->frame(a.frame.r, frame.frame), local_coords{idx});
+ _anim_mesh.draw(shader, *a.atlas, a.frame.r, frame.frame, local_coords{idx});
}
}
}
diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp
index 0bd886bc..4b502208 100644
--- a/src/anim-atlas.cpp
+++ b/src/anim-atlas.cpp
@@ -1,6 +1,7 @@
#include "anim-atlas.hpp"
#include "compat/assert.hpp"
#include "shaders/tile.hpp"
+#include "tile-defs.hpp"
#include <Magnum/Math/Color.h>
#include <Magnum/GL/TextureFormat.h>
@@ -68,12 +69,8 @@ auto anim_atlas::frame(rotation r, std::size_t frame) const noexcept -> const an
auto anim_atlas::texcoords_for_frame(rotation r, std::size_t i) const noexcept -> texcoords
{
- return texcoords_for_frame(frame(r, i));
-}
-
-auto anim_atlas::texcoords_for_frame(const anim_frame& frame) const noexcept -> texcoords
-{
- const Vector2 p0(frame.offset), p1(frame.size);
+ const auto f = frame(r, i);
+ const Vector2 p0(f.offset), p1(f.size);
const auto x0 = p0.x()+.5f, x1 = p1.x()-1, y0 = p0.y()+.5f, y1 = p1.y()-1;
const auto size = _info.pixel_size;
return {{
@@ -86,14 +83,11 @@ auto anim_atlas::texcoords_for_frame(const anim_frame& frame) const noexcept ->
auto anim_atlas::frame_quad(const Vector3& center, rotation r, std::size_t i) const noexcept -> quad
{
- return frame_quad(center, frame(r, i));
-}
-
-auto anim_atlas::frame_quad(const Vector3& center, const anim_frame& frame) noexcept -> quad
-{
- const auto size = Vector2d(frame.size);
- const double gx = frame.ground[0]*.25, gy = frame.ground[1]*.25;
- const double sx = size[0]*.25, sy = size[1]*.25;
+ const auto f = frame(r, i);
+ const auto size = Vector2d(f.size);
+ const double gx = f.ground[0]*.5, gy = f.ground[1]*.5;
+ //auto gx = 0, gy = 0;
+ const double sx = size[0]*.5, sy = size[1]*.5;
const auto bottom_right = Vector2(tile_shader::unproject({ sx - gx, sy - gy })),
top_right = Vector2(tile_shader::unproject({ sx - gx, -sy - gy })),
bottom_left = Vector2(tile_shader::unproject({ -sx - gx, sy - gy })),
diff --git a/src/anim-atlas.hpp b/src/anim-atlas.hpp
index c54cf373..40cc15fe 100644
--- a/src/anim-atlas.hpp
+++ b/src/anim-atlas.hpp
@@ -32,9 +32,7 @@ struct anim_atlas final
const anim_group& group(rotation r) const noexcept;
const anim_frame& frame(rotation r, std::size_t frame) const noexcept;
texcoords texcoords_for_frame(rotation r, std::size_t frame) const noexcept;
- texcoords texcoords_for_frame(const anim_frame& frame) const noexcept;
quad frame_quad(const Vector3& center, rotation r, std::size_t frame) const noexcept;
- static quad frame_quad(const Vector3& center, const anim_frame& frame) noexcept;
fm_DECLARE_DELETED_COPY_ASSIGNMENT(anim_atlas);