ruby-miyako 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +84 -3
- data/lib/Miyako/API/i_yuki.rb +274 -16
- data/lib/Miyako/API/textbox.rb +1 -1
- data/lib/Miyako/API/yuki.rb +274 -16
- data/lib/Miyako/EXT/slides.rb +119 -10
- data/lib/Miyako/miyako.rb +2 -2
- data/sample/Room3/blue.rb +15 -13
- data/sample/Room3/ending.rb +8 -9
- data/sample/Room3/green.rb +16 -13
- data/sample/Room3/main.rb +15 -14
- data/sample/Room3/main_component.rb +1 -0
- data/sample/Room3/red.rb +16 -14
- data/sample/Room3/title.rb +6 -6
- data/win/miyako_no_katana.so +0 -0
- metadata +2 -2
data/lib/Miyako/miyako.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#=コンテンツ作成ライブラリMiyako2.1
|
4
4
|
#
|
5
5
|
#Authors:: サイロス誠
|
6
|
-
#Version:: 2.1.
|
6
|
+
#Version:: 2.1.3
|
7
7
|
#Copyright:: 2007-2009 Cyross Makoto
|
8
8
|
#License:: LGPL2.1
|
9
9
|
#
|
@@ -60,7 +60,7 @@ Thread.abort_on_exception = true
|
|
60
60
|
|
61
61
|
#==Miyako基幹モジュール
|
62
62
|
module Miyako
|
63
|
-
VERSION = "2.1.
|
63
|
+
VERSION = "2.1.4"
|
64
64
|
|
65
65
|
#===アプリケーション実行中に演奏する音楽のサンプリングレートを指定する
|
66
66
|
#単位はHz(周波数)
|
data/sample/Room3/blue.rb
CHANGED
@@ -5,14 +5,16 @@ class Blue
|
|
5
5
|
|
6
6
|
def init
|
7
7
|
@yuki = Yuki.new
|
8
|
-
@yuki.select_textbox(message_box[:box])
|
9
|
-
@yuki.select_commandbox(command_box[:box])
|
8
|
+
@yuki.select_textbox(message_box[:box], message_box)
|
9
|
+
@yuki.select_commandbox(command_box[:box], command_box)
|
10
10
|
@aoyama = Sprite.new(:file => "image/aoyama.png", :type => :ck)
|
11
|
+
@aoyama.hide
|
11
12
|
@aoyama.center!.bottom!
|
12
|
-
@yuki.
|
13
|
+
@yuki.visibles[:aoyama] = @aoyama
|
13
14
|
|
14
15
|
@room = Sprite.new(:file => "image/room_blue.png", :type => :as)
|
15
16
|
@room.center!.bottom!
|
17
|
+
@yuki.bgs[:room] = @room
|
16
18
|
|
17
19
|
var[:aoyama_aisatsu] = false if var[:aoyama_aisatsu] == nil
|
18
20
|
var[:release_aoyama_book] = false if var[:release_aoyama_book] == nil
|
@@ -31,15 +33,15 @@ class Blue
|
|
31
33
|
|
32
34
|
def setup
|
33
35
|
@yuki.setup
|
34
|
-
|
35
|
-
|
36
|
+
@yuki.textbox_all.start
|
37
|
+
@yuki.commandbox_all.start
|
36
38
|
@yuki.start_plot(plot)
|
37
39
|
end
|
38
40
|
|
39
41
|
def update
|
40
42
|
return nil if Input.quit_or_escape?
|
41
|
-
|
42
|
-
|
43
|
+
@yuki.textbox_all.update_animation
|
44
|
+
@yuki.commandbox_all.update_animation
|
43
45
|
@yuki.update
|
44
46
|
r = @yuki.executing? ? @now : @yuki.result
|
45
47
|
if @yuki.is_scenario?(r)
|
@@ -50,10 +52,10 @@ class Blue
|
|
50
52
|
end
|
51
53
|
|
52
54
|
def render
|
53
|
-
@
|
54
|
-
@yuki.render
|
55
|
-
|
56
|
-
|
55
|
+
@yuki.bgs.render
|
56
|
+
@yuki.visibles.render
|
57
|
+
@yuki.textbox_all.render
|
58
|
+
@yuki.commandbox_all.render
|
57
59
|
end
|
58
60
|
|
59
61
|
def get_command
|
@@ -286,8 +288,8 @@ class Blue
|
|
286
288
|
end
|
287
289
|
|
288
290
|
def final
|
289
|
-
|
290
|
-
|
291
|
+
@yuki.textbox_all.stop
|
292
|
+
@yuki.commandbox_all.stop
|
291
293
|
end
|
292
294
|
|
293
295
|
def dispose
|
data/sample/Room3/ending.rb
CHANGED
@@ -14,7 +14,7 @@ class Ending
|
|
14
14
|
}
|
15
15
|
end
|
16
16
|
|
17
|
-
@yuki.select_textbox(message_box[:box])
|
17
|
+
@yuki.select_textbox(message_box[:box], message_box)
|
18
18
|
@bg = Sprite.new(:file => "image/congratulation_bg.png", :type => :as)
|
19
19
|
@bg.oh = @bg.h / 2
|
20
20
|
@anim = SpriteAnimation.new(:sprite=>@bg, :wait=>0.5)
|
@@ -25,23 +25,23 @@ class Ending
|
|
25
25
|
@cong_man.center!.bottom!
|
26
26
|
@visible_cong_man = false
|
27
27
|
@timer = WaitCounter.new(3)
|
28
|
-
@staff_roll = [Shape.text(:font
|
28
|
+
@staff_roll = [Shape.text(:font=>@yuki.textbox.font, :align=>:center){
|
29
29
|
text "シナリオ・グラフィック・"
|
30
30
|
cr
|
31
31
|
text "スクリプティング・その他雑用"
|
32
32
|
cr.cr
|
33
33
|
text "サイロス 誠"
|
34
34
|
},
|
35
|
-
Shape.text(:font
|
35
|
+
Shape.text(:font=>@yuki.textbox.font){ text "Powerd By Miyako 2.1" }
|
36
36
|
]
|
37
37
|
@staff_roll.each{|st|
|
38
|
-
st.snap(
|
38
|
+
st.snap(@yuki.textbox_all)
|
39
39
|
st.centering!
|
40
40
|
}
|
41
41
|
@index = -1
|
42
42
|
|
43
|
-
@end_roll = Shape.text(:font
|
44
|
-
@end_roll.snap(
|
43
|
+
@end_roll = Shape.text(:font=>@yuki.textbox.font){ text "T H E E N D" }
|
44
|
+
@end_roll.snap(@yuki.textbox_all)
|
45
45
|
@end_roll.centering!
|
46
46
|
@yuki.regist_parts(:end_roll, @end_roll)
|
47
47
|
@yuki.vars[:staff_roll] = self.method(:staff_roll)
|
@@ -67,7 +67,7 @@ class Ending
|
|
67
67
|
@cong_man.render if @visible_cong_man
|
68
68
|
if @exec == self.method(:plot_executing)
|
69
69
|
@yuki.render
|
70
|
-
|
70
|
+
@yuki.textbox_all.render
|
71
71
|
@staff_roll[@index].render if @index >= 0
|
72
72
|
end
|
73
73
|
end
|
@@ -90,8 +90,7 @@ class Ending
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def plot_executing
|
93
|
-
|
94
|
-
command_box.update_animation
|
93
|
+
@yuki.textbox_all.update_animation
|
95
94
|
@yuki.update
|
96
95
|
r = @yuki.executing? ? @now : @yuki.result
|
97
96
|
if @yuki.is_scenario?(r)
|
data/sample/Room3/green.rb
CHANGED
@@ -5,14 +5,16 @@ class Green
|
|
5
5
|
|
6
6
|
def init
|
7
7
|
@yuki = Yuki.new
|
8
|
-
@yuki.select_textbox(message_box[:box])
|
9
|
-
@yuki.select_commandbox(command_box[:box])
|
8
|
+
@yuki.select_textbox(message_box[:box], message_box)
|
9
|
+
@yuki.select_commandbox(command_box[:box], command_box)
|
10
10
|
@midori = Sprite.new(:file => "image/midori.png", :type => :ck)
|
11
|
+
@midori.hide
|
11
12
|
@midori.center!.bottom!
|
12
|
-
@yuki.
|
13
|
+
@yuki.visibles[:midori] = @midori
|
13
14
|
|
14
15
|
@room = Sprite.new(:file => "image/room_green.png", :type => :as)
|
15
16
|
@room.center!.bottom!
|
17
|
+
@yuki.bgs[:room] = @room
|
16
18
|
|
17
19
|
var[:midori_aisatsu] = false if var[:midori_aisatsu] == nil
|
18
20
|
var[:release_aoyama_book] = false if var[:release_aoyama_book] == nil
|
@@ -28,15 +30,15 @@ class Green
|
|
28
30
|
|
29
31
|
def setup
|
30
32
|
@yuki.setup
|
31
|
-
|
32
|
-
|
33
|
+
@yuki.textbox_all.start
|
34
|
+
@yuki.commandbox_all.start
|
33
35
|
@yuki.start_plot(plot)
|
34
36
|
end
|
35
37
|
|
36
38
|
def update
|
37
39
|
return nil if Input.quit_or_escape?
|
38
|
-
|
39
|
-
|
40
|
+
@yuki.textbox_all.update_animation
|
41
|
+
@yuki.commandbox_all.update_animation
|
40
42
|
@yuki.update
|
41
43
|
r = @yuki.executing? ? @now : @yuki.result
|
42
44
|
if @yuki.is_scenario?(r)
|
@@ -47,10 +49,11 @@ class Green
|
|
47
49
|
end
|
48
50
|
|
49
51
|
def render
|
50
|
-
@
|
51
|
-
@yuki.render
|
52
|
-
|
53
|
-
|
52
|
+
@yuki.bgs.render
|
53
|
+
@yuki.visibles.render
|
54
|
+
@yuki.textbox_all.render
|
55
|
+
@yuki.commandbox_all.render
|
56
|
+
@yuki.pre_visibles.render
|
54
57
|
end
|
55
58
|
|
56
59
|
def get_command
|
@@ -209,8 +212,8 @@ class Green
|
|
209
212
|
end
|
210
213
|
|
211
214
|
def final
|
212
|
-
|
213
|
-
|
215
|
+
@yuki.textbox_all.stop
|
216
|
+
@yuki.commandbox_all.stop
|
214
217
|
end
|
215
218
|
|
216
219
|
def dispose
|
data/sample/Room3/main.rb
CHANGED
@@ -4,13 +4,13 @@ class MainScene
|
|
4
4
|
include MainComponent
|
5
5
|
|
6
6
|
def init
|
7
|
-
@yuki = Yuki.new(message_box
|
8
|
-
select_textbox(box)
|
9
|
-
select_commandbox(cbox)
|
7
|
+
@yuki = Yuki.new(message_box, command_box){|box, cbox|
|
8
|
+
select_textbox(box[:box], box)
|
9
|
+
select_commandbox(cbox[:box], cbox)
|
10
10
|
}
|
11
11
|
@yuki.select_plot(plot)
|
12
|
-
@doors
|
13
|
-
@doors.center!.bottom!
|
12
|
+
@yuki.load_bg :doors, "image/three_doors.png"
|
13
|
+
@yuki.bgs[:doors].center!.bottom!
|
14
14
|
|
15
15
|
var[:sekkaku] = true if var[:sekkaku] == nil
|
16
16
|
var[:aikotoba] = false if var[:aikotoba] == nil
|
@@ -27,15 +27,16 @@ class MainScene
|
|
27
27
|
|
28
28
|
def setup
|
29
29
|
@yuki.setup
|
30
|
-
|
31
|
-
|
30
|
+
@yuki.bg_show
|
31
|
+
@yuki.textbox_all.start
|
32
|
+
@yuki.commandbox_all.start
|
32
33
|
@yuki.start_plot(plot)
|
33
34
|
end
|
34
35
|
|
35
36
|
def update
|
36
37
|
return nil if Input.quit_or_escape?
|
37
|
-
|
38
|
-
|
38
|
+
@yuki.textbox_all.update_animation
|
39
|
+
@yuki.commandbox_all.update_animation
|
39
40
|
@yuki.update
|
40
41
|
r = @yuki.executing? ? @now : @yuki.result
|
41
42
|
@yuki.start_plot(plot) if (@yuki.executing? == false && r == @now)
|
@@ -90,14 +91,14 @@ class MainScene
|
|
90
91
|
end
|
91
92
|
|
92
93
|
def render
|
93
|
-
@
|
94
|
-
|
95
|
-
|
94
|
+
@yuki.bgs.render
|
95
|
+
@yuki.textbox_all.render
|
96
|
+
@yuki.commandbox_all.render
|
96
97
|
end
|
97
98
|
|
98
99
|
def final
|
99
|
-
|
100
|
-
|
100
|
+
@yuki.textbox_all.stop
|
101
|
+
@yuki.commandbox_all.stop
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|
data/sample/Room3/red.rb
CHANGED
@@ -4,9 +4,9 @@ class Red
|
|
4
4
|
include MainComponent
|
5
5
|
|
6
6
|
def init
|
7
|
-
@yuki = Yuki.new(message_box
|
8
|
-
select_textbox(box)
|
9
|
-
select_commandbox(cbox)
|
7
|
+
@yuki = Yuki.new(message_box, command_box) do |box, cbox|
|
8
|
+
select_textbox(box[:box], box)
|
9
|
+
select_commandbox(cbox[:box], cbox)
|
10
10
|
end
|
11
11
|
def @yuki.text_wait(txt, w = 0.3)
|
12
12
|
text txt
|
@@ -14,11 +14,13 @@ class Red
|
|
14
14
|
end
|
15
15
|
|
16
16
|
@akamatsu = Sprite.new(:file => "image/akamatsu.png", :type => :ck)
|
17
|
+
@akamatsu.hide
|
17
18
|
@akamatsu.center!.bottom!
|
18
|
-
@yuki.
|
19
|
+
@yuki.visibles[:akamatsu] = @akamatsu
|
19
20
|
|
20
21
|
@room = Sprite.new(:file=>"image/room_red.png", :type=>:as)
|
21
22
|
@room.center!.bottom!
|
23
|
+
@yuki.bgs[:room] = @room
|
22
24
|
|
23
25
|
var[:akamatsu_aisatsu] = false if var[:akamatsu_aisatsu] == nil
|
24
26
|
var[:release_akamatsu_book] = false if var[:release_akamatsu_book] == nil
|
@@ -32,8 +34,8 @@ class Red
|
|
32
34
|
|
33
35
|
def setup
|
34
36
|
@yuki.setup
|
35
|
-
|
36
|
-
|
37
|
+
@yuki.textbox_all.start
|
38
|
+
@yuki.commandbox_all.start
|
37
39
|
@yuki.start_plot(plot)
|
38
40
|
end
|
39
41
|
|
@@ -48,8 +50,8 @@ class Red
|
|
48
50
|
|
49
51
|
def update
|
50
52
|
return nil if Input.quit_or_escape?
|
51
|
-
|
52
|
-
|
53
|
+
@yuki.textbox_all.update_animation
|
54
|
+
@yuki.commandbox_all.update_animation
|
53
55
|
@yuki.update
|
54
56
|
r = @yuki.executing? ? @now : @yuki.result
|
55
57
|
if @yuki.is_scenario?(r)
|
@@ -60,10 +62,10 @@ class Red
|
|
60
62
|
end
|
61
63
|
|
62
64
|
def render
|
63
|
-
@
|
64
|
-
@yuki.render
|
65
|
-
|
66
|
-
|
65
|
+
@yuki.bgs.render
|
66
|
+
@yuki.visibles.render
|
67
|
+
@yuki.textbox_all.render
|
68
|
+
@yuki.commandbox_all.render
|
67
69
|
end
|
68
70
|
|
69
71
|
def plot
|
@@ -216,8 +218,8 @@ class Red
|
|
216
218
|
end
|
217
219
|
|
218
220
|
def final
|
219
|
-
|
220
|
-
|
221
|
+
@yuki.textbox_all.stop
|
222
|
+
@yuki.commandbox_all.stop
|
221
223
|
end
|
222
224
|
|
223
225
|
def dispose
|
data/sample/Room3/title.rb
CHANGED
@@ -72,8 +72,8 @@ class TitleCall
|
|
72
72
|
include MainComponent
|
73
73
|
|
74
74
|
def init
|
75
|
-
@yuki = Yuki.new(message_box
|
76
|
-
select_textbox(box)
|
75
|
+
@yuki = Yuki.new(message_box){|box|
|
76
|
+
select_textbox(box[:box], box)
|
77
77
|
}
|
78
78
|
@man = Sprite.new(:file=>"image/start.png", :type=>:ck)
|
79
79
|
@man.center!.bottom!
|
@@ -101,14 +101,14 @@ class TitleCall
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def final
|
104
|
-
|
104
|
+
@yuki.textbox_all.stop
|
105
105
|
end
|
106
106
|
|
107
107
|
def view_in
|
108
108
|
if @wait.finish?
|
109
109
|
if @alpha == 1.0
|
110
110
|
@exec = :exec_yuki
|
111
|
-
|
111
|
+
@yuki.textbox_all.start
|
112
112
|
@yuki.start_plot
|
113
113
|
return @now
|
114
114
|
end
|
@@ -120,7 +120,7 @@ class TitleCall
|
|
120
120
|
end
|
121
121
|
|
122
122
|
def exec_yuki
|
123
|
-
|
123
|
+
@yuki.textbox_all.update_animation
|
124
124
|
@yuki.update
|
125
125
|
return @yuki.result ? @yuki.result : @now
|
126
126
|
end
|
@@ -184,6 +184,6 @@ class TitleCall
|
|
184
184
|
|
185
185
|
def render
|
186
186
|
Bitmap.dec_alpha(@man, Screen, @alpha)
|
187
|
-
|
187
|
+
@yuki.textbox_all.render if @exec == :exec_yuki
|
188
188
|
end
|
189
189
|
end
|
data/win/miyako_no_katana.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-miyako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyross Makoto
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10
|
12
|
+
date: 2009-11-10 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|