Mercurial > hg > old > magoroku_racing
view light.cc @ 134:42337585fb7c
fix merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 22 Jul 2011 18:32:39 +0900 |
parents | 6ef3b0efdeaf |
children |
line wrap: on
line source
/* light.c */ #include <stdio.h> #include "libps2.h" #include "light.h" #include "sjoy.h" // ps2関連ファイルから FMATRIX normal_light; FMATRIX light_color; void init_light(LIGHT *l) { //Three lights in all. // The color of the light of "light0" is color0. // The color of the light of "light1" is color1. // The color of the light of "light2" is color2. l->light0[0] = 0.0; l->light0[1] = 0.0; l->light0[2] = 1.0; l->light0[3] = 1.0; l->light1[0] = 0.0; l->light1[1] = -1.0; l->light1[2] = 0.0; l->light1[3] = 1.0; l->light2[0] = 1.0; l->light2[1] = 1.0; l->light2[2] = 1.0; l->light2[3] = 1.0; l->color0[0] = 0.4; l->color0[1] = 0.4; l->color0[2] = 0.4; l->color0[3] = 1.0; l->color1[0] = 0.4; l->color1[1] = 0.4; l->color1[2] = 0.4; l->color1[3] = 1.0; l->color2[0] = 0.4; l->color2[1] = 0.4; l->color2[2] = 0.4; l->color2[3] = 1.0; //Reflection degree of light l->ambient[0] = 0.4; l->ambient[1] = 0.4; l->ambient[2] = 0.4; l->ambient[3] = 1.0; } // 自作:miya void ps2_vu0_normal_light_matrix(FMATRIX light_color, FVECTOR l0, FVECTOR l1, FVECTOR l2) { printf("ps2_vu0_normal_light_matrix\n"); } // 自作:miya void ps2_vu0_light_color_matrix( FMATRIX light_color, FVECTOR c0, FVECTOR c1, FVECTOR c2, FVECTOR a) { printf("ps2_vu0_light_color_matrix\n"); } void set_light(LIGHT *l) { ps2_vu0_normal_light_matrix(normal_light, l->light0, l->light1, l->light2); ps2_vu0_light_color_matrix(light_color, l->color0, l->color1, l->color2, l->ambient); }