cyross-ruby-miyako 2.0.5.1 → 2.1.0

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.
Files changed (91) hide show
  1. data/README +1092 -929
  2. data/Rakefile +7 -7
  3. data/defines.h +144 -144
  4. data/extern.h +29 -29
  5. data/install_miyako.rb +87 -87
  6. data/lib/Miyako/API/audio.rb +572 -198
  7. data/lib/Miyako/API/basic_data.rb +825 -573
  8. data/lib/Miyako/API/bitmap.rb +534 -507
  9. data/lib/Miyako/API/choices.rb +481 -475
  10. data/lib/Miyako/API/collision.rb +486 -460
  11. data/lib/Miyako/API/diagram.rb +586 -561
  12. data/lib/Miyako/API/drawing.rb +151 -151
  13. data/lib/Miyako/API/exceptions.rb +105 -0
  14. data/lib/Miyako/API/fixedmap.rb +462 -428
  15. data/lib/Miyako/API/font.rb +430 -403
  16. data/lib/Miyako/API/input.rb +456 -447
  17. data/lib/Miyako/API/layout.rb +636 -433
  18. data/lib/Miyako/API/map.rb +583 -529
  19. data/lib/Miyako/API/map_event.rb +222 -198
  20. data/lib/Miyako/API/modules.rb +357 -109
  21. data/lib/Miyako/API/movie.rb +166 -154
  22. data/lib/Miyako/API/parts.rb +276 -189
  23. data/lib/Miyako/API/plane.rb +205 -166
  24. data/lib/Miyako/API/screen.rb +341 -325
  25. data/lib/Miyako/API/shape.rb +443 -443
  26. data/lib/Miyako/API/sprite.rb +771 -752
  27. data/lib/Miyako/API/sprite_animation.rb +490 -481
  28. data/lib/Miyako/API/sprite_list.rb +1135 -0
  29. data/lib/Miyako/API/spriteunit.rb +168 -147
  30. data/lib/Miyako/API/story.rb +350 -300
  31. data/lib/Miyako/API/textbox.rb +770 -725
  32. data/lib/Miyako/API/utility.rb +419 -388
  33. data/lib/Miyako/API/viewport.rb +189 -139
  34. data/lib/Miyako/API/yuki.rb +1226 -996
  35. data/lib/Miyako/EXT/miyako_cairo.rb +62 -62
  36. data/lib/Miyako/EXT/raster_scroll.rb +138 -138
  37. data/lib/Miyako/EXT/slides.rb +157 -157
  38. data/lib/Miyako/miyako.rb +201 -171
  39. data/lib/Miyako/miyako_require_only.rb +35 -0
  40. data/miyako_basicdata.c +590 -590
  41. data/miyako_bitmap.c +1225 -1225
  42. data/miyako_collision.c +403 -403
  43. data/miyako_drawing.c +187 -187
  44. data/miyako_font.c +334 -334
  45. data/miyako_hsv.c +830 -830
  46. data/miyako_input_audio.c +254 -0
  47. data/miyako_layout.c +191 -191
  48. data/miyako_no_katana.c +1078 -1074
  49. data/miyako_sprite2.c +431 -0
  50. data/miyako_transform.c +438 -438
  51. data/miyako_utility.c +288 -288
  52. data/sample/Animation1/m1ku.rb +68 -68
  53. data/sample/Animation2/lex.rb +96 -96
  54. data/sample/Diagram_sample/diagram_sample_yuki2.rb +328 -386
  55. data/sample/Room3/blue.rb +297 -297
  56. data/sample/Room3/ending.rb +180 -180
  57. data/sample/Room3/green.rb +220 -220
  58. data/sample/Room3/main.rb +119 -119
  59. data/sample/Room3/main_component.rb +59 -59
  60. data/sample/Room3/red.rb +227 -227
  61. data/sample/Room3/room3.rb +25 -27
  62. data/sample/Room3/title.rb +184 -184
  63. data/sample/ball_action_sample.rb +204 -204
  64. data/sample/blit_rop.rb +70 -70
  65. data/sample/cairo_sample.rb +25 -25
  66. data/sample/circle_collision_test.rb +66 -66
  67. data/sample/collision_test.rb +33 -33
  68. data/sample/collision_test2.rb +108 -108
  69. data/sample/fixed_map_test/fixed_map_sample.rb +140 -140
  70. data/sample/fixed_map_test/readme.txt +72 -72
  71. data/sample/map_test/chara.rb +58 -58
  72. data/sample/map_test/main_parts.rb +69 -69
  73. data/sample/map_test/main_scene.rb +153 -153
  74. data/sample/map_test/map_manager.rb +75 -75
  75. data/sample/map_test/map_test.rb +23 -23
  76. data/sample/map_test/oasis.rb +71 -71
  77. data/sample/map_test/readme.txt +89 -89
  78. data/sample/map_test/route.rb +157 -157
  79. data/sample/map_test/town.rb +74 -74
  80. data/sample/polygon_test.rb +35 -35
  81. data/sample/rasterscroll.rb +24 -24
  82. data/sample/takahashi.rb +42 -42
  83. data/sample/textbox_sample.rb +189 -189
  84. data/sample/transform.rb +54 -54
  85. data/sample/utility_test.rb +73 -73
  86. data/sample/utility_test2.rb +61 -61
  87. data/sample/utility_test3.rb +64 -64
  88. data/sample/utility_test4.rb +73 -73
  89. data/uninstall_miyako.rb +19 -19
  90. data/win/miyako_no_katana.so +0 -0
  91. metadata +7 -2
@@ -1,180 +1,180 @@
1
- # -*- encoding: utf-8 -*-
2
- # エンディング定義
3
- class Ending
4
- include Story::Scene
5
- include MainComponent
6
-
7
- def init
8
- @yuki = Yuki.new
9
-
10
- def @yuki.text_wait(*txt)
11
- txt.each{|t|
12
- text t
13
- wait 0.3
14
- }
15
- end
16
-
17
- @yuki.select_textbox(message_box[:box])
18
- @bg = Sprite.new(:file => "image/congratulation_bg.png", :type => :as)
19
- @bg.oh = @bg.h / 2
20
- @anim = SpriteAnimation.new(:sprite=>@bg, :wait=>0.5)
21
- @cong_text = Sprite.new(:file=>"image/congra.png", :type => :ck)
22
- @cong_text.centering
23
- @visible_cong_text = false
24
- @cong_man = Sprite.new(:file=>"image/congratulation.png", :type => :ck)
25
- @cong_man.center.bottom
26
- @visible_cong_man = false
27
- @timer = WaitCounter.new(3)
28
- @staff_roll = [Shape.text(:font=>message_box[:box].font, :align=>:center){
29
- text "シナリオ・グラフィック・"
30
- cr
31
- text "スクリプティング・その他雑用"
32
- cr.cr
33
- text "サイロス 誠"
34
- },
35
- Shape.text(:font=>message_box[:box].font){ text "Powerd By Miyako 2.0" }
36
- ]
37
- @staff_roll.each{|st|
38
- st.snap(message_box)
39
- st.centering
40
- }
41
- @index = -1
42
-
43
- @end_roll = Shape.text(:font=>message_box[:box].font){ text "T H E  E N D" }
44
- @end_roll.snap(message_box)
45
- @end_roll.centering
46
- @yuki.regist_parts(:end_roll, @end_roll)
47
- @yuki.vars[:staff_roll] = self.method(:staff_roll)
48
-
49
- @exec = self.method(:view_in1)
50
- end
51
-
52
- def setup
53
- @yuki.setup
54
- @anim.start
55
- @timer.start
56
- end
57
-
58
- def update
59
- return nil if Input.quit_or_escape?
60
- @anim.update_animation
61
- return @exec.call
62
- end
63
-
64
- def render
65
- @anim.render
66
- @cong_text.render
67
- @cong_man.render if @visible_cong_man
68
- if @exec == self.method(:plot_executing)
69
- @yuki.render
70
- message_box.render
71
- @staff_roll[@index].render if @index >= 0
72
- end
73
- end
74
-
75
- def view_in1
76
- if @timer.finish?
77
- @visible_cong_man = true
78
- @timer.start
79
- @exec = self.method(:view_in2)
80
- end
81
- return @now
82
- end
83
-
84
- def view_in2
85
- if @timer.finish?
86
- @exec = self.method(:plot_executing)
87
- @yuki.start_plot(plot)
88
- end
89
- return @now
90
- end
91
-
92
- def plot_executing
93
- message_box.update_animation
94
- command_box.update_animation
95
- @yuki.update
96
- r = @yuki.executing? ? @now : @yuki.result
97
- if @yuki.is_scenario?(r)
98
- @yuki.exec_plot(r)
99
- r = @now
100
- end
101
- return r
102
- end
103
-
104
- def plot
105
- yuki_plot do
106
- text "「コ〜ン "
107
- wait 0.3
108
- text "グラッチュ "
109
- wait 0.3
110
- text "レ〜ショ〜ン♪」"
111
- pause.cr
112
- text "「いやぁ、"
113
- wait 0.2
114
- text "見事難関をクリアしたとはオドロキだ!"
115
- pause.cr
116
- text " 君には全くもって、感服だ!」"
117
- pause.clear
118
- text "「勿論、クリアしたんだから"
119
- wait 0.5
120
- cr
121
- text " 商品をプレゼントしなくちゃね!」"
122
- pause.clear
123
- text_wait "「まずは", "・", "・", "・"
124
- text "「青いはいからうどん」1年分!"
125
- wait 0.5
126
- cr
127
- text_wait " 次に", "・", "・", "・"
128
- text "いつも真っ赤「炎天下ツアー」!"
129
- wait 0.5
130
- cr
131
- text_wait " 最後に", "・", "・", "・"
132
- text "「緑のバルーン」提供の沖縄旅行!"
133
- wait 0.5
134
- cr
135
- text " 現地集合現地解散!"
136
- wait 0.5
137
- cr
138
- text " さ、遠慮せずにうけとってくれ!」"
139
- pause.clear
140
- text "「今日は見事クリアされたけど、"
141
- cr
142
- text " 次回はもっと"
143
- color(:red){ "ヒィヒィ"}
144
- text "言わせる"
145
- cr
146
- text " 仕掛けを用意するから覚悟しとけよ〜!」"
147
- pause.clear
148
- text "「次回の挑戦者はキミだ!"
149
- wait 0.5
150
- cr
151
- text " じゃ、また来週! "
152
- wait 0.5
153
- text "バイバ〜イ!」"
154
- pause.clear
155
- vars[:staff_roll].call
156
- show :end_roll
157
- pause.clear
158
- hide :end_roll
159
- nil
160
- end
161
- end
162
-
163
- def staff_roll
164
- @staff_roll.length.times{|idx|
165
- @index = idx
166
- @yuki.wait 2.0
167
- }
168
- @index = -1
169
- end
170
-
171
- def final
172
- @anim.stop
173
- end
174
-
175
- def dispose
176
- @cong_man.dispose
177
- @cong_text.dispose
178
- @anim.dispose
179
- end
180
- end
1
+ # -*- encoding: utf-8 -*-
2
+ # エンディング定義
3
+ class Ending
4
+ include Story::Scene
5
+ include MainComponent
6
+
7
+ def init
8
+ @yuki = Yuki.new
9
+
10
+ def @yuki.text_wait(*txt)
11
+ txt.each{|t|
12
+ text t
13
+ wait 0.3
14
+ }
15
+ end
16
+
17
+ @yuki.select_textbox(message_box[:box])
18
+ @bg = Sprite.new(:file => "image/congratulation_bg.png", :type => :as)
19
+ @bg.oh = @bg.h / 2
20
+ @anim = SpriteAnimation.new(:sprite=>@bg, :wait=>0.5)
21
+ @cong_text = Sprite.new(:file=>"image/congra.png", :type => :ck)
22
+ @cong_text.centering!
23
+ @visible_cong_text = false
24
+ @cong_man = Sprite.new(:file=>"image/congratulation.png", :type => :ck)
25
+ @cong_man.center!.bottom!
26
+ @visible_cong_man = false
27
+ @timer = WaitCounter.new(3)
28
+ @staff_roll = [Shape.text(:font=>message_box[:box].font, :align=>:center){
29
+ text "シナリオ・グラフィック・"
30
+ cr
31
+ text "スクリプティング・その他雑用"
32
+ cr.cr
33
+ text "サイロス 誠"
34
+ },
35
+ Shape.text(:font=>message_box[:box].font){ text "Powerd By Miyako 2.0" }
36
+ ]
37
+ @staff_roll.each{|st|
38
+ st.snap(message_box)
39
+ st.centering!
40
+ }
41
+ @index = -1
42
+
43
+ @end_roll = Shape.text(:font=>message_box[:box].font){ text "T H E  E N D" }
44
+ @end_roll.snap(message_box)
45
+ @end_roll.centering!
46
+ @yuki.regist_parts(:end_roll, @end_roll)
47
+ @yuki.vars[:staff_roll] = self.method(:staff_roll)
48
+
49
+ @exec = self.method(:view_in1)
50
+ end
51
+
52
+ def setup
53
+ @yuki.setup
54
+ @anim.start
55
+ @timer.start
56
+ end
57
+
58
+ def update
59
+ return nil if Input.quit_or_escape?
60
+ @anim.update_animation
61
+ return @exec.call
62
+ end
63
+
64
+ def render
65
+ @anim.render
66
+ @cong_text.render
67
+ @cong_man.render if @visible_cong_man
68
+ if @exec == self.method(:plot_executing)
69
+ @yuki.render
70
+ message_box.render
71
+ @staff_roll[@index].render if @index >= 0
72
+ end
73
+ end
74
+
75
+ def view_in1
76
+ if @timer.finish?
77
+ @visible_cong_man = true
78
+ @timer.start
79
+ @exec = self.method(:view_in2)
80
+ end
81
+ return @now
82
+ end
83
+
84
+ def view_in2
85
+ if @timer.finish?
86
+ @exec = self.method(:plot_executing)
87
+ @yuki.start_plot(plot)
88
+ end
89
+ return @now
90
+ end
91
+
92
+ def plot_executing
93
+ message_box.update_animation
94
+ command_box.update_animation
95
+ @yuki.update
96
+ r = @yuki.executing? ? @now : @yuki.result
97
+ if @yuki.is_scenario?(r)
98
+ @yuki.exec_plot(r)
99
+ r = @now
100
+ end
101
+ return r
102
+ end
103
+
104
+ def plot
105
+ yuki_plot do
106
+ text "「コ〜ン "
107
+ wait 0.3
108
+ text "グラッチュ "
109
+ wait 0.3
110
+ text "レ〜ショ〜ン♪」"
111
+ pause.cr
112
+ text "「いやぁ、"
113
+ wait 0.2
114
+ text "見事難関をクリアしたとはオドロキだ!"
115
+ pause.cr
116
+ text " 君には全くもって、感服だ!」"
117
+ pause.clear
118
+ text "「勿論、クリアしたんだから"
119
+ wait 0.5
120
+ cr
121
+ text " 商品をプレゼントしなくちゃね!」"
122
+ pause.clear
123
+ text_wait "「まずは", "・", "・", "・"
124
+ text "「青いはいからうどん」1年分!"
125
+ wait 0.5
126
+ cr
127
+ text_wait " 次に", "・", "・", "・"
128
+ text "いつも真っ赤「炎天下ツアー」!"
129
+ wait 0.5
130
+ cr
131
+ text_wait " 最後に", "・", "・", "・"
132
+ text "「緑のバルーン」提供の沖縄旅行!"
133
+ wait 0.5
134
+ cr
135
+ text " 現地集合現地解散!"
136
+ wait 0.5
137
+ cr
138
+ text " さ、遠慮せずにうけとってくれ!」"
139
+ pause.clear
140
+ text "「今日は見事クリアされたけど、"
141
+ cr
142
+ text " 次回はもっと"
143
+ color(:red){ "ヒィヒィ"}
144
+ text "言わせる"
145
+ cr
146
+ text " 仕掛けを用意するから覚悟しとけよ〜!」"
147
+ pause.clear
148
+ text "「次回の挑戦者はキミだ!"
149
+ wait 0.5
150
+ cr
151
+ text " じゃ、また来週! "
152
+ wait 0.5
153
+ text "バイバ〜イ!」"
154
+ pause.clear
155
+ vars[:staff_roll].call
156
+ show :end_roll
157
+ pause.clear
158
+ hide :end_roll
159
+ nil
160
+ end
161
+ end
162
+
163
+ def staff_roll
164
+ @staff_roll.length.times{|idx|
165
+ @index = idx
166
+ @yuki.wait 2.0
167
+ }
168
+ @index = -1
169
+ end
170
+
171
+ def final
172
+ @anim.stop
173
+ end
174
+
175
+ def dispose
176
+ @cong_man.dispose
177
+ @cong_text.dispose
178
+ @anim.dispose
179
+ end
180
+ end
@@ -1,220 +1,220 @@
1
- # -*- encoding: utf-8 -*-
2
- class Green
3
- include Story::Scene
4
- include MainComponent
5
-
6
- def init
7
- @yuki = Yuki.new
8
- @yuki.select_textbox(message_box[:box])
9
- @yuki.select_commandbox(command_box[:box])
10
- @midori = Sprite.new(:file => "image/midori.png", :type => :ck)
11
- @midori.center.bottom
12
- @yuki.regist_parts(:midori, @midori)
13
-
14
- @room = Sprite.new(:file => "image/room_green.png", :type => :as)
15
- @room.center.bottom
16
-
17
- var[:midori_aisatsu] = false if var[:midori_aisatsu] == nil
18
- var[:release_aoyama_book] = false if var[:release_aoyama_book] == nil
19
- var[:midori_talk] = 0 if var[:midori_talk] == nil
20
-
21
- @talks = Array.new(6){|i| self.method("talk#{i}".to_sym).call}
22
-
23
- @yuki.vars[:var] = var
24
- @yuki.vars[:main_command] = main_command
25
- @yuki.vars[:command] = get_command
26
- @yuki.vars[:talks] = @talks
27
- end
28
-
29
- def setup
30
- @yuki.setup
31
- message_box.start
32
- command_box.start
33
- @yuki.start_plot(plot)
34
- end
35
-
36
- def update
37
- return nil if Input.quit_or_escape?
38
- message_box.update_animation
39
- command_box.update_animation
40
- @yuki.update
41
- r = @yuki.executing? ? @now : @yuki.result
42
- if @yuki.is_scenario?(r)
43
- @yuki.start_plot(r)
44
- r = @now
45
- end
46
- return r
47
- end
48
-
49
- def render
50
- @room.render
51
- @yuki.render
52
- message_box.render
53
- command_box.render if @yuki.selecting?
54
- end
55
-
56
- def get_command
57
- return [Yuki::Command.new("挨拶する", nil, lambda{var[:midori_aisatsu]==false}, green2),
58
- Yuki::Command.new("辺りを見る", nil, lambda{var[:midori_aisatsu]==true}, look_green),
59
- Yuki::Command.new("話す", nil, lambda{var[:midori_aisatsu]==true}, talk),
60
- Yuki::Command.new("戻る", nil, lambda{var[:midori_aisatsu]==true}, MainScene)]
61
- end
62
-
63
- def plot
64
- yuki_plot do
65
- text "緑の扉から中に入った。"
66
- pause.clear
67
- show :midori
68
- text "目の前には"
69
- color(:green){vars[:var][:midori_aisatsu]==true ? "みどりさん" : "女の人"}
70
- text "が居る。"
71
- cr
72
- vars[:main_command]
73
- end
74
- end
75
-
76
- def main_command
77
- yuki_plot do
78
- loop do
79
- text "どうする?"
80
- command vars[:command]
81
- clear
82
- break select_result if is_scene?(select_result)
83
- call_plot(select_result) if is_scenario?(select_result)
84
- end
85
- end
86
- end
87
-
88
- def green2
89
- yuki_plot do
90
- text "「私の名前はみどり。よろしくぅ」"
91
- pause.clear
92
- vars[:var][:midori_aisatsu]=true
93
- end
94
- end
95
-
96
- def look_green
97
- yuki_plot do
98
- text "部屋の中は、いたってシンプルだ。"
99
- pause.cr
100
- text "女の子らしく、鏡台がある。"
101
- pause.clear
102
- end
103
- end
104
-
105
- def talk
106
- yuki_plot do
107
- call_plot(vars[:talks][vars[:var][:midori_talk]])
108
- end
109
- end
110
-
111
- def talk0
112
- yuki_plot do
113
- text "「普通の大学生よぉ。」"
114
- pause.clear
115
- vars[:var][:midori_talk] += 1
116
- end
117
- end
118
-
119
- def talk1
120
- yuki_plot do
121
- text "「最近はぁ、"
122
- wait 0.3
123
- cr
124
- text " お菓子作りにぃ、"
125
- wait 0.3
126
- cr
127
- text " 凝ってる、"
128
- wait 0.3
129
- text "みたいな?」"
130
- pause.clear
131
- vars[:var][:midori_talk] += 1
132
- end
133
- end
134
-
135
- def talk2
136
- yuki_plot do
137
- text "「・・・え、"
138
- wait 0.3
139
- text "流行らないってぇ?"
140
- wait 0.3
141
- cr
142
- text " 駄目よぉ。流行に流されてちゃ。」"
143
- pause.clear
144
- vars[:var][:midori_talk] += 1
145
- end
146
- end
147
-
148
- def talk3
149
- yuki_plot do
150
- text "「何事もぉ、"
151
- wait 0.3
152
- cr
153
- text " ゴーイングマイウェイってやっていかないとぉ、"
154
- wait 0.3
155
- cr
156
- text " 体持たないよっ!?」"
157
- pause.clear
158
- vars[:var][:midori_talk] += 1
159
- end
160
- end
161
-
162
- def talk4
163
- yuki_plot do
164
- text "「・・・ああ、そうそう!"
165
- wait 0.3
166
- cr
167
- text " この本、"
168
- wait 0.3
169
- text "隣の青山くんのところから"
170
- cr
171
- text " 借りてきてたんだけどぉ、"
172
- cr
173
- text " 返しといてくれないかなぁ?"
174
- wait 1.0
175
- text "・"
176
- wait 0.5
177
- text "・"
178
- wait 0.5
179
- text "・"
180
- wait 1.0
181
- clear
182
- size(32){
183
- color(:red){
184
- text " さっさと"
185
- wait 0.5
186
- cr
187
- text " 持って行け"
188
- wait 0.5
189
- cr
190
- text " っつてんだろぉ!"
191
- }
192
- }
193
- text "」"
194
- pause.clear
195
- text "ひゃあ。"
196
- wait 0.5
197
- text " 結局、本を無理矢理渡された。"
198
- pause.clear
199
- vars[:var][:release_aoyama_book] = true
200
- vars[:var][:midori_talk] += 1
201
- end
202
- end
203
-
204
- def talk5
205
- yuki_plot do
206
- text "「ちゃんと本渡してくれたぁ?」"
207
- pause.clear
208
- end
209
- end
210
-
211
- def final
212
- message_box.stop
213
- command_box.stop
214
- end
215
-
216
- def dispose
217
- @midori.dispose
218
- @room.dispose
219
- end
220
- end
1
+ # -*- encoding: utf-8 -*-
2
+ class Green
3
+ include Story::Scene
4
+ include MainComponent
5
+
6
+ def init
7
+ @yuki = Yuki.new
8
+ @yuki.select_textbox(message_box[:box])
9
+ @yuki.select_commandbox(command_box[:box])
10
+ @midori = Sprite.new(:file => "image/midori.png", :type => :ck)
11
+ @midori.center!.bottom!
12
+ @yuki.regist_parts(:midori, @midori)
13
+
14
+ @room = Sprite.new(:file => "image/room_green.png", :type => :as)
15
+ @room.center!.bottom!
16
+
17
+ var[:midori_aisatsu] = false if var[:midori_aisatsu] == nil
18
+ var[:release_aoyama_book] = false if var[:release_aoyama_book] == nil
19
+ var[:midori_talk] = 0 if var[:midori_talk] == nil
20
+
21
+ @talks = Array.new(6){|i| self.method("talk#{i}".to_sym).call}
22
+
23
+ @yuki.vars[:var] = var
24
+ @yuki.vars[:main_command] = main_command
25
+ @yuki.vars[:command] = get_command
26
+ @yuki.vars[:talks] = @talks
27
+ end
28
+
29
+ def setup
30
+ @yuki.setup
31
+ message_box.start
32
+ command_box.start
33
+ @yuki.start_plot(plot)
34
+ end
35
+
36
+ def update
37
+ return nil if Input.quit_or_escape?
38
+ message_box.update_animation
39
+ command_box.update_animation
40
+ @yuki.update
41
+ r = @yuki.executing? ? @now : @yuki.result
42
+ if @yuki.is_scenario?(r)
43
+ @yuki.start_plot(r)
44
+ r = @now
45
+ end
46
+ return r
47
+ end
48
+
49
+ def render
50
+ @room.render
51
+ @yuki.render
52
+ message_box.render
53
+ command_box.render if @yuki.selecting?
54
+ end
55
+
56
+ def get_command
57
+ return [Yuki::Command.new("挨拶する", nil, lambda{var[:midori_aisatsu]==false}, green2),
58
+ Yuki::Command.new("辺りを見る", nil, lambda{var[:midori_aisatsu]==true}, look_green),
59
+ Yuki::Command.new("話す", nil, lambda{var[:midori_aisatsu]==true}, talk),
60
+ Yuki::Command.new("戻る", nil, lambda{var[:midori_aisatsu]==true}, MainScene)]
61
+ end
62
+
63
+ def plot
64
+ yuki_plot do
65
+ text "緑の扉から中に入った。"
66
+ pause.clear
67
+ show :midori
68
+ text "目の前には"
69
+ color(:green){vars[:var][:midori_aisatsu]==true ? "みどりさん" : "女の人"}
70
+ text "が居る。"
71
+ cr
72
+ vars[:main_command]
73
+ end
74
+ end
75
+
76
+ def main_command
77
+ yuki_plot do
78
+ loop do
79
+ text "どうする?"
80
+ command vars[:command]
81
+ clear
82
+ break select_result if is_scene?(select_result)
83
+ call_plot(select_result) if is_scenario?(select_result)
84
+ end
85
+ end
86
+ end
87
+
88
+ def green2
89
+ yuki_plot do
90
+ text "「私の名前はみどり。よろしくぅ」"
91
+ pause.clear
92
+ vars[:var][:midori_aisatsu]=true
93
+ end
94
+ end
95
+
96
+ def look_green
97
+ yuki_plot do
98
+ text "部屋の中は、いたってシンプルだ。"
99
+ pause.cr
100
+ text "女の子らしく、鏡台がある。"
101
+ pause.clear
102
+ end
103
+ end
104
+
105
+ def talk
106
+ yuki_plot do
107
+ call_plot(vars[:talks][vars[:var][:midori_talk]])
108
+ end
109
+ end
110
+
111
+ def talk0
112
+ yuki_plot do
113
+ text "「普通の大学生よぉ。」"
114
+ pause.clear
115
+ vars[:var][:midori_talk] += 1
116
+ end
117
+ end
118
+
119
+ def talk1
120
+ yuki_plot do
121
+ text "「最近はぁ、"
122
+ wait 0.3
123
+ cr
124
+ text " お菓子作りにぃ、"
125
+ wait 0.3
126
+ cr
127
+ text " 凝ってる、"
128
+ wait 0.3
129
+ text "みたいな?」"
130
+ pause.clear
131
+ vars[:var][:midori_talk] += 1
132
+ end
133
+ end
134
+
135
+ def talk2
136
+ yuki_plot do
137
+ text "「・・・え、"
138
+ wait 0.3
139
+ text "流行らないってぇ?"
140
+ wait 0.3
141
+ cr
142
+ text " 駄目よぉ。流行に流されてちゃ。」"
143
+ pause.clear
144
+ vars[:var][:midori_talk] += 1
145
+ end
146
+ end
147
+
148
+ def talk3
149
+ yuki_plot do
150
+ text "「何事もぉ、"
151
+ wait 0.3
152
+ cr
153
+ text " ゴーイングマイウェイってやっていかないとぉ、"
154
+ wait 0.3
155
+ cr
156
+ text " 体持たないよっ!?」"
157
+ pause.clear
158
+ vars[:var][:midori_talk] += 1
159
+ end
160
+ end
161
+
162
+ def talk4
163
+ yuki_plot do
164
+ text "「・・・ああ、そうそう!"
165
+ wait 0.3
166
+ cr
167
+ text " この本、"
168
+ wait 0.3
169
+ text "隣の青山くんのところから"
170
+ cr
171
+ text " 借りてきてたんだけどぉ、"
172
+ cr
173
+ text " 返しといてくれないかなぁ?"
174
+ wait 1.0
175
+ text "・"
176
+ wait 0.5
177
+ text "・"
178
+ wait 0.5
179
+ text "・"
180
+ wait 1.0
181
+ clear
182
+ size(32){
183
+ color(:red){
184
+ text " さっさと"
185
+ wait 0.5
186
+ cr
187
+ text " 持って行け"
188
+ wait 0.5
189
+ cr
190
+ text " っつてんだろぉ!"
191
+ }
192
+ }
193
+ text "」"
194
+ pause.clear
195
+ text "ひゃあ。"
196
+ wait 0.5
197
+ text " 結局、本を無理矢理渡された。"
198
+ pause.clear
199
+ vars[:var][:release_aoyama_book] = true
200
+ vars[:var][:midori_talk] += 1
201
+ end
202
+ end
203
+
204
+ def talk5
205
+ yuki_plot do
206
+ text "「ちゃんと本渡してくれたぁ?」"
207
+ pause.clear
208
+ end
209
+ end
210
+
211
+ def final
212
+ message_box.stop
213
+ command_box.stop
214
+ end
215
+
216
+ def dispose
217
+ @midori.dispose
218
+ @room.dispose
219
+ end
220
+ end