Implemented sprite caching, water, grass, and improved performance

This commit is contained in:
Anuken
2017-05-19 18:08:55 -04:00
parent b8b3848e5e
commit 6709d9856d
69 changed files with 477 additions and 527 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,12 +1,12 @@
mindustry.png mindustry.png
size: 256,32 size: 512,32
format: RGBA8888 format: RGBA8888
filter: Nearest,Nearest filter: Nearest,Nearest
repeat: none repeat: none
block block
rotate: false rotate: false
xy: 85, 11 xy: 161, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
@@ -20,7 +20,7 @@ bossmech
index: -1 index: -1
bullet bullet
rotate: false rotate: false
xy: 85, 1 xy: 171, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
@@ -34,98 +34,98 @@ circle
index: -1 index: -1
coal1 coal1
rotate: false rotate: false
xy: 97, 23 xy: 181, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
coal2 coal2
rotate: false rotate: false
xy: 107, 23 xy: 191, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
coal3 coal3
rotate: false rotate: false
xy: 117, 23 xy: 201, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
coaldrill coaldrill
rotate: false rotate: false
xy: 127, 23 xy: 211, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
conveyor conveyor
rotate: false rotate: false
xy: 137, 23 xy: 221, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
conveyormove conveyormove
rotate: false rotate: false
xy: 147, 23 xy: 231, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
core core
rotate: false rotate: false
xy: 157, 23 xy: 241, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
dirt1 dirt1
rotate: false rotate: false
xy: 167, 23 xy: 251, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
dirt2 dirt2
rotate: false rotate: false
xy: 177, 23 xy: 261, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
dirt3 dirt3
rotate: false rotate: false
xy: 187, 23 xy: 271, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
dirtblock dirtblock
rotate: false rotate: false
xy: 197, 23 xy: 281, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
doubleturret doubleturret
rotate: false rotate: false
xy: 37, 21 xy: 51, 7
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
drill drill
rotate: false rotate: false
xy: 207, 23 xy: 291, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
fastmech fastmech
rotate: false rotate: false
xy: 217, 23 xy: 301, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
@@ -139,105 +139,126 @@ firemech
index: -1 index: -1
flameturret flameturret
rotate: false rotate: false
xy: 37, 9 xy: 65, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
furnace furnace
rotate: false rotate: false
xy: 227, 23 xy: 311, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
smelter smelter
rotate: false rotate: false
xy: 227, 23 xy: 311, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
grass grass1
rotate: false rotate: false
xy: 237, 23 xy: 321, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
grass2
rotate: false
xy: 331, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
grass3
rotate: false
xy: 341, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
grassedge
rotate: false
xy: 37, 19
size: 12, 12
orig: 12, 12
offset: 0, 0
index: -1
icon-coal icon-coal
rotate: false rotate: false
xy: 247, 23 xy: 351, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-iron icon-iron
rotate: false rotate: false
xy: 98, 13 xy: 361, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-steel icon-steel
rotate: false rotate: false
xy: 108, 13 xy: 371, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-stone icon-stone
rotate: false rotate: false
xy: 118, 13 xy: 381, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
iron1 iron1
rotate: false rotate: false
xy: 128, 13 xy: 391, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
iron2 iron2
rotate: false rotate: false
xy: 138, 13 xy: 401, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
iron3 iron3
rotate: false rotate: false
xy: 148, 13 xy: 411, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
irondrill irondrill
rotate: false rotate: false
xy: 158, 13 xy: 421, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
ironwall ironwall
rotate: false rotate: false
xy: 168, 13 xy: 431, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
junction junction
rotate: false rotate: false
xy: 178, 13 xy: 441, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
laser laser
rotate: false rotate: false
xy: 95, 7 xy: 63, 5
size: 1, 12 size: 1, 12
orig: 1, 12 orig: 1, 12
offset: 0, 0 offset: 0, 0
@@ -251,175 +272,238 @@ laserend
index: -1 index: -1
machineturret machineturret
rotate: false rotate: false
xy: 49, 21 xy: 77, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
mech1 mech1
rotate: false rotate: false
xy: 188, 13 xy: 451, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
megarepairturret megarepairturret
rotate: false rotate: false
xy: 49, 9 xy: 89, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
player player
rotate: false rotate: false
xy: 198, 13 xy: 461, 23
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
repairturret repairturret
rotate: false rotate: false
xy: 61, 21 xy: 101, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
rock
rotate: false
xy: 471, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
rock2
rotate: false
xy: 481, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
rock2shadow
rotate: false
xy: 491, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
rockshadow
rotate: false
xy: 501, 23
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
router router
rotate: false rotate: false
xy: 208, 13 xy: 66, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
shadow shadow
rotate: false rotate: false
xy: 61, 9 xy: 113, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
shotgunturret shotgunturret
rotate: false rotate: false
xy: 73, 21 xy: 125, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
sniperturret sniperturret
rotate: false rotate: false
xy: 73, 9 xy: 137, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
steelconveyor steelconveyor
rotate: false rotate: false
xy: 218, 13 xy: 66, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
steelconveyormove steelconveyormove
rotate: false rotate: false
xy: 228, 13 xy: 76, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
steelwall steelwall
rotate: false rotate: false
xy: 238, 13 xy: 76, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stone stone
rotate: false rotate: false
xy: 98, 3 xy: 37, 5
size: 8, 8 size: 12, 12
orig: 8, 8 orig: 12, 12
offset: 0, 0
index: -1
stoneedge
rotate: false
xy: 37, 5
size: 12, 12
orig: 12, 12
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stone1 stone1
rotate: false rotate: false
xy: 108, 3 xy: 86, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stone2 stone2
rotate: false rotate: false
xy: 118, 3 xy: 86, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stone3 stone3
rotate: false rotate: false
xy: 128, 3 xy: 96, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stoneblock stoneblock
rotate: false rotate: false
xy: 138, 3 xy: 96, 1
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
stoneblock2
rotate: false
xy: 106, 11
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
stoneblock3
rotate: false
xy: 106, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stonedrill stonedrill
rotate: false rotate: false
xy: 148, 3 xy: 116, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stonedrillhead stonedrillhead
rotate: false rotate: false
xy: 148, 3 xy: 116, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
stonewall stonewall
rotate: false rotate: false
xy: 158, 3 xy: 116, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
turret turret
rotate: false rotate: false
xy: 85, 21 xy: 149, 21
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
water
rotate: false
xy: 126, 11
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
wateredge
rotate: false
xy: 51, 19
size: 12, 12
orig: 12, 12
offset: 0, 0
index: -1
weapon-blaster weapon-blaster
rotate: false rotate: false
xy: 168, 3 xy: 126, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
weapon-flamethrower weapon-flamethrower
rotate: false rotate: false
xy: 178, 3 xy: 136, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
weapon-multigun weapon-multigun
rotate: false rotate: false
xy: 188, 3 xy: 136, 1
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
weapon-trishot weapon-trishot
rotate: false rotate: false
xy: 198, 3 xy: 146, 11
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

View File

@@ -1,19 +1,19 @@
uiskin.png uiskin.png
size: 1024,128 size: 512,128
format: RGBA8888 format: RGBA8888
filter: Nearest,Nearest filter: Nearest,Nearest
repeat: none repeat: none
blank blank
rotate: false rotate: false
xy: 898, 76 xy: 116, 2
size: 8, 8 size: 8, 8
orig: 8, 8 orig: 8, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
border border
rotate: false rotate: false
xy: 134, 2 xy: 90, 3
size: 12, 12 size: 12, 12
split: 4, 4, 4, 4 split: 4, 4, 4, 4
orig: 12, 12 orig: 12, 12
@@ -21,21 +21,21 @@ border
index: -1 index: -1
border-circle border-circle
rotate: false rotate: false
xy: 498, 64 xy: 136, 12
size: 28, 28 size: 28, 28
orig: 28, 28 orig: 28, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
border-circle-error border-circle-error
rotate: false rotate: false
xy: 528, 64 xy: 166, 10
size: 28, 28 size: 28, 28
orig: 28, 28 orig: 28, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
border-dark-blue border-dark-blue
rotate: false rotate: false
xy: 648, 87 xy: 84, 12
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3
@@ -43,7 +43,7 @@ border-dark-blue
index: -1 index: -1
border-error border-error
rotate: false rotate: false
xy: 241, 41 xy: 76, 54
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3
@@ -51,7 +51,7 @@ border-error
index: -1 index: -1
border-white border-white
rotate: false rotate: false
xy: 120, 2 xy: 367, 6
size: 12, 12 size: 12, 12
split: 4, 4, 4, 4 split: 4, 4, 4, 4
orig: 12, 12 orig: 12, 12
@@ -67,7 +67,7 @@ bump
index: -1 index: -1
button button
rotate: false rotate: false
xy: 991, 86 xy: 327, 14
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -75,7 +75,7 @@ button
index: -1 index: -1
button-blue button-blue
rotate: false rotate: false
xy: 705, 86 xy: 223, 44
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -84,7 +84,7 @@ button-blue
index: -1 index: -1
button-blue-down button-blue-down
rotate: false rotate: false
xy: 653, 86 xy: 171, 40
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -93,7 +93,7 @@ button-blue-down
index: -1 index: -1
button-blue-over button-blue-over
rotate: false rotate: false
xy: 679, 86 xy: 197, 40
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -102,7 +102,7 @@ button-blue-over
index: -1 index: -1
button-down button-down
rotate: false rotate: false
xy: 731, 86 xy: 249, 44
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -110,7 +110,7 @@ button-down
index: -1 index: -1
button-gray button-gray
rotate: false rotate: false
xy: 783, 86 xy: 301, 44
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -119,7 +119,7 @@ button-gray
index: -1 index: -1
button-gray-over button-gray-over
rotate: false rotate: false
xy: 757, 86 xy: 275, 44
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -128,7 +128,7 @@ button-gray-over
index: -1 index: -1
button-map button-map
rotate: false rotate: false
xy: 861, 86 xy: 110, 20
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -136,7 +136,7 @@ button-map
index: -1 index: -1
button-map-down button-map-down
rotate: false rotate: false
xy: 809, 86 xy: 58, 12
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -144,7 +144,7 @@ button-map-down
index: -1 index: -1
button-map-over button-map-over
rotate: false rotate: false
xy: 835, 86 xy: 84, 20
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -152,7 +152,7 @@ button-map-over
index: -1 index: -1
button-over button-over
rotate: false rotate: false
xy: 887, 86 xy: 223, 2
size: 24, 40 size: 24, 40
split: 10, 10, 8, 8 split: 10, 10, 8, 8
orig: 24, 40 orig: 24, 40
@@ -160,7 +160,7 @@ button-over
index: -1 index: -1
button-red button-red
rotate: false rotate: false
xy: 913, 86 xy: 249, 2
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -169,7 +169,7 @@ button-red
index: -1 index: -1
button-select button-select
rotate: false rotate: false
xy: 138, 16 xy: 196, 14
size: 24, 24 size: 24, 24
split: 4, 4, 4, 4 split: 4, 4, 4, 4
orig: 24, 24 orig: 24, 24
@@ -177,7 +177,7 @@ button-select
index: -1 index: -1
button-window-bg button-window-bg
rotate: false rotate: false
xy: 939, 86 xy: 275, 2
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -186,7 +186,7 @@ button-window-bg
index: -1 index: -1
button-window-over button-window-over
rotate: false rotate: false
xy: 965, 86 xy: 301, 2
size: 24, 40 size: 24, 40
split: 10, 10, 10, 8 split: 10, 10, 10, 8
pad: 8, 8, 2, 2 pad: 8, 8, 2, 2
@@ -195,77 +195,77 @@ button-window-over
index: -1 index: -1
check-off check-off
rotate: false rotate: false
xy: 503, 94 xy: 353, 31
size: 28, 32 size: 28, 32
orig: 28, 32 orig: 28, 32
offset: 0, 0 offset: 0, 0
index: -1 index: -1
check-on check-on
rotate: false rotate: false
xy: 533, 94 xy: 383, 31
size: 28, 32 size: 28, 32
orig: 28, 32 orig: 28, 32
offset: 0, 0 offset: 0, 0
index: -1 index: -1
check-over check-over
rotate: false rotate: false
xy: 563, 94 xy: 413, 31
size: 28, 32 size: 28, 32
orig: 28, 32 orig: 28, 32
offset: 0, 0 offset: 0, 0
index: -1 index: -1
clear clear
rotate: false rotate: false
xy: 634, 62 xy: 327, 2
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
color-picker-bar-selector color-picker-bar-selector
rotate: false rotate: false
xy: 618, 60 xy: 327, 56
size: 14, 28 size: 14, 28
orig: 14, 28 orig: 14, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
color-picker-cross color-picker-cross
rotate: false rotate: false
xy: 648, 74 xy: 339, 2
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
color-picker-selector-horizontal color-picker-selector-horizontal
rotate: false rotate: false
xy: 335, 83 xy: 76, 59
size: 6, 1 size: 6, 1
orig: 6, 1 orig: 6, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
color-picker-selector-vertical color-picker-selector-vertical
rotate: false rotate: false
xy: 1017, 86 xy: 220, 6
size: 1, 6 size: 1, 6
orig: 1, 6 orig: 1, 6
offset: 0, 0 offset: 0, 0
index: -1 index: -1
cursor cursor
rotate: false rotate: false
xy: 76, 56 xy: 136, 56
size: 4, 4 size: 4, 4
orig: 4, 4 orig: 4, 4
offset: 0, 0 offset: 0, 0
index: -1 index: -1
cursor-normal cursor-normal
rotate: false rotate: false
xy: 646, 62 xy: 196, 2
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
default-pane default-pane
rotate: false rotate: false
xy: 164, 37 xy: 466, 77
size: 5, 3 size: 5, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 5, 3 orig: 5, 3
@@ -273,7 +273,7 @@ default-pane
index: -1 index: -1
default-pane-no-border default-pane-no-border
rotate: false rotate: false
xy: 498, 94 xy: 118, 17
size: 1, 1 size: 1, 1
split: 0, 0, 0, 0 split: 0, 0, 0, 0
orig: 1, 1 orig: 1, 1
@@ -289,7 +289,7 @@ default-select
index: -1 index: -1
default-select-selection default-select-selection
rotate: false rotate: false
xy: 898, 71 xy: 116, 12
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3
@@ -297,46 +297,18 @@ default-select-selection
index: -1 index: -1
grey grey
rotate: false rotate: false
xy: 340, 80 xy: 509, 23
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
menu-bg menu-bg
rotate: false rotate: false
xy: 340, 80 xy: 509, 23
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-arrow-down
rotate: false
xy: 660, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-arrow-left
rotate: false
xy: 658, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-arrow-right
rotate: false
xy: 672, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-arrow-up
rotate: false
xy: 670, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-close icon-close
rotate: false rotate: false
xy: 217, 86 xy: 217, 86
@@ -358,317 +330,37 @@ icon-close-over
orig: 40, 40 orig: 40, 40
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-copy
rotate: false
xy: 684, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-cursor
rotate: false
xy: 682, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-defense icon-defense
rotate: false rotate: false
xy: 696, 74 xy: 208, 2
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-distribution icon-distribution
rotate: false rotate: false
xy: 694, 62 xy: 104, 5
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-dots
rotate: false
xy: 708, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-dots-down
rotate: false
xy: 706, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-down
rotate: false
xy: 720, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-drive
rotate: false
xy: 82, 4
size: 36, 10
orig: 36, 10
offset: 0, 0
index: -1
icon-eraser
rotate: false
xy: 718, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-file-audio
rotate: false
xy: 593, 90
size: 28, 36
orig: 28, 36
offset: 0, 0
index: -1
icon-file-image
rotate: false
xy: 219, 54
size: 26, 30
orig: 26, 30
offset: 0, 0
index: -1
icon-file-pdf
rotate: false
xy: 623, 92
size: 28, 34
orig: 28, 34
offset: 0, 0
index: -1
icon-file-text
rotate: false
xy: 732, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-fill
rotate: false
xy: 730, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-folder
rotate: false
xy: 744, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-folder-new
rotate: false
xy: 466, 97
size: 35, 29
orig: 35, 29
offset: 0, 0
index: -1
icon-folder-parent
rotate: false
xy: 742, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-folder-star
rotate: false
xy: 430, 66
size: 34, 26
orig: 34, 26
offset: 0, 0
index: -1
icon-grid
rotate: false
xy: 756, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-home
rotate: false
xy: 754, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-list-settings
rotate: false
xy: 171, 46
size: 38, 34
orig: 38, 34
offset: 0, 0
index: -1
icon-load-1
rotate: false
xy: 768, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-load-2
rotate: false
xy: 766, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-load-3
rotate: false
xy: 780, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-lock
rotate: false
xy: 778, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-lock-open
rotate: false
xy: 792, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-minus
rotate: false
xy: 790, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-open
rotate: false
xy: 804, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-open-gray
rotate: false
xy: 802, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-pencil
rotate: false
xy: 816, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-pick
rotate: false
xy: 814, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-plus
rotate: false
xy: 828, 74
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
icon-production icon-production
rotate: false rotate: false
xy: 826, 62 xy: 389, 19
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-redo
rotate: false
xy: 840, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-refresh
rotate: false
xy: 247, 54
size: 26, 30
orig: 26, 30
offset: 0, 0
index: -1
icon-rename
rotate: false
xy: 838, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-star
rotate: false
xy: 466, 67
size: 30, 28
orig: 30, 28
offset: 0, 0
index: -1
icon-star-outline
rotate: false
xy: 430, 94
size: 34, 32
orig: 34, 32
offset: 0, 0
index: -1
icon-tap
rotate: false
xy: 852, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-trash
rotate: false
xy: 850, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-undo
rotate: false
xy: 864, 74
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-up
rotate: false
xy: 862, 62
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
icon-zoom
rotate: false
xy: 876, 74
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
list-selection list-selection
rotate: false rotate: false
xy: 78, 2 xy: 220, 3
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
padded-list-selection padded-list-selection
rotate: false rotate: false
xy: 58, 5 xy: 104, 2
size: 10, 1 size: 10, 1
split: 4, 4, 0, 1 split: 4, 4, 0, 1
orig: 10, 1 orig: 10, 1
@@ -676,49 +368,49 @@ padded-list-selection
index: -1 index: -1
progressbar progressbar
rotate: false rotate: false
xy: 1017, 94 xy: 503, 22
size: 1, 32 size: 1, 32
orig: 1, 32 orig: 1, 32
offset: 0, 0 offset: 0, 0
index: -1 index: -1
progressbar-filled progressbar-filled
rotate: false rotate: false
xy: 1020, 94 xy: 506, 22
size: 1, 32 size: 1, 32
orig: 1, 32 orig: 1, 32
offset: 0, 0 offset: 0, 0
index: -1 index: -1
progressbar-filled-vertical progressbar-filled-vertical
rotate: false rotate: false
xy: 207, 43 xy: 84, 17
size: 32, 1 size: 32, 1
orig: 32, 1 orig: 32, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
progressbar-vertical progressbar-vertical
rotate: false rotate: false
xy: 207, 40 xy: 353, 20
size: 32, 1 size: 32, 1
orig: 32, 1 orig: 32, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
radio-off radio-off
rotate: false rotate: false
xy: 558, 64 xy: 443, 44
size: 28, 28 size: 28, 28
orig: 28, 28 orig: 28, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
radio-on radio-on
rotate: false rotate: false
xy: 588, 60 xy: 473, 52
size: 28, 28 size: 28, 28
orig: 28, 28 orig: 28, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
scroll scroll
rotate: false rotate: false
xy: 171, 38 xy: 430, 74
size: 34, 6 size: 34, 6
split: 4, 4, 2, 2 split: 4, 4, 2, 2
orig: 34, 6 orig: 34, 6
@@ -726,7 +418,7 @@ scroll
index: -1 index: -1
scroll-horizontal scroll-horizontal
rotate: false rotate: false
xy: 130, 26 xy: 502, 92
size: 6, 34 size: 6, 34
split: 2, 2, 0, 34 split: 2, 2, 0, 34
pad: 0, 5, 5, 4 pad: 0, 5, 5, 4
@@ -735,7 +427,7 @@ scroll-horizontal
index: -1 index: -1
scroll-knob-horizontal scroll-knob-horizontal
rotate: false rotate: false
xy: 211, 46 xy: 503, 56
size: 6, 34 size: 6, 34
split: 2, 2, 0, 34 split: 2, 2, 0, 34
pad: 0, 5, 13, 12 pad: 0, 5, 13, 12
@@ -744,7 +436,7 @@ scroll-knob-horizontal
index: -1 index: -1
scroll-knob-vertical scroll-knob-vertical
rotate: false rotate: false
xy: 219, 46 xy: 353, 23
size: 34, 6 size: 34, 6
split: 12, 12, 2, 2 split: 12, 12, 2, 2
orig: 34, 6 orig: 34, 6
@@ -752,98 +444,98 @@ scroll-knob-vertical
index: -1 index: -1
select-box-list-bg select-box-list-bg
rotate: false rotate: false
xy: 340, 77 xy: 466, 74
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
window-bg window-bg
rotate: false rotate: false
xy: 340, 77 xy: 466, 74
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
select-down select-down
rotate: false rotate: false
xy: 148, 6 xy: 58, 2
size: 14, 8 size: 14, 8
orig: 14, 8 orig: 14, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
select-up select-up
rotate: false rotate: false
xy: 255, 44 xy: 74, 2
size: 14, 8 size: 14, 8
orig: 14, 8 orig: 14, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
selection selection
rotate: false rotate: false
xy: 588, 91 xy: 81, 56
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
separator separator
rotate: false rotate: false
xy: 148, 3 xy: 121, 12
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
tree-over tree-over
rotate: false rotate: false
xy: 148, 3 xy: 121, 12
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
separator-menu separator-menu
rotate: false rotate: false
xy: 271, 51 xy: 469, 74
size: 1, 1 size: 1, 1
orig: 1, 1 orig: 1, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider slider
rotate: false rotate: false
xy: 130, 16 xy: 509, 46
size: 1, 8 size: 1, 8
orig: 1, 8 orig: 1, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider-knob slider-knob
rotate: false rotate: false
xy: 58, 8 xy: 430, 82
size: 22, 44 size: 22, 44
orig: 22, 44 orig: 22, 44
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider-knob-disabled slider-knob-disabled
rotate: false rotate: false
xy: 82, 16 xy: 454, 82
size: 22, 44 size: 22, 44
orig: 22, 44 orig: 22, 44
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider-knob-down slider-knob-down
rotate: false rotate: false
xy: 106, 16 xy: 478, 82
size: 22, 44 size: 22, 44
orig: 22, 44 orig: 22, 44
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider-knob-over slider-knob-over
rotate: false rotate: false
xy: 106, 16 xy: 478, 82
size: 22, 44 size: 22, 44
orig: 22, 44 orig: 22, 44
offset: 0, 0 offset: 0, 0
index: -1 index: -1
slider-vertical slider-vertical
rotate: false rotate: false
xy: 58, 2 xy: 343, 62
size: 8, 1 size: 8, 1
orig: 8, 1 orig: 8, 1
offset: 0, 0 offset: 0, 0
@@ -858,42 +550,42 @@ slot
index: -1 index: -1
splitpane splitpane
rotate: false rotate: false
xy: 68, 2 xy: 343, 59
size: 8, 1 size: 8, 1
orig: 8, 1 orig: 8, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
splitpane-over splitpane-over
rotate: false rotate: false
xy: 70, 5 xy: 343, 56
size: 8, 1 size: 8, 1
orig: 8, 1 orig: 8, 1
offset: 0, 0 offset: 0, 0
index: -1 index: -1
splitpane-vertical splitpane-vertical
rotate: false rotate: false
xy: 133, 16 xy: 509, 36
size: 1, 8 size: 1, 8
orig: 1, 8 orig: 1, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
splitpane-vertical-over splitpane-vertical-over
rotate: false rotate: false
xy: 138, 52 xy: 509, 26
size: 1, 8 size: 1, 8
orig: 1, 8 orig: 1, 8
offset: 0, 0 offset: 0, 0
index: -1 index: -1
sub-menu sub-menu
rotate: false rotate: false
xy: 888, 70 xy: 126, 4
size: 8, 14 size: 8, 14
orig: 8, 14 orig: 8, 14
offset: 0, 0 offset: 0, 0
index: -1 index: -1
textfield textfield
rotate: false rotate: false
xy: 305, 56 xy: 473, 22
size: 28, 28 size: 28, 28
split: 6, 6, 6, 6 split: 6, 6, 6, 6
orig: 28, 28 orig: 28, 28
@@ -901,7 +593,7 @@ textfield
index: -1 index: -1
textfield-over textfield-over
rotate: false rotate: false
xy: 275, 56 xy: 443, 14
size: 28, 28 size: 28, 28
split: 2, 2, 2, 2 split: 2, 2, 2, 2
orig: 28, 28 orig: 28, 28
@@ -909,7 +601,7 @@ textfield-over
index: -1 index: -1
tooltip-bg tooltip-bg
rotate: false rotate: false
xy: 908, 81 xy: 121, 15
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3
@@ -924,21 +616,21 @@ touchpad-knob
index: -1 index: -1
tree-minus tree-minus
rotate: false rotate: false
xy: 874, 62 xy: 401, 19
size: 10, 10 size: 10, 10
orig: 10, 10 orig: 10, 10
offset: 0, 0 offset: 0, 0
index: -1 index: -1
tree-plus tree-plus
rotate: false rotate: false
xy: 634, 74 xy: 353, 2
size: 12, 16 size: 12, 16
orig: 12, 16 orig: 12, 16
offset: 0, 0 offset: 0, 0
index: -1 index: -1
tree-selection tree-selection
rotate: false rotate: false
xy: 164, 32 xy: 430, 69
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3
@@ -946,7 +638,7 @@ tree-selection
index: -1 index: -1
white white
rotate: false rotate: false
xy: 335, 78 xy: 473, 17
size: 3, 3 size: 3, 3
orig: 3, 3 orig: 3, 3
offset: 0, 0 offset: 0, 0
@@ -961,7 +653,7 @@ window
index: -1 index: -1
window-border-bg window-border-bg
rotate: false rotate: false
xy: 246, 41 xy: 136, 7
size: 3, 3 size: 3, 3
split: 1, 1, 1, 1 split: 1, 1, 1, 1
orig: 3, 3 orig: 3, 3

View File

@@ -19,7 +19,7 @@ com.badlogic.gdx.graphics.Color: {
menuitem: {a: 1, b: 0.65, g: 0.65, r: 0.65 }, menuitem: {a: 1, b: 0.65, g: 0.65, r: 0.65 },
link-label: {a: 1, b: 0.886, g: 0.631, r: 0.105 } link-label: {a: 1, b: 0.886, g: 0.631, r: 0.105 }
}, },
io.anuke.ucore.scene.style.Styles$TintedDrawable: { io.anuke.ucore.scene.Skin$TintedDrawable: {
dialogDim: {name: white, color: {r: 0, g: 0, b: 0, a: 0.45} } dialogDim: {name: white, color: {r: 0, g: 0, b: 0, a: 0.45} }
}, },
io.anuke.ucore.scene.ui.Button$ButtonStyle: { io.anuke.ucore.scene.ui.Button$ButtonStyle: {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -15,56 +15,56 @@ public class EffectLoader{
Effect.create("place", 16, e -> { Effect.create("place", 16, e -> {
Draw.thickness(3f - e.ifract() * 2f); Draw.thickness(3f - e.ifract() * 2f);
Draw.square(e.x, e.y, tilesize / 2f + e.ifract() * 3f); Draw.square(e.x, e.y, tilesize / 2f + e.ifract() * 3f);
Draw.clear(); Draw.reset();
}); });
Effect.create("spark", 10, e -> { Effect.create("spark", 10, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GRAY, e.ifract())); Draw.color(Hue.mix(Color.WHITE, Color.GRAY, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8); Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.clear(); Draw.reset();
}); });
Effect.create("smelt", 10, e -> { Effect.create("smelt", 10, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.YELLOW, Color.RED, e.ifract())); Draw.color(Hue.mix(Color.YELLOW, Color.RED, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8); Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.clear(); Draw.reset();
}); });
Effect.create("break", 12, e -> { Effect.create("break", 12, e -> {
Draw.thickness(2f); Draw.thickness(2f);
Draw.color(Color.WHITE, Color.GRAY, e.ifract()); Draw.color(Color.WHITE, Color.GRAY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 5); Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 5);
Draw.clear(); Draw.reset();
}); });
Effect.create("hit", 10, e -> { Effect.create("hit", 10, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract())); Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 3f, 2, 8); Draw.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
Draw.clear(); Draw.reset();
}); });
Effect.create("shoot", 8, e -> { Effect.create("shoot", 8, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract())); Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 2f, 2, 5); Draw.spikes(e.x, e.y, e.ifract() * 2f, 2, 5);
Draw.clear(); Draw.reset();
}); });
Effect.create("shoot2", 8, e -> { Effect.create("shoot2", 8, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.SKY, e.ifract())); Draw.color(Hue.mix(Color.WHITE, Color.SKY, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5); Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5);
Draw.clear(); Draw.reset();
}); });
Effect.create("shoot3", 8, e -> { Effect.create("shoot3", 8, e -> {
Draw.thickness(1f); Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract())); Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract()));
Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5); Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5);
Draw.clear(); Draw.reset();
}); });
Effect.create("explosion", 15, e -> { Effect.create("explosion", 15, e -> {
@@ -72,7 +72,7 @@ public class EffectLoader{
Draw.color(Hue.mix(Color.ORANGE, Color.GRAY, e.ifract())); Draw.color(Hue.mix(Color.ORANGE, Color.GRAY, e.ifract()));
Draw.spikes(e.x, e.y, 2f + e.ifract() * 3f, 4, 6); Draw.spikes(e.x, e.y, 2f + e.ifract() * 3f, 4, 6);
Draw.circle(e.x, e.y, 3f + e.ifract() * 3f); Draw.circle(e.x, e.y, 3f + e.ifract() * 3f);
Draw.clear(); Draw.reset();
}); });
Effect.create("coreexplosion", 13, e -> { Effect.create("coreexplosion", 13, e -> {
@@ -80,21 +80,21 @@ public class EffectLoader{
Draw.color(Hue.mix(Color.ORANGE, Color.WHITE, e.ifract())); Draw.color(Hue.mix(Color.ORANGE, Color.WHITE, e.ifract()));
Draw.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6); Draw.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6);
Draw.circle(e.x, e.y, 4f + e.ifract() * 40f); Draw.circle(e.x, e.y, 4f + e.ifract() * 40f);
Draw.clear(); Draw.reset();
}); });
Effect.create("spawn", 23, e -> { Effect.create("spawn", 23, e -> {
Draw.thickness(2f); Draw.thickness(2f);
Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract())); Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract()));
Draw.circle(e.x, e.y, 7f - e.ifract() * 6f); Draw.circle(e.x, e.y, 7f - e.ifract() * 6f);
Draw.clear(); Draw.reset();
}); });
Effect.create("ind", 100, e -> { Effect.create("ind", 100, e -> {
Draw.thickness(3f); Draw.thickness(3f);
Draw.color("royal"); Draw.color("royal");
Draw.circle(e.x, e.y, 3); Draw.circle(e.x, e.y, 3);
Draw.clear(); Draw.reset();
}); });
Effect.create("respawn", respawnduration, e -> { Effect.create("respawn", respawnduration, e -> {
@@ -102,7 +102,7 @@ public class EffectLoader{
Draw.tscl(0.25f); Draw.tscl(0.25f);
Draw.text("Respawning in " + (int)((e.lifetime-e.time)/60), e.x, e.y); Draw.text("Respawning in " + (int)((e.lifetime-e.time)/60), e.x, e.y);
Draw.tscl(0.5f); Draw.tscl(0.5f);
Draw.clear(); Draw.reset();
}); });
} }
} }

View File

@@ -94,12 +94,12 @@ public class Input{
Tile cursor = World.cursorTile(); Tile cursor = World.cursorTile();
//block breaking //block breaking
if(Inputs.buttonDown(Buttons.RIGHT) && World.cursorNear() && cursor.artifical() if(Inputs.buttonDown(Buttons.RIGHT) && World.cursorNear() && cursor.breakable()
&& cursor.block() != ProductionBlocks.core){ && cursor.block() != ProductionBlocks.core){
Tile tile = cursor; Tile tile = cursor;
breaktime += Mathf.delta(); breaktime += Mathf.delta();
if(breaktime >= breakduration){ if(breaktime >= tile.block().breaktime){
Effects.effect("break", tile.entity); Effects.effect("break", tile.worldx(), tile.worldy());
Effects.shake(3f, 1f); Effects.shake(3f, 1f);
tile.setBlock(Blocks.air); tile.setBlock(Blocks.air);
breaktime = 0f; breaktime = 0f;

View File

@@ -17,19 +17,62 @@ import io.anuke.ucore.core.Inputs;
import io.anuke.ucore.entities.DestructibleEntity; import io.anuke.ucore.entities.DestructibleEntity;
import io.anuke.ucore.entities.Entities; import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.entities.Entity; import io.anuke.ucore.entities.Entity;
import io.anuke.ucore.graphics.Cache;
import io.anuke.ucore.graphics.Caches;
import io.anuke.ucore.scene.utils.Cursors; import io.anuke.ucore.scene.utils.Cursors;
import io.anuke.ucore.util.GridMap;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Timers; import io.anuke.ucore.util.Timers;
public class Renderer{ public class Renderer{
private static int chunksize = 32;
private static GridMap<Cache> caches = new GridMap<>();
public static void renderTiles(){ public static void renderTiles(){
Draw.clear(); int chunksx = World.width()/chunksize, chunksy = World.height()/chunksize;
//render the entire map
if(caches.size() == 0){
for(int cx = 0; cx < chunksx; cx ++){
for(int cy = 0; cy < chunksy; cy ++){
Caches.begin();
for(int tilex = cx*chunksize; tilex < (cx+1)*chunksize; tilex++){
for(int tiley = cy*chunksize; tiley < (cy+1)*chunksize; tiley++){
World.tile(tilex, tiley).floor().drawCache(World.tile(tilex, tiley));
}
}
caches.put(cx, cy, Caches.end());
}
}
}
OrthographicCamera camera = control.camera; OrthographicCamera camera = control.camera;
Draw.end();
int crangex = (int)(camera.viewportWidth/(chunksize*tilesize));
int crangey = (int)(camera.viewportHeight/(chunksize*tilesize))+1;
for(int x = -crangex; x <= crangex; x++){
for(int y = -crangey; y <= crangey; y++){
int worldx = Mathf.scl(camera.position.x, chunksize*tilesize) + x;
int worldy = Mathf.scl(camera.position.y, chunksize*tilesize) + y;
if(caches.containsKey(worldx, worldy))
caches.get(worldx, worldy).render();
}
}
Draw.begin();
Draw.reset();
int rangex = control.rangex, rangey = control.rangey; int rangex = control.rangex, rangey = control.rangey;
for(int l = 0; l < 4; l++){ for(int l = 0; l < 4; l++){
if(l == 1){ if(l == 0){
Draw.surface("shadow"); Draw.surface("shadow");
} }
@@ -40,11 +83,11 @@ public class Renderer{
if(Mathf.inBounds(worldx, worldy, tiles)){ if(Mathf.inBounds(worldx, worldy, tiles)){
Tile tile = tiles[worldx][worldy]; Tile tile = tiles[worldx][worldy];
if(l == 1){ if(l == 0){
if(tile.block() != Blocks.air) if(tile.block() != Blocks.air)
Draw.rect("shadow", worldx * tilesize, worldy * tilesize); Draw.rect(tile.block().shadow, worldx * tilesize, worldy * tilesize);
}else if(l == 0 || l == 2){ }else if(l == 1){
(l == 0 ? tile.floor() : tile.block()).draw(tile); tile.block().draw(tile);
}else{ }else{
tile.block().drawOver(tile); tile.block().drawOver(tile);
} }
@@ -52,7 +95,7 @@ public class Renderer{
} }
} }
if(l == 1){ if(l == 0){
Draw.color(0, 0, 0, 0.15f); Draw.color(0, 0, 0, 0.15f);
Draw.flushSurface(); Draw.flushSurface();
Draw.color(); Draw.color();
@@ -89,16 +132,16 @@ public class Renderer{
else else
Cursors.restoreCursor(); Cursors.restoreCursor();
Draw.clear(); Draw.reset();
} }
//block breaking //block breaking
if(Inputs.buttonDown(Buttons.RIGHT) && World.cursorNear()){ if(Inputs.buttonDown(Buttons.RIGHT) && World.cursorNear()){
Tile tile = World.cursorTile(); Tile tile = World.cursorTile();
if(tile.artifical() && tile.block() != ProductionBlocks.core){ if(tile.breakable() && tile.block() != ProductionBlocks.core){
Draw.color(Color.YELLOW, Color.SCARLET, breaktime / breakduration); Draw.color(Color.YELLOW, Color.SCARLET, breaktime / tile.block().breaktime);
Draw.square(tile.worldx(), tile.worldy(), 4); Draw.square(tile.worldx(), tile.worldy(), 4);
Draw.clear(); Draw.reset();
} }
} }
@@ -148,6 +191,6 @@ public class Renderer{
Draw.color(Color.RED); Draw.color(Color.RED);
if(w >= 1) if(w >= 1)
Draw.line(x - len + 1, y - offset, x - len + w, y - offset); Draw.line(x - len + 1, y - offset, x - len + w, y - offset);
Draw.clear(); Draw.reset();
} }
} }

View File

@@ -1,12 +1,16 @@
package io.anuke.mindustry; package io.anuke.mindustry;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
import static io.anuke.ucore.scene.actions.Actions.*;
import java.util.function.BooleanSupplier; import java.util.function.BooleanSupplier;
import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.utils.Align;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.entities.Weapon; import io.anuke.mindustry.entities.Weapon;
@@ -18,8 +22,8 @@ import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Textures; import io.anuke.ucore.graphics.Textures;
import io.anuke.ucore.modules.SceneModule; import io.anuke.ucore.modules.SceneModule;
import io.anuke.ucore.scene.Scene; import io.anuke.ucore.scene.Scene;
import io.anuke.ucore.scene.actions.Actions;
import io.anuke.ucore.scene.builders.*; import io.anuke.ucore.scene.builders.*;
import io.anuke.ucore.scene.style.Styles;
import io.anuke.ucore.scene.ui.*; import io.anuke.ucore.scene.ui.*;
import io.anuke.ucore.scene.ui.layout.Stack; import io.anuke.ucore.scene.ui.layout.Stack;
import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.scene.ui.layout.Table;
@@ -40,7 +44,20 @@ public class UI extends SceneModule{
}; };
public UI() { public UI() {
Styles.styles.font().setUseIntegerPositions(false); Dialog.setShowAction(()->{
return sequence(Actions.moveToAligned(Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight(), Align.center),
parallel(Actions.moveToAligned(Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/2, Align.center, 0.09f, Interpolation.fade),
Actions.fadeIn(0.09f, Interpolation.fade)));
});
Dialog.setHideAction(()->{
return sequence(
parallel(Actions.moveBy(0, -Gdx.graphics.getHeight()/2, 0.08f, Interpolation.fade),
Actions.fadeOut(0.08f, Interpolation.fade)));
});
skin.font().setUseIntegerPositions(false);
TooltipManager.getInstance().animations = false; TooltipManager.getInstance().animations = false;
Dialog.closePadR = -1; Dialog.closePadR = -1;
@@ -59,7 +76,7 @@ public class UI extends SceneModule{
Draw.color(Hue.lightness(0.6f)); Draw.color(Hue.lightness(0.6f));
int tw = w/64+1;//, th = h/64+1; int tw = w/64+1;
batch.draw(Textures.get("back"), 0, 0, 0, 0, w, h); batch.draw(Textures.get("back"), 0, 0, 0, 0, w, h);
@@ -67,11 +84,6 @@ public class UI extends SceneModule{
batch.draw(Textures.get("conveyort"), x*64, 0, 0, (int)(Timers.time()*2*(x%2-0.5f)), 32, h); batch.draw(Textures.get("conveyort"), x*64, 0, 0, (int)(Timers.time()*2*(x%2-0.5f)), 32, h);
} }
//for(int y = 0; y < th; y ++){
// batch.draw(Textures.get("conveyor"), 0, y*64, (int)(Timers.time()*2*(y%2-0.5f)), 0, w, 32);
//}
Draw.color(); Draw.color();
Draw.tscl(1.5f); Draw.tscl(1.5f);
@@ -173,17 +185,17 @@ public class UI extends SceneModule{
maxcol = Math.max((int)((float)recipes.size/rows+1), maxcol); maxcol = Math.max((int)((float)recipes.size/rows+1), maxcol);
} }
for(Section sec : Section.values()){ for(Section sec : Section.values()){
recipes.clear(); recipes.clear();
Recipe.getBy(sec, recipes); Recipe.getBy(sec, recipes);
ImageButton button = new ImageButton("icon-"+sec.name(), "toggle"); ImageButton button = new ImageButton("icon-"+sec.name(), "toggle");
add(button).size(size).height(size+8); add(button).fill().height(54).padTop(-10);
button.getImageCell().size(40).padBottom(4); button.getImageCell().size(40).padBottom(4);
group.add(button); group.add(button);
Table table = new Table(); Table table = new Table();
table.pad(4);
int i = 0; int i = 0;
@@ -265,6 +277,9 @@ public class UI extends SceneModule{
add(stack).colspan(3); add(stack).colspan(3);
get().pad(10f); get().pad(10f);
get().padLeft(0f);
get().padRight(0f);
end(); end();
}}.right().bottom().uniformX(); }}.right().bottom().uniformX();
@@ -351,27 +366,38 @@ public class UI extends SceneModule{
new table(){{ new table(){{
float w = 200; float w = 200;
new button("Play", () -> { new table("button"){{
levels.show(); new button("Play", () -> {
}).width(w); levels.show();
}).width(w);
row(); row();
new button("Settings", () -> { new button("Settings", () -> {
prefs.show(scene); prefs.show(scene);
}).width(w); }).width(w);
row(); row();
new button("Controls", () -> { new button("Controls", () -> {
keys.show(scene); keys.show(scene);
}).width(w); }).width(w);
row(); row();
new button("About", () -> { new button("About", () -> {
about.show(scene); about.show(scene);
}).width(w); }).width(w);
row();
if(Gdx.app.getType() != ApplicationType.WebGL)
new button("Exit", () -> {
Gdx.app.exit();
}).width(w);
get().pad(20);
}};
get().setVisible(nplay); get().setVisible(nplay);
}}.end(); }}.end();

View File

@@ -18,7 +18,6 @@ public class Vars{
public static final float respawnduration = 60*4; public static final float respawnduration = 60*4;
public static final float wavespace = 20*60; public static final float wavespace = 20*60;
public static final float enemyspawnspace = 65; public static final float enemyspawnspace = 65;
public static final float breakduration = 30;
public static boolean debug = false; public static boolean debug = false;
public static final Vector2 vector = new Vector2(); public static final Vector2 vector = new Vector2();
@@ -36,7 +35,7 @@ public class Vars{
public static float breaktime = 0; public static float breaktime = 0;
public static final String[] maps = {"delta", "canyon", "pit", "maze"}; public static final String[] maps = {"delta", "canyon", "pit", "maze", "test"};
public static Pixmap[] mapPixmaps; public static Pixmap[] mapPixmaps;
public static Texture[] mapTextures; public static Texture[] mapTextures;
public static int currentMap; public static int currentMap;

View File

@@ -28,6 +28,14 @@ public class World{
return tile == null || tile.block().solid; return tile == null || tile.block().solid;
} }
public static int width(){
return Vars.mapPixmaps[Vars.currentMap].getWidth();
}
public static int height(){
return Vars.mapPixmaps[Vars.currentMap].getHeight();
}
public static Tile tile(int x, int y){ public static Tile tile(int x, int y){
if(!Mathf.inBounds(x, y, tiles)) return null; if(!Mathf.inBounds(x, y, tiles)) return null;
return tiles[x][y]; return tiles[x][y];

View File

@@ -14,8 +14,8 @@ public class MHueristic implements Heuristic<Tile>{
float cost = Math.abs(node.worldx() - other.worldx()) + Math.abs(node.worldy() - other.worldy()); float cost = Math.abs(node.worldx() - other.worldx()) + Math.abs(node.worldy() - other.worldy());
//TODO balance multiplier //TODO balance multiplier
if(node.artifical() && node.block().solid) cost += Vars.tilesize*multiplier; if(node.breakable() && node.block().solid) cost += Vars.tilesize*multiplier;
if(other.artifical() && other.block().solid) cost += Vars.tilesize*multiplier; if(other.breakable() && other.block().solid) cost += Vars.tilesize*multiplier;
return cost; return cost;
} }

View File

@@ -13,28 +13,28 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color("gray"); Draw.color("gray");
Draw.square(b.x, b.y, 1f); Draw.square(b.x, b.y, 1f);
Draw.clear(); Draw.reset();
} }
}, },
iron = new BulletType(1.7f, 2){ iron = new BulletType(1.7f, 2){
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color("gray"); Draw.color("gray");
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}, },
sniper = new BulletType(3f, 20){ sniper = new BulletType(3f, 20){
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color("lightgray"); Draw.color("lightgray");
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}, },
small = new BulletType(1.5f, 1){ small = new BulletType(1.5f, 1){
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color("orange"); Draw.color("orange");
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}, },
smallfast = new BulletType(1.6f, 2){ smallfast = new BulletType(1.6f, 2){
@@ -42,7 +42,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color(color); Draw.color(color);
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}, },
flame = new BulletType(0.6f, 4){ flame = new BulletType(0.6f, 4){
@@ -50,7 +50,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.color(Color.YELLOW, Color.SCARLET, b.time/lifetime); Draw.color(Color.YELLOW, Color.SCARLET, b.time/lifetime);
float size = 6f-b.time/lifetime*5f; float size = 6f-b.time/lifetime*5f;
Draw.rect("circle", b.x, b.y, size, size); Draw.rect("circle", b.x, b.y, size, size);
Draw.clear(); Draw.reset();
} }
}, },
flameshot = new BulletType(0.5f, 3){ flameshot = new BulletType(0.5f, 3){
@@ -58,7 +58,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.color(Color.ORANGE, Color.SCARLET, b.time/lifetime); Draw.color(Color.ORANGE, Color.SCARLET, b.time/lifetime);
float size = 6f-b.time/lifetime*5f; float size = 6f-b.time/lifetime*5f;
Draw.rect("circle", b.x, b.y, size, size); Draw.rect("circle", b.x, b.y, size, size);
Draw.clear(); Draw.reset();
} }
}, },
shot = new BulletType(2.4f, 2){ shot = new BulletType(2.4f, 2){
@@ -66,7 +66,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color(Color.GOLD); Draw.color(Color.GOLD);
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}, },
shot2 = new BulletType(2.5f, 2){ shot2 = new BulletType(2.5f, 2){
@@ -74,7 +74,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){ public void draw(Bullet b){
Draw.color(Color.SKY); Draw.color(Color.SKY);
Draw.rect("bullet", b.x, b.y, b.angle()); Draw.rect("bullet", b.x, b.y, b.angle());
Draw.clear(); Draw.reset();
} }
}; };

View File

@@ -3,6 +3,7 @@ package io.anuke.mindustry.entities;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
import com.badlogic.gdx.Input.Buttons; import com.badlogic.gdx.Input.Buttons;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Vector2;
import io.anuke.mindustry.Vars; import io.anuke.mindustry.Vars;
@@ -80,6 +81,9 @@ public class Player extends DestructibleEntity{
}else{ }else{
float angle = Angles.mouseAngle(x, y); float angle = Angles.mouseAngle(x, y);
direction.lerp(vector.set(0, 1).setAngle(angle), 0.26f); direction.lerp(vector.set(0, 1).setAngle(angle), 0.26f);
if(MathUtils.isEqual(angle, direction.angle(), 0.05f)){
direction.setAngle(angle);
}
} }
} }
} }

View File

@@ -34,7 +34,7 @@ public class MenuDialog extends Dialog{
hide(); hide();
paused = false; paused = false;
playing = false; playing = false;
}); }).show();
}).width(200); }).width(200);
} }
} }

View File

@@ -1,23 +1,38 @@
package io.anuke.mindustry.world; package io.anuke.mindustry.world;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Vector2;
import io.anuke.mindustry.World;
import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Item; import io.anuke.mindustry.resource.Item;
import io.anuke.ucore.core.Draw; import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Caches;
import io.anuke.ucore.util.Mathf;
public class Block{ public class Block{
private static int lastid;
protected static Vector2 vector = new Vector2(); protected static Vector2 vector = new Vector2();
protected static Vector2 vector2 = new Vector2(); protected static Vector2 vector2 = new Vector2();
protected static TextureRegion temp = new TextureRegion();
public final String name; public final String name;
public boolean solid, update, rotate; public boolean solid, update, rotate, breakable;
public int health = 40; public int health = 40;
public String shadow = "shadow";
public float breaktime = 30;
public final int id;
//edge fallback, used for ores
public String edge = "stone";
//whether to have 3 variants
public boolean vary = true;
public Block(String name) { public Block(String name) {
this.name = name; this.name = name;
solid = false; this.solid = false;
this.id = lastid++;
} }
public void drawOver(Tile tile){} public void drawOver(Tile tile){}
@@ -127,10 +142,47 @@ public class Block{
return false; return false;
} }
public void drawCache(Tile tile){
MathUtils.random.setSeed(tile.id());
Caches.draw(vary ? (name() + MathUtils.random(1, 3)) : name(), tile.worldx(), tile.worldy());
for(int dx = -1; dx <= 1; dx ++){
for(int dy = -1; dy <= 1; dy ++){
if(dx == 0 && dy == 0) continue;
Tile other = World.tile(tile.x+dx, tile.y+dy);
if(other == null) continue;
Block floor = other.floor();
if(floor.id <= this.id) continue;
TextureRegion region = Draw.region(floor.name() + "edge");
if(region == null)
region = Draw.region(floor.edge + "edge");
int sx = -dx*8+2, sy = -dy*8+2;
int x = Mathf.clamp(sx, 0, 12);
int y = Mathf.clamp(sy, 0, 12);
int w = Mathf.clamp(sx+8, 0, 12)-x, h = Mathf.clamp(sy+8, 0, 12)-y;
float rx = Mathf.clamp(dx*8, 0, 8-w);
float ry = Mathf.clamp(dy*8, 0, 8-h);
temp.setTexture(region.getTexture());
temp.setRegion(region.getRegionX()+x, region.getRegionY()+y+h, w, -h);
Caches.draw(temp, tile.worldx()-4 + rx, tile.worldy()-4 + ry, w, h);
}
}
}
public void draw(Tile tile){ public void draw(Tile tile){
if(tile.floor() == this){ if(tile.floor() == this){
MathUtils.random.setSeed(tile.id()); throw new RuntimeException("Rendering non-cached tiles is disabled.");
Draw.rect(name() + MathUtils.random(1, 3), tile.worldx(), tile.worldy(), rotate ? tile.rotation * 90 : 0);
}else{ }else{
Draw.rect(name(), tile.worldx(), tile.worldy(), rotate ? tile.rotation * 90 : 0); Draw.rect(name(), tile.worldx(), tile.worldy(), rotate ? tile.rotation * 90 : 0);
} }

View File

@@ -11,6 +11,7 @@ import com.badlogic.gdx.math.MathUtils;
import io.anuke.mindustry.world.blocks.Blocks; import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.ucore.graphics.Hue; import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.noise.Noise; import io.anuke.ucore.noise.Noise;
import io.anuke.ucore.util.Mathf;
public class Generator{ public class Generator{
static final int stonefloor = Color.rgba8888(Hue.rgb(54, 54, 54)); static final int stonefloor = Color.rgba8888(Hue.rgb(54, 54, 54));
@@ -34,13 +35,29 @@ public class Generator{
floor = Blocks.iron; floor = Blocks.iron;
} }
if(Noise.nnoise(x, y, 8, 1) > 0.1){
floor = Blocks.grass;
}
if(Noise.nnoise(x, y, 8, 1) > 0.1){
floor = Blocks.water;
}
if(Mathf.chance(0.01)){
block = Blocks.rock;
}
if(Mathf.chance(0.01)){
block = Blocks.rock2;
}
if(Noise.nnoise(x, y, 6, 1) > 0.245){ if(Noise.nnoise(x, y, 6, 1) > 0.245){
floor = Blocks.coal; floor = Blocks.coal;
} }
if(color == stone && map == 1){ if(color == stone && map == 1){
block = Blocks.dirtblock; block = Blocks.dirtblock;
}else if(color == stone){ }else if(color == stone){
block = Blocks.stoneblock; block = Mathf.choose(Blocks.stoneblock, Blocks.stoneblock2, Blocks.stoneblock3);
}else if(color == start){ }else if(color == start){
core = tiles[x][y]; core = tiles[x][y];
}else if(color == spawn){ }else if(color == spawn){

View File

@@ -64,8 +64,8 @@ public class Tile{
this.floor = type; this.floor = type;
} }
public boolean artifical(){ public boolean breakable(){
return block.update; return block.update || block.breakable;
} }
public Tile[] getNearby(){ public Tile[] getNearby(){

View File

@@ -21,10 +21,35 @@ public class Blocks{
grass = new Block("grass"), grass = new Block("grass"),
water = new Block("water"){{
vary = false;
solid = true;
}},
stoneblock = new Block("stoneblock"){{ stoneblock = new Block("stoneblock"){{
solid = true; solid = true;
}}, }},
stoneblock2 = new Block("stoneblock2"){{
solid = true;
}},
stoneblock3 = new Block("stoneblock3"){{
solid = true;
}},
rock = new Block("rock"){{
shadow = "rockshadow";
breakable = true;
breaktime = 10;
}},
rock2 = new Block("rock2"){{
shadow = "rock2shadow";
breakable = true;
breaktime = 10;
}},
dirtblock = new Block("dirtblock"){{ dirtblock = new Block("dirtblock"){{
solid = true; solid = true;
}}, }},

View File

@@ -48,7 +48,7 @@ public class RepairTurret extends Turret{
Draw.line(x, y, x2, y2); Draw.line(x, y, x2, y2);
Draw.thickness(1f); Draw.thickness(1f);
Draw.rect("circle", x2, y2, 5f, 5f); Draw.rect("circle", x2, y2, 5f, 5f);
Draw.clear(); Draw.reset();
} }
Draw.rect(name(), tile.worldx(), tile.worldy(), entity.rotation - 90); Draw.rect(name(), tile.worldx(), tile.worldy(), entity.rotation - 90);

View File

@@ -42,7 +42,7 @@ public class Turret extends Block{
public void drawPixelOverlay(Tile tile){ public void drawPixelOverlay(Tile tile){
Draw.color("green"); Draw.color("green");
Draw.dashcircle(tile.worldx(), tile.worldy(), range); Draw.dashcircle(tile.worldx(), tile.worldy(), range);
Draw.clear(); Draw.reset();
} }
@Override @Override

View File

@@ -10,7 +10,7 @@ public class DesktopLauncher {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration(); Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setTitle("Mindustry"); config.setTitle("Mindustry");
config.setMaximized(true); config.setMaximized(true);
//config.useVsync(false); config.useVsync(false);
config.setWindowedMode(800, 600); config.setWindowedMode(800, 600);
new Lwjgl3Application(new Mindustry(), config); new Lwjgl3Application(new Mindustry(), config);
} }