Skip to content

Commit

Permalink
it's working !!
Browse files Browse the repository at this point in the history
  • Loading branch information
jjinkou2 committed Oct 19, 2016
1 parent 620deb4 commit b4bf769
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions doax3-xp-grin-v0.7.gpc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;


// ---------------
Expand All @@ -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;


/*---------------------------------------*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -686,17 +683,18 @@ 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);
}

// 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;
}

Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit b4bf769

Please sign in to comment.