# HG changeset patch # User gongo # Date 1162969841 0 # Node ID c875add6256e3a38e446d696542762ef59362f3e # Parent 46b8f2109d34d183be6df1c1b133f87e8aac6ba9 *** empty log message *** diff -r 46b8f2109d34 -r c875add6256e linda.c --- a/linda.c Wed Nov 08 06:50:47 2006 +0000 +++ b/linda.c Wed Nov 08 07:10:41 2006 +0000 @@ -93,7 +93,7 @@ if (mode) *mode = get_header(pkt, PKT_MODE_OFFSET); if (car) *car = get_header(pkt, PKT_CARID_OFFSET); if (course) *course = get_header(pkt, PKT_COURSEID_OFFSET); - //if (data) data = get_header(pkt, PKT_DATA_OFFSET); + if (data) data = pkt+PKT_DATA_OFFSET; psx_free(reply); linda_seq[id] = psx_rd(id); @@ -337,12 +337,38 @@ static Bool linda_sche_ready0() { + linda_set_schedule(linda_sche_main0, MODE_MAIN); return TRUE; } static Bool linda_sche_ready1() { + linda_set_schedule(linda_sche_main1, MODE_MAIN); + return TRUE; +} + +static Bool +linda_sche_main0() +{ + send_packet(2, MODE_MAIN, 1, 1, (char*)game.jiki->body->transfer); + return FALSE; +} + +static Bool +linda_sche_main1() +{ + int mode; + FMATRIX po; + + ps2_vu0_unit_matrix(po); + + get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, (char*)po); + + if (mode == MODE_MAIN) { + ps2_vu0_copy_matrix(game.jiki->body->transfer, po); + } + return FALSE; } diff -r 46b8f2109d34 -r c875add6256e linda.h --- a/linda.h Wed Nov 08 06:50:47 2006 +0000 +++ b/linda.h Wed Nov 08 07:10:41 2006 +0000 @@ -53,3 +53,5 @@ static Bool linda_sche_select_course1(); static Bool linda_sche_ready0(); static Bool linda_sche_ready1(); +static Bool linda_sche_main0(); +static Bool linda_sche_main1(); diff -r 46b8f2109d34 -r c875add6256e schedule.c --- a/schedule.c Wed Nov 08 06:50:47 2006 +0000 +++ b/schedule.c Wed Nov 08 07:10:41 2006 +0000 @@ -249,12 +249,17 @@ } blink_count = (blink_count > 70) ? 0 : blink_count + 1; - if (pad.st > 0) { + if (game.linda_exec() == TRUE) + set_schedule(sche_game_main_init); + +/* + if (pad.st == 1) { set_schedule(sche_game_main_init); } if (pad.cross > 0) { set_schedule(sche_game_select_car); } +*/ } void @@ -263,6 +268,7 @@ if (!game.jiki) play_init(); RUNNIG=0; + set_schedule(sche_game_main); } @@ -320,6 +326,8 @@ car_accelerate(game.jiki, -1); } + game.linda_exec(); + if (pad.r1 == 1) { game.camera_type = !game.camera_type; }