Compare commits
88 Commits
c82bad796e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
5dbf7fcf1f
|
|||
|
70eaa9514a
|
|||
|
befb117d85
|
|||
|
54a2ee3022
|
|||
|
ce3f590715
|
|||
|
39fc7d549a
|
|||
|
8902e28d31
|
|||
|
f15850b022
|
|||
|
46765031e4
|
|||
|
2cda920e15
|
|||
|
93467760db
|
|||
|
6be9927752
|
|||
|
1343b18753
|
|||
|
e0986d4708
|
|||
|
d018ed3e6e
|
|||
|
133afa9c06
|
|||
|
c4b1d029aa
|
|||
|
c8d7a56934
|
|||
|
4f9d1dfcb6
|
|||
|
d092a39115
|
|||
|
9263626ca2
|
|||
|
87aba81f32
|
|||
|
4aa955246b
|
|||
|
f9c511d6bb
|
|||
|
7f8d9d7e9b
|
|||
|
27c36d880d
|
|||
|
c1e355637e
|
|||
|
7b3a8bca0f
|
|||
|
2105a0e8af
|
|||
|
7ee7614c6c
|
|||
|
4b9c0006a6
|
|||
|
42ed4dd099
|
|||
|
97da3982d1
|
|||
|
b380e218f6
|
|||
|
1131996d77
|
|||
|
825b084a68
|
|||
|
1d6f53a70e
|
|||
|
2e73a012d1
|
|||
|
c02ae0302c
|
|||
|
4276c24392
|
|||
|
9484797ced
|
|||
|
4ab53ceab9
|
|||
|
a89838eb38
|
|||
|
580775bf30
|
|||
|
eb2c435671
|
|||
|
484abf4f9b
|
|||
|
d546d302c6
|
|||
|
7e8a27a671
|
|||
|
de42dd6bd6
|
|||
|
4aabe84d59
|
|||
|
67309a6e28
|
|||
|
5dd43b6f9d
|
|||
|
785a76942e
|
|||
|
099f52278c
|
|||
|
d294578a74
|
|||
|
21f4acf6b1
|
|||
|
eba67d7cf8
|
|||
|
e9fc671135
|
|||
|
5192c8df87
|
|||
|
2abdb3b5fb
|
|||
|
7ac1207c83
|
|||
|
fb0273afb0
|
|||
|
b4d07b0d99
|
|||
|
afcc32dc9f
|
|||
|
f4b14214bd
|
|||
|
40111da691
|
|||
|
0f216c6c56
|
|||
|
de70fb71e6
|
|||
|
f6de147046
|
|||
|
c687c4005c
|
|||
|
600a225064
|
|||
|
9916fa8b25
|
|||
|
285b18b4cc
|
|||
|
730c7d406e
|
|||
|
49c8b59d68
|
|||
|
5f9fd8ea99
|
|||
|
1443722f0c
|
|||
|
6254eb2501
|
|||
|
54458293ba
|
|||
|
ce8a97c0cc
|
|||
|
5da7c43edf
|
|||
|
d639e65c15
|
|||
|
51c262d9ac
|
|||
|
fb96035c99
|
|||
|
02d6672114
|
|||
|
bbeba11fb9
|
|||
|
cfea57e542
|
|||
|
46b8c66ff5
|
9
.gitignore
vendored
@@ -30,3 +30,12 @@ bin/
|
|||||||
|
|
||||||
### Mac OS ###
|
### Mac OS ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
### JPackage ###
|
||||||
|
JGame2D
|
||||||
|
|
||||||
|
### Local Game Settings ###
|
||||||
|
gamedata
|
||||||
|
|
||||||
|
|
||||||
|
/system.txt
|
||||||
|
|||||||
11
JGame2D.iml
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
BIN
MapEditor.jar
Normal file
17
README.md
@@ -2,7 +2,22 @@
|
|||||||
JGame2D is a simple two-dimensional pixel art game for enhancing my java skills in fields of game development.<br>
|
JGame2D is a simple two-dimensional pixel art game for enhancing my java skills in fields of game development.<br>
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
### Pre-built package
|
||||||
_To be continued_
|
_To be continued_
|
||||||
|
|
||||||
|
### Build from source (Linux)
|
||||||
|
- **Step 1**<br>
|
||||||
|
Clone the repository<br>
|
||||||
|
```sh
|
||||||
|
$ git clone https://git.miaurizius.de/MiauRizius/JGame2D.git
|
||||||
|
```
|
||||||
|
- **Step 2**<br>
|
||||||
|
Run the build-script
|
||||||
|
```shell
|
||||||
|
$ ./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
_To be continued_
|
You currently cannot contribute to this project.<br>
|
||||||
|
If you have any recommendations for improvements,
|
||||||
|
you can contact me via <a href="mailto:maurice@miaurizius.de">maurice@miaurizius.de</a>.
|
||||||
3
assets/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: de.miaurizius.jgame2d.core.Boot
|
||||||
|
|
||||||
BIN
assets/font/x12y16pxMaruMonica.ttf
Normal file
BIN
assets/interactive_tiles/destructiblewall.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/interactive_tiles/drytree.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
assets/interactive_tiles/metalplate.png
Normal file
|
After Width: | Height: | Size: 539 B |
BIN
assets/interactive_tiles/trunk.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
50
assets/maps/dungeon01.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 36 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 17 32 32 32 32 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 17 17 17 17 32 32 17 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 17 17 17 17 17 17 17 32 32 32 17 17 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 32 32 32 17 17 17 17 17 17 17 32 32 32 32 32 17 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 17 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 17 17 17 17 32 32 32 32 32 32 32 32 32 17 17 17 17 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 32 32 17 17 17 32 32 17 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 17 17 17 32 17 17 17 32 32 17 32 32 32 32 17 32 32 32 32 32 32 17 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 32 32 32 32 32 32 32 32 17 32 32 32 17 32 32 17 17 17 17 17 32 32 17 17 17 32 32 17 17 17 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 17 17 32 32 32 32 32 17 32 32 32 17 32 32 17 17 17 17 17 32 17 17 32 32 32 32 32 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 17 17 32 32 32 32 32 17 32 32 32 17 32 32 17 17 17 17 17 17 17 32 32 32 32 32 32 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 17 17 32 32 32 32 32 17 32 32 32 17 32 32 32 17 17 17 17 32 32 32 32 32 32 32 32 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 17 17 32 32 32 32 32 17 32 32 32 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 32 32 32 32 32 32 32 17 32 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 32 32 32 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 32 32 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 32 17 32 32 32 32 32 17 17 17 32 32 32 32 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 17 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 17 32 32 32 32 32 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 32 32 32 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 37 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 32 32 32 17 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
50
assets/maps/dungeon02.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 17 17 17 17 17 17 17 17 17 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 17 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 17 37 17 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
50
assets/maps/editoredmap.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
27 18 27 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 2 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 21 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 14 14 22 30 30 30 30 30 22 14 14 14 14 14 14 22 14 14 30 14 14 22 14 11 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 25 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 26 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 27 18 5 22 10 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 15 30 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 10 6 32 1 1 1 1 1 1 4 6 32 1 1 1 1 1 1 1 4 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 30 10 6 15 31 3 3 3 3 23 10 6 15 31 3 3 3 3 3 23 10 6 15 22 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 27 18 5 30 10 6 15 11 18 18 18 18 5 10 6 15 11 18 18 18 18 18 5 10 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 10 6 15 34 9 9 9 9 17 10 6 15 34 9 9 9 9 9 17 10 6 15 14 11 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 27 5 22 10 6 8 16 16 16 16 16 16 12 6 8 16 16 16 16 16 16 16 12 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 10 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
27 18 18 5 14 10 6 32 1 1 1 1 1 1 4 6 32 1 1 1 1 1 1 1 4 6 15 22 11 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 27 18 5 30 10 6 15 31 3 3 3 3 23 10 6 15 31 3 3 3 3 3 23 10 6 15 30 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 10 6 15 11 18 18 18 18 5 10 6 15 11 18 18 18 18 18 5 10 6 15 14 11 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 14 10 6 15 34 9 9 9 9 17 10 6 15 34 9 9 9 9 9 17 10 6 15 14 11 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 22 10 6 8 16 16 16 16 16 16 12 6 8 16 16 16 16 16 16 16 12 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 27 18 5 14 10 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 15 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 5 30 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 22 11 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
27 18 18 5 14 30 14 14 14 22 14 30 30 14 14 22 14 14 14 30 14 14 14 22 14 30 14 14 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 28 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 18 18 18 27 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 27 18 18 18 27 27 18 18 18 27 18 18 18 18 18 27 18 18 18 18 18 18 18 18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 27 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
50
assets/maps/hut.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 40 40 40 40 40 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 43 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 44 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 43 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 43 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 43 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 43 43 43 43 43 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 40 40 40 10 40 40 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
|
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
|
||||||
50
assets/maps/indoor01.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 32 32 32 32 32 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 35 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 32 32 32 0 32 32 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 2 2 2 2 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 2 2 2 2 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 2 2 2 2 0 0 0 0 0 1
|
|
||||||
1 0 0 0 0 0 2 2 2 2 0 0 0 0 0 1
|
|
||||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 13 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 13 22 20 20 20 20 20 20 20 23 12 12 12 22 20 20 20 20 20 20 20 20 23 12 12 12 22 20 20 20 20 20 20 20 20 20 20 23 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 18 41 40 40 40 40 40 41 19 20 20 20 21 41 10 10 11 10 10 10 10 19 20 20 20 21 41 10 35 33 33 33 33 33 33 36 17 12 12 13 12 12 12 12
|
|
||||||
12 12 13 12 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 14 15 15 15 16 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 17 12 12 12 18 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
|
|
||||||
12 12 12 13 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 17 12 12 12 18 11 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 13 12 12 12 12 12
|
|
||||||
12 12 12 12 13 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 19 20 20 20 21 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 18 41 40 40 39 40 40 41 41 41 41 41 41 41 11 10 35 33 36 10 10 41 41 41 41 41 41 41 37 28 28 29 26 27 28 38 17 13 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 18 41 41 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 14 15 25 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 13 12 18 41 41 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 13 12 12 12 12
|
|
||||||
12 12 12 12 12 12 24 15 16 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 18 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 10 10 10 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 12 13 12 12 12
|
|
||||||
12 12 13 12 12 12 12 22 21 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 35 33 34 26 30 17 12 12 13 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 10 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 26 26 30 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 13 12 12 12 18 10 41 41 41 41 41 41 41 41 41 41 41 41 10 31 26 30 10 41 41 41 41 41 41 41 41 41 31 26 27 28 38 17 12 13 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 41 41 41 10 35 33 33 33 33 33 33 33 33 34 26 32 33 33 33 33 33 33 33 33 33 33 34 26 30 10 41 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 13 12 18 10 41 41 41 11 31 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 30 10 14 25 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 13 18 10 10 41 41 10 37 28 28 28 28 28 28 28 28 29 26 27 28 28 28 28 28 28 28 28 28 28 29 26 30 10 17 12 13 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 24 16 10 41 41 10 41 41 41 41 41 41 41 41 10 31 26 30 10 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 12 13 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 18 10 41 41 10 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 11 17 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 13 12 22 21 10 41 41 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 13 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 10 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 13 12 12 12 18 10 41 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 10 41 41 41 41 41 41 41 31 26 30 10 17 12 13 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 41 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 10 41 41 41 41 31 26 30 10 17 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 13 18 10 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 10 41 41 41 41 37 28 38 10 17 12 12 12 12 13 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 10 11 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 10 41 14 25 12 12 13 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 24 16 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 13 12 12 18 10 10 10 10 11 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 13 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 18 11 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 11 17 12 12 13 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 18 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 13 12 12 22 21 41 41 41 41 41 41 41 41 41 41 41 41 41 37 28 38 41 41 41 41 41 41 41 41 41 41 11 10 10 19 23 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 41 41 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 41 41 41 41 41 41 41 10 10 10 10 10 19 23 12 12 12 13 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 13 18 41 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 10 10 41 41 10 41 41 10 10 10 10 10 10 10 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 41 41 41 41 41 41 41 41 41 10 11 10 10 10 10 10 11 10 10 41 41 41 41 10 10 10 10 10 11 10 10 17 12 13 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 41 41 41 41 10 41 41 41 41 10 10 11 10 10 10 10 10 10 10 10 41 41 41 10 10 10 10 10 41 10 10 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 13 12 12 12 12 18 10 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 41 10 10 10 10 10 17 12 12 12 12 13 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 18 10 41 41 41 41 10 41 14 15 15 16 10 10 10 10 10 11 10 10 14 15 15 16 10 10 10 10 10 10 10 11 10 17 12 12 12 12 12 12 13 12 12
|
|
||||||
12 12 12 12 12 12 12 18 41 41 41 41 41 41 14 25 12 12 24 16 10 10 10 10 10 10 14 25 12 12 18 10 10 41 10 10 41 10 10 10 17 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 13 12 12 24 15 15 15 15 15 15 25 12 12 12 12 24 15 15 15 15 15 15 25 12 13 12 24 16 10 11 10 10 10 10 14 15 25 12 13 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 24 15 15 15 15 15 15 25 12 12 12 12 12 12 12 13 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12
|
|
||||||
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 2 2 2 2 2 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 1 1 1 1 4 4 4 4 4 4 4 4 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 3 3 3 1 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 0 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 3 3 3 1 4 4 4 4 4 4 4 4 0 0 0 0 0 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 3 3 3 1 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 3 3 3 1 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 1 1 0 1 1 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 0 5 0 4 4 4 4 4 4 4 4 4 4 4 5 5 5 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 0 0 5 0 0 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 0 0 0 5 0 0 0 4 4 4 4 4 4 4 4 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 0 4 4 4 4 4 4 4 0 0 0 5 0 0 0 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 0 4 4 4 4 4 4 4 4 0 0 5 0 0 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 0 4 4 4 4 4 4 4 4 4 0 5 0 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 0 4 4 4 4 4 4 4 4 5 4 4 4 0 4 4 4 4 4 4 4 0 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 4 4 4 4 4 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 0 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 0 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 4 4 0 4 4 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 0 0 0 0 4 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 4 4 4 4 4 0 0 4 0 0 4 0 0 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
|
|
||||||
76
assets/maps/tiledata
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
000.png
|
||||||
|
false
|
||||||
|
001.png
|
||||||
|
false
|
||||||
|
002.png
|
||||||
|
false
|
||||||
|
003.png
|
||||||
|
false
|
||||||
|
004.png
|
||||||
|
false
|
||||||
|
005.png
|
||||||
|
false
|
||||||
|
006.png
|
||||||
|
false
|
||||||
|
007.png
|
||||||
|
false
|
||||||
|
008.png
|
||||||
|
false
|
||||||
|
009.png
|
||||||
|
false
|
||||||
|
010.png
|
||||||
|
false
|
||||||
|
011.png
|
||||||
|
false
|
||||||
|
012.png
|
||||||
|
false
|
||||||
|
013.png
|
||||||
|
false
|
||||||
|
014.png
|
||||||
|
false
|
||||||
|
015.png
|
||||||
|
false
|
||||||
|
016.png
|
||||||
|
true
|
||||||
|
017.png
|
||||||
|
false
|
||||||
|
018.png
|
||||||
|
true
|
||||||
|
019.png
|
||||||
|
true
|
||||||
|
020.png
|
||||||
|
true
|
||||||
|
021.png
|
||||||
|
true
|
||||||
|
022.png
|
||||||
|
true
|
||||||
|
023.png
|
||||||
|
true
|
||||||
|
024.png
|
||||||
|
true
|
||||||
|
025.png
|
||||||
|
true
|
||||||
|
026.png
|
||||||
|
true
|
||||||
|
027.png
|
||||||
|
true
|
||||||
|
028.png
|
||||||
|
true
|
||||||
|
029.png
|
||||||
|
true
|
||||||
|
030.png
|
||||||
|
true
|
||||||
|
031.png
|
||||||
|
true
|
||||||
|
032.png
|
||||||
|
true
|
||||||
|
033.png
|
||||||
|
false
|
||||||
|
034.png
|
||||||
|
false
|
||||||
|
035.png
|
||||||
|
true
|
||||||
|
036.png
|
||||||
|
false
|
||||||
|
037.png
|
||||||
|
false
|
||||||
76
assets/maps/tiledata (old)
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
035.png
|
||||||
|
true
|
||||||
|
026.png
|
||||||
|
true
|
||||||
|
019.png
|
||||||
|
true
|
||||||
|
018.png
|
||||||
|
true
|
||||||
|
000.png
|
||||||
|
false
|
||||||
|
009.png
|
||||||
|
false
|
||||||
|
037.png
|
||||||
|
false
|
||||||
|
007.png
|
||||||
|
false
|
||||||
|
034.png
|
||||||
|
false
|
||||||
|
028.png
|
||||||
|
true
|
||||||
|
008.png
|
||||||
|
false
|
||||||
|
001.png
|
||||||
|
false
|
||||||
|
036.png
|
||||||
|
false
|
||||||
|
005.png
|
||||||
|
false
|
||||||
|
021.png
|
||||||
|
true
|
||||||
|
013.png
|
||||||
|
false
|
||||||
|
023.png
|
||||||
|
true
|
||||||
|
032.png
|
||||||
|
true
|
||||||
|
029.png
|
||||||
|
true
|
||||||
|
031.png
|
||||||
|
true
|
||||||
|
033.png
|
||||||
|
true
|
||||||
|
014.png
|
||||||
|
false
|
||||||
|
025.png
|
||||||
|
true
|
||||||
|
016.png
|
||||||
|
true
|
||||||
|
003.png
|
||||||
|
false
|
||||||
|
024.png
|
||||||
|
true
|
||||||
|
030.png
|
||||||
|
true
|
||||||
|
004.png
|
||||||
|
false
|
||||||
|
010.png
|
||||||
|
false
|
||||||
|
027.png
|
||||||
|
true
|
||||||
|
012.png
|
||||||
|
false
|
||||||
|
006.png
|
||||||
|
false
|
||||||
|
015.png
|
||||||
|
false
|
||||||
|
020.png
|
||||||
|
true
|
||||||
|
017.png
|
||||||
|
false
|
||||||
|
011.png
|
||||||
|
false
|
||||||
|
022.png
|
||||||
|
true
|
||||||
|
002.png
|
||||||
|
false
|
||||||
50
assets/maps/worldmap.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 28 26 26 26 26 26 26 26 29 18 28 26 26 26 26 26 26 26 26 29 18 18 18 28 26 26 26 26 26 26 26 26 26 26 29 18 18 18 18 18 18 18
|
||||||
|
18 19 18 18 18 18 18 18 24 16 32 32 32 32 32 16 25 26 27 16 1 1 1 1 1 1 1 25 26 26 26 27 16 1 12 10 10 10 10 10 10 13 23 18 18 19 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 32 17 17 17 32 16 16 16 16 16 1 20 21 21 21 22 1 16 16 16 16 16 16 16 8 3 3 3 3 3 3 7 23 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 32 17 36 17 32 16 16 16 16 16 1 23 18 18 18 24 1 16 16 16 16 16 16 16 8 3 3 3 3 3 3 7 23 18 18 18 18 19 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 32 17 17 17 32 16 16 16 16 16 1 23 18 18 18 24 1 16 16 16 16 16 16 16 8 3 3 3 3 3 3 7 23 19 18 18 18 18 18 18
|
||||||
|
18 18 19 18 18 18 18 18 24 16 32 17 17 17 32 16 16 16 16 16 1 25 26 26 26 27 1 16 16 16 16 16 16 16 8 3 3 3 3 3 3 7 23 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 19 18 18 24 16 32 32 17 32 32 16 16 16 16 16 1 1 12 10 13 1 1 1 1 1 1 1 1 1 14 5 5 6 3 4 5 15 23 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 16 16 1 16 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 16 16 8 3 7 20 21 31 18 18 18 19 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 30 22 16 16 1 16 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 16 16 8 3 7 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 19 18 18 18 18 18 19 18 24 16 16 1 16 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 16 16 8 3 7 23 19 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 28 27 16 16 1 16 16 16 16 16 16 16 16 16 8 3 7 1 1 1 16 16 16 16 16 16 16 16 16 8 3 7 23 18 18 19 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 28 27 16 16 16 1 16 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 12 10 11 3 7 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 1 1 16 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 3 3 7 23 18 18 18 18 18 19 18 18 18
|
||||||
|
18 18 18 18 18 19 18 24 16 16 1 16 16 16 16 16 16 16 16 16 16 1 8 3 7 1 16 16 16 16 16 16 16 16 16 8 3 4 5 15 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 16 16 1 12 10 10 10 10 10 10 10 11 3 9 10 10 10 10 13 16 16 16 12 10 11 3 7 1 16 23 18 18 19 18 18 18 18 18 18
|
||||||
|
18 18 18 19 18 18 18 24 16 16 1 16 16 1 8 3 3 3 3 3 3 3 3 3 3 3 3 3 3 7 1 1 1 8 3 3 3 7 1 20 31 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 16 16 1 14 5 5 5 5 5 5 5 6 3 4 5 5 5 5 15 16 16 16 14 5 6 3 7 2 23 18 18 19 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 30 22 16 1 16 16 1 16 16 16 16 16 16 16 1 8 3 7 1 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 1 16 16 1 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 28 27 16 1 16 16 1 1 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 19 18 18 18
|
||||||
|
18 18 18 19 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 1 1 1 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 16 16 1 16 16 16 16 16 16 16 8 3 7 1 23 18 18 19 18 18 18 18 18 18 18
|
||||||
|
18 18 19 18 18 18 18 24 16 16 1 1 1 1 1 1 16 16 16 16 16 16 8 3 7 16 16 1 16 16 1 16 16 16 16 14 5 15 1 23 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 2 1 1 1 1 16 16 16 16 16 16 8 3 7 16 16 1 16 16 1 16 16 16 16 16 1 16 20 31 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 19 30 22 16 1 1 1 1 1 1 16 16 16 16 16 16 8 3 7 16 16 1 1 1 1 16 16 16 16 16 1 1 23 18 19 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 1 1 1 2 1 1 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 1 1 1 23 18 18 18 18 18 18 18 18 19 18 18
|
||||||
|
18 18 18 18 18 18 18 18 24 16 1 1 1 1 1 1 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 1 1 2 23 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 19 18 18 18 24 16 1 1 1 1 1 1 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 1 1 1 23 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 28 27 16 16 16 16 16 16 16 16 16 16 16 16 16 14 5 15 16 16 16 16 16 16 16 16 16 16 1 1 1 25 29 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 1 1 1 16 16 16 16 16 16 16 1 1 1 1 1 25 29 18 18 19 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 2 1 1 1 1 16 16 1 16 16 1 1 2 1 1 1 1 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 1 1 1 1 1 16 16 16 16 1 1 1 1 1 1 1 1 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 33 16 16 16 16 16 16 16 16 1 1 1 1 1 1 1 2 1 1 16 16 16 1 1 1 1 1 16 1 2 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 19 18 24 16 16 1 16 16 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 24 16 16 1 1 1 1 16 20 21 21 22 1 1 1 1 1 1 1 1 20 21 21 22 1 1 1 1 1 1 1 1 1 23 18 18 18 18 18 18 18 18 18
|
||||||
|
18 19 18 18 18 18 18 24 16 16 16 16 16 16 20 31 18 18 30 22 1 1 1 1 1 1 20 31 18 18 24 1 1 16 1 1 16 1 1 1 23 18 18 18 18 18 19 18 18 18
|
||||||
|
18 18 18 18 18 18 18 30 21 21 21 21 21 21 31 18 18 18 18 30 21 21 21 21 21 21 31 18 18 18 30 22 1 1 1 1 1 1 20 21 31 18 19 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 30 21 21 21 21 21 21 31 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
|
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
|
||||||
50
assets/maps/worldmap_old_.map
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 9 1 1 1 1 1 1 1 18 3 9 1 1 1 1 1 1 1 1 18 3 3 3 9 1 1 1 1 1 1 1 1 1 1 18 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 17 17 17 17 23 22 1 29 23 11 11 11 11 11 11 11 22 1 1 1 29 23 11 30 28 28 28 28 28 28 15 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 34 34 34 17 23 23 23 23 23 11 33 14 14 14 36 11 23 23 23 23 23 23 23 10 24 24 24 24 24 24 7 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 34 12 34 17 23 23 23 23 23 11 16 3 3 3 25 11 23 23 23 23 23 23 23 10 24 24 24 24 24 24 7 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 34 34 34 17 23 23 23 23 23 11 16 3 3 3 25 11 23 23 23 23 23 23 23 10 24 24 24 24 24 24 7 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 34 34 34 17 23 23 23 23 23 11 22 1 1 1 29 11 23 23 23 23 23 23 23 10 24 24 24 24 24 24 7 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 17 17 11 17 17 23 23 23 23 23 11 11 30 28 15 11 11 11 11 11 11 11 11 11 11 13 13 31 24 27 13 32 16 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 23 23 11 23 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 23 23 10 24 7 33 14 19 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 26 36 23 23 11 23 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 23 23 10 24 7 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 25 23 23 11 23 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 23 23 10 24 7 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 9 29 23 23 11 23 23 23 23 23 23 23 23 23 10 24 7 11 11 11 23 23 23 23 23 23 23 23 23 10 24 7 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 9 29 23 23 23 11 23 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 30 28 35 24 7 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 11 11 23 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 10 24 24 24 7 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 23 23 23 23 23 23 23 23 11 10 24 7 11 23 23 23 23 23 23 23 23 23 10 24 27 13 32 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 11 30 28 28 28 28 28 28 28 35 24 5 28 28 28 28 15 23 23 23 30 28 35 24 7 11 23 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 11 10 24 24 24 24 24 24 24 24 24 24 24 24 24 24 7 11 11 11 10 24 24 24 7 11 33 19 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 11 21 13 13 13 13 13 13 13 31 24 27 13 13 13 13 32 23 23 23 21 13 31 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 26 36 23 11 23 23 11 23 23 23 23 23 23 23 11 10 24 7 23 23 23 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 11 23 23 11 23 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 9 29 23 11 23 23 11 11 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 23 11 23 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 23 11 23 23 23 23 23 23 23 10 24 7 11 11 11 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 23 11 23 23 23 23 23 23 23 10 24 7 23 23 11 23 23 23 23 23 23 23 10 24 7 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 11 11 11 11 23 23 23 23 21 13 32 11 16 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 23 11 23 33 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 26 36 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 23 11 11 16 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 11 11 11 16 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 11 11 11 16 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 25 23 11 11 11 11 11 11 23 23 23 23 23 23 10 24 7 23 23 23 23 23 23 23 23 23 23 11 11 11 16 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 9 29 23 23 23 23 23 23 23 23 23 23 23 23 23 21 13 32 23 23 23 23 23 23 23 23 23 23 11 11 11 22 18 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 23 23 23 23 23 23 23 23 23 23 11 11 11 11 11 11 11 23 23 23 23 23 23 23 11 11 11 11 11 22 18 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 23 23 23 23 23 23 23 23 23 11 11 11 11 11 11 11 11 11 23 23 23 23 23 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 23 23 23 23 23 23 23 23 23 11 11 11 11 11 11 11 11 11 23 23 23 23 11 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 20 23 23 23 23 23 23 23 23 11 11 11 11 11 11 11 11 11 11 23 23 23 11 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 23 23 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 11 11 11 11 23 33 14 14 36 11 11 11 11 11 11 11 11 33 14 14 36 11 11 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 25 23 23 23 23 23 23 33 3 3 3 26 36 11 11 11 11 11 11 33 19 3 3 25 11 11 11 11 11 11 11 11 11 16 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 26 14 14 14 14 14 14 19 3 3 3 3 26 14 14 14 14 14 14 19 3 3 3 26 36 11 11 11 11 11 11 33 14 19 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 26 14 14 14 14 14 14 19 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
BIN
assets/player/guarding/boy_guard_down.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
assets/player/guarding/boy_guard_left.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
assets/player/guarding/boy_guard_right.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
assets/player/guarding/boy_guard_up.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
assets/projectile/fireball_down_1.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
assets/projectile/fireball_down_2.png
Normal file
|
After Width: | Height: | Size: 213 B |
BIN
assets/projectile/fireball_left_1.png
Normal file
|
After Width: | Height: | Size: 189 B |
BIN
assets/projectile/fireball_left_2.png
Normal file
|
After Width: | Height: | Size: 204 B |
BIN
assets/projectile/fireball_right_1.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
assets/projectile/fireball_right_2.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
assets/projectile/fireball_up_1.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
assets/projectile/fireball_up_2.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
assets/projectile/rock_down_1.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
assets/tiles/000.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
assets/tiles/036.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
assets/tiles/037.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
10
build.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
rm -rf out/app
|
||||||
|
|
||||||
|
jpackage \
|
||||||
|
--input out/artifacts/JGame2D_jar/ \
|
||||||
|
--main-jar JGame2D.jar \
|
||||||
|
--main-class de.miaurizius.jgame2d.core.Boot \
|
||||||
|
--name JGame2D \
|
||||||
|
--type app-image \
|
||||||
|
--add-modules ALL-MODULE-PATH \
|
||||||
|
--dest out/app
|
||||||
17
src/de/miaurizius/jgame2d/aStar/Node.java
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package de.miaurizius.jgame2d.aStar;
|
||||||
|
|
||||||
|
public class Node {
|
||||||
|
|
||||||
|
Node parent;
|
||||||
|
public int col, row;
|
||||||
|
int gCost, hCost, fCost;
|
||||||
|
boolean solid;
|
||||||
|
boolean open;
|
||||||
|
boolean checked;
|
||||||
|
|
||||||
|
public Node(int col, int row) {
|
||||||
|
this.col = col;
|
||||||
|
this.row = row;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
146
src/de/miaurizius/jgame2d/aStar/PathFinder.java
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
package de.miaurizius.jgame2d.aStar;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class PathFinder {
|
||||||
|
|
||||||
|
GamePanel panel;
|
||||||
|
Node[][] node;
|
||||||
|
ArrayList<Node> openList = new ArrayList<>();
|
||||||
|
public ArrayList<Node> pathList = new ArrayList<>();
|
||||||
|
Node startNode, goalNode, currentNode;
|
||||||
|
boolean goalReached;
|
||||||
|
int step;
|
||||||
|
|
||||||
|
public PathFinder(GamePanel panel) {
|
||||||
|
this.panel = panel;
|
||||||
|
instantiateNodes();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void instantiateNodes() {
|
||||||
|
node = new Node[panel.maxWorldCol][panel.maxWorldRow];
|
||||||
|
int col = 0;
|
||||||
|
int row = 0;
|
||||||
|
while(col < panel.maxWorldCol && row < panel.maxWorldRow) {
|
||||||
|
node[col][row] = new Node(col, row);
|
||||||
|
col++;
|
||||||
|
if(col != panel.maxWorldCol) continue;
|
||||||
|
col = 0;
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetNodes() {
|
||||||
|
// RESET OPEN LIST
|
||||||
|
int col = 0, row = 0;
|
||||||
|
while(col < panel.maxWorldCol && row < panel.maxWorldRow) {
|
||||||
|
node[col][row].open = false;
|
||||||
|
node[col][row].checked = false;
|
||||||
|
node[col][row].solid = false;
|
||||||
|
|
||||||
|
col++;
|
||||||
|
if(col != panel.maxWorldCol) continue;
|
||||||
|
col = 0;
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESET OTHER SETTINGS
|
||||||
|
openList.clear();
|
||||||
|
pathList.clear();
|
||||||
|
goalReached = false;
|
||||||
|
step = 0;
|
||||||
|
}
|
||||||
|
public void setNodes(int startCol, int startRow, int goalCol, int goalRow) {
|
||||||
|
resetNodes();
|
||||||
|
startNode = node[startCol][startRow];
|
||||||
|
currentNode = startNode;
|
||||||
|
goalNode = node[goalCol][goalRow];
|
||||||
|
openList.add(currentNode);
|
||||||
|
|
||||||
|
int col = 0, row = 0;
|
||||||
|
while(col < panel.maxWorldCol && row < panel.maxWorldRow) {
|
||||||
|
// SOLID NODES
|
||||||
|
int tileNum = panel.tileM.mapTileNum[panel.currentMap.getIndex()][col][row];
|
||||||
|
if(panel.tileM.tile[tileNum].collision) {
|
||||||
|
node[col][row].solid = true;
|
||||||
|
}
|
||||||
|
for(int i = 0; i < panel.iTile.length; i++) {
|
||||||
|
if(panel.iTile[panel.currentMap.getIndex()][i] != null && panel.iTile[panel.currentMap.getIndex()][i].destructible) {
|
||||||
|
int itCol = panel.iTile[panel.currentMap.getIndex()][i].worldX/panel.tileSize;
|
||||||
|
int itRow = panel.iTile[panel.currentMap.getIndex()][i].worldY/panel.tileSize;
|
||||||
|
node[itCol][itRow].solid = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET COST
|
||||||
|
getCost(node[col][row]);
|
||||||
|
col++;
|
||||||
|
if(col != panel.maxWorldCol) continue;
|
||||||
|
col = 0;
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void getCost(Node node) {
|
||||||
|
// G COST
|
||||||
|
int xD = Math.abs(node.col - startNode.col);
|
||||||
|
int yD = Math.abs(node.row - startNode.row);
|
||||||
|
node.gCost = xD + yD;
|
||||||
|
|
||||||
|
// H COST
|
||||||
|
xD = Math.abs(node.col - goalNode.col);
|
||||||
|
yD = Math.abs(node.row - goalNode.row);
|
||||||
|
node.hCost = xD + yD;
|
||||||
|
|
||||||
|
// F COST
|
||||||
|
node.fCost = node.gCost + node.hCost;
|
||||||
|
}
|
||||||
|
public boolean search() {
|
||||||
|
while(!goalReached && step < 500) {
|
||||||
|
int col = currentNode.col;
|
||||||
|
int row = currentNode.row;
|
||||||
|
|
||||||
|
currentNode.checked = true;
|
||||||
|
openList.remove(currentNode);
|
||||||
|
|
||||||
|
if(row - 1 >= 0) openNode(node[col][row-1]);
|
||||||
|
if(col - 1 >= 0) openNode(node[col-1][row]);
|
||||||
|
|
||||||
|
if(row + 1 < panel.maxWorldRow) openNode(node[col][row+1]);
|
||||||
|
if(col + 1 < panel.maxWorldCol) openNode(node[col+1][row]);
|
||||||
|
|
||||||
|
int bestNodeIndex = 0;
|
||||||
|
int bestNodeFCost = 999;
|
||||||
|
for(int i = 0; i < openList.size(); i++) {
|
||||||
|
if(openList.get(i).fCost < bestNodeFCost) {
|
||||||
|
bestNodeIndex = i;
|
||||||
|
bestNodeFCost = openList.get(i).fCost;
|
||||||
|
}
|
||||||
|
else if(openList.get(i).fCost == bestNodeFCost) if(openList.get(i).gCost < openList.get(bestNodeIndex).gCost) bestNodeIndex = i;
|
||||||
|
}
|
||||||
|
if(openList.isEmpty()) break;
|
||||||
|
currentNode = openList.get(bestNodeIndex);
|
||||||
|
if(currentNode == goalNode) {
|
||||||
|
goalReached = true;
|
||||||
|
trackPath();
|
||||||
|
}
|
||||||
|
step++;
|
||||||
|
}
|
||||||
|
return goalReached;
|
||||||
|
}
|
||||||
|
private void openNode(Node node) {
|
||||||
|
if(node.open || node.checked || node.solid) return;
|
||||||
|
node.open = true;
|
||||||
|
node.parent = currentNode;
|
||||||
|
openList.add(node);
|
||||||
|
}
|
||||||
|
private void trackPath() {
|
||||||
|
Node current = goalNode;
|
||||||
|
while(current != startNode) {
|
||||||
|
pathList.add(0, current);
|
||||||
|
current = current.parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,28 +1,46 @@
|
|||||||
package de.miaurizius.jgame2d.core;
|
package de.miaurizius.jgame2d.core;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class Boot {
|
public class Boot {
|
||||||
|
|
||||||
public static final Logger logger = Logger.getLogger("JDGame2D");
|
public static final Logger logger = Logger.getLogger("JDGame2D");
|
||||||
|
public static JFrame window;
|
||||||
|
public static GamePanel gamePanel;
|
||||||
|
|
||||||
static void main() {
|
static {
|
||||||
JFrame window = new JFrame();
|
try {
|
||||||
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
gamePanel = new GamePanel();
|
||||||
window.setResizable(false);
|
} catch (IOException e) {
|
||||||
window.setTitle("JGame2D");
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GamePanel gamePanel = new GamePanel();
|
public static void main(String[] args) {
|
||||||
window.add(gamePanel);
|
generateWindow();
|
||||||
|
|
||||||
window.pack();
|
|
||||||
|
|
||||||
window.setLocationRelativeTo(null);
|
|
||||||
window.setVisible(true);
|
|
||||||
|
|
||||||
gamePanel.setupGame();
|
gamePanel.setupGame();
|
||||||
gamePanel.startGameThread();
|
gamePanel.startGameThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void generateWindow() {
|
||||||
|
window = new JFrame();
|
||||||
|
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
window.setResizable(false);
|
||||||
|
window.setTitle("JGame2D");
|
||||||
|
|
||||||
|
window.add(gamePanel);
|
||||||
|
|
||||||
|
gamePanel.config.load();
|
||||||
|
if(gamePanel.fullscreen) window.setUndecorated(true);
|
||||||
|
|
||||||
|
window.pack();
|
||||||
|
|
||||||
|
window.setLocationRelativeTo(null);
|
||||||
|
window.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
package de.miaurizius.jgame2d.core;
|
package de.miaurizius.jgame2d.core;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.aStar.PathFinder;
|
||||||
import de.miaurizius.jgame2d.core.enums.GameState;
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.Map;
|
||||||
import de.miaurizius.jgame2d.core.handlers.*;
|
import de.miaurizius.jgame2d.core.handlers.*;
|
||||||
|
import de.miaurizius.jgame2d.data.Config;
|
||||||
|
import de.miaurizius.jgame2d.data.SaveLoad;
|
||||||
import de.miaurizius.jgame2d.entity.Entity;
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
import de.miaurizius.jgame2d.entity.Player;
|
import de.miaurizius.jgame2d.entity.Player;
|
||||||
|
import de.miaurizius.jgame2d.environment.EnvironmentManager;
|
||||||
|
import de.miaurizius.jgame2d.tile.MiniMap;
|
||||||
import de.miaurizius.jgame2d.tile.TileManager;
|
import de.miaurizius.jgame2d.tile.TileManager;
|
||||||
|
import de.miaurizius.jgame2d.tile.interactive.InteractiveTile;
|
||||||
|
|
||||||
import javax.sound.sampled.Clip;
|
import javax.sound.sampled.Clip;
|
||||||
|
import javax.sound.sampled.FloatControl;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@@ -18,16 +28,23 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
// SCREEN SETTINGS
|
// SCREEN SETTINGS
|
||||||
final int originalTileSize = 16; //16x16 tile
|
final int originalTileSize = 16; //16x16 tile
|
||||||
final int scale = 3;
|
final int scale = 3;
|
||||||
public final int maxScreenCol = 16;
|
|
||||||
public final int tileSize = originalTileSize * scale; //48x48 tile
|
public final int tileSize = originalTileSize * scale; //48x48 tile
|
||||||
|
public final int maxScreenCol = 20;
|
||||||
public final int maxScreenRow = 12;
|
public final int maxScreenRow = 12;
|
||||||
public final int screenWidth = tileSize * maxScreenCol; // 768 pixels
|
public final int screenWidth = tileSize * maxScreenCol; // 960 pixels
|
||||||
public final int screenHeight = tileSize * maxScreenRow; // 576 pixels
|
public final int screenHeight = tileSize * maxScreenRow; // 576 pixels
|
||||||
|
|
||||||
|
// FULLSCREEN SETTINGS
|
||||||
|
public boolean fullscreen;
|
||||||
|
int fScreenWidth = screenWidth;
|
||||||
|
int fScreenHeight = screenHeight;
|
||||||
|
BufferedImage tempScreen;
|
||||||
|
public Graphics2D fg2;
|
||||||
|
|
||||||
// WORLD SETTINGS
|
// WORLD SETTINGS
|
||||||
public final int maxWorldCol = 50;
|
public int maxWorldCol = 50;
|
||||||
public final int maxWorldRow = 50;
|
public int maxWorldRow = 50;
|
||||||
public final String currentMap = "testmap2";
|
public Map currentMap = Map.OVERWORLD;
|
||||||
|
|
||||||
//FPS
|
//FPS
|
||||||
final int FPS = 60;
|
final int FPS = 60;
|
||||||
@@ -40,21 +57,29 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
public AssetSetter assetSetter = new AssetSetter(this);
|
public AssetSetter assetSetter = new AssetSetter(this);
|
||||||
public UI ui = new UI(this);
|
public UI ui = new UI(this);
|
||||||
public EventHandler eventH = new EventHandler(this);
|
public EventHandler eventH = new EventHandler(this);
|
||||||
Sound se = new Sound();
|
public Sound sfx = new Sound();
|
||||||
Sound music = new Sound();
|
public Sound music = new Sound();
|
||||||
|
public Config config = new Config(this);
|
||||||
|
public PathFinder pFinder = new PathFinder(this);
|
||||||
|
public EnvironmentManager eManager = new EnvironmentManager(this);
|
||||||
|
public MiniMap mapMan = new MiniMap(this);
|
||||||
|
public SaveLoad saveLoad = new SaveLoad(this);
|
||||||
Thread gameThread;
|
Thread gameThread;
|
||||||
|
|
||||||
// ENTITY AND OBJECT
|
// ENTITY AND OBJECT
|
||||||
public Player player = new Player(this, keyH);
|
public Player player = new Player(this, keyH);
|
||||||
public Entity[] obj = new Entity[10];
|
public Entity[][] obj = new Entity[Map.values().length][20];
|
||||||
public Entity[] npc = new Entity[10];
|
public Entity[][] npc = new Entity[Map.values().length][10];
|
||||||
public Entity[] monster = new Entity[20];
|
public Entity[][] monster = new Entity[Map.values().length][20];
|
||||||
|
public InteractiveTile[][] iTile = new InteractiveTile[Map.values().length][50];
|
||||||
|
public ArrayList<Entity> projectileList = new ArrayList<>();
|
||||||
|
public ArrayList<Entity> particleList = new ArrayList<>();
|
||||||
ArrayList<Entity> entityList = new ArrayList<>();
|
ArrayList<Entity> entityList = new ArrayList<>();
|
||||||
|
|
||||||
// GAME STATE
|
// GAME STATE
|
||||||
public GameState gameState;
|
public GameState gameState;
|
||||||
|
|
||||||
public GamePanel() {
|
public GamePanel() throws IOException {
|
||||||
this.setPreferredSize(new Dimension(screenWidth, screenHeight));
|
this.setPreferredSize(new Dimension(screenWidth, screenHeight));
|
||||||
this.setBackground(Color.black);
|
this.setBackground(Color.black);
|
||||||
this.setDoubleBuffered(true);
|
this.setDoubleBuffered(true);
|
||||||
@@ -84,7 +109,9 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
|
|
||||||
if(delta >= 1) {
|
if(delta >= 1) {
|
||||||
update();
|
update();
|
||||||
repaint();
|
//repaint(); //since the new drawing method
|
||||||
|
drawTempScreen();
|
||||||
|
drawScreen();
|
||||||
delta--;
|
delta--;
|
||||||
drawCount++;
|
drawCount++;
|
||||||
}
|
}
|
||||||
@@ -101,46 +128,77 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
switch(gameState) {
|
switch(gameState) {
|
||||||
case PLAY:
|
case PLAY:
|
||||||
player.update();
|
player.update();
|
||||||
for(Entity entity : npc) if(entity != null) entity.update();
|
for(Entity entity : npc[currentMap.getIndex()]) if(entity != null) entity.update();
|
||||||
for(int i = 0; i < monster.length; i++) {
|
for(int i = 0; i < monster[currentMap.getIndex()].length; i++) {
|
||||||
Entity m = monster[i];
|
Entity m = monster[currentMap.getIndex()][i];
|
||||||
if(m != null) {
|
if(m != null) {
|
||||||
if(m.alive && !m.dying) m.update();
|
if(m.alive && !m.dying) m.update();
|
||||||
if(!m.alive) monster[i] = null;
|
if(!m.alive) {
|
||||||
|
monster[currentMap.getIndex()][i].checkDrop();
|
||||||
|
monster[currentMap.getIndex()][i] = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(int i = 0; i < projectileList.size(); i++) {
|
||||||
|
Entity m = projectileList.get(i);
|
||||||
|
if(m != null) {
|
||||||
|
if(m.alive) m.update();
|
||||||
|
else projectileList.remove(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(int i = 0; i < particleList.size(); i++) {
|
||||||
|
Entity m = particleList.get(i);
|
||||||
|
if(m != null) {
|
||||||
|
if(m.alive) m.update();
|
||||||
|
else particleList.remove(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(Entity entity : iTile[currentMap.getIndex()]) if(entity != null) entity.update();
|
||||||
|
eManager.update();
|
||||||
break;
|
break;
|
||||||
case PAUSE:
|
case PAUSE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void paintComponent(Graphics graphics) {
|
public void drawTempScreen() {
|
||||||
super.paintComponent(graphics);
|
|
||||||
Graphics2D graphics2d = (Graphics2D) graphics;
|
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
long drawStart;
|
long drawStart;
|
||||||
drawStart = System.nanoTime();
|
drawStart = System.nanoTime();
|
||||||
|
|
||||||
// TITLE SCREEN
|
// TITLE SCREEN
|
||||||
if(gameState == GameState.TITLE) {
|
if(gameState == GameState.TITLE) {
|
||||||
ui.draw(graphics2d);
|
ui.draw(fg2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(gameState == GameState.MAP) {
|
||||||
|
mapMan.drawFullMapScreen(fg2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GAME
|
// GAME
|
||||||
tileM.draw(graphics2d);
|
tileM.draw(fg2);
|
||||||
|
for(Entity entity : iTile[currentMap.getIndex()]) if(entity != null) entity.draw(fg2);
|
||||||
|
|
||||||
// ENTITY RENDER SYSTEM
|
// ENTITY RENDER SYSTEM
|
||||||
entityList.add(player);
|
entityList.add(player);
|
||||||
for(Entity entity : npc) if(entity != null) entityList.add(entity);
|
for(Entity entity : npc[currentMap.getIndex()]) if(entity != null) entityList.add(entity);
|
||||||
for(Entity entity : obj) if(entity != null) entityList.add(entity);
|
for(Entity entity : obj[currentMap.getIndex()]) if(entity != null) entityList.add(entity);
|
||||||
for(Entity entity : monster) if(entity != null) entityList.add(entity);
|
for(Entity entity : monster[currentMap.getIndex()]) if(entity != null) entityList.add(entity);
|
||||||
|
for(Entity entity : projectileList) if(entity != null) entityList.add(entity);
|
||||||
|
for(Entity entity : particleList) if(entity != null) entityList.add(entity);
|
||||||
entityList.sort(Comparator.comparingInt(o -> o.worldY));
|
entityList.sort(Comparator.comparingInt(o -> o.worldY));
|
||||||
for(Entity entity : entityList) entity.draw(graphics2d);
|
for(Entity entity : entityList) entity.draw(fg2);
|
||||||
entityList.clear();
|
entityList.clear();
|
||||||
|
|
||||||
ui.draw(graphics2d);
|
// ENVIRONMENT
|
||||||
|
eManager.draw(fg2);
|
||||||
|
|
||||||
|
// MINI MAP
|
||||||
|
mapMan.drawMiniMap(fg2);
|
||||||
|
|
||||||
|
// UI
|
||||||
|
ui.draw(fg2);
|
||||||
|
|
||||||
long drawEnd = System.nanoTime();
|
long drawEnd = System.nanoTime();
|
||||||
long passed = drawEnd - drawStart;
|
long passed = drawEnd - drawStart;
|
||||||
@@ -148,22 +206,27 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
// DEBUG
|
// DEBUG
|
||||||
if(keyH.debug) {
|
if(keyH.debug) {
|
||||||
int start = 350;
|
int start = 350;
|
||||||
graphics2d.setColor(Color.white);
|
fg2.setColor(Color.white);
|
||||||
graphics2d.drawString("Draw Time: " + passed, 10, start);
|
fg2.drawString("Draw Time: " + passed, 10, start);
|
||||||
graphics2d.drawString("FPS: " + fpsMeasure, 10, start+tileSize);
|
fg2.drawString("FPS: " + fpsMeasure, 10, start+tileSize);
|
||||||
graphics2d.drawString("Invincible: " + player.invincibleCount, 10, start+tileSize*2);
|
fg2.drawString("Invincible: " + player.invincibleCount, 10, start+tileSize*2);
|
||||||
graphics2d.drawString("X, Y: " + player.worldX+", "+player.worldY, 10, start+tileSize*3);
|
fg2.drawString("X, Y: " + player.worldX+", "+player.worldY, 10, start+tileSize*3);
|
||||||
graphics2d.drawString("Col, Row: " + (player.worldX+player.solidArea.x)/tileSize+", "+(player.worldY+player.solidArea.y)/tileSize, 10, start+tileSize*4);
|
fg2.drawString("Col, Row: " + (player.worldX+player.solidArea.x)/tileSize+", "+(player.worldY+player.solidArea.y)/tileSize, 10, start+tileSize*4);
|
||||||
Boot.logger.log(Level.FINE, "Draw Time: " + passed);
|
Boot.logger.log(Level.FINE, "Draw Time: " + passed);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// END
|
public void drawScreen() {
|
||||||
graphics.dispose();
|
Graphics fg = getGraphics();
|
||||||
|
fg.drawImage(tempScreen, 0, 0, fScreenWidth, fScreenHeight, null);
|
||||||
|
fg.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// MUSIC
|
// MUSIC
|
||||||
public void playMusic(int i) {
|
public void playMusic(int i) {
|
||||||
Clip c = se.clips[i];
|
Clip c = music.clips[i];
|
||||||
|
music.clip = c;
|
||||||
|
music.fc = (FloatControl) c.getControl(FloatControl.Type.MASTER_GAIN);
|
||||||
|
music.checkVolume();
|
||||||
if(c.isRunning()) c.stop();
|
if(c.isRunning()) c.stop();
|
||||||
c.setFramePosition(0);
|
c.setFramePosition(0);
|
||||||
c.start();
|
c.start();
|
||||||
@@ -173,7 +236,9 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
music.stop();
|
music.stop();
|
||||||
}
|
}
|
||||||
public void playSE(int i) {
|
public void playSE(int i) {
|
||||||
Clip c = se.clips[i];
|
Clip c = sfx.clips[i];
|
||||||
|
sfx.fc = (FloatControl) c.getControl(FloatControl.Type.MASTER_GAIN);
|
||||||
|
sfx.checkVolume();
|
||||||
if(c.isRunning()) c.stop();
|
if(c.isRunning()) c.stop();
|
||||||
c.setFramePosition(0);
|
c.setFramePosition(0);
|
||||||
c.start();
|
c.start();
|
||||||
@@ -184,7 +249,33 @@ public class GamePanel extends JPanel implements Runnable {
|
|||||||
assetSetter.setObject();
|
assetSetter.setObject();
|
||||||
assetSetter.setNPC();
|
assetSetter.setNPC();
|
||||||
assetSetter.setMonster();
|
assetSetter.setMonster();
|
||||||
|
assetSetter.setITiles();
|
||||||
|
eManager.setup();
|
||||||
gameState = GameState.TITLE;
|
gameState = GameState.TITLE;
|
||||||
}
|
|
||||||
|
|
||||||
|
tempScreen = new BufferedImage(screenWidth, screenHeight, BufferedImage.TYPE_INT_RGB);
|
||||||
|
fg2 = (Graphics2D) tempScreen.getGraphics();
|
||||||
|
|
||||||
|
if(fullscreen) setFullscreen();
|
||||||
|
}
|
||||||
|
public void setFullscreen() {
|
||||||
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
GraphicsDevice gd = ge.getDefaultScreenDevice();
|
||||||
|
gd.setFullScreenWindow(Boot.window);
|
||||||
|
|
||||||
|
fScreenWidth = Boot.window.getWidth();
|
||||||
|
fScreenHeight = Boot.window.getHeight();
|
||||||
|
}
|
||||||
|
public void resetGame(boolean restart) {
|
||||||
|
player.setDefaultPositions();
|
||||||
|
player.restoreStatus();
|
||||||
|
assetSetter.setNPC();
|
||||||
|
assetSetter.setMonster();
|
||||||
|
|
||||||
|
if(!restart) return;
|
||||||
|
player.setDefaultValues();
|
||||||
|
assetSetter.setObject();
|
||||||
|
assetSetter.setITiles();
|
||||||
|
eManager.lighting.resetDay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,62 +2,76 @@ package de.miaurizius.jgame2d.core;
|
|||||||
|
|
||||||
import de.miaurizius.jgame2d.core.enums.GameState;
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
import de.miaurizius.jgame2d.entity.Entity;
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
import de.miaurizius.jgame2d.entity.item.CoinObj;
|
||||||
import de.miaurizius.jgame2d.entity.item.HeartObj;
|
import de.miaurizius.jgame2d.entity.item.HeartObj;
|
||||||
|
import de.miaurizius.jgame2d.environment.Lighting;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class UI {
|
public class UI {
|
||||||
|
|
||||||
GamePanel panel;
|
GamePanel panel;
|
||||||
Graphics2D graphics2d;
|
Graphics2D graphics2d;
|
||||||
Font arial_40, arial_80B; //TODO: Custom font loader: https://www.youtube.com/watch?v=g-wrebFVP3E
|
BufferedImage heart_full, heart_half, heart_blank, coin;
|
||||||
BufferedImage heart_full, heart_half, heart_blank;
|
|
||||||
ArrayList<String> messages = new ArrayList<>();
|
ArrayList<String> messages = new ArrayList<>();
|
||||||
ArrayList<Integer> messageCounter = new ArrayList<>();
|
ArrayList<Integer> messageCounter = new ArrayList<>();
|
||||||
|
public Font font;
|
||||||
public String currentDialogue;
|
public String currentDialogue;
|
||||||
|
public Entity tradingNPC;
|
||||||
public int commandNum;
|
public int commandNum;
|
||||||
|
public int playerSlotCol, playerSlotRow;
|
||||||
|
public int npcSlotCol, npcSlotRow;
|
||||||
|
private int transCount;
|
||||||
|
private int sleepCount;
|
||||||
|
|
||||||
|
// SUB-STATES
|
||||||
|
public TradeState tradeState = TradeState.SELECT;
|
||||||
|
public OptionState optionState;
|
||||||
|
|
||||||
public UI(GamePanel panel) {
|
public UI(GamePanel panel) {
|
||||||
this.panel = panel;
|
this.panel = panel;
|
||||||
arial_40 = new Font("Arial", Font.PLAIN, 40);
|
font = new Font("Arial", Font.PLAIN, 40);
|
||||||
arial_80B = new Font("Arial", Font.BOLD, 80);
|
try {
|
||||||
|
font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream("assets/font/x12y16pxMaruMonica.ttf"));
|
||||||
|
} catch (FontFormatException | IOException e) {
|
||||||
|
Boot.logger.log(Level.WARNING, "Could not load maruMonica.ttf", e);
|
||||||
|
}
|
||||||
|
|
||||||
// CREATE HUD OBJECT
|
// CREATE HUD OBJECT
|
||||||
Entity heart = new HeartObj(panel);
|
Entity heart = new HeartObj(panel);
|
||||||
heart_full = heart.image;
|
heart_full = heart.image;
|
||||||
heart_half = heart.image2;
|
heart_half = heart.image2;
|
||||||
heart_blank = heart.image3;
|
heart_blank = heart.image3;
|
||||||
|
Entity coin = new CoinObj(panel);
|
||||||
|
this.coin = coin.down1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Graphics2D graphics2d) {
|
public void draw(Graphics2D graphics2d) {
|
||||||
this.graphics2d = graphics2d;
|
this.graphics2d = graphics2d;
|
||||||
graphics2d.setFont(arial_40);
|
graphics2d.setFont(font);
|
||||||
graphics2d.setColor(Color.white);
|
graphics2d.setColor(Color.white);
|
||||||
|
|
||||||
if(panel.gameState == null) return;
|
if(panel.gameState == null) return;
|
||||||
switch (panel.gameState) {
|
switch (panel.gameState) {
|
||||||
case GameState.PLAY:
|
case PLAY -> drawPlayScreen();
|
||||||
drawPlayScreen();
|
case PAUSE -> drawPauseScreen();
|
||||||
break;
|
case DIALOGUE -> drawDialogueScreen();
|
||||||
case GameState.PAUSE:
|
case TITLE -> drawTitleScreen();
|
||||||
drawPauseScreen();
|
case CHARACTER -> drawCharacterScreen();
|
||||||
break;
|
case GAMEOVER -> drawGameOverScreen();
|
||||||
case GameState.DIALOGUE:
|
case TRANSITION -> drawTransitionScreen();
|
||||||
drawDialogueScreen();
|
case TRADE -> drawTradeScreen();
|
||||||
break;
|
case SLEEP -> drawSleepScreen();
|
||||||
case TITLE:
|
|
||||||
drawTitleScreen();
|
|
||||||
break;
|
|
||||||
case CHARACTER:
|
|
||||||
drawCharacterScreen();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HUD
|
// HUD
|
||||||
public void drawPlayerLife() {
|
private void drawPlayerLife() {
|
||||||
int x = panel.tileSize / 2;
|
int x = panel.tileSize / 2;
|
||||||
int y = panel.tileSize / 2;
|
int y = panel.tileSize / 2;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -82,7 +96,7 @@ public class UI {
|
|||||||
x += panel.tileSize;
|
x += panel.tileSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void drawMessages() {
|
private void drawMessages() {
|
||||||
int messageX = panel.tileSize;
|
int messageX = panel.tileSize;
|
||||||
int messageY = panel.tileSize*4;
|
int messageY = panel.tileSize*4;
|
||||||
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.BOLD, 32F));
|
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.BOLD, 32F));
|
||||||
@@ -103,16 +117,171 @@ public class UI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void drawCharStats() {
|
||||||
|
// DRAW FRAME
|
||||||
|
final int frameX = panel.tileSize*2;
|
||||||
|
final int frameY = panel.tileSize;
|
||||||
|
final int frameWidth = panel.tileSize*5;
|
||||||
|
final int frameHeight = panel.tileSize*10;
|
||||||
|
drawSubWindow(frameX, frameY, frameWidth, frameHeight);
|
||||||
|
|
||||||
|
// TEXT
|
||||||
|
graphics2d.setColor(Color.white);
|
||||||
|
graphics2d.setFont(graphics2d.getFont().deriveFont(28F));
|
||||||
|
|
||||||
|
int textX = frameX + 20;
|
||||||
|
int textY = frameY + panel.tileSize;
|
||||||
|
final int lineHeight = 35;
|
||||||
|
|
||||||
|
// NAMES
|
||||||
|
String[] names = {"Level", "Life", "Strength", "Dexterity", "Attack", "Defense", "Exp", "Next Level", "Coins", "Weapon", "Shield"};
|
||||||
|
for(String name : names) {
|
||||||
|
graphics2d.drawString(name, textX, textY);
|
||||||
|
textY += lineHeight + (name.equals("Coins") ? 20 : (name.equals("Weapon") ? 15 : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
// VALUES
|
||||||
|
int tailX = (frameX + frameWidth) - 30;
|
||||||
|
textY = frameY + panel.tileSize;
|
||||||
|
String[] values = {
|
||||||
|
String.valueOf(panel.player.level),
|
||||||
|
(panel.player.life + "/" + panel.player.maxLife),
|
||||||
|
String.valueOf(panel.player.strength),
|
||||||
|
String.valueOf(panel.player.dexterity),
|
||||||
|
String.valueOf(panel.player.attack),
|
||||||
|
String.valueOf(panel.player.defense),
|
||||||
|
String.valueOf(panel.player.exp),
|
||||||
|
String.valueOf(panel.player.nextLevelExp),
|
||||||
|
String.valueOf(panel.player.coins)
|
||||||
|
};
|
||||||
|
for(String value : values) {
|
||||||
|
textX = getAlignedToRightX(value, tailX);
|
||||||
|
graphics2d.drawString(value, textX, textY);
|
||||||
|
textY += lineHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
graphics2d.drawImage(panel.player.currentWeapon.down1, tailX - panel.tileSize, textY-14, null);
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawImage(panel.player.currentShield.down1, tailX - panel.tileSize, textY-14, null);
|
||||||
|
}
|
||||||
|
private void drawInventory(Entity entity, boolean cursor) {
|
||||||
|
int frameX, frameY, frameWidth, frameHeight;
|
||||||
|
int slotCol, slotRow;
|
||||||
|
|
||||||
|
// DRAW FRAME
|
||||||
|
if(entity == panel.player) {
|
||||||
|
frameX = panel.tileSize*12;
|
||||||
|
frameY = panel.tileSize;
|
||||||
|
frameWidth = panel.tileSize*6;
|
||||||
|
frameHeight = panel.tileSize*5;
|
||||||
|
slotCol = playerSlotCol;
|
||||||
|
slotRow = playerSlotRow;
|
||||||
|
} else {
|
||||||
|
frameX = panel.tileSize*2;
|
||||||
|
frameY = panel.tileSize;
|
||||||
|
frameWidth = panel.tileSize*6;
|
||||||
|
frameHeight = panel.tileSize*5;
|
||||||
|
slotCol = npcSlotCol;
|
||||||
|
slotRow = npcSlotRow;
|
||||||
|
}
|
||||||
|
drawSubWindow(frameX, frameY, frameWidth, frameHeight);
|
||||||
|
|
||||||
|
// SLOT
|
||||||
|
final int slotXStart = frameX + 20;
|
||||||
|
final int slotYStart = frameY + 20;
|
||||||
|
int slotX = slotXStart;
|
||||||
|
int slotY = slotYStart;
|
||||||
|
int slotSize = panel.tileSize+3;
|
||||||
|
|
||||||
|
// DRAW ITEMS
|
||||||
|
for(int i = 0; i < entity.inventory.size(); i++) {
|
||||||
|
|
||||||
|
// EQUIP CURSOR
|
||||||
|
if(
|
||||||
|
entity.inventory.get(i) == entity.currentWeapon ||
|
||||||
|
entity.inventory.get(i) == entity.currentShield ||
|
||||||
|
entity.inventory.get(i) == entity.currentLight
|
||||||
|
) {
|
||||||
|
graphics2d.setColor(new Color(240, 190,90));
|
||||||
|
graphics2d.fillRoundRect(slotX, slotY, panel.tileSize, panel.tileSize, 10, 10);
|
||||||
|
}
|
||||||
|
graphics2d.drawImage(entity.inventory.get(i).down1, slotX, slotY, null);
|
||||||
|
|
||||||
|
// AMOUNT
|
||||||
|
if(entity == panel.player && entity.inventory.get(i).amt > 1) {
|
||||||
|
graphics2d.setFont(graphics2d.getFont().deriveFont(32F));
|
||||||
|
int amtX;
|
||||||
|
int amtY;
|
||||||
|
String amtS = String.valueOf(entity.inventory.get(i).amt);
|
||||||
|
amtX = getAlignedToRightX(amtS, slotX+44);
|
||||||
|
amtY = slotY + panel.tileSize;
|
||||||
|
|
||||||
|
// SHADOW
|
||||||
|
graphics2d.setColor(new Color(60, 60, 60));
|
||||||
|
graphics2d.drawString(amtS, amtX, amtY);
|
||||||
|
// NUMBER
|
||||||
|
graphics2d.setColor(Color.white);
|
||||||
|
graphics2d.drawString(amtS, amtX-3, amtY-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
slotX += slotSize;
|
||||||
|
if (i == 4 || i == 9 || i == 14) {
|
||||||
|
slotX = slotXStart;
|
||||||
|
slotY += slotSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CURSOR
|
||||||
|
if(!cursor) return;
|
||||||
|
int curserX = slotXStart + (slotSize*slotCol);
|
||||||
|
int curserY = slotYStart + (slotSize*slotRow);
|
||||||
|
int curserHeight = panel.tileSize;
|
||||||
|
int curserWidth = panel.tileSize;
|
||||||
|
graphics2d.setColor(Color.white);
|
||||||
|
graphics2d.setStroke(new BasicStroke(3));
|
||||||
|
graphics2d.drawRoundRect(curserX, curserY, curserWidth, curserHeight, 10, 10);
|
||||||
|
|
||||||
|
// DESCRIPTION FRAME
|
||||||
|
int itemIndex = getItemIndex(slotCol, slotRow);
|
||||||
|
int dFrameX = frameX;
|
||||||
|
int dFrameY = frameY + frameHeight+2;
|
||||||
|
int dFrameWidth = frameWidth;
|
||||||
|
int dFrameHeight = panel.tileSize*3;
|
||||||
|
|
||||||
|
// DRAW DESCRIPTION
|
||||||
|
int textX = dFrameX + 20;
|
||||||
|
int textY = dFrameY + panel.tileSize;
|
||||||
|
graphics2d.setFont(graphics2d.getFont().deriveFont(28F));
|
||||||
|
if(itemIndex < entity.inventory.size()) {
|
||||||
|
drawSubWindow(dFrameX, dFrameY, dFrameWidth, dFrameHeight);
|
||||||
|
for(String line : entity.inventory.get(itemIndex).description.split("\n")) {
|
||||||
|
graphics2d.drawString(line, textX, textY);
|
||||||
|
textY += 32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GAME STATES
|
// GAME STATES
|
||||||
public void drawPauseScreen() {
|
private void drawPauseScreen() {
|
||||||
drawPlayerLife();
|
graphics2d.setColor(Color.white);
|
||||||
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.PLAIN, 80));
|
graphics2d.setFont(graphics2d.getFont().deriveFont(32F));
|
||||||
String text = "PAUSED";
|
|
||||||
int y = panel.screenHeight / 2;
|
// SUB WINDOW
|
||||||
graphics2d.drawString(text, getCenteredX(text), y);
|
int frameX = panel.tileSize*6;
|
||||||
|
int frameY = panel.tileSize;
|
||||||
|
int frameWidth = panel.tileSize*8;
|
||||||
|
int frameHeight = panel.tileSize*10;
|
||||||
|
drawSubWindow(frameX, frameY, frameWidth, frameHeight);
|
||||||
|
|
||||||
|
switch(optionState) {
|
||||||
|
case OVERVIEW -> optionsTop(frameX, frameY);
|
||||||
|
case SCREENNF -> optionsFSNotify(frameX, frameY);
|
||||||
|
case CONTROLS -> optionsControls(frameX, frameY);
|
||||||
|
case QUITNF -> optionsQuitNotify(frameX, frameY);
|
||||||
|
}
|
||||||
|
panel.keyH.spacePressed = false;
|
||||||
}
|
}
|
||||||
public void drawDialogueScreen() {
|
private void drawDialogueScreen() {
|
||||||
drawPlayerLife();
|
drawPlayerLife();
|
||||||
// WINDOW
|
// WINDOW
|
||||||
int x = panel.tileSize*2;
|
int x = panel.tileSize*2;
|
||||||
@@ -121,7 +290,7 @@ public class UI {
|
|||||||
int height = panel.tileSize*4;
|
int height = panel.tileSize*4;
|
||||||
drawSubWindow(x, y, width, height);
|
drawSubWindow(x, y, width, height);
|
||||||
|
|
||||||
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.PLAIN, 28F));
|
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.PLAIN, 30F));
|
||||||
x += panel.tileSize;
|
x += panel.tileSize;
|
||||||
y += panel.tileSize;
|
y += panel.tileSize;
|
||||||
|
|
||||||
@@ -130,7 +299,7 @@ public class UI {
|
|||||||
y += 40;
|
y += 40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void drawTitleScreen() {
|
private void drawTitleScreen() {
|
||||||
graphics2d.setColor(new Color(0, 0, 0));
|
graphics2d.setColor(new Color(0, 0, 0));
|
||||||
graphics2d.fillRect(0, 0, panel.screenWidth, panel.screenHeight);
|
graphics2d.fillRect(0, 0, panel.screenWidth, panel.screenHeight);
|
||||||
|
|
||||||
@@ -168,75 +337,418 @@ public class UI {
|
|||||||
graphics2d.drawString(text, x, y);
|
graphics2d.drawString(text, x, y);
|
||||||
if(commandNum == 2) graphics2d.drawString(">", x-panel.tileSize, y);
|
if(commandNum == 2) graphics2d.drawString(">", x-panel.tileSize, y);
|
||||||
}
|
}
|
||||||
public void drawCharacterScreen() {
|
private void drawCharacterScreen() {
|
||||||
// DRAW FRAME
|
drawCharStats();
|
||||||
final int frameX = panel.tileSize;
|
drawInventory(panel.player, true);
|
||||||
final int frameY = panel.tileSize;
|
|
||||||
final int frameWidth = panel.tileSize*5;
|
|
||||||
final int frameHeight = panel.tileSize*10;
|
|
||||||
drawSubWindow(frameX, frameY, frameWidth, frameHeight);
|
|
||||||
|
|
||||||
// TEXT
|
|
||||||
graphics2d.setColor(Color.white);
|
|
||||||
graphics2d.setFont(graphics2d.getFont().deriveFont(22F));
|
|
||||||
|
|
||||||
int textX = frameX + 20;
|
|
||||||
int textY = frameY + panel.tileSize;
|
|
||||||
final int lineHeight = 35;
|
|
||||||
|
|
||||||
// NAMES
|
|
||||||
String[] names = {"Level", "Life", "Strength", "Dexterity", "Attack", "Defense", "Exp", "Next Level", "Coins", "Weapon", "Shield"};
|
|
||||||
for(String name : names) {
|
|
||||||
graphics2d.drawString(name, textX, textY);
|
|
||||||
textY += lineHeight + (name.equals("Coins") ? 20 : (name.equals("Weapon") ? 15 : 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
// VALUES
|
|
||||||
int tailX = (frameX + frameWidth) - 30;
|
|
||||||
textY = frameY + panel.tileSize;
|
|
||||||
String[] values = {
|
|
||||||
String.valueOf(panel.player.level),
|
|
||||||
(panel.player.life + "/" + panel.player.maxLife),
|
|
||||||
String.valueOf(panel.player.strength),
|
|
||||||
String.valueOf(panel.player.dexterity),
|
|
||||||
String.valueOf(panel.player.attack),
|
|
||||||
String.valueOf(panel.player.defense),
|
|
||||||
String.valueOf(panel.player.exp),
|
|
||||||
String.valueOf(panel.player.nextLevelExp),
|
|
||||||
String.valueOf(panel.player.coins)
|
|
||||||
};
|
|
||||||
for(String value : values) {
|
|
||||||
textX = getAlignedToRightX(value, tailX);
|
|
||||||
graphics2d.drawString(value, textX, textY);
|
|
||||||
textY += lineHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
graphics2d.drawImage(panel.player.currentWeapon.down1, tailX - panel.tileSize, textY-14, null);
|
|
||||||
textY += panel.tileSize;
|
|
||||||
graphics2d.drawImage(panel.player.currentShield.down1, tailX - panel.tileSize, textY-14, null);
|
|
||||||
}
|
}
|
||||||
public void drawPlayScreen() {
|
private void drawPlayScreen() {
|
||||||
drawPlayerLife();
|
drawPlayerLife();
|
||||||
drawMessages();
|
drawMessages();
|
||||||
}
|
}
|
||||||
|
private void drawGameOverScreen() {
|
||||||
|
graphics2d.setColor(new Color(0,0,0, 150));
|
||||||
|
graphics2d.fillRect(0, 0, panel.screenWidth, panel.screenHeight);
|
||||||
|
|
||||||
|
int x, y;
|
||||||
|
String text;
|
||||||
|
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.BOLD, 110F));
|
||||||
|
text = "GAME OVER";
|
||||||
|
// SHADOW
|
||||||
|
graphics2d.setColor(Color.black);
|
||||||
|
x = getCenteredX(text);
|
||||||
|
y = panel.tileSize*3;
|
||||||
|
graphics2d.drawString(text, x, y);
|
||||||
|
|
||||||
|
// MAIN TEXT
|
||||||
|
graphics2d.setColor(Color.white);
|
||||||
|
graphics2d.drawString(text, x-4, y-4);
|
||||||
|
|
||||||
|
// OPTIONS
|
||||||
|
graphics2d.setFont(graphics2d.getFont().deriveFont(50F));
|
||||||
|
text = "Retry";
|
||||||
|
x = getCenteredX(text);
|
||||||
|
y += panel.tileSize*4;
|
||||||
|
graphics2d.drawString(text, x, y);
|
||||||
|
if(commandNum == 0) graphics2d.drawString(">", x-panel.tileSize, y);
|
||||||
|
|
||||||
|
text = "Return to title";
|
||||||
|
x = getCenteredX(text);
|
||||||
|
y += 55;
|
||||||
|
graphics2d.drawString(text, x, y);
|
||||||
|
if(commandNum == 1) graphics2d.drawString(">", x-panel.tileSize, y);
|
||||||
|
}
|
||||||
|
private void drawTransitionScreen() {
|
||||||
|
transCount++;
|
||||||
|
graphics2d.setColor(new Color(0,0,0, transCount *5));
|
||||||
|
graphics2d.fillRect(0, 0, panel.screenWidth, panel.screenHeight);
|
||||||
|
if(transCount != 50) return;
|
||||||
|
transCount = 0;
|
||||||
|
panel.gameState = GameState.PLAY;
|
||||||
|
panel.currentMap = panel.eventH.tempMap;
|
||||||
|
panel.player.worldX = panel.tileSize * panel.eventH.tempCol;
|
||||||
|
panel.player.worldY = panel.tileSize * panel.eventH.tempRow;
|
||||||
|
panel.eventH.prevEventX = panel.player.worldX;
|
||||||
|
panel.eventH.prevEventY = panel.player.worldY;
|
||||||
|
}
|
||||||
|
private void drawTradeScreen() {
|
||||||
|
switch(tradeState) {
|
||||||
|
case SELECT -> tradeSelect();
|
||||||
|
case BUY -> tradeBuy();
|
||||||
|
case SELL -> tradeSell();
|
||||||
|
}
|
||||||
|
panel.keyH.spacePressed = false;
|
||||||
|
}
|
||||||
|
private void drawSleepScreen() {
|
||||||
|
sleepCount++;
|
||||||
|
if(sleepCount < 120) {
|
||||||
|
panel.eManager.lighting.filterAlpha += 0.01F;
|
||||||
|
if(panel.eManager.lighting.filterAlpha >= 1F) panel.eManager.lighting.filterAlpha = 1F;
|
||||||
|
}
|
||||||
|
if(sleepCount >= 120) {
|
||||||
|
panel.eManager.lighting.filterAlpha -= 0.01F;
|
||||||
|
if(panel.eManager.lighting.filterAlpha <= 0F) {
|
||||||
|
panel.eManager.lighting.filterAlpha = 0F;
|
||||||
|
sleepCount = 0;
|
||||||
|
panel.eManager.lighting.dayCount = 0;
|
||||||
|
panel.eManager.lighting.dayState = Lighting.DayState.DAY;
|
||||||
|
panel.gameState = GameState.PLAY;
|
||||||
|
panel.player.getPlayerImage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TRADING
|
||||||
|
private void tradeSelect() {
|
||||||
|
drawDialogueScreen();
|
||||||
|
|
||||||
|
int x = panel.tileSize*15;
|
||||||
|
int y = panel.tileSize*4;
|
||||||
|
int width = panel.tileSize*3;
|
||||||
|
int height = (int)(panel.tileSize*3.5);
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
|
||||||
|
// DRAW TEXTS
|
||||||
|
x += panel.tileSize;
|
||||||
|
y += panel.tileSize;
|
||||||
|
graphics2d.drawString("Buy",x , y);
|
||||||
|
if(commandNum == 0) {
|
||||||
|
graphics2d.drawString(">", x-panel.tileSize/2, y);
|
||||||
|
if(panel.keyH.spacePressed) tradeState = TradeState.BUY;
|
||||||
|
}
|
||||||
|
y += panel.tileSize;
|
||||||
|
|
||||||
|
graphics2d.drawString("Sell",x , y);
|
||||||
|
if(commandNum == 1) {
|
||||||
|
graphics2d.drawString(">", x-panel.tileSize/2, y);
|
||||||
|
if(panel.keyH.spacePressed) tradeState = TradeState.SELL;
|
||||||
|
}
|
||||||
|
y += panel.tileSize;
|
||||||
|
|
||||||
|
graphics2d.drawString("Leave",x , y);
|
||||||
|
if(commandNum == 2) {
|
||||||
|
graphics2d.drawString(">", x-panel.tileSize/2, y);
|
||||||
|
if(panel.keyH.spacePressed) {
|
||||||
|
commandNum = 0;
|
||||||
|
tradeState = TradeState.SELECT;
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
currentDialogue = "Come again, hehe!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void tradeBuy() {
|
||||||
|
drawInventory(panel.player, false);
|
||||||
|
drawInventory(tradingNPC, true);
|
||||||
|
|
||||||
|
// HINT WINDOW
|
||||||
|
int x = panel.tileSize*2;
|
||||||
|
int y = panel.tileSize*9;
|
||||||
|
int width = panel.tileSize*6;
|
||||||
|
int height = panel.tileSize*2;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawString("[ESC] Back", x+panel.tileSize, y+60);
|
||||||
|
|
||||||
|
// PLAYER COINS
|
||||||
|
x = panel.tileSize*12;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawString("Your Coins: " + panel.player.coins, x+panel.tileSize, y+60);
|
||||||
|
|
||||||
|
// PRICE WINDOW
|
||||||
|
int itemIndex = getItemIndex(npcSlotCol, npcSlotRow);
|
||||||
|
if(itemIndex < tradingNPC.inventory.size()) {
|
||||||
|
x = (int)(panel.tileSize*5.5);
|
||||||
|
y = (int)(panel.tileSize*5.5);
|
||||||
|
width = (int)(panel.tileSize*2.5);
|
||||||
|
height = panel.tileSize;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawImage(coin, x+10, y+8, 32, 32, null);
|
||||||
|
String price = String.valueOf(tradingNPC.inventory.get(itemIndex).price);
|
||||||
|
graphics2d.drawString(price, getAlignedToRightX(price, panel.tileSize*8-20), y+34);
|
||||||
|
|
||||||
|
// BUY
|
||||||
|
if(!panel.keyH.spacePressed) return;
|
||||||
|
if(tradingNPC.inventory.get(itemIndex).price > panel.player.coins) {
|
||||||
|
tradeState = TradeState.SELECT;
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
currentDialogue = "You need more coins to buy that!";
|
||||||
|
drawDialogueScreen();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(panel.player.canObtainItem(tradingNPC.inventory.get(itemIndex))) {
|
||||||
|
panel.player.coins -= tradingNPC.inventory.get(itemIndex).price;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tradeState = TradeState.SELECT;
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
currentDialogue = "Your inventory is full!";
|
||||||
|
drawDialogueScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void tradeSell() {
|
||||||
|
drawInventory(panel.player, true);
|
||||||
|
int x, y, width, height;
|
||||||
|
|
||||||
|
// HINT WINDOW
|
||||||
|
x = panel.tileSize*2;
|
||||||
|
y = panel.tileSize*9;
|
||||||
|
width = panel.tileSize*6;
|
||||||
|
height = panel.tileSize*2;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawString("[ESC] Back", x+panel.tileSize, y+60);
|
||||||
|
|
||||||
|
// PLAYER COINS
|
||||||
|
x = panel.tileSize*12;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawString("Your Coins: " + panel.player.coins, x+panel.tileSize, y+60);
|
||||||
|
|
||||||
|
// PRICE WINDOW
|
||||||
|
int itemIndex = getItemIndex(playerSlotCol, playerSlotRow);
|
||||||
|
if(itemIndex < panel.player.inventory.size()) {
|
||||||
|
x = (int)(panel.tileSize*15.5);
|
||||||
|
y = (int)(panel.tileSize*5.5);
|
||||||
|
width = (int)(panel.tileSize*2.5);
|
||||||
|
height = panel.tileSize;
|
||||||
|
drawSubWindow(x, y, width, height);
|
||||||
|
graphics2d.drawImage(coin, x+10, y+8, 32, 32, null);
|
||||||
|
String price = String.valueOf(panel.player.inventory.get(itemIndex).price/2);
|
||||||
|
graphics2d.drawString(price, getAlignedToRightX(price, panel.tileSize*18-20), y+34);
|
||||||
|
|
||||||
|
// SELL
|
||||||
|
if(!panel.keyH.spacePressed) return;
|
||||||
|
if(panel.player.inventory.get(itemIndex) == panel.player.currentWeapon || panel.player.inventory.get(itemIndex) == panel.player.currentShield) {
|
||||||
|
commandNum = 0;
|
||||||
|
tradeState = TradeState.SELECT;
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
currentDialogue = "You cannot sell an equipped item!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(panel.player.inventory.get(itemIndex).amt <= 1) panel.player.inventory.remove(itemIndex);
|
||||||
|
else panel.player.inventory.get(itemIndex).amt--;
|
||||||
|
panel.player.coins += Integer.parseInt(price);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// UTILITY
|
// UTILITY
|
||||||
public void drawSubWindow(int x, int y, int width, int height) {
|
private void drawSubWindow(int x, int y, int width, int height) {
|
||||||
graphics2d.setColor(new Color(0,0,0,210));
|
graphics2d.setColor(new Color(0,0,0,210));
|
||||||
graphics2d.fillRoundRect(x, y, width, height, 35, 35);
|
graphics2d.fillRoundRect(x, y, width, height, 35, 35);
|
||||||
graphics2d.setColor(new Color(255,255,255));
|
graphics2d.setColor(new Color(255,255,255));
|
||||||
graphics2d.setStroke(new BasicStroke(5));
|
graphics2d.setStroke(new BasicStroke(5));
|
||||||
graphics2d.drawRoundRect(x+5, y+5, width-10, height-10, 25, 25);
|
graphics2d.drawRoundRect(x+5, y+5, width-10, height-10, 25, 25);
|
||||||
}
|
}
|
||||||
public int getCenteredX(String text) {
|
private int getCenteredX(String text) {
|
||||||
return panel.screenWidth / 2 - (int) graphics2d.getFontMetrics().getStringBounds(text, graphics2d).getWidth() / 2;
|
return panel.screenWidth / 2 - (int) graphics2d.getFontMetrics().getStringBounds(text, graphics2d).getWidth() / 2;
|
||||||
}
|
}
|
||||||
public int getAlignedToRightX(String text, int tailX) {
|
private int getAlignedToRightX(String text, int tailX) {
|
||||||
return tailX - (int) graphics2d.getFontMetrics().getStringBounds(text, graphics2d).getWidth() / 2;
|
return tailX - (int) graphics2d.getFontMetrics().getStringBounds(text, graphics2d).getWidth();
|
||||||
|
}
|
||||||
|
public int getItemIndex(int slotCol, int slotRow) {
|
||||||
|
return slotCol + slotRow *5;
|
||||||
}
|
}
|
||||||
public void addMessage(String text) {
|
public void addMessage(String text) {
|
||||||
messages.add(text);
|
messages.add(text);
|
||||||
messageCounter.add(0);
|
messageCounter.add(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OPTIONS UI
|
||||||
|
private void optionsTop(int frameX, int frameY) {
|
||||||
|
int textX, textY;
|
||||||
|
String title = "Options";
|
||||||
|
textX = getCenteredX(title);
|
||||||
|
textY = frameY + panel.tileSize;
|
||||||
|
graphics2d.drawString(title, textX, textY);
|
||||||
|
|
||||||
|
// FULLSCREEN ON/OFF
|
||||||
|
textX = frameX + panel.tileSize;
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString("Full Screen", textX, textY);
|
||||||
|
if(commandNum == 0) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) {
|
||||||
|
optionState = OptionState.SCREENNF;
|
||||||
|
panel.fullscreen = !panel.fullscreen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MUSIC
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString("Music", textX, textY);
|
||||||
|
if(commandNum == 1) graphics2d.drawString(">", textX-25, textY);
|
||||||
|
|
||||||
|
// SOUND EFFECTS
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString("SFX", textX, textY);
|
||||||
|
if(commandNum == 2) graphics2d.drawString(">", textX-25, textY);
|
||||||
|
|
||||||
|
// CONTROL
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString("Controls", textX, textY);
|
||||||
|
if(commandNum == 3) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) {
|
||||||
|
optionState = OptionState.CONTROLS;
|
||||||
|
commandNum = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// END GAME
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString("Title Screen", textX, textY);
|
||||||
|
if(commandNum == 4) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) {
|
||||||
|
optionState = OptionState.QUITNF;
|
||||||
|
commandNum = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// BACK
|
||||||
|
textY += panel.tileSize*2;
|
||||||
|
graphics2d.drawString("Back to Game", textX, textY);
|
||||||
|
if(commandNum == 5) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) panel.gameState = GameState.PLAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// FUNCTIONALITY
|
||||||
|
//
|
||||||
|
|
||||||
|
// FULL SCREEN CHECKBOX
|
||||||
|
textX = frameX + (int)(panel.tileSize*4.5);
|
||||||
|
textY = frameY + panel.tileSize*2 - panel.tileSize/2;
|
||||||
|
graphics2d.setStroke(new BasicStroke(3));
|
||||||
|
graphics2d.drawRect(textX, textY, panel.tileSize/2, panel.tileSize/2);
|
||||||
|
if(panel.fullscreen) {
|
||||||
|
graphics2d.fillRect(textX, textY, panel.tileSize/2, panel.tileSize/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// MUSIC VOLUME
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawRect(textX, textY, 120, panel.tileSize/2); // 120/5 = 24
|
||||||
|
graphics2d.fillRect(textX, textY, 24 * panel.music.volumeScale, panel.tileSize/2);
|
||||||
|
|
||||||
|
// SFX VOLUME
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawRect(textX, textY, 120, panel.tileSize/2); // 120/5 = 24
|
||||||
|
graphics2d.fillRect(textX, textY, 24 * panel.sfx.volumeScale, panel.tileSize/2);
|
||||||
|
|
||||||
|
panel.config.save();
|
||||||
|
}
|
||||||
|
private void optionsControls(int frameX, int frameY) {
|
||||||
|
int textX;
|
||||||
|
int textY;
|
||||||
|
|
||||||
|
// TITLE
|
||||||
|
String text = "Controls";
|
||||||
|
textX = getCenteredX(text);
|
||||||
|
textY = frameY + panel.tileSize;
|
||||||
|
graphics2d.drawString(text, textX, textY);
|
||||||
|
|
||||||
|
textX = frameX + panel.tileSize;
|
||||||
|
textY +=panel.tileSize;
|
||||||
|
String[] options = {"Move", "Confirm/Attack", "Shoot/Cast", "Inventory", "Pause/Settings"};
|
||||||
|
for(String option : options) {
|
||||||
|
graphics2d.drawString(option, textX, textY);
|
||||||
|
textY += panel.tileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
textX = frameX + panel.tileSize*6;
|
||||||
|
textY = frameY + panel.tileSize*2;
|
||||||
|
options = new String[]{"WASD", "SPACE", "F", "C", "ESC"};
|
||||||
|
for(String option : options) {
|
||||||
|
graphics2d.drawString(option, textX, textY);
|
||||||
|
textY += panel.tileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BACK
|
||||||
|
textX = frameX + panel.tileSize;
|
||||||
|
textY = frameY + panel.tileSize*9;
|
||||||
|
graphics2d.drawString("Back", textX, textY);
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) optionState = OptionState.OVERVIEW;
|
||||||
|
}
|
||||||
|
private void optionsFSNotify(int frameX, int frameY) {
|
||||||
|
int textX = frameX + panel.tileSize;
|
||||||
|
int textY = frameY + panel.tileSize*3;
|
||||||
|
|
||||||
|
currentDialogue = "The change will take \neffect after restarting \nthe game";
|
||||||
|
for(String line : currentDialogue.split("\n")) {
|
||||||
|
graphics2d.drawString(line, textX, textY);
|
||||||
|
textY += 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BACK
|
||||||
|
textY =frameY + panel.tileSize*9;
|
||||||
|
graphics2d.drawString("Back", textX, textY);
|
||||||
|
if(commandNum == 0) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) optionState = OptionState.OVERVIEW;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void optionsQuitNotify(int frameX, int frameY) {
|
||||||
|
int textX = frameX + panel.tileSize;
|
||||||
|
int textY = frameY + panel.tileSize*3;
|
||||||
|
|
||||||
|
currentDialogue = "Quit the game and \nreturn to the title screen?";
|
||||||
|
for(String line : currentDialogue.split("\n")) {
|
||||||
|
graphics2d.drawString(line, textX, textY);
|
||||||
|
textY += 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DISPLAY OPTIONS
|
||||||
|
String text = "Yes";
|
||||||
|
textX = getCenteredX(text);
|
||||||
|
textY += panel.tileSize*3;
|
||||||
|
graphics2d.drawString(text, textX, textY);
|
||||||
|
if(commandNum == 0) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) {
|
||||||
|
panel.gameState = GameState.TITLE;
|
||||||
|
panel.stopMusic();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
text = "No";
|
||||||
|
textX = getCenteredX(text);
|
||||||
|
textY += panel.tileSize;
|
||||||
|
graphics2d.drawString(text, textX, textY);
|
||||||
|
if(commandNum == 1) {
|
||||||
|
graphics2d.drawString(">", textX-25, textY);
|
||||||
|
if(panel.keyH.spacePressed) optionState = OptionState.OVERVIEW;
|
||||||
|
panel.resetGame(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum OptionState {
|
||||||
|
OVERVIEW,
|
||||||
|
SCREENNF,
|
||||||
|
CONTROLS,
|
||||||
|
QUITNF;
|
||||||
|
}
|
||||||
|
public enum TradeState {
|
||||||
|
SELECT,
|
||||||
|
BUY,
|
||||||
|
SELL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ public enum Direction {
|
|||||||
UP,
|
UP,
|
||||||
DOWN,
|
DOWN,
|
||||||
LEFT,
|
LEFT,
|
||||||
RIGHT
|
RIGHT;
|
||||||
|
|
||||||
|
public Direction getOpposite() {
|
||||||
|
return switch (this) {
|
||||||
|
case UP -> DOWN;
|
||||||
|
case DOWN -> UP;
|
||||||
|
case LEFT -> RIGHT;
|
||||||
|
case RIGHT -> LEFT;
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,16 @@ public enum EntityType {
|
|||||||
NPC,
|
NPC,
|
||||||
MONSTER,
|
MONSTER,
|
||||||
ITEM,
|
ITEM,
|
||||||
WORLD
|
OBSTACLE,
|
||||||
|
PICKUP,
|
||||||
|
PROJECTILE,
|
||||||
|
WEAPON,
|
||||||
|
LIGHT,
|
||||||
|
SHIELD;
|
||||||
|
|
||||||
|
public enum WeaponType {
|
||||||
|
SWORD,
|
||||||
|
AXE
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,18 @@ package de.miaurizius.jgame2d.core.enums;
|
|||||||
|
|
||||||
public enum GameState {
|
public enum GameState {
|
||||||
|
|
||||||
|
// SCENES
|
||||||
PLAY,
|
PLAY,
|
||||||
PAUSE,
|
PAUSE,
|
||||||
DIALOGUE,
|
|
||||||
TITLE,
|
TITLE,
|
||||||
CHARACTER,
|
|
||||||
|
// IN-GAME
|
||||||
|
CHARACTER, //inventory
|
||||||
|
DIALOGUE,
|
||||||
|
GAMEOVER,
|
||||||
|
TRANSITION,
|
||||||
|
TRADE,
|
||||||
|
SLEEP,
|
||||||
|
MAP,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
23
src/de/miaurizius/jgame2d/core/enums/Map.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package de.miaurizius.jgame2d.core.enums;
|
||||||
|
|
||||||
|
public enum Map {
|
||||||
|
|
||||||
|
OVERWORLD("worldmap", 0),
|
||||||
|
HUT("indoor01", 1);
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final int index;
|
||||||
|
|
||||||
|
Map(String name, int index) {
|
||||||
|
this.name = name;
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,15 @@
|
|||||||
package de.miaurizius.jgame2d.core.handlers;
|
package de.miaurizius.jgame2d.core.handlers;
|
||||||
|
|
||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.Map;
|
||||||
|
import de.miaurizius.jgame2d.entity.item.*;
|
||||||
|
import de.miaurizius.jgame2d.entity.monster.OrcMON;
|
||||||
|
import de.miaurizius.jgame2d.entity.npc.MerchantNPC;
|
||||||
import de.miaurizius.jgame2d.entity.npc.OldManNPC;
|
import de.miaurizius.jgame2d.entity.npc.OldManNPC;
|
||||||
import de.miaurizius.jgame2d.entity.monster.GreenSlimeMON;
|
import de.miaurizius.jgame2d.entity.monster.GreenSlimeMON;
|
||||||
|
import de.miaurizius.jgame2d.entity.obstacle.ChestObj;
|
||||||
|
import de.miaurizius.jgame2d.entity.obstacle.DoorObj;
|
||||||
|
import de.miaurizius.jgame2d.tile.interactive.DryTreeTI;
|
||||||
|
|
||||||
public class AssetSetter {
|
public class AssetSetter {
|
||||||
|
|
||||||
@@ -13,40 +20,104 @@ public class AssetSetter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setObject() {
|
public void setObject() {
|
||||||
|
int i = 0;
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i] = new AxeObj(panel);
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*33;
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*21;
|
||||||
|
i++;
|
||||||
|
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i] = new DoorObj(panel);
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*14;
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*28;
|
||||||
|
i++;
|
||||||
|
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i] = new DoorObj(panel);
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*12;
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*12;
|
||||||
|
i++;
|
||||||
|
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i] = new ChestObj(panel, new KeyObj(panel));
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*30;
|
||||||
|
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*29;
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNPC() {
|
public void setNPC() {
|
||||||
panel.npc[0] = new OldManNPC(panel);
|
panel.npc[Map.OVERWORLD.getIndex()][0] = new OldManNPC(panel);
|
||||||
panel.npc[0].worldX = panel.tileSize*21;
|
panel.npc[Map.OVERWORLD.getIndex()][0].worldX = panel.tileSize*21;
|
||||||
panel.npc[0].worldY = panel.tileSize*21;
|
panel.npc[Map.OVERWORLD.getIndex()][0].worldY = panel.tileSize*21;
|
||||||
|
|
||||||
|
panel.npc[Map.HUT.getIndex()][0] = new MerchantNPC(panel);
|
||||||
|
panel.npc[Map.HUT.getIndex()][0].worldX = panel.tileSize*12;
|
||||||
|
panel.npc[Map.HUT.getIndex()][0].worldY = panel.tileSize*7;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMonster() {
|
public void setMonster() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
panel.monster[i] = new GreenSlimeMON(panel);
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new GreenSlimeMON(panel);
|
||||||
panel.monster[i].worldX = panel.tileSize*23;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*23;
|
||||||
panel.monster[i].worldY = panel.tileSize*36;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*36;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
panel.monster[i] = new GreenSlimeMON(panel);
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new GreenSlimeMON(panel);
|
||||||
panel.monster[i].worldX = panel.tileSize*23;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*23;
|
||||||
panel.monster[i].worldY = panel.tileSize*37;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*37;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
panel.monster[i] = new GreenSlimeMON(panel);
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new GreenSlimeMON(panel);
|
||||||
panel.monster[i].worldX = panel.tileSize*24;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*24;
|
||||||
panel.monster[i].worldY = panel.tileSize*37;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*37;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
panel.monster[i] = new GreenSlimeMON(panel);
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new GreenSlimeMON(panel);
|
||||||
panel.monster[i].worldX = panel.tileSize*34;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*34;
|
||||||
panel.monster[i].worldY = panel.tileSize*42;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*42;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
panel.monster[i] = new GreenSlimeMON(panel);
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new GreenSlimeMON(panel);
|
||||||
panel.monster[i].worldX = panel.tileSize*38;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*38;
|
||||||
panel.monster[i].worldY = panel.tileSize*42;
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*42;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
panel.monster[Map.OVERWORLD.getIndex()][i] = new OrcMON(panel);
|
||||||
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*12;
|
||||||
|
panel.monster[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*33;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setITiles() {
|
||||||
|
int i = 0;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,28,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,29,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,30,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,31,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,32,12);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,33,12);i++;
|
||||||
|
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,30,21);i++;
|
||||||
|
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,25,27);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,26,27);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,27);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,28);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,29);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,30);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,27,31);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,28,31);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,29,31);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,30,31);i++;
|
||||||
|
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,18,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,17,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,16,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,15,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,14,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,13,40);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,13,41);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,12,41);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,11,41);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,10,41);i++;
|
||||||
|
panel.iTile[Map.OVERWORLD.getIndex()][i] = new DryTreeTI(panel,10,40);i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package de.miaurizius.jgame2d.core.handlers;
|
package de.miaurizius.jgame2d.core.handlers;
|
||||||
|
|
||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.Direction;
|
||||||
import de.miaurizius.jgame2d.entity.Entity;
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
public class CollisionHandler {
|
public class CollisionHandler {
|
||||||
@@ -25,29 +26,33 @@ public class CollisionHandler {
|
|||||||
|
|
||||||
int tileNum1, tileNum2;
|
int tileNum1, tileNum2;
|
||||||
|
|
||||||
switch(entity.direction) {
|
// TEMP DIRECTION FOR KNOCKBACK
|
||||||
|
Direction direction = entity.direction;
|
||||||
|
if(entity.knockback) direction = entity.knockbackDirection;
|
||||||
|
|
||||||
|
switch(direction) {
|
||||||
case UP:
|
case UP:
|
||||||
entityTopRow = (entityTopWorldY - entity.speed)/panel.tileSize;
|
entityTopRow = (entityTopWorldY - entity.speed)/panel.tileSize;
|
||||||
tileNum1 = panel.tileM.mapTileNum[entityLeftCol][entityTopRow];
|
tileNum1 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityLeftCol][entityTopRow];
|
||||||
tileNum2 = panel.tileM.mapTileNum[entityRightCol][entityTopRow];
|
tileNum2 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityRightCol][entityTopRow];
|
||||||
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
||||||
break;
|
break;
|
||||||
case DOWN:
|
case DOWN:
|
||||||
entityBottomRow = (entityBottomWorldY + entity.speed)/panel.tileSize;
|
entityBottomRow = (entityBottomWorldY + entity.speed)/panel.tileSize;
|
||||||
tileNum1 = panel.tileM.mapTileNum[entityLeftCol][entityBottomRow];
|
tileNum1 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityLeftCol][entityBottomRow];
|
||||||
tileNum2 = panel.tileM.mapTileNum[entityRightCol][entityBottomRow];
|
tileNum2 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityRightCol][entityBottomRow];
|
||||||
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
||||||
break;
|
break;
|
||||||
case LEFT:
|
case LEFT:
|
||||||
entityLeftCol = (entityLeftWorldX - entity.speed)/panel.tileSize;
|
entityLeftCol = (entityLeftWorldX - entity.speed)/panel.tileSize;
|
||||||
tileNum1 = panel.tileM.mapTileNum[entityLeftCol][entityTopRow];
|
tileNum1 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityLeftCol][entityTopRow];
|
||||||
tileNum2 = panel.tileM.mapTileNum[entityLeftCol][entityBottomRow];
|
tileNum2 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityLeftCol][entityBottomRow];
|
||||||
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
||||||
break;
|
break;
|
||||||
case RIGHT:
|
case RIGHT:
|
||||||
entityRightCol = (entityRightWorldX + entity.speed)/panel.tileSize;
|
entityRightCol = (entityRightWorldX + entity.speed)/panel.tileSize;
|
||||||
tileNum1 = panel.tileM.mapTileNum[entityRightCol][entityTopRow];
|
tileNum1 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityRightCol][entityTopRow];
|
||||||
tileNum2 = panel.tileM.mapTileNum[entityRightCol][entityBottomRow];
|
tileNum2 = panel.tileM.mapTileNum[panel.currentMap.getIndex()][entityRightCol][entityBottomRow];
|
||||||
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
if(panel.tileM.tile[tileNum1].collision || panel.tileM.tile[tileNum2].collision) entity.collisionOn = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -56,7 +61,7 @@ public class CollisionHandler {
|
|||||||
int index = 999;
|
int index = 999;
|
||||||
int c = -1;
|
int c = -1;
|
||||||
|
|
||||||
for(Entity obj : panel.obj) {
|
for(Entity obj : panel.obj[panel.currentMap.getIndex()]) {
|
||||||
c++;
|
c++;
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +1,49 @@
|
|||||||
package de.miaurizius.jgame2d.core.handlers;
|
package de.miaurizius.jgame2d.core.handlers;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.Boot;
|
||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
import de.miaurizius.jgame2d.core.enums.Direction;
|
import de.miaurizius.jgame2d.core.enums.Direction;
|
||||||
import de.miaurizius.jgame2d.core.enums.GameState;
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.Map;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class EventHandler {
|
public class EventHandler {
|
||||||
|
|
||||||
GamePanel panel;
|
GamePanel panel;
|
||||||
EventRect[][] eventRect;
|
EventRect[][][] eventRect;
|
||||||
int prevEventX, prevEventY;
|
public int prevEventX, prevEventY;
|
||||||
boolean canTouchEvent = true;
|
boolean canTouchEvent = true;
|
||||||
|
|
||||||
|
// TMP VARS FOR TRANSITION
|
||||||
|
public int tempCol, tempRow;
|
||||||
|
public Map tempMap;
|
||||||
|
|
||||||
public EventHandler(GamePanel panel) {
|
public EventHandler(GamePanel panel) {
|
||||||
this.panel = panel;
|
this.panel = panel;
|
||||||
eventRect = new EventRect[panel.maxWorldCol][panel.maxWorldRow];
|
eventRect = new EventRect[Map.values().length][panel.maxWorldCol][panel.maxWorldRow];
|
||||||
|
|
||||||
|
int map = 0;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
int row = 0;
|
int row = 0;
|
||||||
while(col < panel.maxWorldCol && row < panel.maxWorldRow) {
|
while(map < Map.values().length && col < panel.maxWorldCol && row < panel.maxWorldRow) {
|
||||||
eventRect[col][row] = new EventRect();
|
eventRect[map][col][row] = new EventRect();
|
||||||
eventRect[col][row].x = 23;
|
eventRect[map][col][row].x = 23;
|
||||||
eventRect[col][row].y = 23;
|
eventRect[map][col][row].y = 23;
|
||||||
eventRect[col][row].width = 2;
|
eventRect[map][col][row].width = 2;
|
||||||
eventRect[col][row].height = 2;
|
eventRect[map][col][row].height = 2;
|
||||||
eventRect[col][row].eventRectDefaultX = eventRect[col][row].x;
|
eventRect[map][col][row].eventRectDefaultX = eventRect[map][col][row].x;
|
||||||
eventRect[col][row].eventRectDefaultY = eventRect[col][row].y;
|
eventRect[map][col][row].eventRectDefaultY = eventRect[map][col][row].y;
|
||||||
col++;
|
col++;
|
||||||
if(col == panel.maxWorldCol) {
|
if(col == panel.maxWorldCol) {
|
||||||
col = 0;
|
col = 0;
|
||||||
row++;
|
row++;
|
||||||
|
if(row == panel.maxWorldRow) {
|
||||||
|
row = 0;
|
||||||
|
map++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,23 +56,31 @@ public class EventHandler {
|
|||||||
if(distance > panel.tileSize) canTouchEvent = true;
|
if(distance > panel.tileSize) canTouchEvent = true;
|
||||||
if(!canTouchEvent) return;
|
if(!canTouchEvent) return;
|
||||||
|
|
||||||
if(hit(27,16, Direction.RIGHT)) damagePit(GameState.DIALOGUE);
|
// PIT/POOL TESTS
|
||||||
if(hit(23,12, null)) healingPool(GameState.DIALOGUE);
|
if(hit(Map.OVERWORLD, 27,16, Direction.RIGHT)) damagePit();
|
||||||
|
else if(hit(Map.OVERWORLD, 23,12, null)) healingPool();
|
||||||
|
|
||||||
|
// HUT
|
||||||
|
else if(hit(Map.OVERWORLD, 10, 39, null)) changeMap(Map.HUT, 12, 13);
|
||||||
|
else if(hit(Map.HUT, 12, 13, null)) changeMap(Map.OVERWORLD, 10, 39);
|
||||||
|
|
||||||
|
// ADVANCED SPEAKING
|
||||||
|
else if(hit(Map.HUT, 12, 9, Direction.UP)) speak(panel.npc[Map.HUT.getIndex()][0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param reqDirection Set to null if no direction is required
|
* @param reqDirection Set to null if no direction is required
|
||||||
*/
|
*/
|
||||||
public boolean hit(int eventCol, int eventRow, Direction reqDirection) {
|
private boolean hit(Map map, int eventCol, int eventRow, Direction reqDirection) {
|
||||||
boolean hit = false;
|
boolean hit = false;
|
||||||
panel.player.solidArea.x = panel.player.worldX + panel.player.solidArea.x;
|
panel.player.solidArea.x = panel.player.worldX + panel.player.solidArea.x;
|
||||||
panel.player.solidArea.y = panel.player.worldY + panel.player.solidArea.y;
|
panel.player.solidArea.y = panel.player.worldY + panel.player.solidArea.y;
|
||||||
eventRect[eventCol][eventRow].x = eventCol*panel.tileSize + eventRect[eventCol][eventRow].x;
|
eventRect[map.getIndex()][eventCol][eventRow].x = eventCol*panel.tileSize + eventRect[map.getIndex()][eventCol][eventRow].x;
|
||||||
eventRect[eventCol][eventRow].y = eventRow*panel.tileSize + eventRect[eventCol][eventRow].y;
|
eventRect[map.getIndex()][eventCol][eventRow].y = eventRow*panel.tileSize + eventRect[map.getIndex()][eventCol][eventRow].y;
|
||||||
if(
|
if(
|
||||||
panel.player.solidArea.intersects(eventRect[eventCol][eventRow]) &&
|
panel.player.solidArea.intersects(eventRect[map.getIndex()][eventCol][eventRow]) &&
|
||||||
(reqDirection == null || panel.player.direction == reqDirection) &&
|
(reqDirection == null || panel.player.direction == reqDirection) &&
|
||||||
!eventRect[eventCol][eventRow].eventDone
|
!eventRect[map.getIndex()][eventCol][eventRow].eventDone
|
||||||
) {
|
) {
|
||||||
hit = true;
|
hit = true;
|
||||||
prevEventX = panel.player.worldX;
|
prevEventX = panel.player.worldX;
|
||||||
@@ -67,28 +88,47 @@ public class EventHandler {
|
|||||||
}
|
}
|
||||||
panel.player.solidArea.x = panel.player.solidAreaDefaultX;
|
panel.player.solidArea.x = panel.player.solidAreaDefaultX;
|
||||||
panel.player.solidArea.y = panel.player.solidAreaDefaultY;
|
panel.player.solidArea.y = panel.player.solidAreaDefaultY;
|
||||||
eventRect[eventCol][eventRow].x = eventRect[eventCol][eventRow].eventRectDefaultX;
|
eventRect[map.getIndex()][eventCol][eventRow].x = eventRect[map.getIndex()][eventCol][eventRow].eventRectDefaultX;
|
||||||
eventRect[eventCol][eventRow].y = eventRect[eventCol][eventRow].eventRectDefaultY;
|
eventRect[map.getIndex()][eventCol][eventRow].y = eventRect[map.getIndex()][eventCol][eventRow].eventRectDefaultY;
|
||||||
|
if(panel.currentMap != map) hit = false;
|
||||||
return hit;
|
return hit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void damagePit(GameState gameState) {
|
private void damagePit() {
|
||||||
panel.gameState = gameState;
|
panel.gameState = GameState.DIALOGUE;
|
||||||
panel.playSE(6);
|
panel.playSE(6);
|
||||||
panel.ui.currentDialogue = "You have fallen into a pit!";
|
panel.ui.currentDialogue = "You have fallen into a pit!";
|
||||||
panel.player.life -= 1;
|
panel.player.life -= 1;
|
||||||
canTouchEvent = false;
|
canTouchEvent = false;
|
||||||
}
|
}
|
||||||
|
private void healingPool() {
|
||||||
public void healingPool(GameState gameState) {
|
|
||||||
if(!panel.keyH.spacePressed) return;
|
if(!panel.keyH.spacePressed) return;
|
||||||
panel.gameState = gameState;
|
panel.gameState = GameState.DIALOGUE;
|
||||||
panel.player.attackCancel = true;
|
panel.player.attackCancel = true;
|
||||||
panel.playSE(2);
|
panel.playSE(2);
|
||||||
panel.ui.currentDialogue = "You drank the holy water.\nYour life has been recovered!\nBut all monsters respawned... \nGood luck!";
|
panel.ui.currentDialogue = "You saved your progress!";
|
||||||
panel.player.life = panel.player.maxLife;
|
//panel.player.life = panel.player.maxLife;
|
||||||
canTouchEvent = false;
|
canTouchEvent = false;
|
||||||
panel.assetSetter.setMonster();
|
panel.assetSetter.setMonster();
|
||||||
|
try {
|
||||||
|
panel.saveLoad.save();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Boot.logger.log(Level.SEVERE, "Saving game failed!", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void changeMap(Map map, int col, int row) {
|
||||||
|
panel.gameState = GameState.TRANSITION;
|
||||||
|
tempMap = map;
|
||||||
|
tempCol = col;
|
||||||
|
tempRow = row;
|
||||||
|
canTouchEvent = false;
|
||||||
|
panel.playSE(13);
|
||||||
|
}
|
||||||
|
private void speak(Entity entity) {
|
||||||
|
if(!panel.keyH.spacePressed) return;
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
panel.player.attackCancel = true;
|
||||||
|
entity.speak();
|
||||||
}
|
}
|
||||||
|
|
||||||
static private class EventRect extends Rectangle {
|
static private class EventRect extends Rectangle {
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
package de.miaurizius.jgame2d.core.handlers;
|
package de.miaurizius.jgame2d.core.handlers;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.Boot;
|
||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.UI;
|
||||||
import de.miaurizius.jgame2d.core.enums.GameState;
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.Map;
|
||||||
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.KeyListener;
|
import java.awt.event.KeyListener;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class KeyHandler implements KeyListener {
|
public class KeyHandler implements KeyListener {
|
||||||
|
|
||||||
public boolean upPressed, downPressed, leftPressed, rightPressed, spacePressed;
|
public boolean upPressed, downPressed, leftPressed, rightPressed, spacePressed, shotKeyPressed, CTLKeyPressed;
|
||||||
public GamePanel panel;
|
public GamePanel panel;
|
||||||
public boolean debug;
|
public boolean debug;
|
||||||
|
|
||||||
@@ -17,7 +21,7 @@ public class KeyHandler implements KeyListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STATE SPECIFIC KEYBIND CONFIGURATION
|
// STATE SPECIFIC KEYBIND CONFIGURATION
|
||||||
public void handleTitle(int code) {
|
private void handleTitle(int code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case KeyEvent.VK_UP -> {
|
case KeyEvent.VK_UP -> {
|
||||||
if(panel.ui.commandNum != 0) panel.ui.commandNum--;
|
if(panel.ui.commandNum != 0) panel.ui.commandNum--;
|
||||||
@@ -25,14 +29,22 @@ public class KeyHandler implements KeyListener {
|
|||||||
case KeyEvent.VK_DOWN -> {
|
case KeyEvent.VK_DOWN -> {
|
||||||
if(panel.ui.commandNum != 2) panel.ui.commandNum++;
|
if(panel.ui.commandNum != 2) panel.ui.commandNum++;
|
||||||
}
|
}
|
||||||
case KeyEvent.VK_ENTER -> {
|
case KeyEvent.VK_ENTER, KeyEvent.VK_SPACE -> {
|
||||||
switch (panel.ui.commandNum) {
|
switch (panel.ui.commandNum) {
|
||||||
case 0:
|
case 0:
|
||||||
panel.gameState = GameState.PLAY;
|
panel.gameState = GameState.PLAY;
|
||||||
panel.playMusic(0);
|
panel.playMusic(0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// add later
|
System.out.printf("Loading config...%n");
|
||||||
|
try {
|
||||||
|
panel.config.load();
|
||||||
|
panel.saveLoad.load();
|
||||||
|
panel.gameState = GameState.PLAY;
|
||||||
|
panel.playMusic(0);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Boot.logger.log(Level.SEVERE, "Failed to load config", e);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
@@ -41,37 +53,213 @@ public class KeyHandler implements KeyListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void handlePlay(int code) {
|
private void handlePlay(int code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
// CONTROLS
|
// CONTROLS
|
||||||
case KeyEvent.VK_W, KeyEvent.VK_UP -> upPressed = true;
|
case KeyEvent.VK_W, KeyEvent.VK_UP -> upPressed = true;
|
||||||
case KeyEvent.VK_S, KeyEvent.VK_DOWN -> downPressed = true;
|
case KeyEvent.VK_S, KeyEvent.VK_DOWN -> downPressed = true;
|
||||||
case KeyEvent.VK_A, KeyEvent.VK_LEFT -> leftPressed = true;
|
case KeyEvent.VK_A, KeyEvent.VK_LEFT -> leftPressed = true;
|
||||||
case KeyEvent.VK_D, KeyEvent.VK_RIGHT -> rightPressed = true;
|
case KeyEvent.VK_D, KeyEvent.VK_RIGHT -> rightPressed = true;
|
||||||
|
case KeyEvent.VK_CONTROL -> CTLKeyPressed = true;
|
||||||
case KeyEvent.VK_SPACE -> spacePressed = true;
|
case KeyEvent.VK_SPACE -> spacePressed = true;
|
||||||
|
//case KeyEvent.VK_F -> shotKeyPressed = true;
|
||||||
|
|
||||||
|
// MINI MAP TOGGLE
|
||||||
|
case KeyEvent.VK_X -> panel.mapMan.miniMapOn = !panel.mapMan.miniMapOn;
|
||||||
|
|
||||||
// DEBUG OPTIONS
|
// DEBUG OPTIONS
|
||||||
case KeyEvent.VK_T -> debug = !debug;
|
case KeyEvent.VK_T -> debug = !debug;
|
||||||
case KeyEvent.VK_R -> panel.tileM.loadMap(panel.currentMap);
|
case KeyEvent.VK_R -> {for(Map m : Map.values()) panel.tileM.loadMap(m);}
|
||||||
|
|
||||||
// GAME STATES
|
// GAME STATES
|
||||||
case KeyEvent.VK_ESCAPE -> panel.gameState = GameState.PAUSE;
|
case KeyEvent.VK_ESCAPE -> {
|
||||||
|
panel.gameState = GameState.PAUSE;
|
||||||
|
panel.ui.optionState = UI.OptionState.OVERVIEW;
|
||||||
|
panel.ui.commandNum = 0;
|
||||||
|
}
|
||||||
case KeyEvent.VK_C -> panel.gameState = GameState.CHARACTER;
|
case KeyEvent.VK_C -> panel.gameState = GameState.CHARACTER;
|
||||||
|
case KeyEvent.VK_M -> panel.gameState = GameState.MAP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void handlePause(int code) {
|
private void handlePause(int code) {
|
||||||
|
if(code == KeyEvent.VK_SPACE) spacePressed = true;
|
||||||
|
|
||||||
|
int maxCommandNum = 0;
|
||||||
|
|
||||||
|
switch (panel.ui.optionState) {
|
||||||
|
case OVERVIEW -> maxCommandNum = 5;
|
||||||
|
case QUITNF -> maxCommandNum = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(code) {
|
||||||
|
case KeyEvent.VK_UP:
|
||||||
|
if(panel.ui.commandNum <= 0) break;
|
||||||
|
panel.ui.commandNum--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_DOWN:
|
||||||
|
if(panel.ui.commandNum >= maxCommandNum) break;
|
||||||
|
panel.ui.commandNum++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_LEFT:
|
||||||
|
if(panel.ui.optionState == UI.OptionState.OVERVIEW)
|
||||||
|
if(panel.ui.commandNum == 1 && panel.music.volumeScale > 0) {
|
||||||
|
panel.music.volumeScale--;
|
||||||
|
panel.music.checkVolume();
|
||||||
|
panel.playSE(9);
|
||||||
|
} else if(panel.ui.commandNum == 2 && panel.sfx.volumeScale > 0) {
|
||||||
|
panel.sfx.volumeScale--;
|
||||||
|
panel.playSE(9);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_RIGHT:
|
||||||
|
if(panel.ui.optionState == UI.OptionState.OVERVIEW) {
|
||||||
|
if(panel.ui.commandNum == 1 && panel.music.volumeScale < 5) {
|
||||||
|
panel.music.volumeScale++;
|
||||||
|
panel.music.checkVolume();
|
||||||
|
panel.playSE(9);
|
||||||
|
} else if(panel.ui.commandNum == 2 && panel.sfx.volumeScale < 5) {
|
||||||
|
panel.sfx.volumeScale++;
|
||||||
|
panel.playSE(9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// EXIT STATE
|
// EXIT STATE
|
||||||
if(code == KeyEvent.VK_ESCAPE) panel.gameState = GameState.PLAY;
|
if(code == KeyEvent.VK_ESCAPE)
|
||||||
|
if(panel.ui.optionState == UI.OptionState.OVERVIEW) panel.gameState = GameState.PLAY; else panel.ui.optionState = UI.OptionState.OVERVIEW;
|
||||||
}
|
}
|
||||||
public void handleDialogue(int code) {
|
private void handleDialogue(int code) {
|
||||||
// EXIT STATE
|
// EXIT STATE
|
||||||
if (code == KeyEvent.VK_SPACE) {
|
if (code == KeyEvent.VK_SPACE) {
|
||||||
panel.gameState = GameState.PLAY;
|
panel.gameState = GameState.PLAY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void handleCharacter(int code) {
|
private void handleCharacter(int code) {
|
||||||
// EXIT STATE
|
switch (code) {
|
||||||
if(code == KeyEvent.VK_C) panel.gameState = GameState.PLAY;
|
case KeyEvent.VK_UP, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT -> playerInventory(code);
|
||||||
|
case KeyEvent.VK_SPACE -> panel.player.selectItem();
|
||||||
|
|
||||||
|
// EXIT STATE
|
||||||
|
case KeyEvent.VK_C, KeyEvent.VK_ESCAPE -> panel.gameState = GameState.PLAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void handleGameOver(int code) {
|
||||||
|
switch(code) {
|
||||||
|
case KeyEvent.VK_UP:
|
||||||
|
if (panel.ui.commandNum <= 0) break;
|
||||||
|
panel.ui.commandNum--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_DOWN:
|
||||||
|
if (panel.ui.commandNum >= 1) break;
|
||||||
|
panel.ui.commandNum++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_SPACE:
|
||||||
|
if(panel.ui.commandNum == 0) {
|
||||||
|
panel.gameState = GameState.PLAY;
|
||||||
|
panel.playMusic(0);
|
||||||
|
panel.resetGame(false);
|
||||||
|
}
|
||||||
|
if(panel.ui.commandNum == 1) {
|
||||||
|
panel.gameState = GameState.TITLE;
|
||||||
|
panel.ui.commandNum = 0;
|
||||||
|
panel.resetGame(true);
|
||||||
|
panel.stopMusic();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void handleTrade(int code) {
|
||||||
|
if(code == KeyEvent.VK_SPACE) spacePressed = true;
|
||||||
|
if(panel.ui.tradeState == UI.TradeState.SELECT) {
|
||||||
|
switch (code) {
|
||||||
|
case KeyEvent.VK_UP:
|
||||||
|
if (panel.ui.commandNum <= 0) break;
|
||||||
|
panel.ui.commandNum--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_DOWN:
|
||||||
|
if (panel.ui.commandNum >= 2) break;
|
||||||
|
panel.ui.commandNum++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(panel.ui.tradeState == UI.TradeState.BUY) {
|
||||||
|
npcInventory(code);
|
||||||
|
if(code == KeyEvent.VK_ESCAPE) panel.ui.tradeState = UI.TradeState.SELECT;
|
||||||
|
}
|
||||||
|
if(panel.ui.tradeState == UI.TradeState.SELL) {
|
||||||
|
playerInventory(code);
|
||||||
|
if(code == KeyEvent.VK_ESCAPE) panel.ui.tradeState = UI.TradeState.SELECT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void handleMap(int code) {
|
||||||
|
switch (code) {
|
||||||
|
// EXIT STATE
|
||||||
|
case KeyEvent.VK_M, KeyEvent.VK_ESCAPE -> panel.gameState = GameState.PLAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// UTILITY
|
||||||
|
private void playerInventory(int code) {
|
||||||
|
switch (code) {
|
||||||
|
case KeyEvent.VK_UP:
|
||||||
|
if(panel.ui.playerSlotRow == 0) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.playerSlotRow--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_DOWN:
|
||||||
|
if(panel.ui.playerSlotRow == 3) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.playerSlotRow++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_LEFT:
|
||||||
|
if(panel.ui.playerSlotCol == 0) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.playerSlotCol--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_RIGHT:
|
||||||
|
if(panel.ui.playerSlotCol == 4) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.playerSlotCol++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void npcInventory(int code) {
|
||||||
|
switch (code) {
|
||||||
|
case KeyEvent.VK_UP:
|
||||||
|
if(panel.ui.npcSlotRow == 0) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.npcSlotRow--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_DOWN:
|
||||||
|
if(panel.ui.npcSlotRow == 3) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.npcSlotRow++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_LEFT:
|
||||||
|
if(panel.ui.npcSlotCol == 0) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.npcSlotCol--;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
case KeyEvent.VK_RIGHT:
|
||||||
|
if(panel.ui.npcSlotCol == 4) break;
|
||||||
|
if(panel.sfx.clips[9].isRunning()) break;
|
||||||
|
panel.ui.npcSlotCol++;
|
||||||
|
panel.playSE(9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// KEY-LISTENER
|
// KEY-LISTENER
|
||||||
@@ -81,21 +269,14 @@ public class KeyHandler implements KeyListener {
|
|||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
int code = e.getKeyCode();
|
int code = e.getKeyCode();
|
||||||
switch(panel.gameState) {
|
switch(panel.gameState) {
|
||||||
case PLAY:
|
case PLAY -> handlePlay(code);
|
||||||
handlePlay(code);
|
case DIALOGUE -> handleDialogue(code);
|
||||||
break;
|
case TITLE -> handleTitle(code);
|
||||||
case DIALOGUE:
|
case PAUSE -> handlePause(code);
|
||||||
handleDialogue(code);
|
case CHARACTER -> handleCharacter(code);
|
||||||
break;
|
case GAMEOVER -> handleGameOver(code);
|
||||||
case TITLE:
|
case TRADE -> handleTrade(code);
|
||||||
handleTitle(code);
|
case MAP -> handleMap(code);
|
||||||
break;
|
|
||||||
case PAUSE:
|
|
||||||
handlePause(code);
|
|
||||||
break;
|
|
||||||
case CHARACTER:
|
|
||||||
handleCharacter(code);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@@ -106,6 +287,8 @@ public class KeyHandler implements KeyListener {
|
|||||||
case KeyEvent.VK_S, KeyEvent.VK_DOWN -> downPressed = false;
|
case KeyEvent.VK_S, KeyEvent.VK_DOWN -> downPressed = false;
|
||||||
case KeyEvent.VK_A, KeyEvent.VK_LEFT -> leftPressed = false;
|
case KeyEvent.VK_A, KeyEvent.VK_LEFT -> leftPressed = false;
|
||||||
case KeyEvent.VK_D, KeyEvent.VK_RIGHT -> rightPressed = false;
|
case KeyEvent.VK_D, KeyEvent.VK_RIGHT -> rightPressed = false;
|
||||||
|
case KeyEvent.VK_CONTROL -> CTLKeyPressed = false;
|
||||||
|
case KeyEvent.VK_F -> shotKeyPressed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,15 +5,19 @@ import de.miaurizius.jgame2d.core.Boot;
|
|||||||
import javax.sound.sampled.AudioInputStream;
|
import javax.sound.sampled.AudioInputStream;
|
||||||
import javax.sound.sampled.AudioSystem;
|
import javax.sound.sampled.AudioSystem;
|
||||||
import javax.sound.sampled.Clip;
|
import javax.sound.sampled.Clip;
|
||||||
|
import javax.sound.sampled.FloatControl;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class Sound {
|
public class Sound {
|
||||||
|
|
||||||
Clip clip;
|
public Clip clip;
|
||||||
URL[] soundURL = new URL[30];
|
URL[] soundURL = new URL[30];
|
||||||
public Clip[] clips = new Clip[30];
|
public Clip[] clips = new Clip[30];
|
||||||
|
public FloatControl fc;
|
||||||
|
public int volumeScale = 3;
|
||||||
|
float volume;
|
||||||
|
|
||||||
public Sound() {
|
public Sound() {
|
||||||
load(0, "assets/sounds/BlueBoyAdventure.wav");
|
load(0, "assets/sounds/BlueBoyAdventure.wav");
|
||||||
@@ -25,6 +29,14 @@ public class Sound {
|
|||||||
load(6, "assets/sounds/receivedamage.wav");
|
load(6, "assets/sounds/receivedamage.wav");
|
||||||
load(7, "assets/sounds/blocked.wav");
|
load(7, "assets/sounds/blocked.wav");
|
||||||
load(8, "assets/sounds/levelup.wav");
|
load(8, "assets/sounds/levelup.wav");
|
||||||
|
load(9, "assets/sounds/cursor.wav");
|
||||||
|
load(10, "assets/sounds/burning.wav");
|
||||||
|
load(11, "assets/sounds/cuttree.wav");
|
||||||
|
load(12, "assets/sounds/gameover.wav");
|
||||||
|
load(13, "assets/sounds/stairs.wav");
|
||||||
|
load(14, "assets/sounds/sleep.wav");
|
||||||
|
load(15, "assets/sounds/blocked.wav");
|
||||||
|
load(16, "assets/sounds/parry.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@@ -38,6 +50,7 @@ public class Sound {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MANAGER
|
||||||
private void load(int index, String path) {
|
private void load(int index, String path) {
|
||||||
try {
|
try {
|
||||||
AudioInputStream ais = AudioSystem.getAudioInputStream(new File(path));
|
AudioInputStream ais = AudioSystem.getAudioInputStream(new File(path));
|
||||||
@@ -47,9 +60,19 @@ public class Sound {
|
|||||||
Boot.logger.log(Level.SEVERE, "Could not load Sound File: " + soundURL[index], e);
|
Boot.logger.log(Level.SEVERE, "Could not load Sound File: " + soundURL[index], e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop() {
|
public void stop() {
|
||||||
clip.stop();
|
clip.stop();
|
||||||
}
|
}
|
||||||
|
public void checkVolume() {
|
||||||
|
switch(volumeScale) {
|
||||||
|
case 0 -> volume = -80f;
|
||||||
|
case 1 -> volume = -20f;
|
||||||
|
case 2 -> volume = -12f;
|
||||||
|
case 3 -> volume = -5f;
|
||||||
|
case 4 -> volume = 1f;
|
||||||
|
case 5 -> volume = 6f;
|
||||||
|
}
|
||||||
|
fc.setValue(volume);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
88
src/de/miaurizius/jgame2d/data/Config.java
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
package de.miaurizius.jgame2d.data;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class Config {
|
||||||
|
|
||||||
|
private final GamePanel panel;
|
||||||
|
private final HashMap<String, String> settings = new HashMap<>();
|
||||||
|
|
||||||
|
public Config(GamePanel panel) throws IOException {
|
||||||
|
this.panel = panel;
|
||||||
|
for (Setting option : Setting.values()) settings.put(option.name, null);
|
||||||
|
new File("gamedata").mkdirs();
|
||||||
|
new File("gamedata/save").mkdirs();
|
||||||
|
new File("gamedata/config").createNewFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GENERAL
|
||||||
|
public final void save() {
|
||||||
|
try {
|
||||||
|
insertToHash();
|
||||||
|
BufferedWriter writer = new BufferedWriter(new FileWriter("gamedata/config"));
|
||||||
|
settings.forEach((invoke, value) -> {
|
||||||
|
try {
|
||||||
|
writer.write(invoke + ": " + value);
|
||||||
|
writer.newLine();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
writer.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public final void load() {
|
||||||
|
try (BufferedReader reader = new BufferedReader(new FileReader("gamedata/config"))) {
|
||||||
|
List<String> lines = reader.lines().toList();
|
||||||
|
if (lines.isEmpty()) return;
|
||||||
|
Map<String, String> configMap = new HashMap<>();
|
||||||
|
for (String line : lines) {
|
||||||
|
String[] parts = line.split(":\\s*", 2);
|
||||||
|
if (parts.length == 2) {
|
||||||
|
configMap.put(parts[0].trim(), parts[1].trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Setting setting : Setting.values()) {
|
||||||
|
String value = configMap.get(setting.name);
|
||||||
|
if (value != null) {
|
||||||
|
switch (setting) {
|
||||||
|
case FULLSCREEN -> panel.fullscreen = Boolean.parseBoolean(value);
|
||||||
|
case MUSICVOLUME -> panel.music.volumeScale = Integer.parseInt(value);
|
||||||
|
case SFXVOLUME -> panel.sfx.volumeScale = Integer.parseInt(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
insertToHash();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// HELP FUNCTIONS
|
||||||
|
private void insertToHash() {
|
||||||
|
settings.put(Setting.FULLSCREEN.name, String.valueOf(panel.fullscreen));
|
||||||
|
settings.put(Setting.MUSICVOLUME.name, String.valueOf(panel.music.volumeScale));
|
||||||
|
settings.put(Setting.SFXVOLUME.name, String.valueOf(panel.sfx.volumeScale));
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum Setting {
|
||||||
|
FULLSCREEN("fullscreen"),
|
||||||
|
MUSICVOLUME("music-vol"),
|
||||||
|
SFXVOLUME("sfx-vol");
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
Setting(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
28
src/de/miaurizius/jgame2d/data/DataStorage.java
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
package de.miaurizius.jgame2d.data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DataStorage implements Serializable {
|
||||||
|
|
||||||
|
// PLAYER STATS
|
||||||
|
int level;
|
||||||
|
int maxLife;
|
||||||
|
int life;
|
||||||
|
int maxMana;
|
||||||
|
int strength;
|
||||||
|
int dexterity;
|
||||||
|
int attack;
|
||||||
|
int defense;
|
||||||
|
int exp;
|
||||||
|
int nextLevelExp;
|
||||||
|
int coins;
|
||||||
|
int worldX, worldY;
|
||||||
|
|
||||||
|
// PLAYER INVENTORY
|
||||||
|
List<String> itemNames = new ArrayList<>();
|
||||||
|
List<Integer> itemAmounts = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
82
src/de/miaurizius/jgame2d/data/SaveLoad.java
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
package de.miaurizius.jgame2d.data;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
|
public class SaveLoad {
|
||||||
|
|
||||||
|
GamePanel panel;
|
||||||
|
|
||||||
|
public SaveLoad(GamePanel panel) {
|
||||||
|
this.panel = panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity getObject(String itemName) {
|
||||||
|
Entity obj;
|
||||||
|
try {
|
||||||
|
obj = (Entity) Class.forName(itemName).getDeclaredConstructor().newInstance(panel);
|
||||||
|
} catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException |
|
||||||
|
InvocationTargetException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save() throws IOException {
|
||||||
|
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("gamedata/save/savegame.dat"));
|
||||||
|
DataStorage ds = new DataStorage();
|
||||||
|
|
||||||
|
// PLAYER STATS
|
||||||
|
ds.level = panel.player.level;
|
||||||
|
ds.maxLife = panel.player.maxLife;
|
||||||
|
ds.life = panel.player.life;
|
||||||
|
ds.maxMana = panel.player.maxMana;
|
||||||
|
ds.strength = panel.player.strength;
|
||||||
|
ds.dexterity = panel.player.dexterity;
|
||||||
|
ds.attack = panel.player.attack;
|
||||||
|
ds.defense = panel.player.defense;
|
||||||
|
ds.exp = panel.player.exp;
|
||||||
|
ds.nextLevelExp = panel.player.nextLevelExp;
|
||||||
|
ds.coins = panel.player.coins;
|
||||||
|
ds.worldX = panel.player.worldX;
|
||||||
|
ds.worldY = panel.player.worldY;
|
||||||
|
|
||||||
|
// PLAYER INVENTORY
|
||||||
|
for(int i = 0; i < panel.player.inventory.size(); i++) {
|
||||||
|
ds.itemNames.add(panel.player.inventory.get(i).getClass().getName());
|
||||||
|
ds.itemAmounts.add(panel.player.inventory.get(i).amt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// WRITE
|
||||||
|
oos.writeObject(ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() throws ClassNotFoundException, IOException {
|
||||||
|
ObjectInputStream ois = new ObjectInputStream(new FileInputStream("gamedata/save/savegame.dat"));
|
||||||
|
DataStorage ds = (DataStorage) ois.readObject();
|
||||||
|
|
||||||
|
panel.player.level = ds.level;
|
||||||
|
panel.player.maxLife = ds.maxLife;
|
||||||
|
panel.player.life = ds.life;
|
||||||
|
panel.player.maxMana = ds.maxMana;
|
||||||
|
panel.player.strength = ds.strength;
|
||||||
|
panel.player.dexterity = ds.dexterity;
|
||||||
|
panel.player.attack = ds.attack;
|
||||||
|
panel.player.defense = ds.defense;
|
||||||
|
panel.player.exp = ds.exp;
|
||||||
|
panel.player.nextLevelExp = ds.nextLevelExp;
|
||||||
|
panel.player.coins = ds.coins;
|
||||||
|
panel.player.worldX = ds.worldX;
|
||||||
|
panel.player.worldY = ds.worldY;
|
||||||
|
|
||||||
|
for(int i = 0; i < ds.itemNames.size(); i++) {
|
||||||
|
Entity obj = getObject(ds.itemNames.get(i));
|
||||||
|
obj.amt = ds.itemAmounts.get(i);
|
||||||
|
panel.player.inventory.add(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,12 +5,17 @@ import de.miaurizius.jgame2d.core.enums.Direction;
|
|||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
import de.miaurizius.jgame2d.core.Utility;
|
import de.miaurizius.jgame2d.core.Utility;
|
||||||
import de.miaurizius.jgame2d.core.enums.EntityType;
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.entity.particle.Particle;
|
||||||
|
import de.miaurizius.jgame2d.entity.projectile.Projectile;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class Entity {
|
public class Entity {
|
||||||
@@ -18,9 +23,11 @@ public class Entity {
|
|||||||
protected GamePanel panel;
|
protected GamePanel panel;
|
||||||
public BufferedImage up1, up2, down1, down2, left1, left2, right1, right2;
|
public BufferedImage up1, up2, down1, down2, left1, left2, right1, right2;
|
||||||
public BufferedImage attackUp1, attackUp2, attackDown1, attackDown2, attackLeft1, attackLeft2, attackRight1, attackRight2;
|
public BufferedImage attackUp1, attackUp2, attackDown1, attackDown2, attackLeft1, attackLeft2, attackRight1, attackRight2;
|
||||||
|
public BufferedImage guardUp, guardDown, guardLeft, guardRight;
|
||||||
public BufferedImage image, image2, image3;
|
public BufferedImage image, image2, image3;
|
||||||
public Rectangle solidArea = new Rectangle(0, 0, 48, 48);
|
public Rectangle solidArea = new Rectangle(0, 0, 48, 48);
|
||||||
public Rectangle attackArea = new Rectangle(0, 0, 0, 0);
|
public Rectangle attackArea = new Rectangle(0, 0, 0, 0);
|
||||||
|
public Entity attacker;
|
||||||
public int solidAreaDefaultX, solidAreaDefaultY;
|
public int solidAreaDefaultX, solidAreaDefaultY;
|
||||||
public boolean collision;
|
public boolean collision;
|
||||||
protected String[] dialogue = new String[20];
|
protected String[] dialogue = new String[20];
|
||||||
@@ -32,20 +39,29 @@ public class Entity {
|
|||||||
int dialogueIndex;
|
int dialogueIndex;
|
||||||
public boolean collisionOn;
|
public boolean collisionOn;
|
||||||
public boolean invincible;
|
public boolean invincible;
|
||||||
boolean attacking;
|
public boolean transparent;
|
||||||
|
public boolean attacking;
|
||||||
public boolean alive = true;
|
public boolean alive = true;
|
||||||
public boolean dying;
|
public boolean dying;
|
||||||
public boolean hpBarOn;
|
public boolean hpBarOn;
|
||||||
|
public boolean consumable;
|
||||||
|
public boolean onPath;
|
||||||
|
public boolean knockback;
|
||||||
|
public boolean guarding;
|
||||||
|
public Direction knockbackDirection;
|
||||||
|
|
||||||
// COUNTER
|
// COUNTER
|
||||||
public int spriteCounter;
|
public int spriteCount;
|
||||||
public int actionLock;
|
public int actionLock;
|
||||||
public int invincibleCount;
|
public int invincibleCount;
|
||||||
|
public int shotAvailableCount;
|
||||||
int dyingCount;
|
int dyingCount;
|
||||||
int hpBarCounter;
|
int hpBarCount;
|
||||||
|
int knockbackCount;
|
||||||
|
|
||||||
// CHARACTER ATTRIBUTES
|
// CHARACTER ATTRIBUTES
|
||||||
public EntityType type;
|
public EntityType type;
|
||||||
|
public int defaultSpeed;
|
||||||
public String name;
|
public String name;
|
||||||
public int speed;
|
public int speed;
|
||||||
public int maxLife;
|
public int maxLife;
|
||||||
@@ -58,12 +74,27 @@ public class Entity {
|
|||||||
public int exp;
|
public int exp;
|
||||||
public int nextLevelExp;
|
public int nextLevelExp;
|
||||||
public int coins;
|
public int coins;
|
||||||
|
public int maxMana;
|
||||||
|
public int mana;
|
||||||
public Entity currentWeapon;
|
public Entity currentWeapon;
|
||||||
public Entity currentShield;
|
public Entity currentShield;
|
||||||
|
public Entity currentLight;
|
||||||
|
public Projectile projectile;
|
||||||
|
public List<Entity> inventory = new ArrayList<>();
|
||||||
|
public final int maxInvSize = 20;
|
||||||
|
|
||||||
// ITEM ATTRIBUTES
|
// ITEM ATTRIBUTES
|
||||||
|
public EntityType.WeaponType weaponType;
|
||||||
public int attackValue;
|
public int attackValue;
|
||||||
public int defenseValue;
|
public int defenseValue;
|
||||||
|
public String description;
|
||||||
|
public int useCost;
|
||||||
|
public int value;
|
||||||
|
public int price;
|
||||||
|
public int knockbackVal;
|
||||||
|
public boolean stackable;
|
||||||
|
public int amt = 1;
|
||||||
|
public float lightRadius;
|
||||||
|
|
||||||
public Entity(GamePanel panel) {
|
public Entity(GamePanel panel) {
|
||||||
this.panel = panel;
|
this.panel = panel;
|
||||||
@@ -71,48 +102,55 @@ public class Entity {
|
|||||||
|
|
||||||
// DEFAULT
|
// DEFAULT
|
||||||
public void update() {
|
public void update() {
|
||||||
setAction();
|
if(knockback) {
|
||||||
collisionOn = false;
|
checkCollision();
|
||||||
panel.collisionH.checkTile(this);
|
if(collisionOn) {
|
||||||
panel.collisionH.checkObject(this, false);
|
knockbackCount = 0;
|
||||||
panel.collisionH.checkEntity(this, panel.npc);
|
knockback = false;
|
||||||
panel.collisionH.checkEntity(this, panel.monster);
|
speed = defaultSpeed;
|
||||||
boolean contactPlayer = panel.collisionH.checkPlayer(this);
|
invincibleCounting();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.type == EntityType.MONSTER && contactPlayer) {
|
switch(knockbackDirection) {
|
||||||
if(panel.player.invincible) return;
|
|
||||||
panel.playSE(6);
|
|
||||||
|
|
||||||
int damage = attack - panel.player.defense;
|
|
||||||
panel.player.life -= Math.max(damage, 0);
|
|
||||||
|
|
||||||
panel.player.invincible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!collisionOn) {
|
|
||||||
switch (direction) {
|
|
||||||
case UP -> worldY -= speed;
|
case UP -> worldY -= speed;
|
||||||
case DOWN -> worldY += speed;
|
case DOWN -> worldY += speed;
|
||||||
case LEFT ->worldX -= speed;
|
case LEFT ->worldX -= speed;
|
||||||
case RIGHT -> worldX += speed;
|
case RIGHT -> worldX += speed;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
spriteCounter++;
|
knockbackCount++;
|
||||||
if(spriteCounter > 12) {
|
if(knockbackCount != 10) {
|
||||||
if(spriteNum == 1) spriteNum = 2;
|
invincibleCounting();
|
||||||
else if(spriteNum == 2) spriteNum = 1;
|
return;
|
||||||
else spriteNum = 0;
|
}
|
||||||
spriteCounter = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// INVINCIBLE COUNTER
|
knockback = false;
|
||||||
if(!invincible) return;
|
knockbackCount = 0;
|
||||||
invincibleCount++;
|
speed = defaultSpeed;
|
||||||
if(invincibleCount > 40) {
|
} else if(attacking) attacking();
|
||||||
invincible = false;
|
else {
|
||||||
invincibleCount = 0;
|
setAction();
|
||||||
|
checkCollision();
|
||||||
|
|
||||||
|
if(!collisionOn) {
|
||||||
|
switch (direction) {
|
||||||
|
case UP -> worldY -= speed;
|
||||||
|
case DOWN -> worldY += speed;
|
||||||
|
case LEFT ->worldX -= speed;
|
||||||
|
case RIGHT -> worldX += speed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spriteCount++;
|
||||||
|
if(spriteCount > 24) {
|
||||||
|
if(spriteNum == 1) spriteNum = 2;
|
||||||
|
else if(spriteNum == 2) spriteNum = 1;
|
||||||
|
else spriteNum = 0;
|
||||||
|
spriteCount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
invincibleCounting();
|
||||||
}
|
}
|
||||||
public void draw(Graphics2D graphics2d) {
|
public void draw(Graphics2D graphics2d) {
|
||||||
int screenX = worldX - panel.player.worldX + panel.player.screenX;
|
int screenX = worldX - panel.player.worldX + panel.player.screenX;
|
||||||
@@ -132,9 +170,9 @@ public class Entity {
|
|||||||
graphics2d.setColor(new Color(255, 0, 30));
|
graphics2d.setColor(new Color(255, 0, 30));
|
||||||
graphics2d.fillRect(screenX, screenY-5, (int) ((double) panel.tileSize/maxLife)*life, 10);
|
graphics2d.fillRect(screenX, screenY-5, (int) ((double) panel.tileSize/maxLife)*life, 10);
|
||||||
|
|
||||||
hpBarCounter++;
|
hpBarCount++;
|
||||||
if(hpBarCounter > 600) { //bar disappears after 10 seconds
|
if(hpBarCount > 600) { //bar disappears after 10 seconds
|
||||||
hpBarCounter = 0;
|
hpBarCount = 0;
|
||||||
hpBarOn = false;
|
hpBarOn = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,24 +180,90 @@ public class Entity {
|
|||||||
// DRAW ENTITY
|
// DRAW ENTITY
|
||||||
if(invincible) {
|
if(invincible) {
|
||||||
hpBarOn = true;
|
hpBarOn = true;
|
||||||
hpBarCounter = 0;
|
hpBarCount = 0;
|
||||||
changeOpacity(graphics2d, 0.4f);
|
if(transparent) changeOpacity(graphics2d, 0.4f);
|
||||||
}
|
}
|
||||||
if(dying) dyingAnimation(graphics2d);
|
if(dying) dyingAnimation(graphics2d);
|
||||||
if(type == EntityType.PLAYER) { // only modify sprite render position for player because I dont know yet how monster attack sprite are gonna look
|
if(type == EntityType.PLAYER || name.equals("orc")) { // only modify sprite render position for player because I dont know yet how monster attack sprite are gonna look
|
||||||
if(attacking) graphics2d.drawImage(parseSpriteATK(),
|
if(attacking) graphics2d.drawImage(parseSpriteATK(),
|
||||||
(direction == Direction.LEFT) ? screenX - panel.tileSize : screenX,
|
(direction == Direction.LEFT) ? screenX - panel.tileSize : screenX,
|
||||||
(direction == Direction.UP) ? screenY - panel.tileSize : screenY, null);
|
(direction == Direction.UP) ? screenY - panel.tileSize : screenY, null);
|
||||||
|
else if(guarding) graphics2d.drawImage(parseSpriteGRD(), screenX, screenY, null);
|
||||||
else graphics2d.drawImage(parseSprite(), screenX, screenY, null);
|
else graphics2d.drawImage(parseSprite(), screenX, screenY, null);
|
||||||
} else graphics2d.drawImage(parseSprite(), screenX, screenY, null);
|
} else graphics2d.drawImage(parseSprite(), screenX, screenY, null);
|
||||||
|
|
||||||
changeOpacity(graphics2d, 1f);
|
changeOpacity(graphics2d, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(panel.keyH.debug) {
|
||||||
|
graphics2d.setColor(new Color(255, 0, 0, 70));
|
||||||
|
graphics2d.fillRect(worldX - panel.player.worldX + panel.player.screenX, worldY - panel.player.worldY + panel.player.screenY, panel.tileSize, panel.tileSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// INTERACTION
|
// INTERACTION
|
||||||
public void setAction() {}
|
public void setAction() {}
|
||||||
public void damageReaction() {}
|
public void damageReaction() {}
|
||||||
|
public void attacking() {
|
||||||
|
if(panel.player.attackCancel && type == EntityType.PLAYER) return;
|
||||||
|
spriteCount++;
|
||||||
|
if(spriteCount <= 5) spriteNum = 1;
|
||||||
|
if(spriteCount > 5 && spriteCount <= 25) {
|
||||||
|
spriteNum = 2;
|
||||||
|
int currentWorldX = worldX;
|
||||||
|
int currentWorldY = worldY;
|
||||||
|
int solidAreaWidth = solidArea.width;
|
||||||
|
int solidAreaHeight = solidArea.height;
|
||||||
|
|
||||||
|
switch(direction) {
|
||||||
|
case UP -> worldY -= attackArea.height;
|
||||||
|
case DOWN -> worldY += attackArea.height;
|
||||||
|
case LEFT -> worldX -= attackArea.width;
|
||||||
|
case RIGHT -> worldX += attackArea.width;
|
||||||
|
}
|
||||||
|
solidArea.width = attackArea.width;
|
||||||
|
solidArea.height = attackArea.height;
|
||||||
|
|
||||||
|
if(type == EntityType.MONSTER) if(panel.collisionH.checkPlayer(this)) damagePlayer(attack);
|
||||||
|
|
||||||
|
if(type == EntityType.PLAYER) {
|
||||||
|
int monsterIndex = panel.collisionH.checkEntity(this, panel.monster[panel.currentMap.getIndex()]);
|
||||||
|
panel.player.damageMonster(monsterIndex, this, attack, currentWeapon.knockbackVal);
|
||||||
|
|
||||||
|
int iTileIndex = panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]);
|
||||||
|
panel.player.interactTile(iTileIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
worldX = currentWorldX;
|
||||||
|
worldY = currentWorldY;
|
||||||
|
solidArea.width = solidAreaWidth;
|
||||||
|
solidArea.height = solidAreaHeight;
|
||||||
|
|
||||||
|
}
|
||||||
|
if(spriteCount > 25) {
|
||||||
|
spriteNum = 1;
|
||||||
|
spriteCount = 0;
|
||||||
|
attacking = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void damagePlayer(int attack) {
|
||||||
|
if(panel.player.invincible) return;
|
||||||
|
|
||||||
|
boolean block = panel.player.guarding && panel.player.direction == this.direction.getOpposite();
|
||||||
|
int damage = attack - panel.player.defense;
|
||||||
|
|
||||||
|
if(block) {
|
||||||
|
panel.playSE(15);
|
||||||
|
damage = 0;
|
||||||
|
} else panel.playSE(6);
|
||||||
|
|
||||||
|
panel.player.life -= Math.max(damage, (block ? 0 : 1));
|
||||||
|
|
||||||
|
if(damage != 0) {
|
||||||
|
setKnockback(panel.player, this, knockbackVal);
|
||||||
|
panel.player.transparent = true;
|
||||||
|
}
|
||||||
|
panel.player.invincible = true;
|
||||||
|
}
|
||||||
public void speak() {
|
public void speak() {
|
||||||
if(dialogue[dialogueIndex] == null) dialogueIndex = 0;
|
if(dialogue[dialogueIndex] == null) dialogueIndex = 0;
|
||||||
panel.ui.currentDialogue = dialogue[dialogueIndex];
|
panel.ui.currentDialogue = dialogue[dialogueIndex];
|
||||||
@@ -184,10 +288,137 @@ public class Entity {
|
|||||||
if(dyingCount > incr*6 && dyingCount <= incr*7) changeOpacity(graphics2d, 0f);
|
if(dyingCount > incr*6 && dyingCount <= incr*7) changeOpacity(graphics2d, 0f);
|
||||||
if(dyingCount > incr*7 && dyingCount <= incr*8) changeOpacity(graphics2d, 1f);
|
if(dyingCount > incr*7 && dyingCount <= incr*8) changeOpacity(graphics2d, 1f);
|
||||||
if(dyingCount > incr*8) {
|
if(dyingCount > incr*8) {
|
||||||
dying = false;
|
|
||||||
alive = false;
|
alive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public boolean use(Entity entity) {
|
||||||
|
return false;
|
||||||
|
} //If entity is consumable
|
||||||
|
public void checkDrop() {
|
||||||
|
|
||||||
|
}
|
||||||
|
public void checkCollision() {
|
||||||
|
collisionOn = false;
|
||||||
|
panel.collisionH.checkTile(this);
|
||||||
|
panel.collisionH.checkObject(this, false);
|
||||||
|
panel.collisionH.checkEntity(this, panel.npc[panel.currentMap.getIndex()]);
|
||||||
|
panel.collisionH.checkEntity(this, panel.monster[panel.currentMap.getIndex()]);
|
||||||
|
panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]);
|
||||||
|
boolean contactPlayer = panel.collisionH.checkPlayer(this);
|
||||||
|
|
||||||
|
if(this.type == EntityType.MONSTER && contactPlayer) damagePlayer(attack);
|
||||||
|
}
|
||||||
|
public void dropItem(Entity droppedItem) {
|
||||||
|
for(int i = 0; i < panel.obj[panel.currentMap.getIndex()].length; i++) {
|
||||||
|
if(panel.obj[panel.currentMap.getIndex()][i] == null) {
|
||||||
|
panel.obj[panel.currentMap.getIndex()][i] = droppedItem;
|
||||||
|
panel.obj[panel.currentMap.getIndex()][i].worldX = worldX;
|
||||||
|
panel.obj[panel.currentMap.getIndex()][i].worldY = worldY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void interact() {
|
||||||
|
|
||||||
|
}
|
||||||
|
public int getDetected(Entity user, Entity[][] target, String targetName) {
|
||||||
|
int index = 999;
|
||||||
|
int nextWorldX = user.getLeftX();
|
||||||
|
int nextWorldY = user.getTopY();
|
||||||
|
|
||||||
|
switch(user.direction) {
|
||||||
|
case UP -> nextWorldY = user.getTopY()-panel.player.speed;
|
||||||
|
case DOWN -> nextWorldY = user.getBottomY()+panel.player.speed;
|
||||||
|
case LEFT -> nextWorldX = user.getLeftX()-panel.player.speed;
|
||||||
|
case RIGHT -> nextWorldX = user.getRightX()+panel.player.speed;
|
||||||
|
}
|
||||||
|
int col = nextWorldX / panel.tileSize;
|
||||||
|
int row = nextWorldY / panel.tileSize;
|
||||||
|
|
||||||
|
for(int i = 0; i < target[panel.currentMap.getIndex()].length; i++) {
|
||||||
|
if(target[panel.currentMap.getIndex()][i] == null) continue;
|
||||||
|
if(
|
||||||
|
target[panel.currentMap.getIndex()][i].getCol() == col &&
|
||||||
|
target[panel.currentMap.getIndex()][i].getRow() == row &&
|
||||||
|
target[panel.currentMap.getIndex()][i].name.equalsIgnoreCase(targetName)
|
||||||
|
) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
public void setKnockback(Entity target, Entity attacker, int knockbackVal) {
|
||||||
|
this.attacker = attacker;
|
||||||
|
target.knockbackDirection = attacker.direction;
|
||||||
|
target.speed += knockbackVal;
|
||||||
|
target.knockback = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PARTICLE SETUP
|
||||||
|
public Color getParticleColor() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public int getParticleSize() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
public int getParticleSpeed() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
public int getParticleMaxLife() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
public void generateParticle(Entity generator, Entity target) {
|
||||||
|
Color color = generator.getParticleColor();
|
||||||
|
int size = generator.getParticleSize();
|
||||||
|
int speed = generator.getParticleSpeed();
|
||||||
|
int maxLife = generator.getParticleMaxLife();
|
||||||
|
|
||||||
|
Particle p1 = new Particle(panel, target, color, size, speed, maxLife, -2, -1);
|
||||||
|
Particle p2 = new Particle(panel, target, color, size, speed, maxLife, 2, -1);
|
||||||
|
Particle p3 = new Particle(panel, target, color, size, speed, maxLife, -2, 1);
|
||||||
|
Particle p4 = new Particle(panel, target, color, size, speed, maxLife, 2, 1);
|
||||||
|
panel.particleList.add(p1);
|
||||||
|
panel.particleList.add(p2);
|
||||||
|
panel.particleList.add(p3);
|
||||||
|
panel.particleList.add(p4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GETTERS
|
||||||
|
public int getLeftX() {
|
||||||
|
return worldX + solidArea.x;
|
||||||
|
}
|
||||||
|
public int getRightX() {
|
||||||
|
return worldX + solidArea.x + solidArea.width;
|
||||||
|
}
|
||||||
|
public int getTopY() {
|
||||||
|
return worldY + solidArea.y;
|
||||||
|
}
|
||||||
|
public int getBottomY() {
|
||||||
|
return worldY + solidArea.y + solidArea.height;
|
||||||
|
}
|
||||||
|
public int getCol() {
|
||||||
|
return (worldX + solidArea.x) / panel.tileSize;
|
||||||
|
}
|
||||||
|
public int getRow() {
|
||||||
|
return (worldY + solidArea.y) / panel.tileSize;
|
||||||
|
}
|
||||||
|
public int dX(Entity target) {
|
||||||
|
return Math.abs(worldX - target.worldX);
|
||||||
|
}
|
||||||
|
public int dY(Entity target) {
|
||||||
|
return Math.abs(worldY - target.worldY);
|
||||||
|
}
|
||||||
|
public int dTile(Entity target) {
|
||||||
|
//if(Objects.equals(name, "orc")) System.out.println("dX: " + dX(target) + " dY: " + dY(target));
|
||||||
|
return (dX(target) + dY(target)) / panel.tileSize;
|
||||||
|
}
|
||||||
|
public int getGoalCol(Entity target) {
|
||||||
|
return (target.worldX+target.solidArea.x)/panel.tileSize;
|
||||||
|
}
|
||||||
|
public int getGoalRow(Entity target) {
|
||||||
|
return (target.worldY+target.solidArea.y)/panel.tileSize;
|
||||||
|
}
|
||||||
|
|
||||||
// SETTING THINGS UP
|
// SETTING THINGS UP
|
||||||
BufferedImage parseSprite() {
|
BufferedImage parseSprite() {
|
||||||
@@ -206,6 +437,14 @@ public class Entity {
|
|||||||
case RIGHT -> (spriteNum == 1) ? attackRight1 : attackRight2;
|
case RIGHT -> (spriteNum == 1) ? attackRight1 : attackRight2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
BufferedImage parseSpriteGRD() {
|
||||||
|
return switch (direction) {
|
||||||
|
case UP -> guardUp;
|
||||||
|
case DOWN -> guardDown;
|
||||||
|
case LEFT -> guardLeft;
|
||||||
|
case RIGHT -> guardRight;
|
||||||
|
};
|
||||||
|
}
|
||||||
public BufferedImage initEntitySprites(String name) {
|
public BufferedImage initEntitySprites(String name) {
|
||||||
try {
|
try {
|
||||||
return Utility.scaleImage(ImageIO.read(new FileInputStream("assets/" + name + ".png")), panel.tileSize, panel.tileSize);
|
return Utility.scaleImage(ImageIO.read(new FileInputStream("assets/" + name + ".png")), panel.tileSize, panel.tileSize);
|
||||||
@@ -225,5 +464,159 @@ public class Entity {
|
|||||||
public void changeOpacity(Graphics2D graphics2d, float opacity) {
|
public void changeOpacity(Graphics2D graphics2d, float opacity) {
|
||||||
graphics2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));
|
graphics2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));
|
||||||
}
|
}
|
||||||
|
public void searchPath(int goalCol, int goalRow) {
|
||||||
|
int startCol = (worldX + solidArea.x) / panel.tileSize;
|
||||||
|
int startRow = (worldY + solidArea.y) / panel.tileSize;
|
||||||
|
|
||||||
|
panel.pFinder.setNodes(startCol, startRow, goalCol, goalRow);
|
||||||
|
|
||||||
|
if (panel.pFinder.search()) {
|
||||||
|
int nextCol = panel.pFinder.pathList.getFirst().col;
|
||||||
|
int nextRow = panel.pFinder.pathList.getFirst().row;
|
||||||
|
|
||||||
|
int enLeftX = worldX + solidArea.x;
|
||||||
|
int enTopY = worldY + solidArea.y;
|
||||||
|
|
||||||
|
int targetX = nextCol * panel.tileSize;
|
||||||
|
int targetY = nextRow * panel.tileSize;
|
||||||
|
|
||||||
|
// UP
|
||||||
|
if (nextRow < startRow) {
|
||||||
|
if (enLeftX < targetX) direction = Direction.RIGHT;
|
||||||
|
else if (enLeftX > targetX) direction = Direction.LEFT;
|
||||||
|
else direction = Direction.UP;
|
||||||
|
}
|
||||||
|
// DOWN
|
||||||
|
else if (nextRow > startRow) {
|
||||||
|
if (enLeftX < targetX) direction = Direction.RIGHT;
|
||||||
|
else if (enLeftX > targetX) direction = Direction.LEFT;
|
||||||
|
else direction = Direction.DOWN;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (nextCol < startCol) { // DOWN LEFT
|
||||||
|
if (enTopY < targetY) direction = Direction.DOWN;
|
||||||
|
else if (enTopY > targetY) direction = Direction.UP;
|
||||||
|
else direction = Direction.LEFT;
|
||||||
|
}
|
||||||
|
else if (nextCol > startCol) { // RIGHT
|
||||||
|
if (enTopY < targetY) direction = Direction.DOWN;
|
||||||
|
else if (enTopY > targetY) direction = Direction.UP;
|
||||||
|
else direction = Direction.RIGHT;
|
||||||
|
}
|
||||||
|
} else onPath = false;
|
||||||
|
}
|
||||||
|
public void followPlayer() {
|
||||||
|
int goalCol = panel.player.getCol();
|
||||||
|
int goalRow = panel.player.getRow();
|
||||||
|
|
||||||
|
int startCol = (worldX + solidArea.x) / panel.tileSize;
|
||||||
|
int startRow = (worldY + solidArea.y) / panel.tileSize;
|
||||||
|
|
||||||
|
panel.pFinder.setNodes(startCol, startRow, goalCol, goalRow);
|
||||||
|
|
||||||
|
if (panel.pFinder.search()) {
|
||||||
|
int nextCol = panel.pFinder.pathList.getFirst().col;
|
||||||
|
int nextRow = panel.pFinder.pathList.getFirst().row;
|
||||||
|
|
||||||
|
int enLeftX = worldX + solidArea.x;
|
||||||
|
int enTopY = worldY + solidArea.y;
|
||||||
|
|
||||||
|
int targetX = nextCol * panel.tileSize;
|
||||||
|
int targetY = nextRow * panel.tileSize;
|
||||||
|
|
||||||
|
// UP
|
||||||
|
if (nextRow < startRow) {
|
||||||
|
if (enLeftX < targetX) direction = Direction.RIGHT;
|
||||||
|
else if (enLeftX > targetX) direction = Direction.LEFT;
|
||||||
|
else direction = Direction.UP;
|
||||||
|
}
|
||||||
|
// DOWN
|
||||||
|
else if (nextRow > startRow) {
|
||||||
|
if (enLeftX < targetX) direction = Direction.RIGHT;
|
||||||
|
else if (enLeftX > targetX) direction = Direction.LEFT;
|
||||||
|
else direction = Direction.DOWN;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (nextCol < startCol) { // DOWN LEFT
|
||||||
|
if (enTopY < targetY) direction = Direction.DOWN;
|
||||||
|
else if (enTopY > targetY) direction = Direction.UP;
|
||||||
|
else direction = Direction.LEFT;
|
||||||
|
}
|
||||||
|
else if (nextCol > startCol) { // RIGHT
|
||||||
|
if (enTopY < targetY) direction = Direction.DOWN;
|
||||||
|
else if (enTopY > targetY) direction = Direction.UP;
|
||||||
|
else direction = Direction.RIGHT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void checkStopChasing(Entity target, int distance, int rate) {
|
||||||
|
//if(Objects.equals(name, "orc")) System.out.println("dTile: " + dTile(target) + " distance: " + distance);
|
||||||
|
if(dTile(target) > distance) onPath = false;
|
||||||
|
}
|
||||||
|
public void checkStartChasing(Entity target, int distance, int rate) {
|
||||||
|
if(dTile(target) < distance) onPath = true;
|
||||||
|
}
|
||||||
|
public void checkShooting(int rate, int shotInterval) {
|
||||||
|
if(new Random().nextInt(rate) == 0 && projectile.alive == false && shotAvailableCount == shotInterval) {
|
||||||
|
projectile.set(worldX, worldY, direction, true, this);
|
||||||
|
|
||||||
|
// CHECK VACANCY
|
||||||
|
for(int ii = 0; ii < panel.projectileList.size(); ii++) {
|
||||||
|
if(panel.projectileList.get(ii) == null) {
|
||||||
|
panel.projectileList.set(ii, projectile);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shotAvailableCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void checkAttack(int rate, int straight, int horizontal) {
|
||||||
|
boolean targetInRange = false;
|
||||||
|
int xDist = dX(panel.player);
|
||||||
|
int yDist = dY(panel.player);
|
||||||
|
|
||||||
|
switch(direction) {
|
||||||
|
case UP -> {
|
||||||
|
if(panel.player.worldY < worldY && yDist < straight && xDist < horizontal) targetInRange = true;
|
||||||
|
}
|
||||||
|
case DOWN -> {
|
||||||
|
if(panel.player.worldY > worldY && yDist < straight && xDist < horizontal) targetInRange = true;
|
||||||
|
}
|
||||||
|
case LEFT -> {
|
||||||
|
if(panel.player.worldX < worldX && xDist < straight && yDist < horizontal) targetInRange = true;
|
||||||
|
}
|
||||||
|
case RIGHT -> {
|
||||||
|
if(panel.player.worldX > worldX && xDist < straight && yDist < horizontal) targetInRange = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(targetInRange)
|
||||||
|
if (new Random().nextInt(rate) == 0) {
|
||||||
|
attacking = true;
|
||||||
|
spriteNum = 1;
|
||||||
|
spriteCount = 0;
|
||||||
|
shotAvailableCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void setRandomDirection() {
|
||||||
|
actionLock++;
|
||||||
|
if(actionLock == 120) { //lock action for x frames
|
||||||
|
Random rand = new Random();
|
||||||
|
int i = rand.nextInt(100)+1; //Generate number between 1 and 100
|
||||||
|
if(i <= 25) direction = Direction.UP;
|
||||||
|
if(i > 25 && i <= 50) direction = Direction.DOWN;
|
||||||
|
if(i > 50 && i <= 75) direction = Direction.LEFT;
|
||||||
|
if(i > 75) direction = Direction.RIGHT;
|
||||||
|
actionLock = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void invincibleCounting() {
|
||||||
|
if(!invincible) return;
|
||||||
|
invincibleCount++;
|
||||||
|
if(invincibleCount > 40) {
|
||||||
|
invincible = false;
|
||||||
|
invincibleCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,24 @@ import de.miaurizius.jgame2d.core.enums.Direction;
|
|||||||
import de.miaurizius.jgame2d.core.enums.EntityType;
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
import de.miaurizius.jgame2d.core.enums.GameState;
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
import de.miaurizius.jgame2d.core.handlers.KeyHandler;
|
import de.miaurizius.jgame2d.core.handlers.KeyHandler;
|
||||||
|
import de.miaurizius.jgame2d.entity.item.KeyObj;
|
||||||
import de.miaurizius.jgame2d.entity.item.ShieldWoodObj;
|
import de.miaurizius.jgame2d.entity.item.ShieldWoodObj;
|
||||||
import de.miaurizius.jgame2d.entity.item.SwordNormalObj;
|
import de.miaurizius.jgame2d.entity.item.SwordNormalObj;
|
||||||
|
import de.miaurizius.jgame2d.entity.projectile.FireballObj;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
public class Player extends Entity {
|
public class Player extends Entity {
|
||||||
|
|
||||||
KeyHandler keyH;
|
KeyHandler keyH;
|
||||||
public final int screenX;
|
public final int screenX;
|
||||||
public final int screenY;
|
public final int screenY;
|
||||||
|
private int standCount;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
public boolean attackCancel;
|
public boolean attackCancel;
|
||||||
|
public boolean lightUpdated;
|
||||||
|
|
||||||
public Player(GamePanel panel, KeyHandler keyH) {
|
public Player(GamePanel panel, KeyHandler keyH) {
|
||||||
super(panel);
|
super(panel);
|
||||||
@@ -37,20 +42,63 @@ public class Player extends Entity {
|
|||||||
solidArea.width = 24;
|
solidArea.width = 24;
|
||||||
solidArea.height = 24;
|
solidArea.height = 24;
|
||||||
|
|
||||||
attackArea.width = 36;
|
|
||||||
attackArea.height = 36;
|
|
||||||
|
|
||||||
setDefaultValues();
|
setDefaultValues();
|
||||||
getPlayerImage();
|
getPlayerImage();
|
||||||
getPlayerAttackImage();
|
getPlayerAttackImage();
|
||||||
|
getGuardImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEFAULT
|
// DEFAULT
|
||||||
public void update() {
|
public void update() {
|
||||||
if(attacking) {
|
if(life > maxLife) life = maxLife;
|
||||||
|
|
||||||
|
if(knockback) {
|
||||||
|
collisionOn = false;
|
||||||
|
panel.collisionH.checkTile(this);
|
||||||
|
panel.collisionH.checkObject(this, false);
|
||||||
|
panel.collisionH.checkEntity(this, panel.npc[panel.currentMap.getIndex()]);
|
||||||
|
// panel.collisionH.checkEntity(this, panel.monster[panel.currentMap.getIndex()]);
|
||||||
|
panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]);
|
||||||
|
if(collisionOn) {
|
||||||
|
knockbackCount = 0;
|
||||||
|
knockback = false;
|
||||||
|
speed = defaultSpeed;
|
||||||
|
invincibleCounting();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(knockbackDirection) {
|
||||||
|
case UP -> worldY -= speed;
|
||||||
|
case DOWN -> worldY += speed;
|
||||||
|
case LEFT -> worldX -= speed;
|
||||||
|
case RIGHT -> worldX += speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
knockbackCount++;
|
||||||
|
if(knockbackCount != 10) {
|
||||||
|
invincibleCounting();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
knockback = false;
|
||||||
|
knockbackCount = 0;
|
||||||
|
speed = defaultSpeed;
|
||||||
|
invincibleCounting();
|
||||||
|
return;
|
||||||
|
} else if(attacking) {
|
||||||
attacking();
|
attacking();
|
||||||
|
invincibleCounting();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BLOCKING
|
||||||
|
if(keyH.CTLKeyPressed) {
|
||||||
|
guarding = true;
|
||||||
|
transparent = false;
|
||||||
|
invincibleCounting();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// MOVEMENT
|
// MOVEMENT
|
||||||
if(keyH.upPressed || keyH.downPressed || keyH.leftPressed || keyH.rightPressed || keyH.spacePressed) {
|
if(keyH.upPressed || keyH.downPressed || keyH.leftPressed || keyH.rightPressed || keyH.spacePressed) {
|
||||||
if(!keyH.spacePressed) {
|
if(!keyH.spacePressed) {
|
||||||
@@ -69,13 +117,16 @@ public class Player extends Entity {
|
|||||||
pickObject(objIndex);
|
pickObject(objIndex);
|
||||||
|
|
||||||
// CHECK ENTITY COLLISION
|
// CHECK ENTITY COLLISION
|
||||||
int npcIndex = panel.collisionH.checkEntity(this, panel.npc);
|
int npcIndex = panel.collisionH.checkEntity(this, panel.npc[panel.currentMap.getIndex()]);
|
||||||
interactNPC(npcIndex);
|
interactNPC(npcIndex);
|
||||||
|
|
||||||
// CHECK MONSTER COLLISION
|
// CHECK MONSTER COLLISION
|
||||||
int monsterIndex = panel.collisionH.checkEntity(this, panel.monster);
|
int monsterIndex = panel.collisionH.checkEntity(this, panel.monster[panel.currentMap.getIndex()]);
|
||||||
interactMonster(monsterIndex);
|
interactMonster(monsterIndex);
|
||||||
|
|
||||||
|
// CHECK INTERACTIVE TILE COLLISION
|
||||||
|
int iTileIndex = panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]);
|
||||||
|
|
||||||
// CHECK EVENT
|
// CHECK EVENT
|
||||||
panel.eventH.checkEvent();
|
panel.eventH.checkEvent();
|
||||||
|
|
||||||
@@ -83,7 +134,7 @@ public class Player extends Entity {
|
|||||||
switch (direction) {
|
switch (direction) {
|
||||||
case UP -> worldY -= speed;
|
case UP -> worldY -= speed;
|
||||||
case DOWN -> worldY += speed;
|
case DOWN -> worldY += speed;
|
||||||
case LEFT ->worldX -= speed;
|
case LEFT -> worldX -= speed;
|
||||||
case RIGHT -> worldX += speed;
|
case RIGHT -> worldX += speed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,118 +142,135 @@ public class Player extends Entity {
|
|||||||
if(keyH.spacePressed && !attackCancel) {
|
if(keyH.spacePressed && !attackCancel) {
|
||||||
panel.playSE(7);
|
panel.playSE(7);
|
||||||
attacking = true;
|
attacking = true;
|
||||||
spriteCounter = 0;
|
spriteCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
attackCancel = false;
|
attackCancel = false;
|
||||||
panel.keyH.spacePressed = false;
|
panel.keyH.spacePressed = false;
|
||||||
|
guarding = false;
|
||||||
|
|
||||||
spriteCounter++;
|
spriteCount++;
|
||||||
if(spriteCounter > 12) {
|
if(spriteCount > 12) {
|
||||||
if(spriteNum == 1) spriteNum = 2;
|
if(spriteNum == 1) spriteNum = 2;
|
||||||
else if(spriteNum == 2) spriteNum = 1;
|
else if(spriteNum == 2) spriteNum = 1;
|
||||||
else spriteNum = 0;
|
else spriteNum = 0;
|
||||||
spriteCounter = 0;
|
spriteCount = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
standCount++;
|
||||||
|
if(standCount == 20) {
|
||||||
|
spriteNum = 1;
|
||||||
|
standCount = 0;
|
||||||
|
}
|
||||||
|
guarding = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(panel.keyH.shotKeyPressed && !projectile.alive) {
|
||||||
|
projectile.set(worldX, worldY, direction, true, this);
|
||||||
|
panel.projectileList.add(projectile);
|
||||||
|
panel.playSE(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// INVINCIBLE COUNTER
|
// INVINCIBLE COUNTER
|
||||||
if(!invincible) return;
|
if(!invincible) return;
|
||||||
invincibleCount++;
|
invincibleCounting();
|
||||||
if(invincibleCount > 60) {
|
|
||||||
invincible = false;
|
if(life <= 0) {
|
||||||
|
panel.gameState = GameState.GAMEOVER;
|
||||||
invincibleCount = 0;
|
invincibleCount = 0;
|
||||||
|
panel.ui.commandNum = -1;
|
||||||
|
panel.stopMusic();
|
||||||
|
panel.playSE(12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// INTERACTION
|
// INTERACTION
|
||||||
public void pickObject(int index) {
|
public void pickObject(int index) {
|
||||||
if(index == 999) return;
|
if(index == 999 || panel.obj[panel.currentMap.getIndex()][index] == null) return;
|
||||||
|
|
||||||
|
// PICKUP ONLY ITEMS
|
||||||
|
if(panel.obj[panel.currentMap.getIndex()][index].type == EntityType.PICKUP) {
|
||||||
|
panel.obj[panel.currentMap.getIndex()][index].use(this);
|
||||||
|
panel.obj[panel.currentMap.getIndex()][index] = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// OBSTACLES
|
||||||
|
if(panel.obj[panel.currentMap.getIndex()][index].type == EntityType.OBSTACLE) {
|
||||||
|
if(!keyH.spacePressed) return;
|
||||||
|
attackCancel = true;
|
||||||
|
panel.obj[panel.currentMap.getIndex()][index].interact();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// INVENTORY ITEMS
|
||||||
|
else {
|
||||||
|
if(!canObtainItem(panel.obj[panel.currentMap.getIndex()][index])) {
|
||||||
|
panel.ui.addMessage("Your inventory is full!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
panel.playSE(1);
|
||||||
|
panel.ui.addMessage("Picked up " + panel.obj[panel.currentMap.getIndex()][index].name + "!");
|
||||||
|
}
|
||||||
|
panel.obj[panel.currentMap.getIndex()][index] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void interactMonster(int index) {
|
public void interactMonster(int index) {
|
||||||
if(index == 999) return;
|
if(index == 999) return;
|
||||||
if(invincible) return;
|
if(invincible || panel.monster[panel.currentMap.getIndex()][index].dying || !panel.monster[panel.currentMap.getIndex()][index].alive) return;
|
||||||
if(panel.monster[index].dying || !panel.monster[index].alive) return;
|
|
||||||
|
|
||||||
int damage = panel.monster[index].attack - defense;
|
int damage = panel.monster[panel.currentMap.getIndex()][index].attack - defense;
|
||||||
|
|
||||||
if(damage > 0) {
|
panel.playSE(6);
|
||||||
panel.playSE(6);
|
life -= Math.max(damage, 0);
|
||||||
life -= damage;
|
if(damage != 0) panel.player.transparent = true;
|
||||||
invincible = true;
|
invincible = true;
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public void attacking() {
|
public void damageMonster(int index, Entity attacker, int attack, int knockbackVal) {
|
||||||
if(attackCancel) return;
|
|
||||||
spriteCounter++;
|
|
||||||
if(spriteCounter <= 5) spriteNum = 1;
|
|
||||||
if(spriteCounter > 5 && spriteCounter <= 25) {
|
|
||||||
spriteNum = 2;
|
|
||||||
int currentWorldX = worldX;
|
|
||||||
int currentWorldY = worldY;
|
|
||||||
int solidAreaWidth = solidArea.width;
|
|
||||||
int solidAreaHeight = solidArea.height;
|
|
||||||
|
|
||||||
switch(direction) {
|
|
||||||
case UP -> worldY -= attackArea.height;
|
|
||||||
case DOWN -> worldY += attackArea.height;
|
|
||||||
case LEFT -> worldX -= attackArea.width;
|
|
||||||
case RIGHT -> worldX += attackArea.width;
|
|
||||||
}
|
|
||||||
solidArea.width = attackArea.width;
|
|
||||||
solidArea.height = attackArea.height;
|
|
||||||
|
|
||||||
int monsterIndex = panel.collisionH.checkEntity(this, panel.monster);
|
|
||||||
damageMonster(monsterIndex);
|
|
||||||
|
|
||||||
worldX = currentWorldX;
|
|
||||||
worldY = currentWorldY;
|
|
||||||
solidArea.width = solidAreaWidth;
|
|
||||||
solidArea.height = solidAreaHeight;
|
|
||||||
|
|
||||||
}
|
|
||||||
if(spriteCounter > 25) {
|
|
||||||
spriteNum = 1;
|
|
||||||
spriteCounter = 0;
|
|
||||||
attacking = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void damageMonster(int index) {
|
|
||||||
if(index == 999) return;
|
if(index == 999) return;
|
||||||
if(panel.monster[index].invincible) return;
|
if(panel.monster[panel.currentMap.getIndex()][index].invincible) return;
|
||||||
|
|
||||||
int damage = attack - panel.monster[index].defense;
|
int damage = attack - panel.monster[panel.currentMap.getIndex()][index].defense;
|
||||||
|
|
||||||
if(damage > 0) {
|
if(damage > 0) {
|
||||||
panel.playSE(5);
|
panel.playSE(5);
|
||||||
panel.monster[index].life -= damage;
|
if(knockbackVal > 0) setKnockback(panel.monster[panel.currentMap.getIndex()][index], attacker, knockbackVal);
|
||||||
panel.monster[index].invincible = true;
|
panel.monster[panel.currentMap.getIndex()][index].life -= damage;
|
||||||
|
panel.monster[panel.currentMap.getIndex()][index].transparent = true;
|
||||||
|
panel.monster[panel.currentMap.getIndex()][index].invincible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
panel.monster[index].damageReaction();
|
panel.monster[panel.currentMap.getIndex()][index].damageReaction();
|
||||||
if(panel.monster[index].life <= 0) {
|
if(panel.monster[panel.currentMap.getIndex()][index].life <= 0) {
|
||||||
panel.monster[index].dying = true;
|
panel.monster[panel.currentMap.getIndex()][index].dying = true;
|
||||||
panel.ui.addMessage("Gained +" + panel.monster[index].exp + " XP!");
|
panel.ui.addMessage("Gained +" + panel.monster[panel.currentMap.getIndex()][index].exp + " XP!");
|
||||||
exp += panel.monster[index].exp;
|
exp += panel.monster[panel.currentMap.getIndex()][index].exp;
|
||||||
checkLevelUp();
|
checkLevelUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void interactTile(int index) {
|
||||||
|
if(index == 999 || !panel.iTile[panel.currentMap.getIndex()][index].destructible || panel.iTile[panel.currentMap.getIndex()][index].invincible) return;
|
||||||
|
if(!panel.iTile[panel.currentMap.getIndex()][index].meetItemReq(this)) return;
|
||||||
|
panel.iTile[panel.currentMap.getIndex()][index].playSE();
|
||||||
|
panel.iTile[panel.currentMap.getIndex()][index].life--;
|
||||||
|
panel.iTile[panel.currentMap.getIndex()][index].invincible = true;
|
||||||
|
generateParticle(panel.iTile[panel.currentMap.getIndex()][index], panel.iTile[panel.currentMap.getIndex()][index]);
|
||||||
|
if(panel.iTile[panel.currentMap.getIndex()][index].life == 0) panel.iTile[panel.currentMap.getIndex()][index] = panel.iTile[panel.currentMap.getIndex()][index].getDestroyedForm();
|
||||||
|
}
|
||||||
|
|
||||||
public void interactNPC(int index) {
|
public void interactNPC(int index) {
|
||||||
if(index == 999) return;
|
if(index == 999) return;
|
||||||
//if(!panel.keyH.spacePressed) return; //Only uncomment if text should only appear if player hits space
|
//if(!panel.keyH.spacePressed) return; //Only uncomment if text should only appear if player hits space
|
||||||
attackCancel = true;
|
attackCancel = true;
|
||||||
panel.gameState = GameState.DIALOGUE;
|
panel.gameState = GameState.DIALOGUE;
|
||||||
panel.npc[index].speak();
|
panel.npc[panel.currentMap.getIndex()][index].speak();
|
||||||
}
|
}
|
||||||
public void speak() {
|
public void speak() {
|
||||||
//This method only exists for character specific things later...
|
//This method only exists for character specific things later...
|
||||||
super.speak();
|
super.speak();
|
||||||
}
|
}
|
||||||
|
|
||||||
// BACKGROUND CHECKS
|
// BACKGROUND JOBS
|
||||||
public void checkLevelUp() {
|
public void checkLevelUp() {
|
||||||
if(exp < nextLevelExp) return;
|
if(exp < nextLevelExp) return;
|
||||||
level++;
|
level++;
|
||||||
@@ -217,12 +285,59 @@ public class Player extends Entity {
|
|||||||
panel.gameState = GameState.DIALOGUE;
|
panel.gameState = GameState.DIALOGUE;
|
||||||
panel.ui.currentDialogue = "You are level " + level + " now!\nYou feel stronger!";
|
panel.ui.currentDialogue = "You are level " + level + " now!\nYou feel stronger!";
|
||||||
}
|
}
|
||||||
|
public void selectItem() {
|
||||||
|
int itemIndex = panel.ui.getItemIndex(panel.ui.playerSlotCol, panel.ui.playerSlotRow);
|
||||||
|
if(itemIndex >= inventory.size()) return;
|
||||||
|
Entity selectedItem = inventory.get(itemIndex);
|
||||||
|
if(selectedItem.type == EntityType.WEAPON) {
|
||||||
|
currentWeapon = selectedItem;
|
||||||
|
getAttack();
|
||||||
|
getPlayerAttackImage();
|
||||||
|
}
|
||||||
|
if(selectedItem.type == EntityType.SHIELD) {
|
||||||
|
currentShield = selectedItem;
|
||||||
|
getDefense();
|
||||||
|
}
|
||||||
|
if(selectedItem.type == EntityType.LIGHT) {
|
||||||
|
if(currentLight == selectedItem) currentLight = null; else currentLight = selectedItem;
|
||||||
|
lightUpdated = true;
|
||||||
|
}
|
||||||
|
if(selectedItem.consumable)
|
||||||
|
if(selectedItem.use(this))
|
||||||
|
if(selectedItem.amt > 1) selectedItem.amt--; else inventory.remove(selectedItem);
|
||||||
|
}
|
||||||
|
public void setDefaultPositions() {
|
||||||
|
worldX = panel.tileSize * 23;
|
||||||
|
worldY = panel.tileSize * 21;
|
||||||
|
direction = Direction.DOWN;
|
||||||
|
}
|
||||||
|
public void restoreStatus() {
|
||||||
|
life = maxLife;
|
||||||
|
invincible = false;
|
||||||
|
transparent = false;
|
||||||
|
attacking = false;
|
||||||
|
guarding = false;
|
||||||
|
knockback = false;
|
||||||
|
lightUpdated = true;
|
||||||
|
}
|
||||||
|
public void getSleepingImage(BufferedImage image) {
|
||||||
|
down1 = image;
|
||||||
|
down2 = image;
|
||||||
|
up1 = image;
|
||||||
|
up2 = image;
|
||||||
|
left1 = image;
|
||||||
|
left2 = image;
|
||||||
|
right1 = image;
|
||||||
|
right2 = image;
|
||||||
|
}
|
||||||
|
|
||||||
// SETTING THINGS UP
|
// SETTING THINGS UP
|
||||||
public void setDefaultValues() {
|
public void setDefaultValues() {
|
||||||
worldX = panel.tileSize * 23;
|
worldX = panel.tileSize * 23;
|
||||||
worldY = panel.tileSize * 21;
|
worldY = panel.tileSize * 21;
|
||||||
speed = 4;
|
|
||||||
|
defaultSpeed = 4;
|
||||||
|
speed = defaultSpeed;
|
||||||
direction = Direction.DOWN;
|
direction = Direction.DOWN;
|
||||||
|
|
||||||
// PLAYER STATUS (1 heart = 2 lives)
|
// PLAYER STATUS (1 heart = 2 lives)
|
||||||
@@ -233,13 +348,22 @@ public class Player extends Entity {
|
|||||||
dexterity = 1;
|
dexterity = 1;
|
||||||
exp = 0;
|
exp = 0;
|
||||||
nextLevelExp = 5;
|
nextLevelExp = 5;
|
||||||
coins = 0;
|
coins = 500;
|
||||||
currentWeapon = new SwordNormalObj(panel);
|
currentWeapon = new SwordNormalObj(panel);
|
||||||
currentShield = new ShieldWoodObj(panel);
|
currentShield = new ShieldWoodObj(panel);
|
||||||
|
currentLight = null;
|
||||||
|
projectile = new FireballObj(panel);
|
||||||
attack = getAttack();
|
attack = getAttack();
|
||||||
defense = getDefense();
|
defense = getDefense();
|
||||||
|
|
||||||
|
// INVENTORY
|
||||||
|
inventory.clear();
|
||||||
|
inventory.add(currentWeapon);
|
||||||
|
inventory.add(currentShield);
|
||||||
|
inventory.add(new KeyObj(panel));
|
||||||
}
|
}
|
||||||
public int getAttack() {
|
public int getAttack() {
|
||||||
|
attackArea = currentWeapon.attackArea;
|
||||||
return attack = strength * currentWeapon.attackValue;
|
return attack = strength * currentWeapon.attackValue;
|
||||||
}
|
}
|
||||||
public int getDefense() {
|
public int getDefense() {
|
||||||
@@ -256,14 +380,67 @@ public class Player extends Entity {
|
|||||||
right2 = initEntitySprites("player/boy_right_2");
|
right2 = initEntitySprites("player/boy_right_2");
|
||||||
}
|
}
|
||||||
public void getPlayerAttackImage() {
|
public void getPlayerAttackImage() {
|
||||||
attackUp1 = initEntitySprites("player/attack/boy_attack_up_1", panel.tileSize, panel.tileSize*2);
|
switch(currentWeapon.weaponType) {
|
||||||
attackUp2 = initEntitySprites("player/attack/boy_attack_up_2", panel.tileSize, panel.tileSize*2);
|
case SWORD:
|
||||||
attackDown1 = initEntitySprites("player/attack/boy_attack_down_1", panel.tileSize, panel.tileSize*2);
|
attackUp1 = initEntitySprites("player/attack/boy_attack_up_1", panel.tileSize, panel.tileSize * 2);
|
||||||
attackDown2 = initEntitySprites("player/attack/boy_attack_down_2", panel.tileSize, panel.tileSize*2);
|
attackUp2 = initEntitySprites("player/attack/boy_attack_up_2", panel.tileSize, panel.tileSize * 2);
|
||||||
attackLeft1 = initEntitySprites("player/attack/boy_attack_left_1", panel.tileSize*2, panel.tileSize);
|
attackDown1 = initEntitySprites("player/attack/boy_attack_down_1", panel.tileSize, panel.tileSize * 2);
|
||||||
attackLeft2 = initEntitySprites("player/attack/boy_attack_left_2", panel.tileSize*2, panel.tileSize);
|
attackDown2 = initEntitySprites("player/attack/boy_attack_down_2", panel.tileSize, panel.tileSize * 2);
|
||||||
attackRight1 = initEntitySprites("player/attack/boy_attack_right_1", panel.tileSize*2, panel.tileSize);
|
attackLeft1 = initEntitySprites("player/attack/boy_attack_left_1", panel.tileSize * 2, panel.tileSize);
|
||||||
attackRight2 = initEntitySprites("player/attack/boy_attack_right_2", panel.tileSize*2, panel.tileSize);
|
attackLeft2 = initEntitySprites("player/attack/boy_attack_left_2", panel.tileSize * 2, panel.tileSize);
|
||||||
|
attackRight1 = initEntitySprites("player/attack/boy_attack_right_1", panel.tileSize * 2, panel.tileSize);
|
||||||
|
attackRight2 = initEntitySprites("player/attack/boy_attack_right_2", panel.tileSize * 2, panel.tileSize);
|
||||||
|
break;
|
||||||
|
case AXE:
|
||||||
|
attackUp1 = initEntitySprites("player/attack/boy_axe_up_1", panel.tileSize, panel.tileSize * 2);
|
||||||
|
attackUp2 = initEntitySprites("player/attack/boy_axe_up_2", panel.tileSize, panel.tileSize * 2);
|
||||||
|
attackDown1 = initEntitySprites("player/attack/boy_axe_down_1", panel.tileSize, panel.tileSize * 2);
|
||||||
|
attackDown2 = initEntitySprites("player/attack/boy_axe_down_2", panel.tileSize, panel.tileSize * 2);
|
||||||
|
attackLeft1 = initEntitySprites("player/attack/boy_axe_left_1", panel.tileSize * 2, panel.tileSize);
|
||||||
|
attackLeft2 = initEntitySprites("player/attack/boy_axe_left_2", panel.tileSize * 2, panel.tileSize);
|
||||||
|
attackRight1 = initEntitySprites("player/attack/boy_axe_right_1", panel.tileSize * 2, panel.tileSize);
|
||||||
|
attackRight2 = initEntitySprites("player/attack/boy_axe_right_2", panel.tileSize * 2, panel.tileSize);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void getGuardImages() {
|
||||||
|
guardUp = initEntitySprites("player/guarding/boy_guard_up");
|
||||||
|
guardDown = initEntitySprites("player/guarding/boy_guard_down");
|
||||||
|
guardLeft = initEntitySprites("player/guarding/boy_guard_left");
|
||||||
|
guardRight = initEntitySprites("player/guarding/boy_guard_right");
|
||||||
|
}
|
||||||
|
public int searchItemInInventory(String itemName) {
|
||||||
|
for(int i = 0; i < inventory.size(); i++) {
|
||||||
|
if(inventory.get(i).name.equals(itemName)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 999;
|
||||||
|
}
|
||||||
|
public boolean canObtainItem(Entity item) {
|
||||||
|
int i = searchItemInInventory(item.name);
|
||||||
|
if(item.stackable) {
|
||||||
|
if(i != 999) {
|
||||||
|
inventory.get(i).amt++;
|
||||||
|
return true;
|
||||||
|
} else if(inventory.size() != maxInvSize) {
|
||||||
|
inventory.add(item);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if(inventory.size() != maxInvSize) {
|
||||||
|
inventory.add(item);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void invincibleCounting() {
|
||||||
|
if(!invincible) return;
|
||||||
|
invincibleCount++;
|
||||||
|
if(invincibleCount > 60) {
|
||||||
|
invincible = false;
|
||||||
|
invincibleCount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
24
src/de/miaurizius/jgame2d/entity/item/AxeObj.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package de.miaurizius.jgame2d.entity.item;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
|
public class AxeObj extends Entity {
|
||||||
|
|
||||||
|
public AxeObj(GamePanel panel) {
|
||||||
|
super(panel);
|
||||||
|
name = "Woodcutter's Axe";
|
||||||
|
description = "[" + name + "]\nA bit rusty but still can \ncut some trees.";
|
||||||
|
type = EntityType.WEAPON;
|
||||||
|
weaponType = EntityType.WeaponType.AXE;
|
||||||
|
down1 = initEntitySprites("/objects/axe");
|
||||||
|
price = 50;
|
||||||
|
knockbackVal = 10;
|
||||||
|
|
||||||
|
attackValue = 2;
|
||||||
|
attackArea.width = 30;
|
||||||
|
attackArea.height = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ public class BootsObj extends Entity {
|
|||||||
|
|
||||||
public BootsObj(GamePanel panel) {
|
public BootsObj(GamePanel panel) {
|
||||||
super(panel);
|
super(panel);
|
||||||
name = "boots";
|
name = "Boots";
|
||||||
type = EntityType.ITEM;
|
type = EntityType.ITEM;
|
||||||
down1 = initEntitySprites("objects/boots.png");
|
down1 = initEntitySprites("objects/boots.png");
|
||||||
}
|
}
|
||||||
|
|||||||
27
src/de/miaurizius/jgame2d/entity/item/CoinObj.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package de.miaurizius.jgame2d.entity.item;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
|
public class CoinObj extends Entity {
|
||||||
|
|
||||||
|
GamePanel panel;
|
||||||
|
|
||||||
|
public CoinObj(GamePanel panel) {
|
||||||
|
super(panel);
|
||||||
|
this.panel = panel;
|
||||||
|
|
||||||
|
name = "Coin";
|
||||||
|
type = EntityType.PICKUP;
|
||||||
|
value = 1;
|
||||||
|
down1 = initEntitySprites("/objects/coin_bronze");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean use(Entity entity) {
|
||||||
|
panel.playSE(1);
|
||||||
|
panel.ui.addMessage("Coin +"+value);
|
||||||
|
panel.player.coins += value;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,13 +6,28 @@ import de.miaurizius.jgame2d.entity.Entity;
|
|||||||
|
|
||||||
public class HeartObj extends Entity {
|
public class HeartObj extends Entity {
|
||||||
|
|
||||||
|
GamePanel panel;
|
||||||
|
|
||||||
public HeartObj(GamePanel panel) {
|
public HeartObj(GamePanel panel) {
|
||||||
super(panel);
|
super(panel);
|
||||||
name = "heart";
|
this.panel = panel;
|
||||||
type = EntityType.ITEM;
|
|
||||||
|
name = "Heart";
|
||||||
|
type = EntityType.PICKUP;
|
||||||
|
value = 2;
|
||||||
|
|
||||||
|
down1 = initEntitySprites("objects/heart_full");
|
||||||
image = initEntitySprites("objects/heart_full");
|
image = initEntitySprites("objects/heart_full");
|
||||||
image2 = initEntitySprites("objects/heart_half");
|
image2 = initEntitySprites("objects/heart_half");
|
||||||
image3 = initEntitySprites("objects/heart_blank");
|
image3 = initEntitySprites("objects/heart_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean use(Entity entity) {
|
||||||
|
panel.playSE(2);
|
||||||
|
panel.ui.addMessage("Life +"+value);
|
||||||
|
entity.life += value;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
21
src/de/miaurizius/jgame2d/entity/item/IronShieldObj.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package de.miaurizius.jgame2d.entity.item;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
|
public class IronShieldObj extends Entity {
|
||||||
|
|
||||||
|
public IronShieldObj(GamePanel panel) {
|
||||||
|
super(panel);
|
||||||
|
|
||||||
|
name = "Iron Shield";
|
||||||
|
description = "[" + name + "]\nAn iron shield. It's very\nheavy.";
|
||||||
|
type = EntityType.SHIELD;
|
||||||
|
down1 = initEntitySprites("objects/shield_blue");
|
||||||
|
defenseValue = 2;
|
||||||
|
|
||||||
|
price = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,15 +2,35 @@ package de.miaurizius.jgame2d.entity.item;
|
|||||||
|
|
||||||
import de.miaurizius.jgame2d.core.GamePanel;
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
import de.miaurizius.jgame2d.core.enums.EntityType;
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.GameState;
|
||||||
import de.miaurizius.jgame2d.entity.Entity;
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
public class KeyObj extends Entity {
|
public class KeyObj extends Entity {
|
||||||
|
|
||||||
public KeyObj(GamePanel panel) {
|
public KeyObj(GamePanel panel) {
|
||||||
super(panel);
|
super(panel);
|
||||||
name = "key";
|
name = "Normal Key";
|
||||||
|
description = "[" + name + "]\nIt opens a door.";
|
||||||
type = EntityType.ITEM;
|
type = EntityType.ITEM;
|
||||||
|
consumable = true;
|
||||||
down1 = initEntitySprites("objects/key");
|
down1 = initEntitySprites("objects/key");
|
||||||
|
|
||||||
|
price = 50;
|
||||||
|
stackable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean use(Entity entity) {
|
||||||
|
panel.gameState = GameState.DIALOGUE;
|
||||||
|
int objIndex = getDetected(entity, panel.obj, "door");
|
||||||
|
if(objIndex == 999) {
|
||||||
|
panel.ui.currentDialogue = "What are you doing?\nThere is no door nearby.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
panel.ui.currentDialogue = "You used a " + name + "!\nThe door is now open.";
|
||||||
|
panel.playSE(3);
|
||||||
|
panel.obj[panel.currentMap.getIndex()][objIndex] = null;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
19
src/de/miaurizius/jgame2d/entity/item/LanternObj.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package de.miaurizius.jgame2d.entity.item;
|
||||||
|
|
||||||
|
import de.miaurizius.jgame2d.core.GamePanel;
|
||||||
|
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||||
|
import de.miaurizius.jgame2d.entity.Entity;
|
||||||
|
|
||||||
|
public class LanternObj extends Entity {
|
||||||
|
|
||||||
|
public LanternObj(GamePanel panel) {
|
||||||
|
super(panel);
|
||||||
|
type = EntityType.LIGHT;
|
||||||
|
name = "Lantern";
|
||||||
|
down1 = initEntitySprites("objects/lantern");
|
||||||
|
description = "[" + name + "]\nA lantern that lights up\nthe surrounding area.";
|
||||||
|
price = 100;
|
||||||
|
lightRadius = 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||