From b4bf7693730c36e505727b9b6b2eff2910d37499 Mon Sep 17 00:00:00 2001 From: jjinkou2 Date: Wed, 19 Oct 2016 23:35:43 +0200 Subject: [PATCH] it's working !! --- doax3-xp-grin-v0.7.gpc | 57 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/doax3-xp-grin-v0.7.gpc b/doax3-xp-grin-v0.7.gpc index 9ee3b8b..1b661b1 100644 --- a/doax3-xp-grin-v0.7.gpc +++ b/doax3-xp-grin-v0.7.gpc @@ -193,10 +193,10 @@ define SandwichI = -24; define Sidecar = 2; //tab2 -define Dangerous = 0; -define Tempting = 1; -define Forbidden = 2; -define Secret = -1; +define Dangerous = -1; +define Tempting = 2; +define Forbidden = 1; +define Secret = 0; define MoebieusSlow = 3; define HardGelEx = -6; @@ -299,7 +299,7 @@ define optionalSMovie = FALSE; // -------- // Set to TRUE if you want your girl to play with a partner. Not fully tested -define takePartner = FALSE; +define takePartner = TRUE; // --------------- @@ -324,9 +324,12 @@ define Nb_Cross = 5; // how many times repeating cross (x 200ms) /* Definition */ /*-----------------------*/ -define Nb_Events = 3; // Morning, Afternoon, Evening define Nb_Days = 14; define Nb_Notifs = 20; +define Night = 0; +define Morning = 1; +define Afternoon = 2; +define Evening = 3; /*---------------------------------------*/ @@ -440,7 +443,7 @@ int indexCurrent = 0; // Days and loop vacation //----------------------- int NumDay = 1; -int loop_event = Nb_Events; // Morning , Afternoon, Evening +int loop_event = Night; // Morning , Afternoon, Evening int loop_vacation = 1; int loop_notif = 1; int loop_button = 0; @@ -661,14 +664,8 @@ main { //Press Triangle to pause/play the script. if(event_press(PS4_TRIANGLE)) { Play = !Play; - if (Play) { - SwitchLED(GREEN); - State = Next_State; //Start or restart where we were. - } - else { - Next_State = State; // Save state - SwitchLED(RED_BLINK); - } + SwitchLED(GREEN); + State = Next_State; //Start or restart where we were. } // Press R1 to Stop the script @@ -686,7 +683,7 @@ main { // pressing R2 // will restart it at the beginning of the day if (event_press(PS4_R2)) { - loop_event = Nb_Events; // correction from Morganite + loop_event = Night; // correction from Morganite Play = TRUE; State = S_Start_Day; SwitchLED(GREEN); @@ -694,9 +691,10 @@ main { // L2 to start at the next RCQ if (event_press(PS4_L2)) { - loop_event = loop_event % Nb_Events + 1 ;// adjust the event if script is stopped + loop_event = loop_event % 3 + 1 ;// adjust the event if script is stopped set_val(TRACE_5,loop_event); Play = TRUE; + SwitchLED(GREEN); State = S_Start_RockPlay; } @@ -728,25 +726,26 @@ main { if (State == S_Start_Vacation) run_State(cb_start_vacation, 0, S_Partner); if (State == S_Partner) run_State(cb_partner, 2 * takePartner, //little trick S_Exit_Mission); // to save memory - + // Day States if (State == S_Exit_Mission) { - if (NumDay == 1 && loop_event == 2) run_State(cb_quit_mission,2,S_Start_RockPlay); + if (NumDay == 1 && loop_event == Afternoon) run_State(cb_quit_mission,2,S_Start_RockPlay); else run_State(cb_quit_mission,0,S_Start_RockPlay); } if (State == S_Start_Day) run_State(cb_select_rock_stage, 0, S_Start_RockPlay); if (State == S_Start_RockPlay) { - loop_event = loop_event - 1; + loop_event = loop_event + 1; if (NumDay==1){ - if (loop_event != 0) run_State(cb_abort_rock_play, 0, S_Exit_Mission); - if (loop_event == 0) {loop_event = Nb_Events; run_State(cb_abort_rock_play, 0, S_Hotel);} + if (loop_event == Evening) run_State(cb_abort_rock_play, 0, S_Exit_Mission); +// if (loop_event == Evening) {loop_event = Nb_Events; run_State(cb_abort_rock_play, 0, S_Hotel);} + else {loop_event = Night; run_State(cb_abort_rock_play, 0, S_Hotel);} } else { - if (loop_event == 2) run_State(cb_abort_rock_play, 0, S_Start_RockPlay); - if (loop_event == 1) run_State(cb_abort_rock_play, 0, S_Exit_Mission); - if (loop_event == 0) {loop_event = Nb_Events; run_State(cb_abort_rock_play, 0, S_Hotel);} + if (loop_event == Morning) run_State(cb_abort_rock_play, 0, S_Start_RockPlay); + if (loop_event == Afternoon) run_State(cb_abort_rock_play, 0, S_Exit_Mission); + if (loop_event == Evening) {loop_event = Night; run_State(cb_abort_rock_play, 0, S_Hotel);} } } //if (State == S_Clear_Event) Repeat_ThenGoto(PS4_SQUARE,Nb_Notifs, S_Hotel); @@ -762,7 +761,7 @@ main { if (State == S_Owner_Shop) run_State(cb_owner_shop, 0, S_Select_Tab); - if (State == S_Debug) run_State(cb_owner_shop, 12, S_Select_Tab); //uncomment this to test items to buy + // if (State == S_Debug) run_State(cb_owner_shop, 12, S_Select_Tab); //uncomment this to test items to buy // ============== Start loop Debug =============================== if (State == S_Select_Tab) Repeat_ThenGoto(PS4_RIGHT, Item_Tab, 2, S_Select_Item); if (State == S_Select_Item) select_Item_ThenGoto(S_Buy_Item); @@ -771,9 +770,9 @@ main { //if (State == S_Debug) run_State(cb_owner_shop, 12, S_Wrap); //uncomment this to test items to buy if (State == S_Wrap) run_State(cb_paper, 0, S_Exit_Shop); // ============== END loop Debug =============================== - if (State == S_Exit_Shop) exit_Shop_ThenGoto(S_Debug); // uncomment this to test items to buy + //if (State == S_Exit_Shop) exit_Shop_ThenGoto(S_Debug); // uncomment this to test items to buy - //if (State == S_Exit_Shop) exit_Shop_ThenGoto(S_Throw_Gift); //comment this to test items to buy + if (State == S_Exit_Shop) exit_Shop_ThenGoto(S_Throw_Gift); //comment this to test items to buy // End of hotel if (State == S_Throw_Gift) run_State(cb_throw_gift, 0, S_Go_Bed); @@ -891,7 +890,7 @@ function get_combo_index(combo_id) { }//----------------------------------- function StartGame(){ - loop_event = Nb_Events - 1; // only Afternoon & evening + loop_event = Afternoon; // only Afternoon & evening index_char = index_char + 1; if (CharacterToPlay[index_char] == EndOfChars) index_char = 1; Selected_Char = CharacterToPlay[index_char];