changeset 100:e5f2eb98b575

change cc
author e085768
date Thu, 02 Jun 2011 18:19:07 +0900
parents c534f339ee8b
children 67c843471b77
files TAGS camera.o car.cc carNode.cc carNode.h col.o controler.o field.cc field.o gFont.cc gFont.h gFont.o gSprite.cc gSprite.o game_time.o light.cc light.o main.o mytype.o ps2util.cc ps2util.h ps2util.o quotanion.o schedule.cc sjoy.cc sjoy.o test_vector title_scene.o
diffstat 28 files changed, 89 insertions(+), 92 deletions(-) [+]
line wrap: on
line diff
--- a/TAGS	Thu Jun 02 17:51:41 2011 +0900
+++ b/TAGS	Thu Jun 02 18:19:07 2011 +0900
@@ -152,47 +152,47 @@
 } GsSpritePacket;87,2043
 } SpritePacketHeader;102,2557
 
-camera.c,138
+camera.cc,138
 static CAMERA camera,13,214
 static CAMERA camera, def_camera;13,214
 camera_init(17,255
 void set_camera(53,1122
 camera_update(65,1465
 
-car.c,383
+car.cc,383
 #define DEFAULT_SET 15,233
 #define BUFSIZE 16,322
 static FVECTOR location 19,377
 static FVECTOR direction 20,418
 car_create(25,497
 car_new_readCSV(73,1792
-CarPtr car_init(115,2655
-car_swerve(136,3061
-car_accelerate(156,3612
-car_field_check(174,4217
-car_move(216,5282
-car_axis_rotation(232,5670
-void car_update(264,6568
-car_destroy(279,6801
-void car_id_update(296,7093
+CarPtr car_init(115,2664
+car_swerve(136,3085
+car_accelerate(156,3636
+car_field_check(174,4241
+car_move(216,5306
+car_axis_rotation(232,5694
+void car_update(264,6592
+car_destroy(279,6825
+void car_id_update(296,7117
 
-carNode.c,99
+carNode.cc,99
 static CarPtr car_list;12,188
 carNode_append(15,218
 carNode_draw(29,380
 carNode_destroy(41,496
 
-col.c,90
+col.cc,90
 col_detect_approx(20,430
 col_orthocenter(46,1161
 col_detect(71,1818
 col_init(105,2584
 
-controler.c,42
+controler.cc,42
 SGO_PAD pad;21,329
 bool padCheck(23,343
 
-field.c,419
+field.cc,419
 #define BUFSIZE 13,222
 static int field_num_max 18,287
 static int field_num 19,317
@@ -209,7 +209,7 @@
 field_set_actual(255,5236
 field_get_actual(261,5299
 
-gFont.c,647
+gFont.cc,647
 #define DEFOBJ 15,332
 #define SPRITE_COL 16,351
 #define SCREEN_HALF_W 17,375
@@ -233,7 +233,7 @@
 gFont_SetStringInt(158,2957
 gFont_SetFont_OP(167,3093
 
-gSprite.c,562
+gSprite.cc,562
 #define DEFOBJ 8,123
 #define SPRITE_COL 9,142
 #define SCREEN_HALF_W 10,166
@@ -253,18 +253,18 @@
 gSprite_Draw_Reset(145,3535
 gSprite_PutSprite_Pause(155,3628
 
-game.c,50
+game.cc,50
 #define linda_init 20,288
 void game_main(23,317
 
-game_time.c,169
+game_time.cc,169
 int game_time_get_msec(6,67
 int game_time_conv_ms2cs 29,516
 int game_time_conv_ms2sec 34,603
 int game_time_conv_ms2minute 39,672
 void game_time_set_raptime 56,1044
 
-light.c,187
+light.cc,187
 FMATRIX normal_light;9,124
 FMATRIX light_color;10,146
 void init_light(13,169
@@ -272,7 +272,7 @@
 void ps2_vu0_light_color_matrix(67,1226
 void set_light(73,1371
 
-linda.c,967
+linda.cc,967
 static int my_id;18,343
 static CarPtr linda_carlist[linda_carlist19,361
 static int linda_seq[linda_seq20,404
@@ -307,11 +307,11 @@
 void linda_env_init(694,14743
 linda_init(706,14862
 
-main.c,39
+main.cc,39
 FILE *main_fp;main_fp6,79
 main(9,99
 
-mytype.c,139
+mytype.cc,139
 static clock_t start;10,137
 static clock_t race_start;11,159
 wait_init(14,192
@@ -319,7 +319,7 @@
 time_RaceStart(39,480
 time_RaceTime(45,533
 
-ps2util.c,1332
+ps2util.cc,1332
 OBJECT *ps2util_obj_Create_fromXML(ps2util_obj_Create_fromXML15,337
 void ps2util_obj_Set_effect(32,610
 void ps2_vu0_copy_vector(38,732
@@ -333,37 +333,37 @@
 void ps2_vu0_apply_matrix(118,2612
 void ps2_vu0_scale_vector(127,3010
 void ps2_vu0_add_vector(137,3361
-void ps2_vu0_outer_product(146,3556
-float ps2_vu0_inner_product(155,3793
-void ps2_vu0_mul_matrix(161,3907
-void ps2_vu0_copy_matrix(185,5644
-void ps2util_obj_Free(190,5749
-void ps2_vu0_sub_vector(197,5804
-void ps2_vu0_normalize(207,5991
-void xml_free(218,6241
-void ps2util_obj_Draw(224,6287
-void  ps2util_sprite_Destroy(230,6340
-void ps2util_sprite_Set_basicAttribute(238,6416
-void ps2util_sprite_Request(248,6722
-void ps2util_sprite_Unuse_alpha(254,6783
-void ps2util_graphic_Init(259,6848
-#define SPRITE_HAS_4VERTEXIS 268,6944
-#define PS2_GS_XYZ3 270,6976
-sprite_disappear(273,7068
-void delete_name_dictionary(289,7458
-void free_texture(322,8135
-int malloc_align16(338,8463
-void ps2util_tex_Exclude(362,8991
-void ps2util_sprite_Draw(368,9091
-void ps2util_graphic_Finish(373,9160
-void ps2util_sprite_Use_alpha(380,9262
+void ps2_vu0_outer_product(147,3581
+float ps2_vu0_inner_product(156,3818
+void ps2_vu0_mul_matrix(162,3932
+void ps2_vu0_copy_matrix(186,5669
+void ps2util_obj_Free(191,5774
+void ps2_vu0_sub_vector(198,5829
+void ps2_vu0_normalize(208,6019
+void xml_free(219,6266
+void ps2util_obj_Draw(225,6312
+void  ps2util_sprite_Destroy(231,6365
+void ps2util_sprite_Set_basicAttribute(239,6441
+void ps2util_sprite_Request(249,6747
+void ps2util_sprite_Unuse_alpha(255,6808
+void ps2util_graphic_Init(260,6873
+#define SPRITE_HAS_4VERTEXIS 269,6969
+#define PS2_GS_XYZ3 271,7001
+sprite_disappear(274,7093
+void delete_name_dictionary(290,7483
+void free_texture(323,8160
+int malloc_align16(339,8488
+void ps2util_tex_Exclude(363,9016
+void ps2util_sprite_Draw(369,9116
+void ps2util_graphic_Finish(374,9185
+void ps2util_sprite_Use_alpha(381,9287
 
-quotanion.c,69
+quotanion.cc,69
 quotanion(11,226
 quotanion_rotmatrix(25,529
 degree2radian(47,1167
 
-schedule.c,1007
+schedule.cc,1007
 #define linda_update(31,521
 #define MAXCAR 34,575
 #define MAXFIELD 35,616
@@ -401,7 +401,7 @@
 void swap_dbuff(488,9793
 schedule(494,9849
 
-sjoy.c,431
+sjoy.cc,431
 #define N_JOY 14,195
 static char *g_devName[g_devName16,214
 static int g_fd[g_fd21,280
@@ -418,18 +418,18 @@
 int sjoy_get_axis(125,2439
 int sjoy_get_ps2_button(131,2582
 
-test_vector.c,157
+test_vector.cc,157
 int main(16,358
-void init_FVECTOR(134,2888
-void init_FMATRIX(143,3070
-void output_FVECTOR(154,3298
-void output_FMATRIX(164,3461
-void all_init(179,3692
+void init_FVECTOR(134,2887
+void init_FMATRIX(144,3081
+void output_FVECTOR(159,3395
+void output_FMATRIX(169,3558
+void all_init(184,3789
 
-title_scene.c,319
-    TITLE_INIT,10,123
-    TITLE_MAIN,11,139
-    TITLE_FINISH12,155
+title_scene.cc,360
+    TITLE_INIT,::TITLE_INIT10,123
+    TITLE_MAIN,::TITLE_MAIN11,139
+    TITLE_FINISH::TITLE_FINISH12,155
 } TITLE_STATE;13,172
 static ps2utilSprite title_sprite;15,188
 static TEXTURE *title_img;title_img17,224
Binary file camera.o has changed
--- a/car.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/car.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -1,4 +1,4 @@
-/* car.c */
+/* Car.c */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -72,7 +72,7 @@
 static CarPtr
 car_new_readCSV(FILE *fp, int id)
 {
-  CarPtr new;
+  CarPtr newCar;
   int   car_id;
   float speed_accel, speed_max, brake, rot;
   char  buff[BUFSIZE], *bufp;
@@ -97,9 +97,9 @@
       if (flag == true) {
 	sscanf(bufp, " %s %s %f %f %f %f\n",
 	       carImg, texImg, &speed_accel, &speed_max, &rot, &brake);
-	new = car_create(id, carImg, texImg,
+	newCar = car_create(id, carImg, texImg,
 			 speed_accel, speed_max, rot, brake);
-	return new;
+	return newCar;
       }
       break;
     default:
@@ -114,18 +114,18 @@
 
 CarPtr car_init(int id)
 {
-  CarPtr new;
+  CarPtr newCar;
   FILE *fp;
-  char *filename = "car/car.dat";
+  const char *filename = "car/car.dat";
 
   if (!(fp = fopen(filename, "r"))) {
     fprintf(main_fp, "error read file %s\n", filename);
     exit(EXIT_FAILURE);
   }
-  new = car_new_readCSV(fp, id);
+  newCar = car_new_readCSV(fp, id);
   fclose(fp);
 
-  return new;
+  return newCar;
 }
 
 /*---------------------------
--- a/carNode.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/carNode.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -12,15 +12,15 @@
 static CarPtr car_list;
 
 void
-carNode_append(CarPtr new) 
+carNode_append(CarPtr newCar) 
 {
   CarPtr p = car_list;
 
   if (!p) {
-    car_list = new;
+    car_list = newCar;
   } else {
     while (p->next) p = p->next;
-    p->next = new;
+    p->next = newCar;
   }
 }
 
--- a/carNode.h	Thu Jun 02 17:51:41 2011 +0900
+++ b/carNode.h	Thu Jun 02 18:19:07 2011 +0900
@@ -6,7 +6,7 @@
 /* --- car.c --- */
 void car_destroy(CarPtr car);
 
-void carNode_append(CarPtr new) ;
+void carNode_append(CarPtr newCar) ;
 void carNode_draw();
 void carNode_destroy();
 
Binary file col.o has changed
Binary file controler.o has changed
--- a/field.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/field.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -151,7 +151,7 @@
 field_init(int id)
 {
     FILE *fp;
-    char *filename = "course/course.dat";
+    const char *filename = "course/course.dat";
 
     if (!(fp = fopen(filename, "r"))) {
         fprintf(main_fp, "error read file %s\n", filename);
Binary file field.o has changed
--- a/gFont.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/gFont.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -27,7 +27,7 @@
 static TEXTURE *font_tex;
 
 static void
-gFont_Init_Png(char *texname)
+gFont_Init_Png(const char *texname)
 {
   if (!(font_tex = read_png_file(texname))) {
     fprintf(stderr,
@@ -139,7 +139,7 @@
  * str をスプライド表示
  */
 void
-gFont_SetString(char *str, int x, int y)
+gFont_SetString(const char *str, int x, int y)
 {
   int number;
 
--- a/gFont.h	Thu Jun 02 17:51:41 2011 +0900
+++ b/gFont.h	Thu Jun 02 18:19:07 2011 +0900
@@ -2,7 +2,7 @@
 
 // extern 消してみた:miya
 void gFont_Draw_Reset();
-void gFont_SetString(char *str, int x, int y);
+void gFont_SetString(const char *str, int x, int y);
 void gFont_SetStringInt(int str, int x, int y);
 void gFont_Init();
 void gFont_SetFont_OP();
Binary file gFont.o has changed
--- a/gSprite.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/gSprite.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -63,7 +63,7 @@
 
 
 static void
-gSprite_Init_Png(char *texname)
+gSprite_Init_Png(const char *texname)
 {
   if (!(sprite_tex = read_png_file(texname))) {
     fprintf(stderr,
Binary file gSprite.o has changed
Binary file game_time.o has changed
--- a/light.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/light.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -59,15 +59,13 @@
 // 自作:miya
 void ps2_vu0_normal_light_matrix(FMATRIX light_color, FVECTOR l0, FVECTOR l1, FVECTOR l2)
 {
-  char *miyahira;
-  miyahira = "この関数なに?";
+  printf("test\n");
 }
 
 // 自作:miya
 void ps2_vu0_light_color_matrix( FMATRIX light_color, FVECTOR c0, FVECTOR c1, FVECTOR c2, FVECTOR a)
 {
-  char *miyahira;
-  miyahira = "test";
+  printf("test\n");
 }
 
 void set_light(LIGHT *l)
Binary file light.o has changed
Binary file main.o has changed
Binary file mytype.o has changed
--- a/ps2util.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/ps2util.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -12,7 +12,7 @@
   どんな処理か分からないので、とりあえず、初期化している。
 */
 
-OBJECT *ps2util_obj_Create_fromXML(char *filename)
+OBJECT *ps2util_obj_Create_fromXML(const char *filename)
 {
   OBJECT *body;
 
@@ -49,7 +49,7 @@
 /*
   ps2 内の texture.c から
 */
-TEXTURE* read_png_file(char *texname)
+TEXTURE* read_png_file(const char *texname)
 {
   printf("trace\n");  
   //とりあえず戻り値を返してエラーをどうにか
@@ -362,8 +362,7 @@
 // miya
 void ps2util_tex_Exclude( TEXTURE* t )
 {
-  char *miyahira;
-  miyahira = "なにこの関数?";
+  const char *test = "test";
 }
 
 void ps2util_sprite_Draw()
--- a/ps2util.h	Thu Jun 02 17:51:41 2011 +0900
+++ b/ps2util.h	Thu Jun 02 18:19:07 2011 +0900
@@ -17,7 +17,7 @@
 #include "libps2.h"
 #include "col.h"
 
-OBJECT *ps2util_obj_Create_fromXML(char *filename);
+OBJECT *ps2util_obj_Create_fromXML(const char *filename);
 
 
 /*
@@ -41,7 +41,7 @@
 void ps2_vu0_copy_vector( FVECTOR a,  FVECTOR b);
 void ps2util_obj_Renew_transMatrix(OBJECT*);
 
-TEXTURE* read_png_file(char *texname);
+TEXTURE* read_png_file(const char *texname);
 int ps2util_tex_Set(TEXTURE*);
 void ps2util_obj_Set_texture(OBJECT*, TEXTURE*);
 void ps2_vu0_unit_matrix( FMATRIX );
Binary file ps2util.o has changed
Binary file quotanion.o has changed
--- a/schedule.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/schedule.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -68,15 +68,15 @@
 static LIGHT l;
 static int i=0;
 
-static void (*sche_func_assumption)();
-static void (*sche_func)() = &sche_game_init;
+static void (*sche_func_assumption)(Game*);
+static void (*sche_func)(Game*) = &sche_game_init;
 static int change_state = 0;
 
 // schedule.cで使用してる
 void linda_env_init( void );
 
 static void
-set_schedule_assumption(void *_func)
+set_schedule_assumption(void (*_func)(Game*) )
 {
   sche_func_assumption = _func;
   change_state = 1;
--- a/sjoy.cc	Thu Jun 02 17:51:41 2011 +0900
+++ b/sjoy.cc	Thu Jun 02 18:19:07 2011 +0900
@@ -13,7 +13,7 @@
 
 #define N_JOY   2
 
-static char *g_devName[N_JOY] = {
+static const char *g_devName[N_JOY] = {
   "/dev/js0",
   "/dev/js1",
 };
Binary file sjoy.o has changed
Binary file test_vector has changed
Binary file title_scene.o has changed