changeset 70:cee55c8365e9 default tip

fix
author Kazuma
date Thu, 19 May 2016 18:52:26 +0900
parents 1c57e38fb9b5
children
files Character_state.c Dandy.cc Makefile.def Makefile.mac TaskDandy.cc ppe/Atari.cc ppe/chara_state22.cc sgoex.c xml.c
diffstat 9 files changed, 19 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/Character_state.c	Sun May 22 10:19:58 2011 +0900
+++ b/Character_state.c	Thu May 19 18:52:26 2016 +0900
@@ -450,7 +450,7 @@
       p->vy = rand % 3 + 1;
       p->state = chara_state23;
     }
-  if((sf == 2))
+  if(sf == 2)
     {
       p->x = rand % 290;
       p->y = -30;
@@ -918,7 +918,6 @@
 
 CHARACTER * chara_state41(CHARACTER *p) //left arm up arm vulkan
 {
-  int rand;
 
   if (enemy_part2->f == FALSE)
     {
@@ -947,7 +946,7 @@
     {
       if (p->dt1 % 15 == 1) 
 	{
-	  Puttama(9 + rand % 2, p->x, p->y);
+	  Puttama(9 + rand() % 2, p->x, p->y);
 	}
     }
   if (rinkf1 == 10)
--- a/Dandy.cc	Sun May 22 10:19:58 2011 +0900
+++ b/Dandy.cc	Thu May 19 18:52:26 2016 +0900
@@ -300,17 +300,17 @@
     CameraPtr camera = sgroot->sgroot->getCamera();
 
     sgroot->sgroot->flip();
-    sgroot->sgroot->lightCalc();
 
     root = sgroot->createSceneGraph();
     root->xyz[0] = 0;
     root->xyz[1] = 0;
     root->xyz[2] = 30.0f;
 
+    sgroot->sgroot->lightCalc(root);
     /*親の回転、座標から、子の回転、座標を算出*/
     get_matrix(root->matrix, root->angle, root->xyz, camera->matrix);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
+    // get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
 
     sgroot->setSceneData(root);
 }
--- a/Makefile.def	Sun May 22 10:19:58 2011 +0900
+++ b/Makefile.def	Thu May 19 18:52:26 2016 +0900
@@ -6,7 +6,7 @@
 
 ABIBIT = 64
 ABI = -m$(ABIBIT)
-CC      = g++
+CC      = clang++
 OPT = -g
 CFLAGS  =  -Wall $(OPT) $(ABI)
 
--- a/Makefile.mac	Sun May 22 10:19:58 2011 +0900
+++ b/Makefile.mac	Thu May 19 18:52:26 2016 +0900
@@ -10,8 +10,8 @@
 TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CFLAGS  += `sdl-config --cflags` `xml2-config --cflags` $(INCLUDE)
-LIBS	+=  `sdl-config --libs` -framework OpenGL -lSDL_mixer -lSDL_image `xml2-config --libs`
+CFLAGS  += `sdl-config --cflags` `xml2-config --cflags ` `freetype-config --cflags` -Drestrict=__restrict  -Wno-int-to-pointer-cast $(INCLUDE)
+LIBS	+=  `sdl-config --libs` -framework OpenGL -lSDL_mixer -lSDL_image `xml2-config --libs` `freetype-config --libs`
 LIBS += -lCerium -lFifoManager
 
 all: $(TARGET)
@@ -37,4 +37,4 @@
 .cc.o:
 	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
 
-debug.o:debug.h
\ No newline at end of file
+debug.o:debug.h
--- a/TaskDandy.cc	Sun May 22 10:19:58 2011 +0900
+++ b/TaskDandy.cc	Thu May 19 18:52:26 2016 +0900
@@ -301,19 +301,19 @@
     CameraPtr camera = sgroot->sgroot->getCamera();
 
     sgroot->sgroot->flip();
-    sgroot->sgroot->lightCalc();
 
     root = sgroot->createSceneGraph();
     root->xyz[0] = 0;
     root->xyz[1] = 0;
     root->xyz[2] = 30.0f;
 
+    sgroot->sgroot->lightCalc(root);
     /*親の回転、座標から、子の回転、座標を算出*/
     get_matrix(root->matrix, root->angle, root->xyz, camera->matrix);
     scale_matrix(root->matrix, root->scale, root->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
-    scale_matrix(root->real_matrix, root->scale, root->c_xyz);
+    // get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
+    // scale_matrix(root->real_matrix, root->scale, root->c_xyz);
 
     sgroot->setSceneData(root);
 }
@@ -621,8 +621,8 @@
     get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
     scale_matrix(object->matrix, scale, object->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
-    scale_matrix(object->real_matrix, object->scale, object->c_xyz);
+    // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
+    // scale_matrix(object->real_matrix, object->scale, object->c_xyz);
 }
 
 void
@@ -647,8 +647,8 @@
     get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
     scale_matrix(object->matrix, scale, object->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
-    scale_matrix(object->real_matrix, object->scale, object->c_xyz);    
+    // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
+    // scale_matrix(object->real_matrix, object->scale, object->c_xyz);    
 }
 
 struct SGO_PAD pad[2];
--- a/ppe/Atari.cc	Sun May 22 10:19:58 2011 +0900
+++ b/ppe/Atari.cc	Thu May 19 18:52:26 2016 +0900
@@ -58,7 +58,7 @@
 	
 
 	infg->stg = 0;
-	*infg_level--;
+	(*infg_level)--;
 	if (*infg_level < 0)
 	    *infg_level = 0;
 
--- a/ppe/chara_state22.cc	Sun May 22 10:19:58 2011 +0900
+++ b/ppe/chara_state22.cc	Thu May 19 18:52:26 2016 +0900
@@ -19,7 +19,7 @@
 	  p->vy = rand % 3 + 1;
 	  p->task = STATE23;
       }
-      if((sf == 2))
+      if(sf == 2)
       {
 	  p->x = rand % 290;
 	  p->y = -30;
--- a/sgoex.c	Sun May 22 10:19:58 2011 +0900
+++ b/sgoex.c	Thu May 19 18:52:26 2016 +0900
@@ -32,9 +32,6 @@
 
 //static int padd;
 
-static const int sgo_tpx[12] =
-{ 0, 64, 128, 192, 256, 320, 0, 64, 128, 192, 256, 320 };
-static const int sgo_tpy[12] = { 0, 0, 0, 0, 0, 0, 256, 256, 256, 256, 256, 256 };
 
 /*  sgo.h  独自の変数形  */
 SpriteTable sptable[DEFOBJ];
@@ -42,16 +39,6 @@
 
 #define IMAGE_ADJUSTMENT (0) 
 
-/**
- * 一つの画像をpageno(page number)で区切るtexture_page_offsetで
- * pagenoに対応した領域のx,yを用意しておく。PlayStationではpageno
- * で区切る必要があったのだろうが、PS2では全く意味はなさない。
- */
-static const struct texture_page_offset {
-    int x;
-    int y;
-} texpage_offset[] = {
-    {0, 0}, {128 + IMAGE_ADJUSTMENT, 0}, {256 + IMAGE_ADJUSTMENT, 0}, {384 + IMAGE_ADJUSTMENT, 0}};
 
 /*-------------------------------------------------------------
   関数プロトタイプ
--- a/xml.c	Sun May 22 10:19:58 2011 +0900
+++ b/xml.c	Thu May 19 18:52:26 2016 +0900
@@ -28,7 +28,8 @@
 
 static inline char *pickup_exponent(int *exp, char *cont)
 {
-    int n,value=0,shift=10;
+    int n,value=0;
+    float shift = 10;
 
     if (*cont == ',' || *cont == '\n') return(NULL);