From d5d1a78a05eb09feb43c8bd736108ad362c8f9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Tue, 21 Aug 2018 18:11:23 +0200 Subject: [PATCH] Add question about video opening --- Update/&opening.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ Update/flow.txt | 6 ++++-- Update/onik_op.txt | 4 +--- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 Update/&opening.txt diff --git a/Update/&opening.txt b/Update/&opening.txt new file mode 100644 index 0000000..20a5b1b --- /dev/null +++ b/Update/&opening.txt @@ -0,0 +1,44 @@ +void main() +{ +} + +void OpeningQuestion() +{ + if (GetGlobalFlag(GVideoOpening) == 0) { + OutputLine(NULL, "オープニング動画は多少のネタバレ要素を含んでいますが、再生を有効にしますか?", + NULL, "Video opening might contain minor spoilers. Do you want to enable it anyway?", Line_Normal); + + char Item[2]; + + if (GetGlobalFlag(GLanguage) == 1) { + Item[0] = "Yes"; + Item[1] = "No"; + } else { + Item[0] = "はい"; + Item[1] = "いいえ"; + } + + Select( 2, Item ); + + if (LoadValueFromLocalWork(SelectResult) == 0) { + SetGlobalFlag(GVideoOpening, 2); + } else { + SetGlobalFlag(GVideoOpening, 1); + } + } +} + +void OpeningLaunch() +{ + if (GetGlobalFlag(GVideoOpening) >= 3) { + ModPlayMovie("mv01"); + } +} + +void OpeningStory() +{ + if (GetGlobalFlag(GVideoOpening) >= 2) { + SetGlobalFlag(GVideoOpening, 3); + ModPlayMovie("mv01"); + } +} diff --git a/Update/flow.txt b/Update/flow.txt index a1ae332..8c63c67 100644 --- a/Update/flow.txt +++ b/Update/flow.txt @@ -1,4 +1,4 @@ - + void main() { SetValidityOfSaving( FALSE ); @@ -18,6 +18,8 @@ void BrandLogo() SetGlobalFlag(GFlag_FirstPlay, 1); + ModCallScriptSection("&opening", "OpeningQuestion"); + DrawBG( "07thlogo", 1000, TRUE ); Wait( 2000 ); DrawSceneWithMask( "mangagamer", "logomask", 0, 0, 1000 ); @@ -26,7 +28,7 @@ void BrandLogo() DrawSceneWithMask( "black", "logomask", 0, 0, 1000 ); - ModPlayMovie("mv01"); + ModCallScriptSection("&opening", "OpeningLaunch"); } void Title() diff --git a/Update/onik_op.txt b/Update/onik_op.txt index e3a7809..021af5b 100644 --- a/Update/onik_op.txt +++ b/Update/onik_op.txt @@ -544,7 +544,5 @@ void main() //return - - SetValidityOfInput( TRUE ); - ModPlayMovie("mv01"); + ModCallScriptSection("&opening", "OpeningStory"); }