comparison TaskDandy.cc @ 70:cee55c8365e9 default tip

fix
author Kazuma
date Thu, 19 May 2016 18:52:26 +0900
parents fce767bb5e25
children
comparison
equal deleted inserted replaced
69:1c57e38fb9b5 70:cee55c8365e9
299 flip() 299 flip()
300 { 300 {
301 CameraPtr camera = sgroot->sgroot->getCamera(); 301 CameraPtr camera = sgroot->sgroot->getCamera();
302 302
303 sgroot->sgroot->flip(); 303 sgroot->sgroot->flip();
304 sgroot->sgroot->lightCalc();
305 304
306 root = sgroot->createSceneGraph(); 305 root = sgroot->createSceneGraph();
307 root->xyz[0] = 0; 306 root->xyz[0] = 0;
308 root->xyz[1] = 0; 307 root->xyz[1] = 0;
309 root->xyz[2] = 30.0f; 308 root->xyz[2] = 30.0f;
310 309
310 sgroot->sgroot->lightCalc(root);
311 /*親の回転、座標から、子の回転、座標を算出*/ 311 /*親の回転、座標から、子の回転、座標を算出*/
312 get_matrix(root->matrix, root->angle, root->xyz, camera->matrix); 312 get_matrix(root->matrix, root->angle, root->xyz, camera->matrix);
313 scale_matrix(root->matrix, root->scale, root->c_xyz); 313 scale_matrix(root->matrix, root->scale, root->c_xyz);
314 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/ 314 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
315 get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix); 315 // get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
316 scale_matrix(root->real_matrix, root->scale, root->c_xyz); 316 // scale_matrix(root->real_matrix, root->scale, root->c_xyz);
317 317
318 sgroot->setSceneData(root); 318 sgroot->setSceneData(root);
319 } 319 }
320 320
321 321
619 619
620 float scale[] = {my_scale,my_scale,1}; 620 float scale[] = {my_scale,my_scale,1};
621 get_matrix(object->matrix, object->angle, object->xyz, root->matrix); 621 get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
622 scale_matrix(object->matrix, scale, object->c_xyz); 622 scale_matrix(object->matrix, scale, object->c_xyz);
623 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/ 623 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
624 get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix); 624 // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
625 scale_matrix(object->real_matrix, object->scale, object->c_xyz); 625 // scale_matrix(object->real_matrix, object->scale, object->c_xyz);
626 } 626 }
627 627
628 void 628 void
629 PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle) 629 PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle)
630 { 630 {
645 645
646 float scale[] = {5*scalex,5*scaley,1}; 646 float scale[] = {5*scalex,5*scaley,1};
647 get_matrix(object->matrix, object->angle, object->xyz, root->matrix); 647 get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
648 scale_matrix(object->matrix, scale, object->c_xyz); 648 scale_matrix(object->matrix, scale, object->c_xyz);
649 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/ 649 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
650 get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix); 650 // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
651 scale_matrix(object->real_matrix, object->scale, object->c_xyz); 651 // scale_matrix(object->real_matrix, object->scale, object->c_xyz);
652 } 652 }
653 653
654 struct SGO_PAD pad[2]; 654 struct SGO_PAD pad[2];
655 655
656 /* コントローラ状態の読み込み */ 656 /* コントローラ状態の読み込み */