# HG changeset patch # User Shinji KONO # Date 1256284967 -32400 # Node ID cc989924f4696afe30ba9a87478c43c9686ac749 # Parent 0f13810d449244cf7cf6586fabeb50bfc1dbb568 minor fix diff -r 0f13810d4492 -r cc989924f469 Renderer/Engine/SceneGraphRoot.cc --- a/Renderer/Engine/SceneGraphRoot.cc Fri Oct 23 15:53:24 2009 +0900 +++ b/Renderer/Engine/SceneGraphRoot.cc Fri Oct 23 17:02:47 2009 +0900 @@ -77,7 +77,7 @@ { int dup; if ((dup = getSgid(sg->name))>=0) { // while... - sg_src[dup]->name = 0; + sg_src[dup]->name = ""; // we should remove this. but some one may use it... } if (sg_src_id+1> sg_src_size) { @@ -218,7 +218,7 @@ SceneGraphRoot::getSgid(const char *name) { for(int i =0;i<= sg_src_id; i++) { - if (strcmp(name,sg_src[i]->name) ) + if (sg_src[i] && strcmp(name,sg_src[i]->name) == 0) return i; } return -1; diff -r 0f13810d4492 -r cc989924f469 Renderer/Engine/lindaapi.h --- a/Renderer/Engine/lindaapi.h Fri Oct 23 15:53:24 2009 +0900 +++ b/Renderer/Engine/lindaapi.h Fri Oct 23 17:02:47 2009 +0900 @@ -79,6 +79,7 @@ extern int psx_ld(unsigned int tspace_id, unsigned int id, char mode, void(*callback)(unsigned char *,void *),void * obj); +#define psx_get_data(tuple) ((tuple)+LINDA_HEADER_SIZE) #define psx_in(tid, id) psx_ld(tid, id, 'i', NULL, NULL) #define psx_rd(tid, id) psx_ld(tid, id, 'r', NULL, NULL) #define psx_ck(tid, id) psx_ld(tid, id, 'c', NULL, NULL) diff -r 0f13810d4492 -r cc989924f469 Renderer/Test/Makefile.macosx --- a/Renderer/Test/Makefile.macosx Fri Oct 23 15:53:24 2009 +0900 +++ b/Renderer/Test/Makefile.macosx Fri Oct 23 17:02:47 2009 +0900 @@ -10,8 +10,8 @@ .cc.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ -all: ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum send_linda dynamic - +ALL = ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum send_linda dynamic +all: $(ALL) BALL_BOUND_OBJ = ball_bound.o ball_bound : $(BALL_BOUND_OBJ) @@ -73,7 +73,7 @@ clean: rm -f $(TARGET) $(OBJS) $(TASK_OBJS) *.o - rm -f *~ \#* + rm -f *~ \#* $(ALL) rm -f $(BALL_BOUND_XML).cc $(BALL_BOUND_XML).h $(BALL_BOUND_OBJ) -include depend.inc diff -r 0f13810d4492 -r cc989924f469 Renderer/Test/dynamic_create.cc --- a/Renderer/Test/dynamic_create.cc Fri Oct 23 15:53:24 2009 +0900 +++ b/Renderer/Test/dynamic_create.cc Fri Oct 23 17:02:47 2009 +0900 @@ -79,45 +79,6 @@ } } -int -fix_byte(int size,int fix_byte_size) -{ - size = (size/fix_byte_size)*fix_byte_size + ((size%fix_byte_size)!= 0)*fix_byte_size; - - return size; -} - -st_mmap_t -my_mmap(char *filename) -{ - int fd = -1; - int map = MAP_PRIVATE; - st_mmap_t st_mmap; - struct stat sb; - - if ((fd = open(filename, O_RDONLY, 0666)) == 0 ) { - fprintf(stderr, "Can't open %s\n", filename); - } - - if (fstat(fd, &sb)) { - fprintf(stderr, "Can't fstat %s\n", filename); - } - - printf("file size %d\n", (int)sb.st_size); - - st_mmap.size = fix_byte(sb.st_size, 4096); - - printf("fix 4096byte file size %d\n", (int)st_mmap.size); - - st_mmap.file_mmap = (char *)mmap(NULL, st_mmap.size, PROT_READ, map, fd, (off_t)0); - if (st_mmap.file_mmap == (caddr_t)-1) { - fprintf(stderr, "Can't mmap file\n"); - perror(NULL); - exit(0); - } - - return st_mmap; -} static void earth_collision(SceneGraphPtr node, int screen_w, int screen_h,