changeset 5:8afbbe129730

minor fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 07 Dec 2010 17:02:11 +0900
parents 84082ad11ef1
children 6541f0bebb81
files Character.c tree_controll.c
diffstat 2 files changed, 0 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/Character.c	Tue Dec 07 16:18:59 2010 +0900
+++ b/Character.c	Tue Dec 07 17:02:11 2010 +0900
@@ -40,24 +40,6 @@
 {
 
   pool_size = num;
-  /*
-  q = (CHARACTER*)malloc(sizeof(CHARACTER)*(num+1));
-  
-  if(!q){
-    return 0;
-  }
-
-  q->next = active_chara_list;
-  active_chara_list = q;
-
-  q = active_chara_list + 1;
-  for(q = active_chara_list +1;num-->0;q++)
-    {
-      q->next = q+1;
-    }
-  q->next = free_chara_list;
-  free_chara_list = active_chara_list+1;
-  */
   __debug("task init start");
 
   int i;
@@ -115,24 +97,6 @@
 	 CHARACTER * (*action)(CHARACTER *chara))
 {
   CHARACTER *q;
-  /*
-  if(!free_chara_list)
-    {
-      pool_size *= 2;
-      if(pool_size > CHARACTER_MAX_POOL_SIZE)
-	{
-	  printf("pool_size over\n");
-	  SDL_Quit();
-	  exit(1);
-	}
-      if (!extend_chara_list_pool(pool_size)) 
-	{
-	  printf("failed to memory allocate\n");
-	  SDL_Quit();
-	  exit(1);
-	}
-    }
-  */
 
   for(q = active_chara_list->next; q != NULL ;q = q->next)
     {
@@ -162,15 +126,6 @@
 CHARACTER *
 delete_chara(CHARACTER *p)
 {
-  /*
-  CHARACTER * parent = p->prev;
-  p->state = noaction;
-  p->prev->next = p->next;
-  p->next->prev = p->prev;
-  
-  p->next = free_chara_list->next;
-  free_chara_list->next = p;
-  */
 
   CHARACTER *parent = p;
   p->f = FALSE;
--- a/tree_controll.c	Tue Dec 07 16:18:59 2010 +0900
+++ b/tree_controll.c	Tue Dec 07 17:02:11 2010 +0900
@@ -102,35 +102,6 @@
 
 
 float tes_angle[3] = {0,0,0};
-/*
-void obj_draw(SURFACE *surfaces)
-{
-  int n;
-
-  glEnable(GL_TEXTURE_2D);
-  glBindTexture(GL_TEXTURE_2D, (GLuint)surfaces->texture);
-
-  glTranslatef(surfaces->xyz[0],surfaces->xyz[1],surfaces->xyz[2]);
-
-  glTranslatef(*(surfaces->data[2][0]), *(surfaces->data[2][0]+1), *(surfaces->data[2][0]+2));
-
-  glRotatef(surfaces->angle[0], 1, 0, 0);
-  glRotatef(surfaces->angle[1], 0, 1, 0);
-  glRotatef(surfaces->angle[2], 0, 0, 1);
-  
-  glTranslatef(-*(surfaces->data[2][0]), -*(surfaces->data[2][0]+1), -*(surfaces->data[2][0]+2));
-  
-  glBegin( GL_TRIANGLES);
-  for(n=0; n<surfaces->size; n++)
-    {
-      glTexCoord2f(*(surfaces->data[3][n]),*(surfaces->data[3][n]+1));
-      glVertex3f(*(surfaces->data[0][n]),*(surfaces->data[0][n]+1),*(surfaces->data[0][n]+2));
-      glNormal3f(*(surfaces->data[1][n]),*(surfaces->data[1][n]+1),*(surfaces->data[1][n]+2));
-    }
-  glEnd( );
-  glDisable(GL_TEXTURE_2D);
-}
-*/
 
 
 SURFACE *next_draw_node(SURFACE *surfaces)
@@ -192,29 +163,6 @@
   printf("can't not find node\n");
   return ret_node;
 }
-/*
-void all_obj_draw(OBJECT *top)
-{
-  SURFACE *node;
-  node = top->surfaces;
-  glPushMatrix();
-  while(node != NULL)
-    {
-      obj_draw(node);
-      //if(node->child != NULL)
-	{
-	  node = next_draw_node(node);
-	}
-	//
-      else
-	{
-	  //node = node->next;
-	}
-      //
-    }
-  glPopMatrix();
-}
-*/
 
 SURFACE *next_node(SURFACE *surfaces)
 {
@@ -245,21 +193,6 @@
     }
 }
 
-/*
-void node_draw(OBJECT *top, char *name)
-{
-  SURFACE *node;
-  for(node=top->surfaces; node!=NULL; node=next_node(node))
-    {
-      if(!strcmp(node->name, name))
-        {
-	  glPushMatrix();
-          obj_draw(node);
-	  glPopMatrix();
-        }
-    }
-}
-*/
 
 
 void node_prameter_change(OBJECT *top, char *name, float x, float y, float z, float ax, float ay, float az)