Mercurial > hg > old > magoroku_racing
changeset 144:4ce7b80c9265
test
author | e085768 |
---|---|
date | Sat, 23 Jul 2011 07:31:47 +0900 |
parents | 29a07a7c3760 |
children | 6c326c0860c1 |
files | car.cc field.cc gSprite.cc game.h schedule.cc |
diffstat | 5 files changed, 45 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/car.cc Sat Jul 23 03:21:15 2011 +0900 +++ b/car.cc Sat Jul 23 07:31:47 2011 +0900 @@ -304,10 +304,22 @@ //思う方向と逆に動いたので、マイナスして見ている。 + /* + car->body->xyz[0] = -car->location[0]; + car->body->xyz[1] = -car->location[1]; + car->body->xyz[2] = -car->location[2]; + */ + + /* + car->body->xyz[0] = -car->location[2]; + car->body->xyz[1] = car->location[1]; + car->body->xyz[2] = -car->location[0]; + */ + car->body->xyz[0] = -car->location[0]; - car->body->xyz[1] = -car->location[1]; + car->body->xyz[1] = car->location[1]; car->body->xyz[2] = -car->location[2]; - + // 壁にぶつかった時の処理 if (car_field_check(game,car) == false) { // 壁にぶつかったら計算前の前フレームの座標にしてsppedは半分 @@ -316,6 +328,7 @@ printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); printf("^^^^^^courseOUT!!!!!^^^^^^^^^\n"); } + }
--- a/field.cc Sat Jul 23 03:21:15 2011 +0900 +++ b/field.cc Sat Jul 23 07:31:47 2011 +0900 @@ -207,45 +207,58 @@ p->object->transfer[3][2] = p->location[2]; p->object->transfer[3][3] = p->location[3]; + // p->object->xyz[0] = -p->location[0]; + // p->object->xyz[1] = -p->location[1]; + // p->object->xyz[2] = -p->location[2]; + + // p->object->angle[1] = 90.0f; + // 下の行はしないで良いのか // memcpy(p->object->xyz, p->location, sizeof(FVECTOR)); //memcpy(p->object->angle, p->direction, sizeof(FVECTOR)); gSprite_PutObject( COURSE1_1, p->object ); - } void field_update(CarPtr car) { + printf("field_num_max = %d\n",field_num_max); + printf("field_num = %d\n",field_num); FieldPtr p; p = field_actual; //current + p->location[0] = -car->location[0]; p->location[1] = -car->location[1]; p->location[2] = -car->location[2]; p->location[3] = 1; + field_draw(p); // next p = field_actual->next; if (p) { + p->location[0] = -car->location[0]; p->location[1] = -car->location[1]; p->location[2] = -car->location[2]; p->location[3] = 1; + field_draw(p); } // prev p = field_actual->prev; if (p) { + p->location[0] = -car->location[0]; p->location[1] = -car->location[1]; p->location[2] = -car->location[2]; p->location[3] = 1; + field_draw(p); }
--- a/gSprite.cc Sat Jul 23 03:21:15 2011 +0900 +++ b/gSprite.cc Sat Jul 23 07:31:47 2011 +0900 @@ -76,11 +76,11 @@ // magoroku_camera CAMERA mc = get_MagorokuCamera(); for( int i = 0; i < 4; i ++ ){ - root->xyz[i] = mc.xyz[i]; - root->angle[i] = mc.angle[i]; + root->xyz[i] = mc.xyz[i]; + root->angle[i] = mc.angle[i]; - // camera->zd[i] = mc.zd[i]; - //camera->yd[i] = mc.yd[i]; + // camera->zd[i] = mc.zd[i]; + //camera->yd[i] = mc.yd[i]; } */
--- a/game.h Sat Jul 23 03:21:15 2011 +0900 +++ b/game.h Sat Jul 23 07:31:47 2011 +0900 @@ -5,7 +5,6 @@ #include "car.h" #include "linda/lindaapi.h" - void game_main(); int linda_init();
--- a/schedule.cc Sat Jul 23 03:21:15 2011 +0900 +++ b/schedule.cc Sat Jul 23 07:31:47 2011 +0900 @@ -358,14 +358,13 @@ set_schedule_assumption(sche_game_main_ready); ColFacePtr colface = field_get_actual( )->colface.colface; - INIT_VECTOR(game->jiki->location, - (3*colface->p0[0]+colface->v0[0]+colface->v1[0])/3, + ( (3*colface->p0[0]) + (colface->v0[0]) + (colface->v1[0]) )/3, (3*colface->p0[1]+colface->v0[1]+colface->v1[1])/3, (3*colface->p0[2]+colface->v0[2]+colface->v1[2])/3, 1); + - // とりあえず、トップビューで // FVECTOR cPos = { 0, 877, -2000, 0 }; FVECTOR cPos = { 0, 877, 7500, 0 }; @@ -392,8 +391,15 @@ { printf("sche_game_main()\n"); - FVECTOR cPos = { game->jiki->location[0],game->jiki->location[1], -game->jiki->location[2] ,0 }; - FVECTOR a={180,0,0,0}; + /* + FVECTOR cPos = { game->jiki->location[2], + game->jiki->location[1], + -game->jiki->location[0] ,0 }; + */ + + FVECTOR cPos = { game->jiki->body->xyz[0], game->jiki->body->xyz[1], game->jiki->location[2] ,0 }; + FVECTOR a={ +0,0,0,0}; /** begin: dispaly RAP TIME **/ if(RUNNIG==0){ @@ -425,7 +431,7 @@ // jikiによってカメラも移動( camera_update()って関数のほう使うからイラんね ) set_cameraPos( cPos , a ); - + //camera_update(game, game->jiki->body->transfer);