Mercurial > hg > old > magoroku_racing.bad
changeset 52:c875add6256e
*** empty log message ***
author | gongo |
---|---|
date | Wed, 08 Nov 2006 07:10:41 +0000 |
parents | 46b8f2109d34 |
children | a233027e895c |
files | linda.c linda.h schedule.c |
diffstat | 3 files changed, 38 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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();
--- 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; }