Mercurial > hg > Game > Cerium
changeset 235:7c1f0cd70d7a draft
fix Makefile
author | gongo@localhost.localdomain |
---|---|
date | Sun, 29 Mar 2009 22:02:09 +0900 |
parents | c93532a1b5b8 |
children | dd24efac4519 |
files | TaskManager/Test/test_render/Makefile.linux TaskManager/Test/test_render/Makefile.macosx TaskManager/Test/test_render/Makefile.ps3 TaskManager/Test/test_render/task/DrawSpan.cpp |
diffstat | 4 files changed, 42 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Makefile.linux Sun Mar 29 21:15:09 2009 +0900 +++ b/TaskManager/Test/test_render/Makefile.linux Sun Mar 29 22:02:09 2009 +0900 @@ -23,8 +23,18 @@ all: $(TARGET) -$(TARGET): $(OBJS) $(TASK_OBJS) - $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS) +$(TARGET): SGList.o $(OBJS) $(TASK_OBJS) + $(CC) -o $@ $(OBJS) $(TASK_OBJS) SGList.o $(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;\ + cd ../;\ + fi run: $(TARGET) sudo ./$(TARGET) -width 576 -height 384 -bpp 32 @@ -38,4 +48,5 @@ clean: rm -f $(TARGET) $(OBJS) $(TASK_OBJS) - rm -f *~ \#* \ No newline at end of file + rm -f *~ \#* + rm -f SGList.h SGList.cpp \ No newline at end of file
--- a/TaskManager/Test/test_render/Makefile.macosx Sun Mar 29 21:15:09 2009 +0900 +++ b/TaskManager/Test/test_render/Makefile.macosx Sun Mar 29 22:02:09 2009 +0900 @@ -23,8 +23,19 @@ all: $(TARGET) -$(TARGET): $(OBJS) $(TASK_OBJS) - $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS) +$(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 + run: $(TARGET) sudo ./$(TARGET) -width 576 -height 384 -bpp 32 @@ -39,5 +50,6 @@ clean: rm -f $(TARGET) $(OBJS) $(TASK_OBJS) rm -f *~ \#* + rm -f SGList.h SGList.cpp -include depend.inc \ No newline at end of file
--- a/TaskManager/Test/test_render/Makefile.ps3 Sun Mar 29 21:15:09 2009 +0900 +++ b/TaskManager/Test/test_render/Makefile.ps3 Sun Mar 29 22:02:09 2009 +0900 @@ -21,10 +21,21 @@ .cpp.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ +default: all + all: $(TARGET) speobject -$(TARGET): $(OBJS) $(TASK_OBJS) - $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS) +$(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) @@ -42,6 +53,6 @@ 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/task/DrawSpan.cpp Sun Mar 29 21:15:09 2009 +0900 +++ b/TaskManager/Test/test_render/task/DrawSpan.cpp Sun Mar 29 22:02:09 2009 +0900 @@ -1,6 +1,5 @@ #include <stdlib.h> #include <string.h> -#include <spu_intrinsics.h> #include "DrawSpan.h" #include "polygon_pack.h" #include "texture.h" @@ -20,31 +19,6 @@ free((void*)((int)linebuf*doneWrite)); } -inline vector float -spu_re_nrm(vector float a) -{ - vector float unit = (vector float){1.0, 1.0, 1.0, 1.0}; - vector float approximation; - - approximation = spu_re(a); - return spu_madd(spu_nmsub(approximation, a, unit), - approximation, approximation); -} - - -vector signed int -getLocalPositionVec(vector signed int d, signed int offset) -{ - return spu_and(d, spu_splats(offset-1)); -} - -vector signed int -getLocalXVec(vector signed int x) -{ - return getLocalPositionVec(x, split_screen_w); -} - - /** * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する * @@ -136,20 +110,9 @@ float *buf = (float*)smanager->allocate(sizeof(float)*width*height); float def = 65535.0f; -#if 0 for (int i = 0; i < width*height; i++) { buf[i] = def; } -#else - vector float init = spu_splats(0.0f); - vector float defi = spu_splats(def); - - for (int i = 0; i < width*height; i += 4) { - vector float *out = (vector float *)&buf[i]; - - *out = spu_add(init, defi); - } -#endif return buf; }