changeset 280:b55ebcb0f934

test_render can not
author e075766@henri.cr.ie.u-ryukyu.ac.jp
date Thu, 04 Jun 2009 18:45:25 +0900
parents 99dccf47e684
children ef061be0baff
files TaskManager/Test/test_render/Makefile TaskManager/Test/test_render/Makefile.cell TaskManager/Test/test_render/Makefile.ps3 TaskManager/Test/test_render/SGList.cpp TaskManager/Test/test_render/SGList.h TaskManager/Test/test_render/boss1_action.cpp TaskManager/Test/test_render/main.cpp TaskManager/Test/test_render/test_nogl TaskManager/Test/test_render/tools/create_sglist.pl
diffstat 9 files changed, 143 insertions(+), 116 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Makefile	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/Makefile	Thu Jun 04 18:45:25 2009 +0900
@@ -4,9 +4,9 @@
 	@echo "Make for Mac OS X"
 	@$(MAKE) -f Makefile.macosx
 
-ps3: FORCE
+cell: FORCE
 	@echo "Make for PS3 (Cell)"
-	@$(MAKE) -f Makefile.ps3
+	@$(MAKE) -f Makefile.cell
 
 linux: FORCE
 	@echo "Make for Linux"
@@ -15,8 +15,8 @@
 macosx-depend: FORCE
 	@$(MAKE) -f Makefile.macosx depend
 
-ps3-depend: FORCE
-	@$(MAKE) -f Makefile.ps3 depend
+cell-depend: FORCE
+	@$(MAKE) -f Makefile.cell depend
 
 linux-depend: FORCE
 	@$(MAKE) -f Makefile.linux depend
@@ -25,6 +25,9 @@
 
 clean:
 	@$(MAKE) -f Makefile.macosx clean
-	@$(MAKE) -f Makefile.ps3 clean
+	@$(MAKE) -f Makefile.cell clean
 	@$(MAKE) -f Makefile.linux clean
-	rm -f depend.inc
\ No newline at end of file
+	rm -f depend.inc
+
+sglist:
+	perl tools/create_sglist.pl xml_file/*.xml 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Test/test_render/Makefile.cell	Thu Jun 04 18:45:25 2009 +0900
@@ -0,0 +1,61 @@
+include ./Makefile.def
+
+SRCS_TMP = $(wildcard *.cpp)
+SRCS_EXCLUDE =   # ½ü³°
+SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
+OBJS = $(SRCS:.cpp=.o)
+
+TASK_DIR  = task
+TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cpp)
+TASK_SRCS_EXCLUDE = span_pack_draw.cpp
+TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
+TASK_OBJS = $(TASK_SRCS:.cpp=.o)
+
+LIBS += -lCellManager -lspe2 -lpthread
+
+CFLAGS += `sdl-config --cflags` `xml2-config --cflags`
+LIBS   += `sdl-config --libs` -lSDL_image -lGL `xml2-config --libs`
+
+.SUFFIXES: .cpp .o
+
+.cpp.o:
+	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
+
+default: all
+
+all: $(TARGET) speobject
+
+$(TARGET): $(OBJS) $(TASK_OBJS)
+	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
+
+SGList.o: create_sg_list
+	$(CC) $(CFLAGS) $(INCLUDE) -c SGList.cpp -o $@
+
+create_sg_list:
+	@if [ ! -f SGList.h ]; then \
+		cd tools/;\
+		./create_sglist.pl ../xml_file/*.xml;\
+	fi
+
+speobject:
+	cd spe; $(MAKE)
+
+run: $(TARGET)
+	sudo ./$(TARGET) -width 576 -height 384 -bpp 32
+run-hd: $(TARGET)
+	sudo /usr/sbin/ps3-video-mode -v 133
+	sudo ./$(TARGET) -video fb -width 1920 -height 1080 -bpp 32
+
+debug: $(TARGET)
+	sudo ppu-gdb ./$(TARGET) 
+
+depend:
+	$(RM) depend.inc
+	$(CC) -MM -MG $(INCLUDE) $(CFLAGS) $(SRCS) $(TASK_SRCS) > depend.inc
+
+clean:
+	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
+	rm -f *~ \#*
+	rm -f SGList.h SGList.cpp
+	cd task; rm -f *~ \#*
+	cd spe; $(MAKE) clean
--- a/TaskManager/Test/test_render/Makefile.ps3	Thu Jun 04 05:12:28 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-include ./Makefile.def
-
-SRCS_TMP = $(wildcard *.cpp)
-SRCS_EXCLUDE =   # ½ü³°
-SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
-OBJS = $(SRCS:.cpp=.o)
-
-TASK_DIR  = task
-TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cpp)
-TASK_SRCS_EXCLUDE = span_pack_draw.cpp
-TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
-TASK_OBJS = $(TASK_SRCS:.cpp=.o)
-
-LIBS += -lCellManager -lspe2 -lpthread
-
-CFLAGS += `sdl-config --cflags` `xml2-config --cflags`
-LIBS   += `sdl-config --libs` -lSDL_image -lGL `xml2-config --libs`
-
-.SUFFIXES: .cpp .o
-
-.cpp.o:
-	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
-
-default: all
-
-all: $(TARGET) speobject
-
-$(TARGET): SGList.o $(OBJS) $(TASK_OBJS)
-	$(CC) -o $@ SGList.o $(OBJS) $(TASK_OBJS) $(LIBS)
-
-SGList.o: create_sg_list
-	$(CC) $(CFLAGS) $(INCLUDE) -c SGList.cpp -o $@
-
-create_sg_list:
-	@if [ ! -f SGList.h ]; then \
-		cd tools/;\
-		./create_sglist.pl ../xml_file/*.xml;\
-	fi
-
-speobject:
-	cd spe; $(MAKE)
-
-run: $(TARGET)
-	sudo ./$(TARGET) -width 576 -height 384 -bpp 32
-
-debug: $(TARGET)
-	sudo ppu-gdb ./$(TARGET) 
-
-depend:
-	$(RM) depend.inc
-	$(CC) -MM -MG $(INCLUDE) $(CFLAGS) $(SRCS) $(TASK_SRCS) > depend.inc
-
-clean:
-	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
-	rm -f *~ \#*
-	rm -f SGList.h SGList.cpp
-	cd task; rm -f *~ \#*
-	cd spe; $(MAKE) clean
--- a/TaskManager/Test/test_render/SGList.cpp	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/SGList.cpp	Thu Jun 04 18:45:25 2009 +0900
@@ -1,5 +1,5 @@
 #include "SGList.h"
 
 const char *sglist_table[SGLIST_LENGTH] = {
-    "Ball", "LongCube", "Venus000", "Venus001", "Venus002", "Venus008", "Venus003", "Venus007", "Venus006", "Venus004", "Venus005", "Venus009", "Cube", "BigCube", "Plane", "SmallCube", "Diry", "Dirz", "Dirx", "IEBOSS", "IEJIKI", "IETAMA", "MCUBE_BACK", "MCUBE", "BIGMCUBE", "CUBE", "PANEL_1024", "PANEL_2048", "PANEL_512", "BACK", "BULEBULLET", "E_PLANE", "IDLE", "Sphere", "BigSphere", "Earth", "Moon"
+    "Ball", "LongCube", "Venus000", "Venus001", "Venus002", "Venus008", "Venus003", "Venus007", "Venus006", "Venus004", "Venus005", "Venus009", "BLAST8", "BLAST7", "BLAST6", "BLAST5", "BLAST4", "BLAST3", "BLAST2", "BLAST1", "BOSS1", "BOSS1_L", "BOSS1_R", "Cube", "BigCube", "Plane", "SmallCube", "Diry", "Dirz", "Dirx", "IEBOSS", "IEJIKI", "IETAMA", "MCUBE_BACK", "MCUBE", "BIGMCUBE", "CUBE", "P_SHOT1", "PANEL_1024", "PANEL_2048", "PANEL_512", "PLAYER", "PLAYER_L", "PLAYER_LL", "PLAYER_R", "PLAYER_RR", "Sphere", "BigSphere", "Earth", "Moon"
 };
--- a/TaskManager/Test/test_render/SGList.h	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/SGList.h	Thu Jun 04 18:45:25 2009 +0900
@@ -1,13 +1,13 @@
 #ifndef INCLUDED_SGLIST
 #define INCLUDED_SGLIST
 
-/* ../xml_file/Ball.xml */
+/* xml_file/Ball.xml */
 #define Ball	 0
 
-/* ../xml_file/LongCube.xml */
+/* xml_file/LongCube.xml */
 #define LongCube	 1
 
-/* ../xml_file/Venus.xml */
+/* xml_file/Venus.xml */
 #define Venus000	 2
 #define Venus001	 3
 #define Venus002	 4
@@ -19,63 +19,87 @@
 #define Venus005	 10
 #define Venus009	 11
 
-/* ../xml_file/cube.xml */
-#define Cube	 12
+/* xml_file/blast.xml */
+#define BLAST8	 12
+#define BLAST7	 13
+#define BLAST6	 14
+#define BLAST5	 15
+#define BLAST4	 16
+#define BLAST3	 17
+#define BLAST2	 18
+#define BLAST1	 19
 
-/* ../xml_file/cube_big.xml */
-#define BigCube	 13
+/* xml_file/boss1.xml */
+#define BOSS1	 20
+#define BOSS1_L	 21
+#define BOSS1_R	 22
 
-/* ../xml_file/cube_split.xml */
-#define Plane	 14
-#define SmallCube	 15
+/* xml_file/cube.xml */
+#define Cube	 23
 
-/* ../xml_file/direction.xml */
-#define Diry	 16
-#define Dirz	 17
-#define Dirx	 18
+/* xml_file/cube_big.xml */
+#define BigCube	 24
+
+/* xml_file/cube_split.xml */
+#define Plane	 25
+#define SmallCube	 26
 
-/* ../xml_file/ieboss.xml */
-#define IEBOSS	 19
+/* xml_file/direction.xml */
+#define Diry	 27
+#define Dirz	 28
+#define Dirx	 29
 
-/* ../xml_file/iejiki.xml */
-#define IEJIKI	 20
+/* xml_file/ieboss.xml */
+#define IEBOSS	 30
 
-/* ../xml_file/ietama.xml */
-#define IETAMA	 21
+/* xml_file/iejiki.xml */
+#define IEJIKI	 31
+
+/* xml_file/ietama.xml */
+#define IETAMA	 32
 
-/* ../xml_file/mcube.xml */
-#define MCUBE_BACK	 22
-#define MCUBE	 23
-#define BIGMCUBE	 24
-#define CUBE	 25
+/* xml_file/mcube.xml */
+#define MCUBE_BACK	 33
+#define MCUBE	 34
+#define BIGMCUBE	 35
+#define CUBE	 36
+
+/* xml_file/p_shot.xml */
+#define P_SHOT1	 37
 
-/* ../xml_file/panel_1024.xml */
-#define PANEL_1024	 26
+/* xml_file/panel_1024.xml */
+#define PANEL_1024	 38
 
-/* ../xml_file/panel_2048.xml */
-#define PANEL_2048	 27
+/* xml_file/panel_2048.xml */
+#define PANEL_2048	 39
 
-/* ../xml_file/panel_512.xml */
-#define PANEL_512	 28
+/* xml_file/panel_512.xml */
+#define PANEL_512	 40
 
-/* ../xml_file/player.xml */
-#define BACK	 29
-#define BULEBULLET	 30
-#define E_PLANE	 31
-#define IDLE	 32
+/* xml_file/player.xml */
+#define PLAYER	 41
+#define PLAYER_L	 42
+#define PLAYER_LL	 43
+#define PLAYER_R	 44
+#define PLAYER_RR	 45
+
+/* xml_file/sphere.xml */
+#define Sphere	 46
 
-/* ../xml_file/sphere.xml */
-#define Sphere	 33
+/* xml_file/sphere_big.xml */
+#define BigSphere	 47
 
-/* ../xml_file/sphere_big.xml */
-#define BigSphere	 34
+/* xml_file/universe.xml */
+#define Earth	 48
+#define Moon	 49
 
-/* ../xml_file/universe.xml */
-#define Earth	 35
-#define Moon	 36
+#define BACK 50
+#define BULEBULLET 51
+#define E_PLANE 52
+#define IDLE 53
 
 /* Number of Scene */
-#define SGLIST_LENGTH 37
+#define SGLIST_LENGTH 54
 
 /* Scene Table */
 extern const char *sglist_table[SGLIST_LENGTH];
--- a/TaskManager/Test/test_render/boss1_action.cpp	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/boss1_action.cpp	Thu Jun 04 18:45:25 2009 +0900
@@ -1,3 +1,4 @@
+#include "SGList.h"
 #include "boss1_action.h"
 
 static void
--- a/TaskManager/Test/test_render/main.cpp	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/main.cpp	Thu Jun 04 18:45:25 2009 +0900
@@ -14,7 +14,7 @@
 
 static int sg_number = 0;
 
-static const char *help_str = "Usage: ./test_nogl [OPTION]\n\
+char *usr_help_str = "Usage: ./test_nogl [OPTION]\n\
   -cpu Number of SPE (default 1)\n\
   -width, -height window size (default 640x480)\n\
   -sg Draw SceneGraph\n\
@@ -56,10 +56,6 @@
 	if (strcmp(argv[i], "-cpu") == 0) {
 	    spenum = atoi(argv[++i]);
 	}
-	if (strcmp(argv[i], "-help") == 0) {
-	    printf("%s\n", help_str);
-	    return -1;
-	}
 	if (strcmp(argv[i], "-video") == 0) {
 	    if (strcmp(argv[i+1], "sdl") == 0) { 
 		vtype = VTYPE_SDL;
Binary file TaskManager/Test/test_render/test_nogl has changed
--- a/TaskManager/Test/test_render/tools/create_sglist.pl	Thu Jun 04 05:12:28 2009 +0900
+++ b/TaskManager/Test/test_render/tools/create_sglist.pl	Thu Jun 04 18:45:25 2009 +0900
@@ -56,8 +56,8 @@
 use strict;
 use XML::LibXML;
 
-my $outfile_h = "../SGList.h";
-my $outfile_c = "../SGList.cpp";
+my $outfile_h = "SGList.h";
+my $outfile_c = "SGList.cpp";
 my $id = 0;
 my @table;