Skip to content

Commit f17cb23

Browse files
committed
Defold 1.13.0 update: remove old APIs
1 parent 0179143 commit f17cb23

6 files changed

Lines changed: 5 additions & 95 deletions

File tree

example/controls.atlas

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ images {
2222
images {
2323
image: "/example/images/black1px.png"
2424
}
25-
margin: 0
2625
extrude_borders: 1
27-
inner_padding: 0

example/fonts/controls.font

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
font: "/builtins/fonts/vera_mo_bd.ttf"
22
material: "/builtins/fonts/font.material"
33
size: 45
4-
antialias: 1
5-
alpha: 1.0
64
outline_alpha: 1.0
75
outline_width: 2.0
8-
shadow_alpha: 0.0
9-
shadow_blur: 0
10-
shadow_x: 0.0
11-
shadow_y: 0.0
12-
extra_characters: ""
13-
output_format: TYPE_BITMAP
14-
all_chars: false
15-
cache_width: 0
16-
cache_height: 0
6+
characters: " !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

example/logo.atlas

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
images {
22
image: "/example/images/logo.png"
33
}
4-
margin: 0
5-
extrude_borders: 0
6-
inner_padding: 0

example/player.collection

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -5,77 +5,28 @@ embedded_instances {
55
data: "components {\n"
66
" id: \"script\"\n"
77
" component: \"/example/player.script\"\n"
8-
" position {\n"
9-
" x: 0.0\n"
10-
" y: 0.0\n"
11-
" z: 0.0\n"
12-
" }\n"
13-
" rotation {\n"
14-
" x: 0.0\n"
15-
" y: 0.0\n"
16-
" z: 0.0\n"
17-
" w: 1.0\n"
18-
" }\n"
19-
" property_decls {\n"
20-
" }\n"
218
"}\n"
229
"components {\n"
2310
" id: \"controls\"\n"
2411
" component: \"/example/controls.gui\"\n"
25-
" position {\n"
26-
" x: 0.0\n"
27-
" y: 0.0\n"
28-
" z: 0.0\n"
29-
" }\n"
30-
" rotation {\n"
31-
" x: 0.0\n"
32-
" y: 0.0\n"
33-
" z: 0.0\n"
34-
" w: 1.0\n"
35-
" }\n"
36-
" property_decls {\n"
37-
" }\n"
3812
"}\n"
3913
"embedded_components {\n"
4014
" id: \"sprite\"\n"
4115
" type: \"sprite\"\n"
4216
" data: \"default_animation: \\\"logo\\\"\\n"
4317
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
44-
"blend_mode: BLEND_MODE_ALPHA\\n"
4518
"textures {\\n"
4619
" sampler: \\\"texture_sampler\\\"\\n"
4720
" texture: \\\"/example/video.atlas\\\"\\n"
4821
"}\\n"
4922
"\"\n"
50-
" position {\n"
51-
" x: 0.0\n"
52-
" y: 0.0\n"
53-
" z: 0.0\n"
54-
" }\n"
55-
" rotation {\n"
56-
" x: 0.0\n"
57-
" y: 0.0\n"
58-
" z: 0.0\n"
59-
" w: 1.0\n"
60-
" }\n"
6123
"}\n"
6224
""
6325
position {
6426
x: 400.0
6527
y: 300.0
6628
z: 0.5
6729
}
68-
rotation {
69-
x: 0.0
70-
y: 0.0
71-
z: 0.0
72-
w: 1.0
73-
}
74-
scale3 {
75-
x: 1.0
76-
y: 1.0
77-
z: 1.0
78-
}
7930
}
8031
embedded_instances {
8132
id: "logo"
@@ -84,39 +35,16 @@ embedded_instances {
8435
" type: \"sprite\"\n"
8536
" data: \"default_animation: \\\"logo\\\"\\n"
8637
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
87-
"blend_mode: BLEND_MODE_ALPHA\\n"
8838
"textures {\\n"
8939
" sampler: \\\"texture_sampler\\\"\\n"
9040
" texture: \\\"/example/logo.atlas\\\"\\n"
9141
"}\\n"
9242
"\"\n"
93-
" position {\n"
94-
" x: 0.0\n"
95-
" y: 0.0\n"
96-
" z: 0.0\n"
97-
" }\n"
98-
" rotation {\n"
99-
" x: 0.0\n"
100-
" y: 0.0\n"
101-
" z: 0.0\n"
102-
" w: 1.0\n"
103-
" }\n"
10443
"}\n"
10544
""
10645
position {
10746
x: 100.0
10847
y: 100.0
10948
z: 1.0
11049
}
111-
rotation {
112-
x: 0.0
113-
y: 0.0
114-
z: 0.0
115-
w: 1.0
116-
}
117-
scale3 {
118-
x: 1.0
119-
y: 1.0
120-
z: 1.0
121-
}
12250
}

example/player.script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ end
5555

5656
function init(self)
5757
local logosize = 128
58-
local screen_width = sys.get_config("display.width", 600)
59-
local screen_height = sys.get_config("display.height", 800)
58+
local screen_width = sys.get_config_int("display.width", 600)
59+
local screen_height = sys.get_config_int("display.height", 800)
6060
local scale_width = screen_width / logosize
6161
local scale_height = screen_height / logosize
6262

@@ -108,7 +108,7 @@ function update(self, dt)
108108
-- get a video frame and update the texture
109109
local videoframe = mpeg.get_frame(self.video)
110110
if videoframe then
111-
local videoheader = { width=info.width, height=info.height, type=resource.TEXTURE_TYPE_2D, format=resource.TEXTURE_FORMAT_RGB, num_mip_maps=1 }
111+
local videoheader = { width=info.width, height=info.height, type=graphics.TEXTURE_TYPE_2D, format=graphics.TEXTURE_FORMAT_RGB, num_mip_maps=1 }
112112
local path = go.get("#sprite", "texture0")
113113
resource.set_texture(path, videoheader, videoframe)
114114
end
@@ -135,4 +135,4 @@ function on_message(self, message_id, message, sender)
135135
mpeg.seek(self.video, time, false)
136136
end
137137
end
138-
end
138+
end

example/video.atlas

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
images {
22
image: "/example/images/logo.png"
33
}
4-
margin: 0
5-
extrude_borders: 0
6-
inner_padding: 0

0 commit comments

Comments
 (0)