Skip to content

Commit 00ed7ec

Browse files
committed
Character icons in subtitles + several fixes.
- Add snapshot repository in plugins to build.gradle - Add arrows to ui atlas - fix DesktopLauncher template syntax error
1 parent fd77cf9 commit 00ed7ec

File tree

16 files changed

+132
-61
lines changed

16 files changed

+132
-61
lines changed

adventure-editor/src/main/java/com/bladecoder/engineeditor/setup/BuildScriptHelper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ public static void addBuildScript(List<ProjectType> projects, BufferedWriter wr)
1414
write(wr, "buildscript {");
1515
// repos
1616
write(wr, "repositories {");
17+
18+
// TODO: Delete when release v2.2 of roboVM plugin
19+
write(wr, "maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }");
20+
21+
1722
write(wr, DependencyBank.mavenCentral);
1823
if (projects.contains(ProjectType.HTML)) {
1924
write(wr, DependencyBank.jCenter);

adventure-editor/src/main/java/com/bladecoder/engineeditor/ui/WorldProps.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ protected void updateModel(String property, String value) {
5757
Ctx.project.getProjectConfig().setProperty(Config.FAST_LEAVE, value);
5858
} else if (property.equals(Config.DEBUG_PROP)) {
5959
Ctx.project.getProjectConfig().setProperty(Config.DEBUG_PROP, value);
60+
} else if (property.equals(Config.CHARACTER_ICON_ATLAS)) {
61+
Ctx.project.getProjectConfig().setProperty(Config.CHARACTER_ICON_ATLAS, value);
6062
} else if (property.equals(Config.SHOW_DESC_PROP)) {
6163
Ctx.project.getProjectConfig().setProperty(Config.SHOW_DESC_PROP, value);
6264
} else if (property.equals(Config.EXTEND_VIEWPORT_PROP)) {
@@ -86,6 +88,8 @@ private void setProject() {
8688
Boolean.parseBoolean(Ctx.project.getProjectConfig().getProperty(Config.DEBUG_PROP, "false")));
8789
addProperty(Config.SHOW_DESC_PROP,
8890
Boolean.parseBoolean(Ctx.project.getProjectConfig().getProperty(Config.SHOW_DESC_PROP, "true")));
91+
addProperty(Config.CHARACTER_ICON_ATLAS,
92+
Ctx.project.getProjectConfig().getProperty(Config.CHARACTER_ICON_ATLAS, ""));
8993
addProperty(Config.EXTEND_VIEWPORT_PROP, Boolean
9094
.parseBoolean(Ctx.project.getProjectConfig().getProperty(Config.EXTEND_VIEWPORT_PROP, "true")));
9195
}

adventure-editor/src/main/resources/projectTmpl/android/assets/ui/1/ui.atlas

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,154 @@
11

22
ui.png
3-
size: 523,522
3+
size: 300,1035
44
format: RGBA8888
55
filter: Linear,Linear
66
repeat: none
77
back
88
rotate: false
9-
xy: 431, 190
9+
xy: 207, 139
1010
size: 90, 88
1111
orig: 120, 120
1212
offset: 15, 16
1313
index: -1
1414
border_rect
1515
rotate: false
16-
xy: 1, 1
16+
xy: 151, 443
1717
size: 29, 29
1818
split: 5, 5, 5, 5
1919
orig: 29, 29
2020
offset: 0, 0
2121
index: -1
2222
bubblepointer
2323
rotate: false
24-
xy: 1, 32
24+
xy: 1, 41
2525
size: 60, 39
2626
orig: 60, 39
2727
offset: 0, 0
2828
index: -1
2929
credits
3030
rotate: false
31-
xy: 1, 373
31+
xy: 1, 886
3232
size: 148, 148
3333
orig: 148, 148
3434
offset: 0, 0
3535
index: -1
3636
debug
3737
rotate: false
38-
xy: 1, 223
38+
xy: 1, 736
3939
size: 148, 148
4040
orig: 148, 148
4141
offset: 0, 0
4242
index: -1
4343
delete
4444
rotate: false
45-
xy: 301, 147
45+
xy: 108, 322
4646
size: 112, 112
4747
orig: 112, 112
4848
offset: 0, 0
4949
index: -1
5050
help
5151
rotate: false
52-
xy: 151, 373
52+
xy: 151, 886
5353
size: 148, 148
5454
orig: 148, 148
5555
offset: 0, 0
5656
index: -1
57+
hotspot
58+
rotate: false
59+
xy: 108, 223
60+
size: 97, 97
61+
orig: 97, 97
62+
offset: 0, 0
63+
index: -1
5764
hotspotpointer
5865
rotate: false
59-
xy: 1, 73
66+
xy: 1, 586
6067
size: 148, 148
6168
orig: 148, 148
6269
offset: 0, 0
6370
index: -1
71+
inv_down
72+
rotate: false
73+
xy: 1, 259
74+
size: 105, 175
75+
orig: 105, 175
76+
offset: 0, 0
77+
index: -1
78+
inv_up
79+
rotate: false
80+
xy: 1, 82
81+
size: 105, 175
82+
orig: 105, 175
83+
offset: 0, 0
84+
index: -1
6485
inventory
6586
rotate: false
66-
xy: 301, 261
87+
xy: 151, 474
6788
size: 128, 110
6889
orig: 129, 129
6990
offset: 0, 11
7091
index: -1
7192
leave
7293
rotate: false
73-
xy: 415, 98
94+
xy: 108, 34
7495
size: 94, 90
7596
orig: 94, 90
7697
offset: 0, 0
7798
index: -1
7899
lookat
79100
rotate: false
80-
xy: 151, 223
101+
xy: 151, 736
81102
size: 148, 148
82103
orig: 148, 148
83104
offset: 0, 0
84105
index: -1
85106
menu
86107
rotate: false
87-
xy: 451, 438
108+
xy: 222, 389
88109
size: 63, 83
89110
orig: 123, 123
90111
offset: 30, 19
91112
index: -1
92113
pickup
93114
rotate: false
94-
xy: 301, 373
115+
xy: 1, 436
95116
size: 148, 148
96117
orig: 148, 148
97118
offset: 0, 0
98119
index: -1
99120
plus
100121
rotate: false
101-
xy: 431, 280
122+
xy: 207, 229
102123
size: 91, 91
103124
orig: 91, 91
104125
offset: 0, 0
105126
index: -1
106127
pointer
107128
rotate: false
108-
xy: 301, 50
129+
xy: 108, 126
109130
size: 95, 95
110131
orig: 95, 95
111132
offset: 0, 0
112133
index: -1
113134
rect
114135
rotate: false
115-
xy: 451, 405
136+
xy: 1, 1
116137
size: 31, 31
117138
split: 5, 5, 5, 4
118139
orig: 31, 31
119140
offset: 0, 0
120141
index: -1
121142
talkto
122143
rotate: false
123-
xy: 151, 73
144+
xy: 151, 586
124145
size: 148, 148
125146
orig: 148, 148
126147
offset: 0, 0
127148
index: -1
128149
white_pixel
129150
rotate: false
130-
xy: 516, 518
151+
xy: 281, 581
131152
size: 3, 3
132153
orig: 3, 3
133154
offset: 0, 0
Loading

adventure-editor/src/main/resources/projectTmpl/desktop/src/DesktopLauncher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public class DesktopLauncher extends BladeEngine {
128128
"-d\tShow debug messages\n" +
129129
"-res width\tForce the resolution width\n" +
130130
"-l game_state\tLoad the previusly saved game state\n" +
131-
"-r\tRun the game from the begining\n"
131+
"-r\tRun the game from the begining\n" +
132132
"-aspect aspect_ratio\tSets the specified screen aspect (16:9, 4:3, 16:10)\n"
133133
);
134134

adventure-editor/src/main/resources/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Autogenerated by build.gradle
2-
#Fri Aug 12 15:39:12 CEST 2016
2+
#Fri Aug 12 21:31:06 CEST 2016
33
roboVMVersion=2.1.0
44
gwtVersion=2.6.0
55
libgdxVersion=1.9.3

blade-engine/src/com/bladecoder/engine/actions/LookAtAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.bladecoder.engine.model.TextManager;
2626
import com.bladecoder.engine.model.VerbRunner;
2727
import com.bladecoder.engine.model.World;
28-
import com.bladecoder.engine.util.EngineLogger;
2928

3029
@ActionDescription("Shows the text and sets the player to lookat in the selected actor direction")
3130
public class LookAtAction implements Action {
@@ -64,7 +63,7 @@ public String getDirection() {
6463
@Override
6564
public boolean run(VerbRunner cb) {
6665

67-
EngineLogger.debug("LOOKAT ACTION");
66+
// EngineLogger.debug("LOOKAT ACTION");
6867
InteractiveActor a = (InteractiveActor) World.getInstance().getCurrentScene().getActor(actor, true);
6968

7069
if (World.getInstance().getInventory().getItem(actor) == null) {
@@ -79,8 +78,10 @@ else if (a != null && player != null) {
7978
}
8079

8180
if (text != null) {
81+
String actorId = World.getInstance().getCurrentScene().getPlayer() != null? World.getInstance().getCurrentScene().getPlayer().getId():null;
82+
8283
World.getInstance().getTextManager().addText(text, TextManager.POS_SUBTITLE, TextManager.POS_SUBTITLE,
83-
false, Text.Type.SUBTITLE, null, null, wait ? cb : null);
84+
false, Text.Type.SUBTITLE, null, null, actorId, wait ? cb : null);
8485

8586
return wait;
8687
}

blade-engine/src/com/bladecoder/engine/actions/SayAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public boolean run(VerbRunner cb) {
8484
}
8585

8686
World.getInstance().getTextManager().addText(text, x, y, queue, type, color, null,
87-
this);
87+
a.getId(), this);
8888
}
8989

9090
return getWait();

blade-engine/src/com/bladecoder/engine/actions/SayDialogAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public boolean run(VerbRunner cb) {
7272
float y = boundingRectangle.getY() + boundingRectangle.getHeight();
7373

7474
w.getTextManager().addText(playerText, x, y, false,
75-
Text.Type.TALK, player.getTextColor(), null, this);
75+
Text.Type.TALK, player.getTextColor(), null, player.getId(), this);
7676

7777
startTalkAnim(player);
7878

@@ -104,7 +104,7 @@ public void resume() {
104104

105105
World.getInstance().getTextManager().addText(responseText, x,
106106
y, false, Text.Type.TALK,
107-
((CharacterActor) actor).getTextColor(), null, this);
107+
((CharacterActor) actor).getTextColor(), null, actor.getId(), this);
108108

109109

110110
if(actor instanceof CharacterActor) {

blade-engine/src/com/bladecoder/engine/actions/TextAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public boolean run(VerbRunner cb) {
7676
}
7777

7878
World.getInstance().getTextManager()
79-
.addText(text, x, y, queue, type, color, style, wait?cb:null);
79+
.addText(text, x, y, queue, type, color, style, null, wait?cb:null);
8080
}
8181

8282
return wait;

0 commit comments

Comments
 (0)