mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Merge branch 'master' into title_screen
Conflicts: AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/PathFinder.java AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/MainView.java
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
"id":"mikhail_start_select_default",
|
||||
"replies":[
|
||||
{
|
||||
"nextPhraseID":"mikhail_visited",
|
||||
"nextPhraseID":"mikhail_default",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
@@ -114,9 +114,73 @@
|
||||
"id":"mikhail_default",
|
||||
"message":"Anything else I can help you with?",
|
||||
"replies":[
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_all_tasks_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_bread_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100,
|
||||
"negate":true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_rats_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100,
|
||||
"negate":true
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any tasks for me?",
|
||||
"nextPhraseID":"mikhail_tasks"
|
||||
"nextPhraseID":"mikhail_tasks",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100,
|
||||
"negate":true
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100,
|
||||
"negate":true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Is there anything else you can tell me about Andor?",
|
||||
@@ -142,6 +206,44 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_bread_done",
|
||||
"message":"Thanks for getting me the bread. There are still the rats.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"What about the rats?",
|
||||
"nextPhraseID":"mikhail_rats_select"
|
||||
},
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_rats_done",
|
||||
"message":"Thanks for taking care of the rats. I'd still love some bread.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"What about the bread?",
|
||||
"nextPhraseID":"mikhail_bread_select"
|
||||
},
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_all_tasks_done",
|
||||
"message":"Not for now. Thanks for taking care of the bread and rats.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_andor1",
|
||||
"message":"As I said, Andor went out yesterday and hasn't been back since. I'm starting to worry about him. Please go look for your brother, he said he would only be out a short while.",
|
||||
|
||||
@@ -1,245 +1,274 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE map SYSTEM 'http://mapeditor.org/dtd/1.0/map.dtd'><map height="30" orientation="orthogonal" tileheight="32" tilewidth="32" version="1.0" width="30">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="2017.05.26" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="32" tileheight="32" nextobjectid="17">
|
||||
<properties>
|
||||
<property name="outdoors" value="1"/>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tileset firstgid="1" name="map_bed_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bed_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="129" name="map_border_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_border_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="257" name="map_bridge_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bridge_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="385" name="map_bridge_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bridge_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="513" name="map_broken_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_broken_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="641" name="map_cavewall_1" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_1.png" width="576"/>
|
||||
</tileset><tileset firstgid="749" name="map_cavewall_2" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_2.png" width="576"/>
|
||||
</tileset><tileset firstgid="857" name="map_cavewall_3" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_3.png" width="576"/>
|
||||
</tileset><tileset firstgid="965" name="map_cavewall_4" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_4.png" width="576"/>
|
||||
</tileset><tileset firstgid="1073" name="map_chair_table_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_chair_table_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1201" name="map_chair_table_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_chair_table_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="1329" name="map_crate_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_crate_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1457" name="map_cupboard_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_cupboard_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1585" name="map_curtain_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_curtain_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1713" name="map_entrance_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_entrance_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1841" name="map_entrance_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_entrance_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="1969" name="map_fence_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="2097" name="map_fence_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="2225" name="map_fence_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="2353" name="map_fence_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="2481" name="map_ground_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="2609" name="map_ground_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="2737" name="map_ground_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="2865" name="map_ground_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="2993" name="map_ground_5" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_5.png" width="512"/>
|
||||
</tileset><tileset firstgid="3121" name="map_ground_6" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_6.png" width="512"/>
|
||||
</tileset><tileset firstgid="3249" name="map_ground_7" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_7.png" width="512"/>
|
||||
</tileset><tileset firstgid="3377" name="map_ground_8" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_8.png" width="512"/>
|
||||
</tileset><tileset firstgid="3505" name="map_house_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_house_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="3633" name="map_house_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_house_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="3761" name="map_indoor_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_indoor_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="3889" name="map_indoor_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_indoor_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4017" name="map_kitchen_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_kitchen_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4145" name="map_outdoor_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_outdoor_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4273" name="map_pillar_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_pillar_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4401" name="map_pillar_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_pillar_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4529" name="map_plant_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_plant_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4657" name="map_plant_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_plant_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4785" name="map_rock_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_rock_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4913" name="map_rock_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_rock_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="5041" name="map_roof_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5169" name="map_roof_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="5297" name="map_roof_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="5425" name="map_shop_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_shop_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5553" name="map_sign_ladder_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_sign_ladder_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5681" name="map_table_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_table_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5809" name="map_trail_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_trail_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5937" name="map_transition_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6065" name="map_transition_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="6193" name="map_transition_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="6321" name="map_transition_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="6449" name="map_transition_5" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_5.png" width="512"/>
|
||||
</tileset><tileset firstgid="6577" name="map_tree_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_tree_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6705" name="map_tree_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_tree_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="6833" name="map_wall_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6961" name="map_wall_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_2.png" width="480"/>
|
||||
</tileset><tileset firstgid="7081" name="map_wall_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_3.png" width="480"/>
|
||||
</tileset><tileset firstgid="7201" name="map_wall_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_4.png" width="480"/>
|
||||
</tileset><tileset firstgid="7321" name="map_window_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_window_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="7449" name="map_window_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_window_2.png" width="512"/>
|
||||
</tileset><layer height="30" name="Ground" width="30">
|
||||
<data compression="zlib" encoding="base64">eJztl0EOgjAQRRtdGNmybPQGcmKvIMYTQK+gl0AvAO5sI4RhnGkb6cjGxQtYSl87ob+xXClVWozl6qHq+1Gc+z6nQJ/LdoRq44Dj1gAD5lYTRHlzgv5ZhTwDcDyuVibgNfkneNyY2oTA3kYrdQc8dBpPyNtaz3qjVKffPAW9uPa/IPZb/ntlvLvMj5R3b8cusukV3kt5sQv/TuXFNTxkflJ5yRpSWY1yk20PPIdeXEMqq3FeT9oJuPdK5IXrxVlN5jXjIOeCvG7NBeFt9ZjTQ2bjvIYOPEeHb73O++0304A6dAQNU6e558JwfnHnVsuca855WyArl3CSeyy0HxMSs08liNqnAsTs0z/zcLlxZJD2xv6XSskLbjmFEg==</data>
|
||||
<tileset firstgid="1" name="map_bed_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bed_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="129" name="map_border_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_border_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="257" name="map_bridge_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bridge_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="385" name="map_bridge_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bridge_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="513" name="map_broken_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_broken_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="641" name="map_cavewall_1" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_1.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="749" name="map_cavewall_2" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_2.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="857" name="map_cavewall_3" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_3.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="965" name="map_cavewall_4" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_4.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1073" name="map_chair_table_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_chair_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1201" name="map_chair_table_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_chair_table_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1329" name="map_crate_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_crate_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1457" name="map_cupboard_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_cupboard_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1585" name="map_curtain_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_curtain_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1713" name="map_entrance_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_entrance_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1841" name="map_entrance_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_entrance_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1969" name="map_fence_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2097" name="map_fence_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2225" name="map_fence_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2353" name="map_fence_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2481" name="map_ground_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2609" name="map_ground_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2737" name="map_ground_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2865" name="map_ground_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2993" name="map_ground_5" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_5.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3121" name="map_ground_6" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_6.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3249" name="map_ground_7" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_7.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3377" name="map_ground_8" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_8.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3505" name="map_house_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_house_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3633" name="map_house_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_house_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3761" name="map_indoor_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_indoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3889" name="map_indoor_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_indoor_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4017" name="map_kitchen_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_kitchen_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4145" name="map_outdoor_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_outdoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4273" name="map_pillar_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_pillar_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4401" name="map_pillar_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_pillar_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4529" name="map_plant_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_plant_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4657" name="map_plant_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_plant_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4785" name="map_rock_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_rock_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4913" name="map_rock_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_rock_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5041" name="map_roof_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5169" name="map_roof_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5297" name="map_roof_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5425" name="map_shop_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_shop_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5553" name="map_sign_ladder_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_sign_ladder_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5681" name="map_table_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5809" name="map_trail_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_trail_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5937" name="map_transition_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6065" name="map_transition_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6193" name="map_transition_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6321" name="map_transition_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6449" name="map_transition_5" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_5.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6577" name="map_tree_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_tree_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6705" name="map_tree_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_tree_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6833" name="map_wall_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_wall_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6961" name="map_wall_2" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_2.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7081" name="map_wall_3" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_3.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7201" name="map_wall_4" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_4.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7321" name="map_window_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_window_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7449" name="map_window_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_window_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<layer name="Ground" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztlkEOgjAQRRtdGNmyJHoDObFXEOIJkCMgl0AvAO4ssQ3Dd6ZUpbpx8aIW6Wsn9A/ZQqlcU2vODirNQZMZToTS/KeAcUtmHMf1ADcmUYDHUpO1cWsuzD1Ob8xgrlXgsdD5pFrVE94yfgbn9anNFOhtEqUuhGsyj4fz0tq32rNcKdUlD26BvDlT+2/g+yz/vWG8m8hNKO9Wz51G40/6PZQXXfh7Li/WcBe5mcvL1pDLashNcXziOvViDbmsxrwejTNI92XgpfvFrGbzWnCwawFvv+eU8bbJkNM2szGvqQPX2OPab+9995lpSB06hkaoE/ajV7H9S+pbrdDXyh/1o1842TM2dR5nxOechsDrnAbA55z++Yw+N/YCob0SId+97knhh3c=
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Objects" width="30">
|
||||
<data compression="zlib" encoding="base64">eJytV89rE0EUXtJEakDJBBoJxD9B6KXVk+BB6cGrwZMHweLJkwqC+C940aPau0ELQttABSHttpsEFayJ9RAvomASETwXfK/zXufty2x2RT8YZnaz8773eyZB8H+wdyz9m3Y1CCIYQdm9a+TsHBk7hzR/pvl5brrMrxl4DzmJn9GE9a5J3+MD6hxWrG6nUvTTvCi3mSD7adHazzYjzw+h47nZIFgH3g69G4GcnzAGNOM+3DM2kzY0q+75N/jsFny3WbPPL4pxPR6K5z7IWiJejBvK+GIcJ88I1rUjdI7Iz+ynBzB3ifd6wX33DDhXYNwuuXfMi3b77JXciLbHrxinXyYe609i/RI4V4s23+4A992S471KvGi35B5X7fO46mxEcC5jDHH/AuxfpIGcOO8b9w5tXRTf1Ik3lP4zjkvmwtAEsTo6ynHYv5ZxvDru1p2K3f9+Sk0wBsQl7WubuC1J4xLZeFG8Ozsbl39g4ly+WB/5QPgpTNBd5vAScd0A3y+XbDwOeYSffXnG4NrYEVwzEIc8xaJnnEyE5O2LHJMYiXodefKL8V3ZlyfeGcGNeSztvZIhJnpwPLgn9zx+zZcn37G9G3+Rg3po9DPkI/Ouq/2R2JuUG2k4SNnn482CkcjnViXuY5k/K9QrsWe3YL1V+zdexEDlFeaMjvFqza0/wHoPxoWCn5f1upyL6ygx8tQv92HpY+xx9wq2byPOnLZxZN5ozvpC6nU/59aIN6TL+bzfXokFlfe6b9c99j4G/R6Js4v78jvS5VreX798p+mJfN9Q85rnt446E3ROhqKHIfj8bYi7SZqduv53EvJ+qLgY3CsbKfch9iWf94i25qLe0k25o8n+nFanzMvnve6l2h4ExzDy3Hf0eSTrdBvWIYzunOOV9cU9bb48aUfWmWOMdcp3q4+w7sFYLlhejtWEf4Pk+8y0MxDn12RzHThuFuK5zDmroXsLc/h6e8/4dWkJufp+hJA1GpNbdvdhiV2PDMRQ7Z2GJznH+y0l/2S++e4yjHm6a6YBed/SfymWx/7aN8nxGyTE9wTIOQnjD2MmYjM=</data>
|
||||
<layer name="Objects" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJylV89rE0EUXtJEakDJBBoJxD9B6KXVk+BB6cGroScPgsWTJxUE8V/woke1d4MWhLYBBSF2202CCq2J9RAvomASETwXfK/zXufty2x2pR8MM7vZed/7PZMgsNjNBcfC3on0b9rVIIhgBGX3rkG8kbFzSPNXml+k6PU9A+8hJ/EzmrDeMel7fECdw4rV7UwGv0lelNtMkP2saO1nm5Hnl9DxwmwQbABvh96NQM5vGAOacR/uGZtJG5pV9/wXfHYbvntTs88vi3E9HonnPshaIl6MG8r4ZhwnzwjWtSN0jsjP7KeHMHeJ90bBffccOFdh3Cm5d8yLdvvsldyItsevGKc/Jh7rL2L9CjjXijbf7gL3vZLjXSZetFtyj6v2eVx1NiI4lzGGuH8B9i/SQE6c9417h7Yuim/qxBtK/xnHJXNhaIJYHR3lOOxfzzhen3TrTsXu/zSlJhgD4pL2tU3clqRxhWy8LN6dn43LPzBxLl+sj3wg/BQm6C5zeIm4boLvV0o2Hoc8ws++PGNwbWwLrhmIQ55i0TNOJkLy9kWOSYxEvY48+cX4qezLE++M4MY8lvZeyxATPTge3JN7Hr/my5Pv2N7N/8hBPTT6GfKReTfU/kjsTcqNNByk7PPxZsFI5HOrEvexzJ9V6pXYs1uwfl87Hi9ioPIKc0bHeK3m1ruw3oNxqeDnZb2u5uI6Sow89ct9WPoYe9z9gu3biHNnbRyZN5qzvpB6Pci5NeId6XIx77dXYkHlve7bdY+9T0C/x+Ls4r78kXS5nvfXL99peiLfN9W87vmto84EnZOh6GEIPn8b4m6SZqeu/+2EvB8qLgb3ykbKfYh9yec9oq25qLd0U+5osj+n1Snz8nmve6m2B8ExjDz3HX0eyTrdgnUIozvneGV9cU+bL0/akXXmGGOd8t3qM6x7MFYKlpdjNeHfIPk+M+0MxPkt2VwHjluFeC5zzmro3sIcvt7eM35dWkKuvh8hZI3G5JbdfVhixyMDMVR7p+FpzvH+SMk/mW++uwxjnu6aaUDeD/RfiuWxv/ZNcvwGCfE9BXJOw/gHEIBjCA==
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Above" width="30">
|
||||
<data compression="zlib" encoding="base64">eJy9VktuAjEMTWdDVxUSiIqLcKN22RtxkEoVG05Au4VKcIP2AFVriWjM04vtpIS3mZl44hc7/qU04n2RumJ71v+6HNc+HE797395ce044f+fyLrlm/3fGQ/L8WntEd67e65nKKwzML8cDF8xH0RkDHuHW5/N0l3y6dM0pedp/DzM7t6xzCCxzO7lcUhpdb7blbpj/S7/1CLfQ+39tUDHeIbmFVs8G14G+9vi0uhtb6nm3MLPPXlrY8zj/Zy1n6WWV9fqH+DN9RrrOdZxJtc1m/HqWv0wv5Tlev0Fer/h25OvG++lhRdzyuu/GlJTd6R/Yd/y5IJrxLSnQ+RoL9tTqkOlfPF6C8rFx7fqRxjP18jRN2cG0z7OOYY5KmBzVQTaplJvyDGHOSqIzlU4x3l9SGDlTyTGLd2W3Jurdp3iDXl78SBqa2QEOK8zeQQbEpssXiPPKHLc6TO26NF7Bb9+MYAg</data>
|
||||
<layer name="Above" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJy9VktuwkAMdbNpVxUSiIqLcKN2yY04SCXUTU9A2UIluEF7AARWsXCfPLZnlORtkoxn/Mbxl+gPuznR15wGxedN//vivrYLOPXezH6PF9eOj/b+k7Hu/Zv99Y6Hxf3pnWHehydbT1dYt4D/hXEw1jRvi8zCPuDWd/N0l/7p64TobZK/D9o9RixbYF7LLy8d0fLm26XysX7nPbUQP9T6rwU6xgWal22JbFh1/rfHpTG0vZYPx+AtoS/e2hiLeL+n7Xep5dW1+gy8Uq+xnmMdt+S6Zlu8ulY/z/7LpF7/gN5f+I7k60a/tPBiTtX0U66pW6N/Yd+K5Iw+YjrSwXK01zpTqkOlfIl6C8rH7EcYz33k6MaZK4RTIDmGOcqw5qoMtE2l3iAxhznKyM5VOMdFfYjh5U8mxj3dnjyaq7YDxRvyDsWDqK2RGeC8bskz+DBi04rXzDMLiTt9xxY9+izjAqtAgts=
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Walkable" visible="0" width="30">
|
||||
<data compression="zlib" encoding="base64">eJzFlNERwCAIQ52i+6/ghv3teTUJCbbc+dMKDwI4rzHmzweZ4qsyVN8urloDur9qcZKLesDioZ6hGCoX8Zluqu1yZuxUf5a38s+t2TGnLlUzheXmzOKle1Lh7u5+UW/Xu4C4rlVnAb0RLMYpbtf8n+A6Gin5d+37s7a3b8k87+Kq9SLtTuySa6znipYJM425ap4wE+3dea+y05lms9nNXLWpGvPt7GNH/7tny62/sr/uuQFP8nz2</data>
|
||||
<layer name="Walkable" width="30" height="30" visible="0">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzFlNERwCAIQ52i+6/ghv3teTUJCbbc+dMKDwI4rzHmzweZ4qsyVN8urloDur9qcZKLesDioZ6hGCoX8Zluqu1yZuxUf5a38s+t2TGnLlUzheXmzOKle1Lh7u5+UW/Xu4C4rlVnAb0RLMYpbtf8n+A6Gin5d+37s7a3b8k87+Kq9SLtTuySa6znipYJM425ap4wE+3dea+y05lms9nNXLWpGvPt7GNH/7tny62/sr/uuQFP8nz2
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup name="Mapevents">
|
||||
<object height="32" name="cave" type="mapchange" width="32" x="576" y="32">
|
||||
<objectgroup name="Mapevents" visible="0">
|
||||
<object id="1" name="cave" type="mapchange" x="576" y="32" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_cave"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="hall" type="mapchange" width="32" x="544" y="608">
|
||||
<object id="2" name="hall" type="mapchange" x="544" y="608" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_hall"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="farmhouse" type="mapchange" width="32" x="320" y="544">
|
||||
<object id="3" name="farmhouse" type="mapchange" x="320" y="544" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_farmhouse"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="home" type="mapchange" width="32" x="160" y="160">
|
||||
<object id="4" name="home" type="mapchange" x="160" y="160" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="home"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="64" name="east" type="mapchange" width="32" x="928" y="416">
|
||||
<object id="5" name="east" type="mapchange" x="928" y="416" width="32" height="64">
|
||||
<properties>
|
||||
<property name="map" value="wild1"/>
|
||||
<property name="place" value="west"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="smith" type="mapchange" width="32" x="128" y="800">
|
||||
<object id="6" name="smith" type="mapchange" x="128" y="800" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_smith"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="south" type="mapchange" width="32" x="256" y="928">
|
||||
<object id="7" name="south" type="mapchange" x="256" y="928" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="wild2"/>
|
||||
<property name="place" value="north"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
<objectgroup name="Spawn">
|
||||
<object height="160" name="crossglen_wasp" type="spawn" width="192" x="736" y="160">
|
||||
<objectgroup name="Spawn" visible="0">
|
||||
<object id="8" name="crossglen_wasp" type="spawn" x="736" y="160" width="192" height="160">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="128" name="trainingrat" type="spawn" width="192" x="352" y="96">
|
||||
<object id="9" name="trainingrat" type="spawn" x="352" y="96" width="192" height="128">
|
||||
<properties>
|
||||
<property name="quantity" value="2"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="128" name="crossglen_farmer1" type="spawn" width="256" x="192" y="320"/>
|
||||
<object height="192" name="crossglen_farmer2" type="spawn" width="96" x="64" y="416"/>
|
||||
<object height="224" name="crossglen_beetle" type="spawn" width="384" x="32" y="320"/>
|
||||
<object height="96" name="crossglen_ant" type="spawn" width="384" x="512" y="832">
|
||||
<object id="10" name="crossglen_farmer1" type="spawn" x="192" y="320" width="256" height="128"/>
|
||||
<object id="11" name="crossglen_farmer2" type="spawn" x="64" y="416" width="96" height="192"/>
|
||||
<object id="12" name="crossglen_beetle" type="spawn" x="32" y="320" width="384" height="224"/>
|
||||
<object id="13" name="crossglen_ant" type="spawn" x="512" y="832" width="384" height="96">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="odair" type="spawn" width="32" x="896" y="32"/>
|
||||
<object height="32" name="oromir" type="spawn" width="32" x="896" y="864"/>
|
||||
<object height="32" name="halvor" type="spawn" width="32" x="736" y="608"/>
|
||||
<object id="14" name="odair" type="spawn" x="896" y="32" width="32" height="32"/>
|
||||
<object id="15" name="oromir" type="spawn" x="896" y="864" width="32" height="32"/>
|
||||
<object id="16" name="halvor" type="spawn" x="736" y="608" width="32" height="32"/>
|
||||
</objectgroup>
|
||||
<objectgroup name="Keys"/>
|
||||
</map>
|
||||
</map>
|
||||
|
||||
@@ -239,8 +239,10 @@ public final class ConversationActivity
|
||||
} else {
|
||||
conversation.nameColor = getSpanColor(R.attr.ui_theme_npcname_dark_color);
|
||||
}
|
||||
}else{
|
||||
} else if (conversation.isReward) {
|
||||
conversation.textColor = getSpanColor(R.attr.ui_theme_reward_light_color);
|
||||
} else {
|
||||
conversation.textColor = getSpanColor(R.attr.ui_theme_dialogue_dark_color);;
|
||||
}
|
||||
numberOfNewMessage--;
|
||||
}
|
||||
@@ -256,12 +258,12 @@ public final class ConversationActivity
|
||||
} else {
|
||||
if (rb == null) return;
|
||||
Reply r = (Reply) rb.getTag();
|
||||
addConversationStatement(player, rb.getText().toString(), getSpanColor(R.attr.ui_theme_dialogue_light_color));
|
||||
addConversationStatement(player, rb.getText().toString(), getSpanColor(R.attr.ui_theme_dialogue_light_color), false);
|
||||
conversationState.playerSelectedReply(getResources(), r);
|
||||
}
|
||||
}
|
||||
|
||||
private void addConversationStatement(Actor actor, String text, int textColor) {
|
||||
private void addConversationStatement(Actor actor, String text, int textColor, boolean isReward) {
|
||||
ConversationStatement s = new ConversationStatement();
|
||||
if (actor != null) {
|
||||
s.iconID = actor.iconID;
|
||||
@@ -273,6 +275,7 @@ public final class ConversationActivity
|
||||
s.nameColor = actor == player ? getSpanColor(R.attr.ui_theme_playername_light_color) : getSpanColor(R.attr.ui_theme_npcname_light_color);
|
||||
s.textColor = textColor;
|
||||
s.isPlayerActor = actor != null && actor == player;
|
||||
s.isReward = isReward;
|
||||
conversationHistory.add(s);
|
||||
numberOfNewMessage++;
|
||||
statementList.clearFocus();
|
||||
@@ -296,6 +299,7 @@ public final class ConversationActivity
|
||||
public int nameColor;
|
||||
public int textColor;
|
||||
public boolean isPlayerActor;
|
||||
public boolean isReward;
|
||||
|
||||
public boolean hasActor() {
|
||||
return iconID != NO_ICON;
|
||||
@@ -312,6 +316,7 @@ public final class ConversationActivity
|
||||
dest.writeInt(nameColor);
|
||||
dest.writeInt(textColor);
|
||||
dest.writeByte((byte) (isPlayerActor ? 1 : 0));
|
||||
dest.writeByte((byte) (isReward ? 1 : 0));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -325,6 +330,7 @@ public final class ConversationActivity
|
||||
result.nameColor = in.readInt();
|
||||
result.textColor = in.readInt();
|
||||
result.isPlayerActor = in.readByte() == 1;
|
||||
result.isReward = in.readByte() == 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -391,7 +397,7 @@ public final class ConversationActivity
|
||||
|
||||
@Override
|
||||
public void onTextPhraseReached(String message, Actor actor, String phraseID) {
|
||||
addConversationStatement(actor, message, getSpanColor(R.attr.ui_theme_dialogue_light_color));
|
||||
addConversationStatement(actor, message, getSpanColor(R.attr.ui_theme_dialogue_light_color), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -427,7 +433,7 @@ public final class ConversationActivity
|
||||
}
|
||||
|
||||
private void addRewardMessage(String text) {
|
||||
addConversationStatement(null, text, getSpanColor(R.attr.ui_theme_reward_light_color));
|
||||
addConversationStatement(null, text, getSpanColor(R.attr.ui_theme_reward_light_color), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -94,6 +94,9 @@ public final class ConversationController {
|
||||
case alignmentChange:
|
||||
addAlignmentReward(player, effect.effectID, effect.value);
|
||||
break;
|
||||
case alignmentSet:
|
||||
setAlignmentReward(player, effect.effectID, effect.value);
|
||||
break;
|
||||
case giveItem:
|
||||
addItemReward(effect.effectID, effect.value, result);
|
||||
break;
|
||||
@@ -172,6 +175,11 @@ public final class ConversationController {
|
||||
MovementController.refreshMonsterAggressiveness(world.model.currentMap, world.model.player);
|
||||
}
|
||||
|
||||
private void setAlignmentReward(Player player, String faction, int delta) {
|
||||
player.setAlignment(faction, delta);
|
||||
MovementController.refreshMonsterAggressiveness(world.model.currentMap, world.model.player);
|
||||
}
|
||||
|
||||
private void addQuestProgressReward(Player player, String questID, int questProgress, ScriptEffectResult result) {
|
||||
QuestProgress progress = new QuestProgress(questID, questProgress);
|
||||
boolean added = player.addQuestProgress(progress);
|
||||
|
||||
@@ -204,7 +204,10 @@ public final class MapController {
|
||||
hasUpdated = true;
|
||||
}
|
||||
}
|
||||
map.lastSeenLayoutHash = tileMap.getCurrentLayoutHash();
|
||||
if (map.lastSeenLayoutHash != tileMap.getCurrentLayoutHash()) {
|
||||
map.lastSeenLayoutHash = tileMap.getCurrentLayoutHash();
|
||||
hasUpdated = true;
|
||||
}
|
||||
return hasUpdated;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,21 +52,23 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean monsterCanMoveTo(final Monster movingMonster, final PredefinedMap map, final LayeredTileMap tilemap, final CoordRect p) {
|
||||
public static boolean monsterCanMoveTo(final Monster movingMonster, final PredefinedMap map, final LayeredTileMap tilemap, final CoordRect p, boolean ignoreAreas) {
|
||||
if (tilemap != null) {
|
||||
if (!tilemap.isWalkable(p)) return false;
|
||||
}
|
||||
if (map.getMonsterAt(p, movingMonster) != null) return false;
|
||||
|
||||
for (MapObject mObj : map.eventObjects) {
|
||||
if (mObj == null) continue;
|
||||
if (!mObj.isActive) continue;
|
||||
if (!mObj.position.intersects(p)) continue;
|
||||
switch (mObj.type) {
|
||||
if (!ignoreAreas) {
|
||||
for (MapObject mObj : map.eventObjects) {
|
||||
if (mObj == null) continue;
|
||||
if (!mObj.isActive) continue;
|
||||
if (!mObj.position.intersects(p)) continue;
|
||||
switch (mObj.type) {
|
||||
case newmap:
|
||||
case keyarea:
|
||||
case rest:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -82,7 +84,7 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
} else {
|
||||
determineMonsterNextPosition(m, area, world.model.player.position);
|
||||
|
||||
if (!monsterCanMoveTo(m, map, tileMap, m.nextPosition)) {
|
||||
if (!monsterCanMoveTo(m, map, tileMap, m.nextPosition, area.ignoreAreas)) {
|
||||
cancelCurrentMonsterMovement(m);
|
||||
return;
|
||||
}
|
||||
@@ -152,12 +154,12 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
|
||||
private final PathFinder pathfinder = new PathFinder(Constants.MAX_MAP_WIDTH, Constants.MAX_MAP_HEIGHT, this);
|
||||
public boolean findPathFor(Monster m, Coord to) {
|
||||
return pathfinder.findPathBetween(m.rectPosition, to, m.nextPosition);
|
||||
return pathfinder.findPathBetween(m.rectPosition, to, m.nextPosition, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWalkable(CoordRect r) {
|
||||
return monsterCanMoveTo(null, world.model.currentMap, world.model.currentTileMap, r);
|
||||
public boolean isWalkable(CoordRect r, Monster m) {
|
||||
return monsterCanMoveTo(null, world.model.currentMap, world.model.currentTileMap, r, m.area.ignoreAreas);
|
||||
}
|
||||
|
||||
public void moveMonsterToNextPosition(final Monster m, final PredefinedMap map) {
|
||||
|
||||
@@ -51,20 +51,20 @@ public final class MonsterSpawningController {
|
||||
}
|
||||
public boolean TEST_spawnInArea(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, MonsterType type) { return spawnInArea(map, tileMap, a, type, null); }
|
||||
private boolean spawnInArea(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, MonsterType type, Coord playerPosition) {
|
||||
Coord p = getRandomFreePosition(map, tileMap, a.area, type.tileSize, playerPosition);
|
||||
Coord p = getRandomFreePosition(map, tileMap, a, type.tileSize, playerPosition);
|
||||
if (p == null) return false;
|
||||
Monster m = a.spawn(p, type);
|
||||
monsterSpawnListeners.onMonsterSpawned(map, m);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Coord getRandomFreePosition(PredefinedMap map, LayeredTileMap tileMap, CoordRect area, Size requiredSize, Coord playerPosition) {
|
||||
public static Coord getRandomFreePosition(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, Size requiredSize, Coord playerPosition) {
|
||||
CoordRect p = new CoordRect(requiredSize);
|
||||
for(int i = 0; i < 100; ++i) {
|
||||
p.topLeft.set(
|
||||
area.topLeft.x + Constants.rnd.nextInt(area.size.width)
|
||||
,area.topLeft.y + Constants.rnd.nextInt(area.size.height));
|
||||
if (!MonsterMovementController.monsterCanMoveTo(null, map, tileMap, p)) continue;
|
||||
a.area.topLeft.x + Constants.rnd.nextInt(a.area.size.width)
|
||||
,a.area.topLeft.y + Constants.rnd.nextInt(a.area.size.height));
|
||||
if (!MonsterMovementController.monsterCanMoveTo(null, map, tileMap, p, a.ignoreAreas)) continue;
|
||||
if (playerPosition != null && p.contains(playerPosition)) continue;
|
||||
return p.topLeft;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ public final class MovementController implements TimedMessageTask.Callback {
|
||||
for (MonsterSpawnArea a : map.spawnAreas) {
|
||||
for (Monster m : a.monsters) {
|
||||
if (tileMap.isWalkable(m.rectPosition)) continue;
|
||||
Coord p = MonsterSpawningController.getRandomFreePosition(map, tileMap, a.area, m.tileSize, playerPosition);
|
||||
Coord p = MonsterSpawningController.getRandomFreePosition(map, tileMap, a, m.tileSize, playerPosition);
|
||||
if (p == null) continue;
|
||||
m.position.set(p);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gpl.rpg.AndorsTrail.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
|
||||
@@ -21,10 +22,10 @@ public class PathFinder {
|
||||
}
|
||||
|
||||
public interface EvaluateWalkable {
|
||||
public boolean isWalkable(CoordRect r);
|
||||
public boolean isWalkable(CoordRect r, Monster m);
|
||||
}
|
||||
|
||||
public boolean findPathBetween(final CoordRect from, final Coord to, CoordRect nextStep) {
|
||||
public boolean findPathBetween(final CoordRect from, final Coord to, CoordRect nextStep, Monster m) {
|
||||
int iterations = 0;
|
||||
if (from.contains(to)) return false;
|
||||
|
||||
@@ -44,19 +45,19 @@ public class PathFinder {
|
||||
|
||||
if (from.isAdjacentTo(p)) return true;
|
||||
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; p.y -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.y += 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo);
|
||||
p.y -= 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 1; p.y -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.y += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.y -= 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 2; visit(nextStep, measureDistanceTo, m);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void visit(CoordRect r, Coord measureDistanceTo) {
|
||||
private void visit(CoordRect r, Coord measureDistanceTo, Monster m) {
|
||||
final int x = r.topLeft.x;
|
||||
final int y = r.topLeft.y;
|
||||
|
||||
@@ -68,7 +69,7 @@ public class PathFinder {
|
||||
final int i = (y * maxWidth) + x;
|
||||
if (visited[i]) return;
|
||||
visited[i] = true;
|
||||
if (!map.isWalkable(r)) return;
|
||||
if (!map.isWalkable(r, m)) return;
|
||||
|
||||
int dx = (measureDistanceTo.x - x);
|
||||
int dy = (measureDistanceTo.y - y);
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class VisualEffectController {
|
||||
|
||||
public final class SpriteMoveAnimation extends Handler implements Runnable {
|
||||
|
||||
private static final int millisecondsPerFrame=25;
|
||||
// private static final int millisecondsPerFrame=25;
|
||||
|
||||
private final VisualEffectCompletedCallback callback;
|
||||
private final int callbackValue;
|
||||
@@ -80,12 +80,12 @@ public final class VisualEffectController {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
update();
|
||||
if (System.currentTimeMillis() - actor.vfxStartTime >= duration) {
|
||||
onCompleted();
|
||||
} else {
|
||||
postDelayed(this, millisecondsPerFrame);
|
||||
}
|
||||
onCompleted();
|
||||
// update();
|
||||
// if (System.currentTimeMillis() - actor.vfxStartTime >= duration) {
|
||||
// } else {
|
||||
// postDelayed(this, millisecondsPerFrame);
|
||||
// }
|
||||
}
|
||||
|
||||
public SpriteMoveAnimation(Coord origin, Coord destination, int duration, Actor actor, VisualEffectCompletedCallback callback, int callbackValue) {
|
||||
@@ -98,10 +98,10 @@ public final class VisualEffectController {
|
||||
|
||||
}
|
||||
|
||||
private void update() {
|
||||
|
||||
visualEffectFrameListeners.onNewSpriteMoveFrame(this);
|
||||
}
|
||||
// private void update() {
|
||||
//
|
||||
// visualEffectFrameListeners.onNewSpriteMoveFrame(this);
|
||||
// }
|
||||
|
||||
private void onCompleted() {
|
||||
--effectCount;
|
||||
@@ -115,8 +115,11 @@ public final class VisualEffectController {
|
||||
actor.hasVFXRunning = true;
|
||||
actor.vfxDuration = duration;
|
||||
actor.vfxStartTime = System.currentTimeMillis();
|
||||
visualEffectFrameListeners.onSpriteMoveStarted(this);
|
||||
if (duration == 0 || !controllers.preferences.enableUiAnimations) onCompleted();
|
||||
else postDelayed(this, 0);
|
||||
else {
|
||||
postDelayed(this, duration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gpl.rpg.AndorsTrail.controller.VisualEffectController.VisualEffectAni
|
||||
public interface VisualEffectFrameListener {
|
||||
void onNewAnimationFrame(VisualEffectAnimation animation, int tileID, int textYOffset);
|
||||
void onAnimationCompleted(VisualEffectAnimation animation);
|
||||
void onSpriteMoveStarted(SpriteMoveAnimation animation);
|
||||
void onNewSpriteMoveFrame(SpriteMoveAnimation animation);
|
||||
void onSpriteMoveCompleted(SpriteMoveAnimation animation);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ public final class VisualEffectFrameListeners extends ListOfListeners<VisualEffe
|
||||
@Override public void call(VisualEffectFrameListener listener, VisualEffectAnimation animation) { listener.onAnimationCompleted(animation); }
|
||||
};
|
||||
|
||||
private final Function1<VisualEffectFrameListener, SpriteMoveAnimation> onSpriteMoveStarted = new Function1<VisualEffectFrameListener, SpriteMoveAnimation>() {
|
||||
@Override public void call(VisualEffectFrameListener listener, SpriteMoveAnimation animation) { listener.onSpriteMoveStarted(animation); }
|
||||
};
|
||||
|
||||
private final Function1<VisualEffectFrameListener, SpriteMoveAnimation> onNewSpriteMoveFrame = new Function1<VisualEffectFrameListener, SpriteMoveAnimation>() {
|
||||
@Override public void call(VisualEffectFrameListener listener, SpriteMoveAnimation animation) { listener.onNewSpriteMoveFrame(animation); }
|
||||
};
|
||||
@@ -32,6 +36,11 @@ public final class VisualEffectFrameListeners extends ListOfListeners<VisualEffe
|
||||
callAllListeners(this.onAnimationCompleted, animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpriteMoveStarted(SpriteMoveAnimation animation) {
|
||||
callAllListeners(this.onSpriteMoveStarted, animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewSpriteMoveFrame(SpriteMoveAnimation animation) {
|
||||
callAllListeners(this.onNewSpriteMoveFrame, animation);
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.gpl.rpg.AndorsTrail.model.ability.SkillCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.DropList;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemContainer;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.Loot;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.savegames.LegacySavegameFormatReaderForMonster;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
@@ -25,10 +26,12 @@ public final class Monster extends Actor {
|
||||
private ItemContainer shopItems = null;
|
||||
|
||||
private final MonsterType monsterType;
|
||||
public final MonsterSpawnArea area;
|
||||
|
||||
public Monster(MonsterType monsterType) {
|
||||
public Monster(MonsterType monsterType, MonsterSpawnArea area) {
|
||||
super(monsterType.tileSize, false, monsterType.isImmuneToCriticalHits());
|
||||
this.monsterType = monsterType;
|
||||
this.area = area;
|
||||
this.iconID = monsterType.iconID;
|
||||
this.nextPosition = new CoordRect(new Coord(), monsterType.tileSize);
|
||||
resetStatsToBaseTraits();
|
||||
@@ -95,20 +98,20 @@ public final class Monster extends Actor {
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
|
||||
public static Monster newFromParcel(DataInputStream src, WorldContext world, int fileversion) throws IOException {
|
||||
public static Monster newFromParcel(DataInputStream src, WorldContext world, int fileversion, MonsterSpawnArea area) throws IOException {
|
||||
String monsterTypeId = src.readUTF();
|
||||
if (fileversion < 20) {
|
||||
monsterTypeId = monsterTypeId.replace(' ', '_').replace("\\'", "").toLowerCase();
|
||||
}
|
||||
MonsterType monsterType = world.monsterTypes.getMonsterType(monsterTypeId);
|
||||
|
||||
if (fileversion < 25) return LegacySavegameFormatReaderForMonster.newFromParcel_pre_v25(src, fileversion, monsterType);
|
||||
if (fileversion < 25) return LegacySavegameFormatReaderForMonster.newFromParcel_pre_v25(src, fileversion, monsterType, area);
|
||||
|
||||
return new Monster(src, world, fileversion, monsterType);
|
||||
return new Monster(src, world, fileversion, monsterType, area);
|
||||
}
|
||||
|
||||
private Monster(DataInputStream src, WorldContext world, int fileversion, MonsterType monsterType) throws IOException {
|
||||
this(monsterType);
|
||||
private Monster(DataInputStream src, WorldContext world, int fileversion, MonsterType monsterType, MonsterSpawnArea area) throws IOException {
|
||||
this(monsterType, area);
|
||||
|
||||
boolean readCombatTraits = true;
|
||||
if (fileversion >= 25) readCombatTraits = src.readBoolean();
|
||||
|
||||
@@ -24,7 +24,11 @@ public final class MonsterTypeCollection {
|
||||
for (MonsterType t : monsterTypesById.values()) {
|
||||
if (t.spawnGroup.equalsIgnoreCase(spawnGroup)) result.add(t);
|
||||
}
|
||||
|
||||
//If the spawnGroup is empty, it should be a direct reference to a MonsterType's id.
|
||||
if (result.isEmpty()) {
|
||||
MonsterType t = monsterTypesById.get(spawnGroup);
|
||||
if (t != null) result.add(t);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -38,9 +42,4 @@ public final class MonsterTypeCollection {
|
||||
public void initialize(MonsterTypeParser parser, String input) {
|
||||
parser.parseRows(input, monsterTypesById);
|
||||
}
|
||||
|
||||
// Unit test method. Not part of the game logic.
|
||||
public HashMap<String, MonsterType> UNITTEST_getAllMonsterTypes() {
|
||||
return monsterTypesById;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +202,9 @@ public final class Player extends Actor {
|
||||
if (v == null) return 0;
|
||||
return v;
|
||||
}
|
||||
public void setAlignment(String faction, int newValue) {
|
||||
alignments.put(faction, newValue);
|
||||
}
|
||||
public void addAlignment(String faction, int delta) {
|
||||
int newValue = getAlignment(faction) + delta;
|
||||
alignments.put(faction, newValue);
|
||||
|
||||
@@ -7,6 +7,7 @@ public final class MapSection {
|
||||
public final MapLayer layerGround;
|
||||
public final MapLayer layerObjects;
|
||||
public final MapLayer layerAbove;
|
||||
public final MapLayer layerTop;
|
||||
public final boolean[][] isWalkable;
|
||||
private final byte[] layoutHash;
|
||||
|
||||
@@ -14,12 +15,14 @@ public final class MapSection {
|
||||
MapLayer layerGround
|
||||
, MapLayer layerObjects
|
||||
, MapLayer layerAbove
|
||||
, MapLayer layerTop
|
||||
, boolean[][] isWalkable
|
||||
, byte[] layoutHash
|
||||
) {
|
||||
this.layerGround = layerGround;
|
||||
this.layerObjects = layerObjects;
|
||||
this.layerAbove = layerAbove;
|
||||
this.layerTop = layerTop;
|
||||
this.isWalkable = isWalkable;
|
||||
this.layoutHash = layoutHash;
|
||||
}
|
||||
@@ -28,6 +31,7 @@ public final class MapSection {
|
||||
replaceTileLayerSection(layerGround, replaceLayersWith.layerGround, replacementArea);
|
||||
replaceTileLayerSection(layerObjects, replaceLayersWith.layerObjects, replacementArea);
|
||||
replaceTileLayerSection(layerAbove, replaceLayersWith.layerAbove, replacementArea);
|
||||
replaceTileLayerSection(layerTop, replaceLayersWith.layerTop, replacementArea);
|
||||
if (replaceLayersWith.isWalkable != null) {
|
||||
final int dy = replacementArea.topLeft.y;
|
||||
final int height = replacementArea.size.height;
|
||||
|
||||
@@ -21,6 +21,7 @@ public final class MonsterSpawnArea {
|
||||
public final String[] monsterTypeIDs;
|
||||
public final ArrayList<Monster> monsters = new ArrayList<Monster>();
|
||||
public final boolean isUnique; // unique == non-respawnable
|
||||
public final boolean ignoreAreas; //Can spawn on other game objects area.
|
||||
private final String group;
|
||||
public boolean isSpawning;
|
||||
public final boolean isSpawningForNewGame;
|
||||
@@ -32,6 +33,7 @@ public final class MonsterSpawnArea {
|
||||
, String areaID
|
||||
, String[] monsterTypeIDs
|
||||
, boolean isUnique
|
||||
, boolean ignoreAreas
|
||||
, String group
|
||||
, boolean isSpawningForNewGame
|
||||
) {
|
||||
@@ -41,6 +43,7 @@ public final class MonsterSpawnArea {
|
||||
this.areaID = areaID;
|
||||
this.monsterTypeIDs = monsterTypeIDs;
|
||||
this.isUnique = isUnique;
|
||||
this.ignoreAreas = ignoreAreas;
|
||||
this.group = group;
|
||||
this.isSpawningForNewGame = isSpawningForNewGame;
|
||||
this.isSpawning = isSpawningForNewGame;
|
||||
@@ -79,7 +82,7 @@ public final class MonsterSpawnArea {
|
||||
spawn(p, context.monsterTypes.getMonsterType(monsterTypeID));
|
||||
}
|
||||
public Monster spawn(Coord p, MonsterType type) {
|
||||
Monster m = new Monster(type);
|
||||
Monster m = new Monster(type, this);
|
||||
m.position.set(p);
|
||||
monsters.add(m);
|
||||
quantity.current++;
|
||||
@@ -125,7 +128,7 @@ public final class MonsterSpawnArea {
|
||||
if (fileversion >= 41) isSpawning = src.readBoolean();
|
||||
quantity.current = src.readInt();
|
||||
for(int i = 0; i < quantity.current; ++i) {
|
||||
monsters.add(Monster.newFromParcel(src, world, fileversion));
|
||||
monsters.add(Monster.newFromParcel(src, world, fileversion, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ public final class TMXMapTranslator {
|
||||
mapObjects.add(MapObject.createMapChangeArea(position, object.name, map, place, group.name));
|
||||
} else if (object.type.equalsIgnoreCase("spawn")) {
|
||||
boolean isActiveForNewGame = true;
|
||||
boolean ignoreAreas = false;
|
||||
int maxQuantity = 1;
|
||||
int spawnChance = 10;
|
||||
String spawnGroup = object.name;
|
||||
@@ -125,6 +126,8 @@ public final class TMXMapTranslator {
|
||||
spawnChance = Integer.parseInt(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("active")) {
|
||||
isActiveForNewGame = Boolean.parseBoolean(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("ignoreAreas")) {
|
||||
ignoreAreas = Boolean.parseBoolean(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("spawngroup")) {
|
||||
spawnGroup = p.value;
|
||||
} else if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
@@ -152,6 +155,7 @@ public final class TMXMapTranslator {
|
||||
,object.name
|
||||
,monsterTypeIDs
|
||||
,isUnique
|
||||
,ignoreAreas
|
||||
,group.name
|
||||
,isActiveForNewGame
|
||||
);
|
||||
@@ -256,9 +260,10 @@ public final class TMXMapTranslator {
|
||||
private static final String LAYERNAME_GROUND = "ground";
|
||||
private static final String LAYERNAME_OBJECTS = "objects";
|
||||
private static final String LAYERNAME_ABOVE = "above";
|
||||
private static final String LAYERNAME_TOP = "top";
|
||||
private static final String LAYERNAME_WALKABLE = "walkable";
|
||||
private static final String PROPNAME_FILTER = "colorfilter";
|
||||
private static final SetOfLayerNames defaultLayerNames = new SetOfLayerNames(LAYERNAME_GROUND, LAYERNAME_OBJECTS, LAYERNAME_ABOVE, LAYERNAME_WALKABLE);
|
||||
private static final SetOfLayerNames defaultLayerNames = new SetOfLayerNames(LAYERNAME_GROUND, LAYERNAME_OBJECTS, LAYERNAME_ABOVE, LAYERNAME_TOP, LAYERNAME_WALKABLE);
|
||||
|
||||
private static LayeredTileMap transformMap(TMXLayerMap map, TileCache tileCache) {
|
||||
final Size mapSize = new Size(map.width, map.height);
|
||||
@@ -303,6 +308,7 @@ public final class TMXMapTranslator {
|
||||
if (prop.name.equalsIgnoreCase(LAYERNAME_GROUND)) layerNames.groundLayerName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_OBJECTS)) layerNames.objectsLayerName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_ABOVE)) layerNames.aboveLayersName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_TOP)) layerNames.topLayersName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_WALKABLE)) layerNames.walkableLayersName = prop.value;
|
||||
else if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
if (!requirementPropertiesNames.contains(prop.name))
|
||||
@@ -344,9 +350,10 @@ public final class TMXMapTranslator {
|
||||
final MapLayer layerGround = transformMapLayer(layersPerLayerName, layerNames.groundLayerName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerObjects = transformMapLayer(layersPerLayerName, layerNames.objectsLayerName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerAbove = transformMapLayer(layersPerLayerName, layerNames.aboveLayersName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerTop = transformMapLayer(layersPerLayerName, layerNames.topLayersName, srcMap, tileCache, area, usedTileIDs);
|
||||
boolean[][] isWalkable = transformWalkableMapLayer(findLayer(layersPerLayerName, layerNames.walkableLayersName, srcMap.name), area);
|
||||
byte[] layoutHash = calculateLayoutHash(srcMap, layersPerLayerName, layerNames);
|
||||
return new MapSection(layerGround, layerObjects, layerAbove, isWalkable, layoutHash);
|
||||
return new MapSection(layerGround, layerObjects, layerAbove, layerTop, isWalkable, layoutHash);
|
||||
}
|
||||
|
||||
private static TMXLayer findLayer(HashMap<String, TMXLayer> layersPerLayerName, String layerName, String mapName) {
|
||||
@@ -447,17 +454,20 @@ public final class TMXMapTranslator {
|
||||
public String groundLayerName;
|
||||
public String objectsLayerName;
|
||||
public String aboveLayersName;
|
||||
public String topLayersName;
|
||||
public String walkableLayersName;
|
||||
public SetOfLayerNames() {
|
||||
this.groundLayerName = null;
|
||||
this.objectsLayerName = null;
|
||||
this.aboveLayersName = null;
|
||||
this.topLayersName = null;
|
||||
this.walkableLayersName = null;
|
||||
}
|
||||
public SetOfLayerNames(String groundLayerName, String objectsLayerName, String aboveLayersName, String walkableLayersName) {
|
||||
public SetOfLayerNames(String groundLayerName, String objectsLayerName, String aboveLayersName, String topLayersName, String walkableLayersName) {
|
||||
this.groundLayerName = groundLayerName;
|
||||
this.objectsLayerName = objectsLayerName;
|
||||
this.aboveLayersName = aboveLayersName;
|
||||
this.topLayersName = topLayersName;
|
||||
this.walkableLayersName = walkableLayersName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ public final class ScriptEffect {
|
||||
, actorCondition
|
||||
, actorConditionImmunity
|
||||
, alignmentChange
|
||||
, alignmentSet
|
||||
, giveItem
|
||||
, createTimer
|
||||
, spawnAll
|
||||
|
||||
@@ -5,11 +5,12 @@ import java.io.IOException;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.MonsterType;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
|
||||
public final class LegacySavegameFormatReaderForMonster {
|
||||
public static Monster newFromParcel_pre_v25(DataInputStream src, int fileversion, MonsterType monsterType) throws IOException {
|
||||
Monster m = new Monster(monsterType);
|
||||
public static Monster newFromParcel_pre_v25(DataInputStream src, int fileversion, MonsterType monsterType, MonsterSpawnArea area) throws IOException {
|
||||
Monster m = new Monster(monsterType, area);
|
||||
m.position.set(new Coord(src, fileversion));
|
||||
m.ap.current = src.readInt();
|
||||
m.health.current = src.readInt();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.gpl.rpg.AndorsTrail.view;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
@@ -40,6 +42,7 @@ import com.gpl.rpg.AndorsTrail.resource.tiles.TileCollection;
|
||||
import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
import com.gpl.rpg.AndorsTrail.util.Size;
|
||||
|
||||
public final class MainView extends SurfaceView
|
||||
@@ -91,9 +94,6 @@ public final class MainView extends SurfaceView
|
||||
private LayeredTileMap currentTileMap;
|
||||
private TileCollection tiles;
|
||||
|
||||
private Bitmap groundBitmap = null;
|
||||
// private Bitmap objectsBitmap = null;
|
||||
private Bitmap aboveBitmap = null;
|
||||
private final Coord playerPosition = new Coord();
|
||||
private Size surfaceSize;
|
||||
private boolean redrawNextTick = false;
|
||||
@@ -103,6 +103,8 @@ public final class MainView extends SurfaceView
|
||||
private long scrollStartTime;
|
||||
//TODO restore private final modifiers before release
|
||||
public static long SCROLL_DURATION = Constants.MINIMUM_INPUT_INTERVAL;
|
||||
private int movingSprites = 0;
|
||||
private SpriteMoveAnimationHandler movingSpritesRedrawTick = new SpriteMoveAnimationHandler(this);
|
||||
|
||||
|
||||
public MainView(Context context, AttributeSet attr) {
|
||||
@@ -178,6 +180,7 @@ public final class MainView extends SurfaceView
|
||||
@Override
|
||||
public void surfaceDestroyed(SurfaceHolder sh) {
|
||||
hasSurface = false;
|
||||
movingSpritesRedrawTick.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -208,7 +211,7 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
private static enum RedrawAllDebugReason {
|
||||
SurfaceChanged, MapChanged, PlayerMoved, MapScrolling, FilterAnimation
|
||||
SurfaceChanged, MapChanged, PlayerMoved, SpriteMoved, MapScrolling, FilterAnimation
|
||||
}
|
||||
private static enum RedrawAreaDebugReason {
|
||||
MonsterMoved, MonsterKilled, EffectCompleted
|
||||
@@ -219,6 +222,7 @@ public final class MainView extends SurfaceView
|
||||
|
||||
private void redrawAll(RedrawAllDebugReason why) {
|
||||
if (scrolling && why != RedrawAllDebugReason.MapScrolling) return;
|
||||
if (!scrolling && movingSprites > 0 && why != RedrawAllDebugReason.SpriteMoved) return;
|
||||
redrawArea_(mapViewArea, null, 0, 0);
|
||||
}
|
||||
private void redrawTile(final Coord p, RedrawTileDebugReason why) {
|
||||
@@ -435,11 +439,8 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
private void doDrawRect_Ground(Canvas canvas, CoordRect area) {
|
||||
if (!tryDrawMapBitmap(canvas, area, groundBitmap)) {
|
||||
drawMapLayer(canvas, area, currentTileMap.currentLayout.layerGround);
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerObjects);
|
||||
}
|
||||
|
||||
drawMapLayer(canvas, area, currentTileMap.currentLayout.layerGround);
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerObjects);
|
||||
}
|
||||
|
||||
private void doDrawRect_Objects(Canvas canvas, CoordRect area) {
|
||||
@@ -482,9 +483,8 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
private void doDrawRect_Above(Canvas canvas, CoordRect area) {
|
||||
if (!tryDrawMapBitmap(canvas, area, aboveBitmap)) {
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerAbove);
|
||||
}
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerAbove);
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerTop);
|
||||
|
||||
if (model.uiSelections.selectedPosition != null) {
|
||||
if (model.uiSelections.selectedMonster != null) {
|
||||
@@ -495,18 +495,6 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
}
|
||||
|
||||
private boolean tryDrawMapBitmap(Canvas canvas, final CoordRect area, final Bitmap bitmap) {
|
||||
if (bitmap != null) {
|
||||
drawMapBitmap(canvas, area, bitmap);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void drawMapBitmap(Canvas canvas, final CoordRect area, final Bitmap bitmap){
|
||||
canvas.drawBitmap(bitmap, -mapViewArea.topLeft.x * tileSize, -mapViewArea.topLeft.y * tileSize, mPaint);
|
||||
}
|
||||
|
||||
private void tryDrawMapLayer(Canvas canvas, final CoordRect area, final MapLayer layer) {
|
||||
if (layer != null) drawMapLayer(canvas, area, layer);
|
||||
}
|
||||
@@ -530,25 +518,6 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
}
|
||||
|
||||
private void drawMapLayerOffscreen(Canvas canvas, final MapLayer layer) {
|
||||
int my = 0;
|
||||
int py = 0;
|
||||
int px0 = 0;
|
||||
for (int y = 0; y < currentMap.size.height; ++y, ++my, py += tileSize) {
|
||||
int mx = 0;
|
||||
if (my < 0) continue;
|
||||
if (my >= currentMap.size.height) break;
|
||||
int px = px0;
|
||||
for (int x = 0; x < currentMap.size.width; ++x, ++mx, px += tileSize) {
|
||||
if (mx < 0) continue;
|
||||
if (mx >= currentMap.size.width) break;
|
||||
final int tile = layer.tiles[mx][my];
|
||||
if (tile == 0) continue;
|
||||
tiles.drawTile(canvas, tile, px, py, mPaint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void drawFromMapPosition(Canvas canvas, final CoordRect area, final Coord p, final int tile) {
|
||||
if (!area.contains(p)) return;
|
||||
_drawFromMapPosition(canvas, area, p.x, p.y, tile);
|
||||
@@ -574,11 +543,12 @@ public final class MainView extends SurfaceView
|
||||
|
||||
@Override
|
||||
public void onPlayerEnteredNewMap(PredefinedMap map, Coord p) {
|
||||
movingSpritesRedrawTick.start();
|
||||
synchronized (holder) {
|
||||
currentMap = map;
|
||||
currentTileMap = model.currentTileMap;
|
||||
tiles = world.tileManager.currentMapTiles;
|
||||
|
||||
movingSprites = 0;
|
||||
Size visibleNumberOfTiles = new Size(
|
||||
Math.min(screenSizeTileCount.width, currentMap.size.width)
|
||||
,Math.min(screenSizeTileCount.height, currentMap.size.height)
|
||||
@@ -604,8 +574,6 @@ public final class MainView extends SurfaceView
|
||||
|
||||
clearCanvas();
|
||||
|
||||
updateBitmaps();
|
||||
|
||||
recalculateMapTopLeft(model.player.position, false);
|
||||
redrawAll(RedrawAllDebugReason.MapChanged);
|
||||
}
|
||||
@@ -629,7 +597,7 @@ public final class MainView extends SurfaceView
|
||||
if (allowScrolling) {
|
||||
if (mapTopLeft.x != oldX || mapTopLeft.y != oldY) {
|
||||
scrollVector = new Coord(mapTopLeft.x - oldX, mapTopLeft.y - oldY);
|
||||
new ScrollAnimationHandler().start();
|
||||
new ScrollAnimationHandler(this).start();
|
||||
}
|
||||
} else {
|
||||
scrolling = false;
|
||||
@@ -641,63 +609,22 @@ public final class MainView extends SurfaceView
|
||||
worldCoordsToScreenCords(mapViewArea, redrawClip);
|
||||
}
|
||||
|
||||
// private void printMem() {
|
||||
// Runtime r = Runtime.getRuntime();
|
||||
// L.log("---------------------------------------");
|
||||
// L.log("Max : "+r.maxMemory()/1024);
|
||||
// L.log("Tot : "+r.totalMemory()/1024);
|
||||
// L.log("Use : "+(r.totalMemory()-r.freeMemory())/1024);
|
||||
// L.log("Fre : "+r.freeMemory()/1024);
|
||||
// }
|
||||
|
||||
private void updateBitmaps() {
|
||||
|
||||
//CPU and pixel fill-rate optimization, but makes low heap-size devices throw an OutOfMemoryError... disabled for now.
|
||||
// Canvas bitmapDrawingCanvas;
|
||||
//
|
||||
// printMem();
|
||||
//
|
||||
// if (groundBitmap != null) {
|
||||
// groundBitmap.recycle();
|
||||
// groundBitmap = null;
|
||||
// }
|
||||
// if (aboveBitmap != null) {
|
||||
// aboveBitmap.recycle();
|
||||
// aboveBitmap = null;
|
||||
// }
|
||||
//
|
||||
// System.gc();
|
||||
//
|
||||
// long freeMemRequired = tileSize * tileSize * currentMap.size.width * currentMap.size.height * 4 /*RGBA_8888*/ * 3 /*Require three times the needed size, to leave room for others*/;
|
||||
// Runtime r = Runtime.getRuntime();
|
||||
//
|
||||
// if (currentTileMap.currentLayout.layerGround != null && r.maxMemory() - r.totalMemory() > freeMemRequired) {
|
||||
// groundBitmap = Bitmap.createBitmap(currentMap.size.width * tileSize, currentMap.size.height * tileSize, Config.ARGB_8888);
|
||||
// bitmapDrawingCanvas = new Canvas(groundBitmap);
|
||||
// drawMapLayerOffscreen(bitmapDrawingCanvas, currentTileMap.currentLayout.layerGround);
|
||||
// if (currentTileMap.currentLayout.layerObjects != null) {
|
||||
// drawMapLayerOffscreen(bitmapDrawingCanvas, currentTileMap.currentLayout.layerObjects);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (currentTileMap.currentLayout.layerAbove != null && r.maxMemory() - r.totalMemory() > freeMemRequired) {
|
||||
// aboveBitmap = Bitmap.createBitmap(currentMap.size.width * tileSize, currentMap.size.height * tileSize, Config.ARGB_8888);
|
||||
// bitmapDrawingCanvas = new Canvas(aboveBitmap);
|
||||
// drawMapLayerOffscreen(bitmapDrawingCanvas, currentTileMap.currentLayout.layerAbove);
|
||||
// }
|
||||
|
||||
// printMem();
|
||||
//
|
||||
}
|
||||
|
||||
public final class ScrollAnimationHandler extends Handler implements Runnable {
|
||||
public static final class ScrollAnimationHandler extends Handler implements Runnable {
|
||||
|
||||
private static final int FRAME_DURATION = 40;
|
||||
|
||||
private final WeakReference<MainView> view;
|
||||
|
||||
public ScrollAnimationHandler(MainView view) {
|
||||
this.view = new WeakReference<MainView>(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (System.currentTimeMillis() - scrollStartTime >= SCROLL_DURATION) {
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
if (System.currentTimeMillis() - v.scrollStartTime >= SCROLL_DURATION) {
|
||||
onCompleted();
|
||||
} else {
|
||||
postDelayed(this, FRAME_DURATION);
|
||||
@@ -706,22 +633,77 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
private void update() {
|
||||
redrawAll(RedrawAllDebugReason.MapScrolling);
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
v.redrawAll(RedrawAllDebugReason.MapScrolling);
|
||||
}
|
||||
|
||||
private void onCompleted() {
|
||||
scrolling = false;
|
||||
scrollVector = null;
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
v.scrolling = false;
|
||||
v.scrollVector = null;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
scrolling = true;
|
||||
scrollStartTime = System.currentTimeMillis();
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
v.scrolling = true;
|
||||
v.scrollStartTime = System.currentTimeMillis();
|
||||
postDelayed(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static final class SpriteMoveAnimationHandler extends Handler implements Runnable {
|
||||
|
||||
private static final int FRAME_DURATION = 40;
|
||||
private final WeakReference<MainView> view;
|
||||
private boolean stop = true;
|
||||
|
||||
public SpriteMoveAnimationHandler(MainView view) {
|
||||
this.view = new WeakReference<MainView>(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!stop) postDelayed(this, FRAME_DURATION);
|
||||
update();
|
||||
}
|
||||
|
||||
private void update() {
|
||||
// L.log("stop="+stop+" - scroll="+scrolling+" - moving="+movingSprites);
|
||||
if (stop) return;
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
if (!v.scrolling) {
|
||||
if (v.movingSprites > 0) {
|
||||
//TODO : limit redraw area when shouldRedrawEverything() returns false.
|
||||
//Implies keeping track of the animation bounding box in a thread-safe way... :'(
|
||||
v.redrawAll(RedrawAllDebugReason.SpriteMoved);
|
||||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
if (v.movingSprites <= 0) stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (stop) {
|
||||
stop = false;
|
||||
MainView v = view.get();
|
||||
if (v == null) return;
|
||||
if (v.controllers.preferences.enableUiAnimations) postDelayed(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
stop = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onPlayerMoved(Coord newPosition, Coord previousPosition) {
|
||||
recalculateMapTopLeft(newPosition, preferences.enableUiAnimations);
|
||||
@@ -829,7 +811,6 @@ public final class MainView extends SurfaceView
|
||||
@Override
|
||||
public void onMapTilesChanged(PredefinedMap map, LayeredTileMap tileMap) {
|
||||
if (map != currentMap) return;
|
||||
updateBitmaps();
|
||||
currentTileMap.setColorFilter(this.mPaint);
|
||||
redrawAll(RedrawAllDebugReason.MapChanged);
|
||||
}
|
||||
@@ -843,14 +824,23 @@ public final class MainView extends SurfaceView
|
||||
public void onAnimationCompleted(VisualEffectAnimation animation) {
|
||||
redrawArea(animation.area, RedrawAreaDebugReason.EffectCompleted);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpriteMoveStarted(SpriteMoveAnimation animation) {
|
||||
synchronized (movingSpritesRedrawTick) {
|
||||
movingSprites++;
|
||||
movingSpritesRedrawTick.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewSpriteMoveFrame(SpriteMoveAnimation animation) {
|
||||
redrawMoveArea_(CoordRect.getBoundingRect(animation.origin, animation.destination, animation.actor.tileSize), animation);
|
||||
//redrawMoveArea_(CoordRect.getBoundingRect(animation.origin, animation.destination, animation.actor.tileSize), animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpriteMoveCompleted(SpriteMoveAnimation animation) {
|
||||
movingSprites--;
|
||||
redrawArea(CoordRect.getBoundingRect(animation.origin, animation.destination, animation.actor.tileSize), RedrawAreaDebugReason.EffectCompleted);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user