• R/O
  • SSH

hyakutyping: コミット

ゲーム用のソースコード


コミットメタ情報

リビジョン13a8aec19d263c639160aea1d0c22909e69b574d (tree)
日時2011-08-05 06:30:04
作者satofumi
コミッターsatofumi

ログメッセージ

曲と効果音を適用した

変更サマリ

差分

diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/epilogue.wav
Binary file resources/epilogue.wav has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/input_terminated.wav
Binary file resources/input_terminated.wav has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/music_menu.mp3
Binary file resources/music_menu.mp3 has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/music_typing.mp3
Binary file resources/music_typing.mp3 has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/prologue.wav
Binary file resources/prologue.wav has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 resources/type.wav
Binary file resources/type.wav has changed
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/display_result_practice.lua
--- a/scripts/display_result_practice.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/display_result_practice.lua Fri Aug 05 06:30:04 2011 +0900
@@ -1,7 +1,7 @@
11 -- 結果の表示 (練習用)
22 --
33 -- Satofumi KAMIMURA
4--- $Id$
4+-- $Id: display_result_practice.lua,v 47f83febdec5 2011/01/12 03:37:04 Satofumi $
55
66 require("db_local")
77
@@ -54,7 +54,6 @@
5454 title_label_ = nil
5555 title_ = nil
5656
57- --state_ = NotInitialized
5857 mode_ = Result_Shimonoku
5958 end
6059
@@ -134,15 +133,7 @@
134133
135134 local start_sec_data = typing_data_start_sec()
136135 if mode_ == Result_Shimonoku then
137- -- !!! 励ましのメッセージを、オプションで非表示にできるようにする
138- -- !!! この設定は、option_save.lua で管理する
139- -- !!! 利用する励ましのメッセージを選択できるようにしておく
140-
141- -- 励ましのメッセージを表示する
142- -- !!! 結果について、メッセージを表示してもよいかも
143- -- !!! - "最近、ミスの数が減ってきてます。この調子です!"
144- -- !!! - "「入力の開始時間」の最高記録を更新しました!"
145- -- !!! など
136+ -- 現状では、特になにもしない
146137
147138 elseif mode_ == Result_Kimariji then
148139 -- 入力の遅かった和歌の決まり字と下の句の最初の2文字を表示する
@@ -169,6 +160,9 @@
169160 end
170161 end
171162
163+ -- 終了の効果音を鳴らす
164+ sound_effect_epilogue_:play(0.0, 0.0, 0.1)
165+
172166 -- ENTER の入力待ちへ
173167 require("wait_enter")
174168 state:stateMachine():changeState(wait_enter)
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/display_waka.lua
--- a/scripts/display_waka.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/display_waka.lua Fri Aug 05 06:30:04 2011 +0900
@@ -395,10 +395,11 @@
395395 waka_layer_:remove(input_sample_label_)
396396 end
397397
398- if not is_roman then
399- -- ローマ字入力でなければ、戻る
400- return
401- end
398+ -- !!! かな入力のときの BS の扱いを調整中
399+-- if not is_roman then
400+-- -- ローマ字入力でなければ、戻る
401+-- return
402+-- end
402403
403404 -- ローマ字の入力候補を作成
404405 local center_x = screen_:rect().w / 2
@@ -461,7 +462,9 @@
461462 end
462463
463464 if view_ku >= input_ku + 4 and roman_sample_label_ ~= nil then
464- waka_layer_:push_front(roman_sample_label_)
465+ if is_roman then
466+ waka_layer_:push_front(roman_sample_label_)
467+ end
465468 end
466469 end
467470
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/first_menu.lua
--- a/scripts/first_menu.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/first_menu.lua Fri Aug 05 06:30:04 2011 +0900
@@ -106,7 +106,7 @@
106106 function(state)
107107 -- 曲の再生を開始する
108108 if not back_music_:isPlaying() then
109- back_music_:play(Music_menu_, 1000, BackMusic_Infinity, 1000)
109+ back_music_:play(Music_menu_, 300, BackMusic_Infinity, 1000)
110110 end
111111
112112 -- フェードイン
@@ -128,6 +128,10 @@
128128 selected_index_ = menu_:clickedId()
129129 --selected_index_ = 3
130130
131+ if selected_index_ ~= 4 then
132+ sound_effect_input_terminated_:play(0.0, 0.0, 0.1)
133+ end
134+
131135 if selected_index_ == 1 then
132136 require("practice_menu")
133137 state:stateMachine():changeState(practice_menu)
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/kimariji_typing.lua
--- a/scripts/kimariji_typing.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/kimariji_typing.lua Fri Aug 05 06:30:04 2011 +0900
@@ -27,6 +27,8 @@
2727 local input_completed_ = false
2828 local kimariji_input_sample_text_ = nil
2929
30+local sound_effect_prologue_ = nil
31+
3032
3133 function kimariji_typing_handle_escape(state)
3234
@@ -59,16 +61,17 @@
5961
6062 kimariji_typing["Enter"] =
6163 function(state)
62-
6364 if state_ == DisplaySubTitle then
6465 -- サブタイトルの作成
6566 state:stateMachine():changeState(display_subtitle)
6667 state_ = DisplayWaka
6768
6869 -- サブタイトル用の曲を再生
69- back_music_:play(Music_prologue_, 100, 1, 100)
70+ sound_effect_prologue_ = SoundEffect(Sound_prologue_)
71+ sound_effect_prologue_:play(0.0, 0.0, 0.1)
7072
7173 elseif state_ == DisplayWaka then
74+ sound_effect_prologue_:stop()
7275 text_input_:clear()
7376 display_percent_ = 0
7477 if waka_index_ == 0 then
@@ -154,7 +157,7 @@
154157 display_waka_yomibito(waka_id_, 100)
155158
156159 -- 入力完了の効果音を鳴らす
157- sound_effect_input_teminated_:play(0.0, 0.0, 0.1)
160+ sound_effect_input_terminated_:play(0.0, 0.0, 0.1)
158161
159162 -- 改行を待つ
160163 require("wait_enter")
@@ -185,6 +188,7 @@
185188 function(state)
186189 -- 曲の再生を止める
187190 back_music_:stop(1000)
191+ sound_effect_prologue_ = nil
188192
189193 collectgarbage("collect")
190194 end
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/option_config.lua
--- a/scripts/option_config.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/option_config.lua Fri Aug 05 06:30:04 2011 +0900
@@ -67,15 +67,14 @@
6767 option_screen_:setIndex(is_fullscreen_index_)
6868 option_screen_:press(is_fullscreen_index_ + 1)
6969
70- volume_music_:setIndex(volume_music_index_)
70+ --volume_music_:setIndex(volume_music_index_)
7171 volume_music_:press(volume_music_index_ + 1)
72- volume_se_:setIndex(volume_se_index_)
72+ --volume_se_:setIndex(volume_se_index_)
7373 volume_se_:press(volume_se_index_ + 1)
7474 end
7575
7676
7777 function update_option_variable()
78-
7978 if option_input_:clickedIndex() ~= is_roman_index_ then
8079 is_roman_index_ = option_input_:clickedIndex()
8180 is_roman_ = is_roman_index_ == 0 and true or false
@@ -92,15 +91,16 @@
9291 end
9392
9493 -- 曲の音量設定を反映させる
95- if volume_music_:clickedIndex() ~= volume_music_index_ then
94+ if volume_music_:clickedIndex() >= 0 and volume_music_:clickedIndex() ~= volume_music_index_ then
9695 volume_music_index_ = volume_music_:clickedIndex()
9796 back_music_:setVolume(volume_music_index_ * 10)
9897 end
9998
10099 -- 効果音の音量設定を反映させる
101- if volume_se_:clickedIndex() ~= volume_se_index_ then
100+ if volume_se_:clickedIndex() >= 0 and volume_se_:clickedIndex() ~= volume_se_index_ then
102101 volume_se_index_ = volume_se_:clickedIndex()
103- sound_effect_input_teminated_:setMasterVolume(volume_se_index_ * 10)
102+ sound_effect_input_terminated_:setMasterVolume(volume_se_index_ * 10)
103+ sound_effect_input_terminated_:play(0.0, 0.0, 0.1)
104104 end
105105 end
106106
@@ -289,6 +289,9 @@
289289 update_option_variable()
290290 redraw()
291291
292+ -- Enter イベントを読み捨てる
293+ enter_event_:isActive()
294+
292295 if escape_event_:isActive() then
293296 state:stateMachine():changePreviousState()
294297 end
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/practice_menu.lua
--- a/scripts/practice_menu.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/practice_menu.lua Fri Aug 05 06:30:04 2011 +0900
@@ -80,6 +80,9 @@
8080 -- 曲の再生を開始する
8181 if not back_music_:isPlaying() then
8282 back_music_:play(Music_menu_, 1000, BackMusic_Infinity, 1000)
83+
84+ -- 前回タイピングの効果音が再生中ならば、再生を中止する
85+ sound_effect_epilogue_:stop()
8386 end
8487
8588 redraw()
@@ -87,6 +90,7 @@
8790
8891 -- メニューで選択された状態へ遷移させる
8992 if menu_:isClicked() then
93+
9094 selected_index_ = menu_:clickedId()
9195 if selected_index_ == 1 then
9296 require("shimonoku_typing")
@@ -113,6 +117,8 @@
113117 state:stateMachine():changeState(kimariji_typing)
114118
115119 elseif selected_index_ == 4 then
120+ sound_effect_input_terminated_:play(0.0, 0.0, 0.1)
121+
116122 require("first_menu")
117123 state:stateMachine():changeState(first_menu)
118124 selected_index_ = 1
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/shimonoku_typing.lua
--- a/scripts/shimonoku_typing.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/shimonoku_typing.lua Fri Aug 05 06:30:04 2011 +0900
@@ -30,6 +30,8 @@
3030 local converted_text_ = ""
3131 local input_completed_ = false
3232
33+local sound_effect_prologue_ = nil
34+
3335
3436 function shimonoku_typing_handle_escape(state)
3537
@@ -66,9 +68,13 @@
6668 state_ = DisplayWaka
6769
6870 -- サブタイトル用の曲を再生
69- back_music_:play(Music_prologue_, 100, 1, 100)
71+ sound_effect_prologue_ = SoundEffect(Sound_prologue_)
72+ sound_effect_prologue_:play(0.0, 0.0, 0.1)
7073
7174 elseif state_ == DisplayWaka then
75+ if sound_effect_prologue_ ~= nil then
76+ sound_effect_prologue_:stop()
77+ end
7278 text_input_:clear()
7379 display_percent_ = 0
7480 if waka_index_ == 0 then
@@ -170,7 +176,7 @@
170176 display_waka_yomibito(waka_id_, 100)
171177
172178 -- 入力完了の効果音を鳴らす
173- sound_effect_input_teminated_:play(0.0, 0.0, 0.1)
179+ sound_effect_input_terminated_:play(0.0, 0.0, 0.1)
174180
175181 -- 改行を待つ
176182 require("wait_enter")
@@ -199,7 +205,8 @@
199205 shimonoku_typing["Exit"] =
200206 function(state)
201207 -- 曲の再生を止める
202- back_music_:stop(100)
208+ back_music_:stop(1000)
209+ sound_effect_prologue_ = nil
203210
204211 collectgarbage("collect")
205212 end
diff -r 84c4d5adb8f2 -r 13a8aec19d26 scripts/startup.lua
--- a/scripts/startup.lua Fri Jul 29 18:45:20 2011 +0900
+++ b/scripts/startup.lua Fri Aug 05 06:30:04 2011 +0900
@@ -15,13 +15,15 @@
1515
1616 _G.Music_menu_ = "resources/music_menu.mp3"
1717 _G.Music_typing_ = "resources/music_typing.mp3"
18-_G.Music_prologue_ = "resources/prologue.mp3"
1918
20-_G.Sound_input_terminated_ = "resources/input_terminated.ogg"
21-_G.Sound_miss_ = "resources/miss.ogg"
22-_G.Sound_type_ = "resources/type.ogg"
19+_G.Sound_prologue_ = "resources/prologue.wav"
20+_G.Sound_epilogue_ = "resources/epilogue.wav"
21+_G.Sound_input_terminated_ = "resources/input_terminated.wav"
22+_G.Sound_miss_ = "resources/miss.wav"
23+_G.Sound_type_ = "resources/type.wav"
2324
24-_G.sound_effect_input_teminated_ = SoundEffect(Sound_input_terminated_)
25+_G.sound_effect_epilogue_ = SoundEffect(Sound_epilogue_)
26+_G.sound_effect_input_terminated_ = SoundEffect(Sound_input_terminated_)
2527
2628 _G.screen_ = nil
2729 _G.audio_ = nil
@@ -154,7 +156,7 @@
154156
155157 -- 音量設定を反映
156158 back_music_:setVolume(volume_music_index_ * 10)
157- sound_effect_input_teminated_:setMasterVolume(volume_se_index_ * 10)
159+ sound_effect_input_terminated_:setMasterVolume(volume_se_index_ * 10)
158160
159161 -- 共通リソースの初期化
160162 layer_manager_ = LayerManager()
旧リポジトリブラウザで表示