Mercurial > hg > old > magoroku_racing
changeset 91:cb6c6de125dc
halfway
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 May 2011 14:44:03 +0900 |
parents | 8edae89a3877 |
children | 01bec7dbe42c |
files | .#car.h Linda/#lindaapi.h# Linda/lindaapi.h Linda/lindaapi.h~ Makefile Makefile2 camera.c camera.h car.c car.h carNode.c carNode.h col.c col.h controler.c field.c field.h gSprite.c libps2.h linda.c makefile ps2util.c ps2util.h quotanion.c quotanion.h schedule.c schedule.h title_scene.c |
diffstat | 28 files changed, 1653 insertions(+), 298 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.#car.h Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,1 @@ +e095729@takeuMac.local.13267 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Linda/#lindaapi.h# Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,85 @@ +// $Id$ +// + +/*---------------------------------------------------------------------- + ’¥Þ’¥¯’¥í’Äê’µÁ +----------------------------------------------------------------------*/ + +#define FAIL (-1) + +#define PS_DEB 0xf8 + +#define MAX_QUEUE 1024 + +#define INT_SIZE 4 // Byte = sizeof(int) + +/*---------------------------------------------------------------------- + ’¥Ñ’¥±’¥Ã’¥È’¥Õ’¥©’¡¼’¥Þ’¥Ã’¥È + char short int int + Mode + ID + Seq + Data_len + Padding + Data + 0 1 3 7 11 12 +----------------------------------------------------------------------*/ + +#define LINDA_MODE_OFFSET 0 +#define LINDA_ID_OFFSET 1 +#define LINDA_SEQ_OFFSET 3 +#define LINDA_DATA_LENGTH_OFFSET 7 +#define LINDA_TID_OFFSET 11 +#define LINDA_HEADER_SIZE 12 + +/*---------------------------------------------------------------------- + ’¹½’¤’ÂÎ’Äê’µÁ +----------------------------------------------------------------------*/ +typedef struct psx_reply{ + unsigned char *answer; + unsigned int seq; + struct psx_reply *next; + char mode; + void(*callback)(char * tuple, void * obj); + void * obj; +} REPLY, *REPLY_PTR; + +typedef struct command_queue{ + unsigned char *command; + struct command_queue *next; + unsigned int size; +INDA_H COMMAND, *COMMAND_PTR; + +/*---------------------------------------------------------------------- + ’ÀŒŪ’´Ø’¿ô’¥Æ’¥ó’¥×’¥ì’¡¼’¥È +----------------------------------------------------------------------*/ + +int start_linda(char *hostname); +void unix_chkserv(); + +int psx_out(unsigned int id, unsigned char *data, unsigned int size); +int psx_ld(unsigned int id, char mode, void(*callback)(char *,void *),void * obj); + +#define psx_in(id) psx_ld(id, 'i', NULL, NULL) +#define psx_rd(id) psx_ld(id, 'r', NULL, NULL) +#define psx_ck(id) psx_ld(id, 'c', NULL, NULL) +#define psx_wait_rd(id) psx_ld(id, 'w', NULL, NULL) + +#define psx_callback_in(id,callback,obj) psx_ld(id, 'i', callback, obj) +#define psx_callback_rd(id,callback,obj) psx_ld(id, 'r', callback, obj) +#define psx_callback_ck(id,callback,obj) psx_ld(id, 'c', callback, obj) +#define psx_callback_wait_rd(id,callback,obj) psx_ld(id, 'w', callback, obj) + +unsigned char *psx_reply(int seq); +void psx_sync_n(); +void psx_free(unsigned char *); +int psx_queue(unsigned int id, unsigned int size, unsigned char *data, char mode, + void(*callback)(char *,void *),void * obj); +int psx_get_datalength(unsigned char *); +unsigned char *psx_get_data(unsigned char *); +int psx_get_seq(unsigned char *); +short psx_get_id(unsigned char *); +char psx_get_mode(unsigned char *); + +int unix_open(); /* UNIX ’ÄÌ’¿®’¤ò’³«’Àß’¤¹’¤ë */ +int unix_read(int,char *,unsigned int); /* UNIX ’¤«’¤é’ÆÉ’¤ß’¹þ’¤à */ +int unix_read_w(int,char *,int); /* UNIX ’¤«’¤é’ÆÉ’¤ß’¹þ’¤à(non wait) */ +int unix_write(int,unsigned char *,unsigned int);/* UNIX ’¤Ø’½ñ’¤’¹þ’¤à */ +int unix_write_w(int,unsigned char *,unsigned int);/* UNIX ’¤Ø’½ñ’¤’¹þ’¤à(non wait) */ +int send_able(); /* ’ÆÉ’¤ß’½ñ’¤’¤Ç’¤’¤ë’¥Ñ’¥±’¥Ã’¥È’¿ô’¤ò’µá’¤á’¤ë */ +
--- a/Linda/lindaapi.h Thu May 19 16:41:21 2011 +0900 +++ b/Linda/lindaapi.h Thu May 26 14:44:03 2011 +0900 @@ -1,5 +1,7 @@ -// $Id$ -// +#ifndef LINDAAPI_H +#define LINDAAPI_H + + /*---------------------------------------------------------------------- ¥Þ¥¯¥íÄêµÁ @@ -99,3 +101,8 @@ struct command_queue *next; unsigned int size; } COMMAND, *COMMAND_PTR; + + + + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Linda/lindaapi.h~ Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,101 @@ +// $Id$ +// + +/*---------------------------------------------------------------------- + ¥Þ¥¯¥íÄêµÁ +----------------------------------------------------------------------*/ + +#define FAIL (-1) + +#define PS_DEB 0xf8 + +#define MAX_QUEUE 1024 + +#define INT_SIZE 4 // Byte = sizeof(int) + +/*---------------------------------------------------------------------- + ¥Ñ¥±¥Ã¥È¥Õ¥©¡¼¥Þ¥Ã¥È + char short int int + Mode + ID + Seq + Data_len + Padding + Data + 0 1 3 7 11 12 +----------------------------------------------------------------------*/ + +#define LINDA_MODE_OFFSET 0 +#define LINDA_ID_OFFSET 1 +#define LINDA_SEQ_OFFSET 3 +#define LINDA_DATA_LENGTH_OFFSET 7 +#define LINDA_TID_OFFSET 11 +#define LINDA_HEADER_SIZE 12 + +/*---------------------------------------------------------------------- + ¹½Â¤ÂÎÄêµÁ +----------------------------------------------------------------------*/ +/*typedef struct psx_reply{ + unsigned char *answer; + unsigned int seq; + struct psx_reply *next; + char mode; + void(*callback)(char * tuple, void * obj); + void * obj; +} REPLY, *REPLY_PTR;*/ + +/*typedef struct command_queue{ + unsigned char *command; + struct command_queue *next; + unsigned int size; +} COMMAND, *COMMAND_PTR;*/ + +/*---------------------------------------------------------------------- + ÀÅŪ´Ø¿ô¥Æ¥ó¥×¥ì¡¼¥È +----------------------------------------------------------------------*/ + + +int start_linda(char *hostname); +void unix_chkserv(); + +int psx_out(unsigned int id, unsigned char *data, unsigned int size); +int psx_ld(unsigned int id, char mode, void(*callback)(char *,void *),void * obj); + +#define psx_in(id) psx_ld(id, 'i', NULL, NULL) +#define psx_rd(id) psx_ld(id, 'r', NULL, NULL) +#define psx_ck(id) psx_ld(id, 'c', NULL, NULL) +#define psx_wait_rd(id) psx_ld(id, 'w', NULL, NULL) + +#define psx_callback_in(id,callback,obj) psx_ld(id, 'i', callback, obj) +#define psx_callback_rd(id,callback,obj) psx_ld(id, 'r', callback, obj) +#define psx_callback_ck(id,callback,obj) psx_ld(id, 'c', callback, obj) +#define psx_callback_wait_rd(id,callback,obj) psx_ld(id, 'w', callback, obj) + +unsigned char *psx_reply(int seq); +void psx_sync_n(); +void psx_free(unsigned char *); +int psx_queue(unsigned int id, unsigned int size, unsigned char *data, char mode, + void(*callback)(char *,void *),void * obj); +int psx_get_datalength(unsigned char *); +unsigned char *psx_get_data(unsigned char *); +int psx_get_seq(unsigned char *); +short psx_get_id(unsigned char *); +char psx_get_mode(unsigned char *); + +int unix_open(); /* UNIX ÄÌ¿®¤ò³«Àߤ¹¤ë */ +int unix_read(int,char *,unsigned int); /* UNIX ¤«¤éÆɤ߹þ¤à */ +int unix_read_w(int,char *,int); /* UNIX ¤«¤éÆɤ߹þ¤à(non wait) */ +int unix_write(int,unsigned char *,unsigned int);/* UNIX ¤Ø½ñ¤¹þ¤à */ +int unix_write_w(int,unsigned char *,unsigned int);/* UNIX ¤Ø½ñ¤¹þ¤à(non wait) */ +int send_able(); /* Æɤ߽ñ¤¤Ç¤¤ë¥Ñ¥±¥Ã¥È¿ô¤òµá¤á¤ë */ + +typedef struct psx_reply{ + unsigned char *answer; + unsigned int seq; + struct psx_reply *next; + char mode; + void(*callback)(char * tuple, void * obj); + void * obj; +} REPLY, *REPLY_PTR; + + +typedef struct command_queue{ + unsigned char *command; + struct command_queue *next; + unsigned int size; +} COMMAND, *COMMAND_PTR;
--- a/Makefile Thu May 19 16:41:21 2011 +0900 +++ b/Makefile Thu May 26 14:44:03 2011 +0900 @@ -1,6 +1,7 @@ TARGET = main CC = gcc -SRCS = main.c game.c car.c col.c quotanion.c controler.c field.c camera.c gSprite.c schedule.c mytype.c gFont.c carNode.c linda.c light.c title_scene.c game_time.c linda/lindaapi.c +SRCS = main.c game.c car.c col.c quotanion.c controler.c field.c camera.c gSprite.c schedule.c mytype.c gFont.c carNode.c light.c title_scene.c game_time.c ps2util.c +#linda/lindaapi.c linda.c OBJS = ${SRCS:.c=.o} VU1DIR = vu1code @@ -12,9 +13,9 @@ INCLUDES = \ #-I/usr/local/include/libps2a \ #-I/usr/local/include/ps2util \ --I./Linda +#-I./Linda -DEFINES = -DDEBUG -DLINDA +#DEFINES = -DDEBUG -DLINDA DEBUGFLAGS = -Wall -g #LIBPS2ARC = /usr/local/lib/libps2a.a @@ -54,7 +55,7 @@ # DO NOT DELETE main.o: -game.o: /Users/e095729/magoroku_racing/Linda/lindaapi.h +game.o: #/Users/e095729/magoroku_racing/Linda/lindaapi.h car.o: col.o: quotanion.o: @@ -66,7 +67,7 @@ mytype.o: gFont.o: carNode.o: -linda.o: /Users/e095729/magoroku_racing/Linda/lindaapi.h +linda.o: #/Users/e095729/magoroku_racing/Linda/lindaapi.h light.o: title_scene.o: game_time.o:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile2 Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,629 @@ +TARGET = main +CC = gcc +SRCS = main.c game.c car.c col.c quotanion.c controler.c field.c camera.c gSprite.c schedule.c mytype.c gFont.c carNode.c linda.c light.c title_scene.c game_time.c +OBJS = ${SRCS:.c=.o} +VU1DIR = vu1code + +MPGOBJ = mpg.elf + +VPUSRCS = ${VU1DIR}/Makefile ${VU1DIR}/MPG.dsm ${VU1DIR}/basic.vsm ${VU1DIR}/vpu.cmd ${VU1DIR}/vumacros.h +VU1OBJ = ${VU1DIR}/mpg.elf + +INCLUDES = \ +-I/usr/local/include/libps2a \ +-I/usr/local/include/ps2util \ +-I./Linda + +DEFINES = -DDEBUG -DLINDA +DEBUGFLAGS = -Wall -g +LIBPS2ARC = /usr/local/lib/libps2a.a + +CFLAGS = ${INCLUDES} ${DEFINES} ${DEBUGFLAGS} + +LIBS = `xml-config --libs` -lps2util -lpng -lps2a + +all : ${TARGET} + +${VU1OBJ}: ${VPUSRCS} + cd ${VU1DIR}; make + cp ${VU1OBJ} . + +#${TARGET} : ${OBJS} ${VU1OBJ} +# ${CC} -o ${TARGET} ${OBJS} ${LIBS} + +${TARGET} : ${OBJS} + ${AR} x ${LIBPS2ARC} ${MPGOBJ} + ${CC} -o ${TARGET} ${OBJS} ${LIBS} + + +tag: + etags *.[ch] + +clean : + rm -f ${OBJS} + rm -f ${TARGET} + rm -f ${MPGOBJ} + rm -f ${VU1OBJ} + rm -f *~ + cd ${VU1DIR}; make clean +depend: + makedepend -- ${CFLAGS} -- ${SRCS} ${MAINSRC} +# DO NOT DELETE + +main.o: /usr/include/stdio.h #/usr/include/features.h +main.o: /usr/include/sys/cdefs.h +#main.o: /usr/include/gnu/stubs.h +#main.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +#main.o: /usr/include/bits/types.h +#main.o: /usr/include/bits/pthreadtypes.h +#main.o: /usr/include/bits/sched.h +#main.o: /usr/include/libio.h +#main.o: /usr/include/_G_config.h +main.o: /usr/include/wchar.h +#main.o: /usr/include/bits/wchar.h +#main.o: /usr/include/gconv.h +#main.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +#main.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +main.o: /usr/include/bits/stdio_lim.h /usr/local/include/libps2a/libps2.h +main.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +main.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +main.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +main.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +main.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +main.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +main.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +main.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +main.o: /usr/local/include/libps2a/sjoy.h /usr/local/include/libps2a/sprite.h +main.o: /usr/local/include/libps2a/texture.h +main.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +main.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +main.o: /usr/local/include/libps2a/surface.h +main.o: /usr/local/include/libps2a/giftag.h +main.o: /usr/local/include/libps2a/material.h +main.o: /usr/local/include/libps2a/object.h +main.o: /usr/local/include/libps2a/malloc128.h +main.o: /usr/local/include/libps2a/debug.h +main.o: /usr/local/include/ps2util/ps2util.h +game.o: /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h +game.o: /usr/include/gnu/stubs.h +game.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +game.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +game.o: /usr/include/bits/sched.h /usr/include/libio.h +game.o: /usr/include/_G_config.h /usr/include/wchar.h +game.o: /usr/include/bits/wchar.h /usr/include/gconv.h +game.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +game.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +game.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +game.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +game.o: /usr/include/bits/endian.h /usr/include/sys/select.h +game.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +game.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +game.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +game.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +game.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +game.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +game.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +game.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +game.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +game.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +game.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +game.o: /usr/local/include/libps2a/sjoy.h /usr/local/include/libps2a/sprite.h +game.o: /usr/local/include/libps2a/texture.h +game.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +game.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +game.o: /usr/local/include/libps2a/surface.h +game.o: /usr/local/include/libps2a/giftag.h +game.o: /usr/local/include/libps2a/material.h +game.o: /usr/local/include/libps2a/object.h +game.o: /usr/local/include/libps2a/malloc128.h +game.o: /usr/local/include/libps2a/debug.h +game.o: /usr/local/include/ps2util/ps2util.h camera.h controler.h +game.o: /usr/local/include/libps2a/lindaapi.h col.h field.h car.h game.h +game.o: gSprite.h gFont.h +car.o: /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h +car.o: /usr/include/gnu/stubs.h +car.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +car.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +car.o: /usr/include/bits/sched.h /usr/include/libio.h +car.o: /usr/include/_G_config.h /usr/include/wchar.h +car.o: /usr/include/bits/wchar.h /usr/include/gconv.h +car.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +car.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +car.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +car.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +car.o: /usr/include/bits/endian.h /usr/include/sys/select.h +car.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +car.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +car.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +car.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +car.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +car.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +car.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +car.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +car.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +car.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +car.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +car.o: /usr/local/include/libps2a/sjoy.h /usr/local/include/libps2a/sprite.h +car.o: /usr/local/include/libps2a/texture.h +car.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +car.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +car.o: /usr/local/include/libps2a/surface.h +car.o: /usr/local/include/libps2a/giftag.h +car.o: /usr/local/include/libps2a/material.h +car.o: /usr/local/include/libps2a/object.h +car.o: /usr/local/include/libps2a/malloc128.h +car.o: /usr/local/include/libps2a/debug.h +car.o: /usr/local/include/ps2util/ps2util.h col.h field.h car.h mytype.h +car.o: /usr/include/math.h /usr/include/bits/huge_val.h +car.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h quotanion.h +car.o: game.h +col.o: /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h +col.o: /usr/include/gnu/stubs.h +col.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +col.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +col.o: /usr/include/bits/sched.h /usr/include/libio.h +col.o: /usr/include/_G_config.h /usr/include/wchar.h +col.o: /usr/include/bits/wchar.h /usr/include/gconv.h +col.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +col.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +col.o: /usr/include/bits/stdio_lim.h /usr/local/include/libps2a/libps2.h +col.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +col.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +col.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +col.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +col.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +col.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +col.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +col.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +col.o: /usr/local/include/libps2a/sjoy.h /usr/local/include/libps2a/sprite.h +col.o: /usr/local/include/libps2a/texture.h +col.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +col.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +col.o: /usr/local/include/libps2a/surface.h +col.o: /usr/local/include/libps2a/giftag.h +col.o: /usr/local/include/libps2a/material.h +col.o: /usr/local/include/libps2a/object.h +col.o: /usr/local/include/libps2a/malloc128.h +col.o: /usr/local/include/libps2a/debug.h +col.o: /usr/local/include/ps2util/ps2util.h col.h mytype.h +col.o: /usr/include/math.h /usr/include/bits/huge_val.h +col.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h +quotanion.o: /usr/local/include/libps2a/libps2.h /usr/include/ps2gs.h +quotanion.o: /usr/include/sys/ioctl.h /usr/include/features.h +quotanion.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +quotanion.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +quotanion.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +quotanion.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +quotanion.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +quotanion.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +quotanion.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +quotanion.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +quotanion.o: /usr/local/include/libps2a/sjoy.h +quotanion.o: /usr/local/include/libps2a/sprite.h +quotanion.o: /usr/local/include/libps2a/texture.h +quotanion.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +quotanion.o: /usr/local/include/libps2a/def.h +quotanion.o: /usr/local/include/libps2a/xml.h +quotanion.o: /usr/local/include/libps2a/surface.h +quotanion.o: /usr/local/include/libps2a/giftag.h +quotanion.o: /usr/local/include/libps2a/material.h +quotanion.o: /usr/local/include/libps2a/object.h +quotanion.o: /usr/local/include/libps2a/malloc128.h +quotanion.o: /usr/local/include/libps2a/debug.h /usr/include/math.h +quotanion.o: /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h +quotanion.o: /usr/include/bits/mathcalls.h mytype.h +controler.o: /usr/include/stdio.h /usr/include/features.h +controler.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +controler.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +controler.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +controler.o: /usr/include/bits/sched.h /usr/include/libio.h +controler.o: /usr/include/_G_config.h /usr/include/wchar.h +controler.o: /usr/include/bits/wchar.h /usr/include/gconv.h +controler.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +controler.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +controler.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +controler.o: /usr/include/sys/types.h /usr/include/time.h +controler.o: /usr/include/endian.h /usr/include/bits/endian.h +controler.o: /usr/include/sys/select.h /usr/include/bits/select.h +controler.o: /usr/include/bits/sigset.h /usr/include/bits/time.h +controler.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h +controler.o: /usr/local/include/libps2a/libps2.h /usr/include/ps2gs.h +controler.o: /usr/include/sys/ioctl.h /usr/include/bits/ioctls.h +controler.o: /usr/include/asm/ioctls.h /usr/include/asm/ioctl.h +controler.o: /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h +controler.o: /usr/include/linux/ps2/dev.h /usr/include/linux/ioctl.h +controler.o: /usr/include/asm/types.h /usr/include/linux/autoconf.h +controler.o: /usr/include/linux/ps2/ee.h /usr/include/linux/ps2/gs.h +controler.o: /usr/include/linux/ps2/pad.h /usr/include/gs_vc.h +controler.o: /usr/include/libvu0.h /usr/include/ps2vpu.h +controler.o: /usr/local/include/libps2a/sjoy.h +controler.o: /usr/local/include/libps2a/sprite.h +controler.o: /usr/local/include/libps2a/texture.h +controler.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +controler.o: /usr/local/include/libps2a/def.h +controler.o: /usr/local/include/libps2a/xml.h +controler.o: /usr/local/include/libps2a/surface.h +controler.o: /usr/local/include/libps2a/giftag.h +controler.o: /usr/local/include/libps2a/material.h +controler.o: /usr/local/include/libps2a/object.h +controler.o: /usr/local/include/libps2a/malloc128.h +controler.o: /usr/local/include/libps2a/debug.h +controler.o: /usr/local/include/ps2util/ps2util.h col.h field.h car.h +controler.o: controler.h game.h +field.o: /usr/include/stdio.h /usr/include/features.h +field.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +field.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +field.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +field.o: /usr/include/bits/sched.h /usr/include/libio.h +field.o: /usr/include/_G_config.h /usr/include/wchar.h +field.o: /usr/include/bits/wchar.h /usr/include/gconv.h +field.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +field.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +field.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +field.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +field.o: /usr/include/bits/endian.h /usr/include/sys/select.h +field.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +field.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +field.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +field.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +field.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +field.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +field.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +field.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +field.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +field.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +field.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +field.o: /usr/local/include/libps2a/sjoy.h +field.o: /usr/local/include/libps2a/sprite.h +field.o: /usr/local/include/libps2a/texture.h +field.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +field.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +field.o: /usr/local/include/libps2a/surface.h +field.o: /usr/local/include/libps2a/giftag.h +field.o: /usr/local/include/libps2a/material.h +field.o: /usr/local/include/libps2a/object.h +field.o: /usr/local/include/libps2a/malloc128.h +field.o: /usr/local/include/libps2a/debug.h +field.o: /usr/local/include/ps2util/ps2util.h mytype.h /usr/include/math.h +field.o: /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h +field.o: /usr/include/bits/mathcalls.h col.h field.h car.h quotanion.h game.h +camera.o: /usr/include/stdlib.h /usr/include/features.h +camera.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +camera.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +camera.o: /usr/include/sys/types.h /usr/include/bits/types.h +camera.o: /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h +camera.o: /usr/include/time.h /usr/include/endian.h +camera.o: /usr/include/bits/endian.h /usr/include/sys/select.h +camera.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +camera.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +camera.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +camera.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +camera.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +camera.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +camera.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +camera.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +camera.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +camera.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +camera.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +camera.o: /usr/local/include/libps2a/sjoy.h +camera.o: /usr/local/include/libps2a/sprite.h +camera.o: /usr/local/include/libps2a/texture.h +camera.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +camera.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +camera.o: /usr/local/include/libps2a/surface.h +camera.o: /usr/local/include/libps2a/giftag.h +camera.o: /usr/local/include/libps2a/material.h +camera.o: /usr/local/include/libps2a/object.h +camera.o: /usr/local/include/libps2a/malloc128.h +camera.o: /usr/local/include/libps2a/debug.h +camera.o: /usr/local/include/ps2util/ps2util.h car.h game.h controler.h +gSprite.o: /usr/include/stdio.h /usr/include/features.h +gSprite.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +gSprite.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +gSprite.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +gSprite.o: /usr/include/bits/sched.h /usr/include/libio.h +gSprite.o: /usr/include/_G_config.h /usr/include/wchar.h +gSprite.o: /usr/include/bits/wchar.h /usr/include/gconv.h +gSprite.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +gSprite.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +gSprite.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +gSprite.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +gSprite.o: /usr/include/bits/endian.h /usr/include/sys/select.h +gSprite.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +gSprite.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +gSprite.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +gSprite.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +gSprite.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +gSprite.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +gSprite.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +gSprite.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +gSprite.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +gSprite.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +gSprite.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +gSprite.o: /usr/local/include/libps2a/sjoy.h +gSprite.o: /usr/local/include/libps2a/sprite.h +gSprite.o: /usr/local/include/libps2a/texture.h +gSprite.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +gSprite.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +gSprite.o: /usr/local/include/libps2a/surface.h +gSprite.o: /usr/local/include/libps2a/giftag.h +gSprite.o: /usr/local/include/libps2a/material.h +gSprite.o: /usr/local/include/libps2a/object.h +gSprite.o: /usr/local/include/libps2a/malloc128.h +gSprite.o: /usr/local/include/libps2a/debug.h +gSprite.o: /usr/local/include/ps2util/ps2util.h col.h field.h car.h game.h +gSprite.o: gSprite.h +schedule.o: /usr/include/stdio.h /usr/include/features.h +schedule.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +schedule.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +schedule.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +schedule.o: /usr/include/bits/sched.h /usr/include/libio.h +schedule.o: /usr/include/_G_config.h /usr/include/wchar.h +schedule.o: /usr/include/bits/wchar.h /usr/include/gconv.h +schedule.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +schedule.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +schedule.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +schedule.o: /usr/include/sys/types.h /usr/include/time.h +schedule.o: /usr/include/endian.h /usr/include/bits/endian.h +schedule.o: /usr/include/sys/select.h /usr/include/bits/select.h +schedule.o: /usr/include/bits/sigset.h /usr/include/bits/time.h +schedule.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h +schedule.o: /usr/include/string.h /usr/local/include/libps2a/libps2.h +schedule.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +schedule.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +schedule.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +schedule.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +schedule.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +schedule.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +schedule.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +schedule.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +schedule.o: /usr/local/include/libps2a/sjoy.h +schedule.o: /usr/local/include/libps2a/sprite.h +schedule.o: /usr/local/include/libps2a/texture.h +schedule.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +schedule.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +schedule.o: /usr/local/include/libps2a/surface.h +schedule.o: /usr/local/include/libps2a/giftag.h +schedule.o: /usr/local/include/libps2a/material.h +schedule.o: /usr/local/include/libps2a/object.h +schedule.o: /usr/local/include/libps2a/malloc128.h +schedule.o: /usr/local/include/libps2a/debug.h +schedule.o: /usr/local/include/ps2util/ps2util.h col.h field.h car.h +schedule.o: gSprite.h gFont.h game.h controler.h camera.h mytype.h +schedule.o: /usr/include/math.h /usr/include/bits/huge_val.h +schedule.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h light.h +schedule.o: title_scene.h game_time.h /usr/include/sys/time.h +demo.o: /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h +demo.o: /usr/include/gnu/stubs.h +demo.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +demo.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +demo.o: /usr/include/bits/sched.h /usr/include/libio.h +demo.o: /usr/include/_G_config.h /usr/include/wchar.h +demo.o: /usr/include/bits/wchar.h /usr/include/gconv.h +demo.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +demo.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +demo.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +demo.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +demo.o: /usr/include/bits/endian.h /usr/include/sys/select.h +demo.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +demo.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +demo.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +demo.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +demo.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +demo.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +demo.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +demo.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +demo.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +demo.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +demo.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +demo.o: /usr/local/include/libps2a/sjoy.h /usr/local/include/libps2a/sprite.h +demo.o: /usr/local/include/libps2a/texture.h +demo.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +demo.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +demo.o: /usr/local/include/libps2a/surface.h +demo.o: /usr/local/include/libps2a/giftag.h +demo.o: /usr/local/include/libps2a/material.h +demo.o: /usr/local/include/libps2a/object.h +demo.o: /usr/local/include/libps2a/malloc128.h +demo.o: /usr/local/include/libps2a/debug.h +demo.o: /usr/local/include/ps2util/ps2util.h col.h field.h car.h game.h +mytype.o: /usr/include/time.h /usr/include/bits/types.h +mytype.o: /usr/include/features.h /usr/include/sys/cdefs.h +mytype.o: /usr/include/gnu/stubs.h +mytype.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +mytype.o: /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h +mytype.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h +mytype.o: /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h +mytype.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +mytype.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +mytype.o: /usr/include/bits/stdio_lim.h /usr/local/include/libps2a/libps2.h +mytype.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +mytype.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +mytype.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +mytype.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +mytype.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +mytype.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +mytype.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +mytype.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +mytype.o: /usr/local/include/libps2a/sjoy.h +mytype.o: /usr/local/include/libps2a/sprite.h +mytype.o: /usr/local/include/libps2a/texture.h +mytype.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +mytype.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +mytype.o: /usr/local/include/libps2a/surface.h +mytype.o: /usr/local/include/libps2a/giftag.h +mytype.o: /usr/local/include/libps2a/material.h +mytype.o: /usr/local/include/libps2a/object.h +mytype.o: /usr/local/include/libps2a/malloc128.h +mytype.o: /usr/local/include/libps2a/debug.h +mytype.o: /usr/local/include/ps2util/ps2util.h mytype.h /usr/include/math.h +mytype.o: /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h +mytype.o: /usr/include/bits/mathcalls.h +gFont.o: /usr/include/stdio.h /usr/include/features.h +gFont.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +gFont.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +gFont.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +gFont.o: /usr/include/bits/sched.h /usr/include/libio.h +gFont.o: /usr/include/_G_config.h /usr/include/wchar.h +gFont.o: /usr/include/bits/wchar.h /usr/include/gconv.h +gFont.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +gFont.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +gFont.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +gFont.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +gFont.o: /usr/include/bits/endian.h /usr/include/sys/select.h +gFont.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +gFont.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +gFont.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +gFont.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +gFont.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +gFont.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +gFont.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +gFont.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +gFont.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +gFont.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +gFont.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +gFont.o: /usr/local/include/libps2a/sjoy.h +gFont.o: /usr/local/include/libps2a/sprite.h +gFont.o: /usr/local/include/libps2a/texture.h +gFont.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +gFont.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +gFont.o: /usr/local/include/libps2a/surface.h +gFont.o: /usr/local/include/libps2a/giftag.h +gFont.o: /usr/local/include/libps2a/material.h +gFont.o: /usr/local/include/libps2a/object.h +gFont.o: /usr/local/include/libps2a/malloc128.h +gFont.o: /usr/local/include/libps2a/debug.h +gFont.o: /usr/local/include/ps2util/ps2util.h gSprite.h +carNode.o: /usr/include/stdio.h /usr/include/features.h +carNode.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +carNode.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +carNode.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +carNode.o: /usr/include/bits/sched.h /usr/include/libio.h +carNode.o: /usr/include/_G_config.h /usr/include/wchar.h +carNode.o: /usr/include/bits/wchar.h /usr/include/gconv.h +carNode.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +carNode.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +carNode.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +carNode.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +carNode.o: /usr/include/bits/endian.h /usr/include/sys/select.h +carNode.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +carNode.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +carNode.o: /usr/include/alloca.h /usr/local/include/libps2a/libps2.h +carNode.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +carNode.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +carNode.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +carNode.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +carNode.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +carNode.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +carNode.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +carNode.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +carNode.o: /usr/local/include/libps2a/sjoy.h +carNode.o: /usr/local/include/libps2a/sprite.h +carNode.o: /usr/local/include/libps2a/texture.h +carNode.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +carNode.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +carNode.o: /usr/local/include/libps2a/surface.h +carNode.o: /usr/local/include/libps2a/giftag.h +carNode.o: /usr/local/include/libps2a/material.h +carNode.o: /usr/local/include/libps2a/object.h +carNode.o: /usr/local/include/libps2a/malloc128.h +carNode.o: /usr/local/include/libps2a/debug.h +carNode.o: /usr/local/include/ps2util/ps2util.h car.h game.h +linda.o: /usr/include/stdio.h /usr/include/features.h +linda.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +linda.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +linda.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +linda.o: /usr/include/bits/sched.h /usr/include/libio.h +linda.o: /usr/include/_G_config.h /usr/include/wchar.h +linda.o: /usr/include/bits/wchar.h /usr/include/gconv.h +linda.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +linda.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +linda.o: /usr/include/bits/stdio_lim.h /usr/include/stdlib.h +linda.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h +linda.o: /usr/include/bits/endian.h /usr/include/sys/select.h +linda.o: /usr/include/bits/select.h /usr/include/bits/sigset.h +linda.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h +linda.o: /usr/include/alloca.h /usr/include/math.h +linda.o: /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h +linda.o: /usr/include/bits/mathcalls.h /usr/local/include/libps2a/libps2.h +linda.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +linda.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +linda.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +linda.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +linda.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +linda.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +linda.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +linda.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +linda.o: /usr/local/include/libps2a/sjoy.h +linda.o: /usr/local/include/libps2a/sprite.h +linda.o: /usr/local/include/libps2a/texture.h +linda.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +linda.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +linda.o: /usr/local/include/libps2a/surface.h +linda.o: /usr/local/include/libps2a/giftag.h +linda.o: /usr/local/include/libps2a/material.h +linda.o: /usr/local/include/libps2a/object.h +linda.o: /usr/local/include/libps2a/malloc128.h +linda.o: /usr/local/include/libps2a/debug.h +linda.o: /usr/local/include/ps2util/ps2util.h car.h game.h +linda.o: /usr/local/include/libps2a/lindaapi.h +light.o: /usr/include/stdio.h /usr/include/features.h +light.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +light.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +light.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h +light.o: /usr/include/bits/sched.h /usr/include/libio.h +light.o: /usr/include/_G_config.h /usr/include/wchar.h +light.o: /usr/include/bits/wchar.h /usr/include/gconv.h +light.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stdarg.h +light.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/va-mips.h +light.o: /usr/include/bits/stdio_lim.h /usr/local/include/libps2a/libps2.h +light.o: /usr/include/ps2gs.h /usr/include/sys/ioctl.h +light.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +light.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +light.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +light.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +light.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +light.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +light.o: /usr/include/gs_vc.h /usr/include/libvu0.h /usr/include/ps2vpu.h +light.o: /usr/local/include/libps2a/sjoy.h +light.o: /usr/local/include/libps2a/sprite.h +light.o: /usr/local/include/libps2a/texture.h +light.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +light.o: /usr/local/include/libps2a/def.h /usr/local/include/libps2a/xml.h +light.o: /usr/local/include/libps2a/surface.h +light.o: /usr/local/include/libps2a/giftag.h +light.o: /usr/local/include/libps2a/material.h +light.o: /usr/local/include/libps2a/object.h +light.o: /usr/local/include/libps2a/malloc128.h +light.o: /usr/local/include/libps2a/debug.h light.h +title_scene.o: /usr/local/include/libps2a/libps2.h /usr/include/ps2gs.h +title_scene.o: /usr/include/sys/ioctl.h /usr/include/features.h +title_scene.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +title_scene.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h +title_scene.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h +title_scene.o: /usr/include/sys/ttydefaults.h /usr/include/linux/ps2/dev.h +title_scene.o: /usr/include/linux/ioctl.h /usr/include/asm/types.h +title_scene.o: /usr/include/linux/autoconf.h /usr/include/linux/ps2/ee.h +title_scene.o: /usr/include/linux/ps2/gs.h /usr/include/linux/ps2/pad.h +title_scene.o: /usr/include/gs_vc.h /usr/include/libvu0.h +title_scene.o: /usr/include/ps2vpu.h /usr/local/include/libps2a/sjoy.h +title_scene.o: /usr/local/include/libps2a/sprite.h +title_scene.o: /usr/local/include/libps2a/texture.h +title_scene.o: /usr/local/include/libps2a/ps2dma.h /usr/include/ps2vpufile.h +title_scene.o: /usr/local/include/libps2a/def.h +title_scene.o: /usr/local/include/libps2a/xml.h +title_scene.o: /usr/local/include/libps2a/surface.h +title_scene.o: /usr/local/include/libps2a/giftag.h +title_scene.o: /usr/local/include/libps2a/material.h +title_scene.o: /usr/local/include/libps2a/object.h +title_scene.o: /usr/local/include/libps2a/malloc128.h +title_scene.o: /usr/local/include/libps2a/debug.h +title_scene.o: /usr/local/include/ps2util/ps2util.h title_scene.h +game_time.o: game_time.h /usr/include/sys/time.h /usr/include/features.h +game_time.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h +game_time.o: /usr/include/bits/types.h +game_time.o: /usr/lib/gcc-lib/mipsEEel-linux/2.95.2/include/stddef.h +game_time.o: /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h +game_time.o: /usr/include/time.h /usr/include/bits/time.h +game_time.o: /usr/include/sys/select.h /usr/include/bits/select.h +game_time.o: /usr/include/bits/sigset.h
--- a/camera.c Thu May 19 16:41:21 2011 +0900 +++ b/camera.c Thu May 26 14:44:03 2011 +0900 @@ -1,20 +1,22 @@ #include <stdlib.h> -//#include "libps2.h" -//#include "ps2util.h" +#include <string.h> +#include "libps2.h" +#include "ps2util.h" #include "car.h" #include "game.h" #include "controler.h" +#include "camera.h" //大域変数ã€å„部ã§å…±æœ‰ //extern SGO_PAD pad; -//static CAMERA camera, def_camera; +static CAMERA camera, def_camera; void camera_init() { - /* + //カメラã®åˆæœŸä½ç½®è¨å®š def_camera.xyz[0] = 0; def_camera.xyz[1] =-7;// -3; @@ -38,55 +40,70 @@ //def_cameraã‚’cameraã«ã‚³ãƒ”ー memcpy( &camera, &def_camera, sizeof(CAMERA)); - set_ -camera(&def_camera); - */ + set_camera(&def_camera); + } + +/* + ps2ä¾å˜é–¢ä¿‚ã‹ã‚‰æ‹å€Ÿã€‚ + 自分ãŒæ¶ˆã—ãŸã®ã‹ã€å…ƒã€…ç„¡ã„ã®ã‹ã¯è¦šãˆã¦ã„ãªã„ã‘ã© + 呼ã°ã‚Œã¦ã„ã‚‹ã®ã§ã¨ã‚Šã‚ãˆãšï¼ˆç©ºã£ã½ã«ã—ã¦ãŠã)。 +*/ +// set_camera must be called if camera's parameters were moved +void set_camera(CAMERA *camera) +{ + //vu0_rot_camera_matrix(world_view, camera->xyz, camera->zd, camera->yd,camera->angle); +} + + + + /** * pose: カメラã®å¯¾è±¡ç‰©(obj)ã®åº§æ¨™è¡Œåˆ— * カメラãŒobjã«ã¤ã„ã¦ã„ãよã†ã«(ãã®ã‚ˆã†ãªå‹•ãã«è¦‹ã›ã‚‹ãŸã‚) * カメラã®ä½ç½®ãƒ™ã‚¯ãƒˆãƒ«ã€è¦–点ベクトルを更新 */ void -camera_update(Game *game)//FMATRIX pose) +camera_update(Game *game, FMATRIX pose) { - // FVECTOR location, eyes, vertical, angle; - // int type = game.camera_type; + FVECTOR location, eyes, vertical, angle; + + //int type = game->camera_type; - // ps2_vu0_apply_matrix(location, pose, def_camera.xyz); - // ps2_vu0_apply_matrix(eyes, pose, def_camera.zd); - // ps2_vu0_apply_matrix(vertical, pose, def_camera.yd); + ps2_vu0_apply_matrix(location, pose, def_camera.xyz); + ps2_vu0_apply_matrix(eyes, pose, def_camera.zd); + ps2_vu0_apply_matrix(vertical, pose, def_camera.yd); /**When the car bends, the angle of the camera is changed**/ //if(pad.left>0 && game.jiki->speed !=0){ if(game->jiki->speed !=0){ - /* if(def_camera.angle[1]<=0.2){ - def_camera.angle[1]+=0.02; - }*/ + if(def_camera.angle[1]<=0.2){ + def_camera.angle[1]+=0.02; + } } //else if(pad.right>0 && game.jiki->speed !=0){ else if(game->jiki->speed !=0){ - /* if(def_camera.angle[1]>=-0.2){ - def_camera.angle[1]-=0.02; - }*/ + if(def_camera.angle[1]>=-0.2){ + def_camera.angle[1]-=0.02; + } } else { - /* if(def_camera.angle[1]<-0.01){ - def_camera.angle[1]+=0.02; - } - else if(def_camera.angle[1]>0.01){ - def_camera.angle[1]-=0.02; - }*/ + if(def_camera.angle[1]<-0.01){ + def_camera.angle[1]+=0.02; + } + else if(def_camera.angle[1]>0.01){ + def_camera.angle[1]-=0.02; + } } - /* ps2_vu0_apply_matrix(angle, pose, def_camera.angle); + ps2_vu0_apply_matrix(angle, pose, def_camera.angle); ps2_vu0_copy_vector(camera.xyz, location); ps2_vu0_copy_vector(camera.zd, eyes); ps2_vu0_copy_vector(camera.yd, vertical); ps2_vu0_copy_vector(camera.angle, angle); - set_camera(&camera);*/ + set_camera(&camera); }
--- a/camera.h Thu May 19 16:41:21 2011 +0900 +++ b/camera.h Thu May 26 14:44:03 2011 +0900 @@ -1,2 +1,21 @@ -extern void camera_update(Game);//FMATRIX); +#ifndef CAMERA_H +#define CAMERA_H + +#include "game.h" +#include "libps2.h" + + +typedef struct camera{ + FVECTOR xyz; + FVECTOR zd; + FVECTOR yd; + float angle[4]; +} CAMERA; + +extern void camera_update(Game *game, FMATRIX pose); extern void camera_init(); +void set_camera(CAMERA *camera); + + + +#endif
--- a/car.c Thu May 19 16:41:21 2011 +0900 +++ b/car.c Thu May 26 14:44:03 2011 +0900 @@ -1,8 +1,8 @@ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "field.h" #include "car.h" #include "mytype.h" @@ -14,8 +14,8 @@ #define BUFSIZE 256 /* åˆæœŸä½ç½®ã¨åˆæœŸæ–¹å‘ */ -//static FVECTOR location = {0, 0, 0, 1}; -//static FVECTOR direction = {0, 0, 1, 1}; +static FVECTOR location = {0, 0, 0, 1}; +static FVECTOR direction = {0, 0, 1, 1}; extern FILE* main_fp; @@ -30,18 +30,18 @@ float speed_max, float rot, float brake) { CarPtr car; - //OBJECT *body; - //TEXTURE* tex; + OBJECT *body; + TEXTURE* tex; void *free_addr; - //body = ps2util_obj_Create_fromXML(filename); - //ps2util_obj_Set_effect(body, DEFAULT_SET); + body = ps2util_obj_Create_fromXML(filename); + ps2util_obj_Set_effect(body, DEFAULT_SET); - if (true){//malloc_align16(&free_addr, &car, sizeof(Car)) == -1) { - // fprintf(main_fp, "car.c: malloc_align16 error\n"); + if (malloc_align16(&free_addr, &car, sizeof(Car)) == -1) { + fprintf(main_fp, "car.c: malloc_align16 error\n"); exit(EXIT_FAILURE); } - //car->body = body; + car->body = body; car->next = NULL; car->speed = 0.0; car->speed_accel = speed_accel; @@ -51,23 +51,23 @@ car->y_angle = 0.0; car->free_addr = free_addr; - //ps2_vu0_copy_vector(car->direction, direction); - //ps2_vu0_copy_vector(car->location, location); - //INIT_VECTOR(car->vertical, 0, -1, 0, 1); - //INIT_VECTOR(car->body->xyz, 0, 0, 0, 1); - //INIT_VECTOR(car->body->angle, 0, 0, 0, 1); + ps2_vu0_copy_vector(car->direction, direction); + ps2_vu0_copy_vector(car->location, location); + INIT_VECTOR(car->vertical, 0, -1, 0, 1); + INIT_VECTOR(car->body->xyz, 0, 0, 0, 1); + INIT_VECTOR(car->body->angle, 0, 0, 0, 1); - //ps2util_obj_Renew_transMatrix(car->body); - //ps2util_obj_Set_effect(car->body, DEFAULT_SET); + ps2util_obj_Renew_transMatrix(car->body); + ps2util_obj_Set_effect(car->body, DEFAULT_SET); if (*texname != 'n') { - //tex = read_png_file(texname); - //ps2util_tex_Set(tex); - //ps2util_obj_Set_texture(car->body, tex); + tex = read_png_file(texname); + ps2util_tex_Set(tex); + ps2util_obj_Set_texture(car->body, tex); } #ifdef DEBUG - // fprintf(main_fp, "malloc car addr = %x\n", (int)free_addr); + fprintf(main_fp, "malloc car addr = %x\n", (int)free_addr); #endif return car; @@ -140,17 +140,17 @@ void car_swerve(CarPtr car, int flg) { - //FMATRIX rot; - // FVECTOR v; + FMATRIX rot; + FVECTOR v; car->y_angle += (float)flg*car->rotation_angle; car->y_angle += (car->y_angle < 0) ? 360.0 : 0; car->y_angle += (car->y_angle > 360.0) ? -360.0 : 0; - // ps2_vu0_unit_matrix(rot); - // ps2_vu0_rot_matrix_y(rot, rot, degree2radian((float)flg*car->rotation_angle)); - // ps2_vu0_copy_vector(v, car->direction); - // ps2_vu0_apply_matrix(car->direction, rot, v); + ps2_vu0_unit_matrix(rot); + ps2_vu0_rot_matrix_y(rot, rot, degree2radian((float)flg*car->rotation_angle)); + ps2_vu0_copy_vector(v, car->direction); + ps2_vu0_apply_matrix(car->direction, rot, v); } /*---------------------------- @@ -176,20 +176,20 @@ FALSEã‚’è¿”ã™ã€‚ ---------------------------------*/ static bool -car_field_check(CarPtr car) +car_field_check(Game *game ,CarPtr car) { FieldPtr p; FieldPtr f = field_get_actual(); // ç¾åœ¨ã®ã‚³ãƒ¼ã‚¹ã§è¡çªãƒ»å†…外判定 p = f; - if (true){//(col_detect(&p->colface, car->vertical, car->location) == true) { + if (col_detect(&p->colface, car->vertical, car->location) == true) { goto FIELD_CHECK_OK; } // ç¾åœ¨ã®ã‚³ãƒ¼ã‚¹ã®æ¬¡ã«éš£æŽ¥ã™ã‚‹ã‚³ãƒ¼ã‚¹ã§è¡çªãƒ»å†…外判定 p = f->next; - if (true){//if (col_detect(&p->colface, car->vertical, car->location) == true) { + if (col_detect(&p->colface, car->vertical, car->location) == true) { if (field_rap_increment(1)) { game->rap++; } @@ -198,7 +198,7 @@ // ç¾åœ¨ã®ã‚³ãƒ¼ã‚¹ã®å‰ã«éš£æŽ¥ã™ã‚‹ã‚³ãƒ¼ã‚¹ã§è¡çªãƒ»å†…外判定 p = f->prev; - if (true){//if (col_detect(&p->colface, car->vertical, car->location) == true) { + if (col_detect(&p->colface, car->vertical, car->location) == true) { field_rap_increment(-1); goto FIELD_CHECK_OK; } @@ -218,59 +218,59 @@ ã¾ãŸã€é€²è¡Œå¾Œã®è¡çªåˆ¤å®šã‚‚è¡Œã†ã€‚ ------------------------------*/ static void -car_move(CarPtr car) +car_move(Game *game,CarPtr car) { - //FVECTOR mov, prev_location; + FVECTOR mov, prev_location; - // ps2_vu0_scale_vector(mov, car->direction, car->speed); - // ps2_vu0_copy_vector(prev_location, car->location); - // ps2_vu0_add_vector(car->location, car->location, mov); + ps2_vu0_scale_vector(mov, car->direction, car->speed); + ps2_vu0_copy_vector(prev_location, car->location); + ps2_vu0_add_vector(car->location, car->location, mov); - if (car_field_check(car) == false) { - // ps2_vu0_copy_vector(car->location, prev_location); + if (car_field_check(game,car) == false) { + ps2_vu0_copy_vector(car->location, prev_location); car->speed = car->speed*0.5; - } + } } static void car_axis_rotation(CarPtr car) { - // FMATRIX pose, yrot, yrotinv; + FMATRIX pose, yrot, yrotinv; - // ps2_vu0_unit_matrix(yrot); - // ps2_vu0_rot_matrix_y(yrot, yrot, -degree2radian(car->y_angle)); - // ps2_vu0_unit_matrix(yrotinv); - // ps2_vu0_rot_matrix_y(yrotinv, yrotinv, degree2radian(car->y_angle)); + ps2_vu0_unit_matrix(yrot); + ps2_vu0_rot_matrix_y(yrot, yrot, -degree2radian(car->y_angle)); + ps2_vu0_unit_matrix(yrotinv); + ps2_vu0_rot_matrix_y(yrotinv, yrotinv, degree2radian(car->y_angle)); { - // FVECTOR yd = {0, -1, 0, 1}; - // FVECTOR rotaxis; - // FVECTOR q; + FVECTOR yd = {0, -1, 0, 1}; + FVECTOR rotaxis; + FVECTOR q; - // ps2_vu0_outer_product(rotaxis, car->vertical, yd); + ps2_vu0_outer_product(rotaxis, car->vertical, yd); { - // float scale=1/NORM(rotaxis); - // rotaxis[0] *= scale; - // rotaxis[1] *= scale; - // rotaxis[2] *= scale; + float scale=1/NORM(rotaxis); + rotaxis[0] *= scale; + rotaxis[1] *= scale; + rotaxis[2] *= scale; } - // quotanion(q, rotaxis, acos(ps2_vu0_inner_product(yd, car->vertical)/(NORM(yd)*NORM(car->vertical)))); - // quotanion_rotmatrix(pose, q); + quotanion(q, rotaxis, acos(ps2_vu0_inner_product(yd, car->vertical)/(NORM(yd)*NORM(car->vertical)))); + quotanion_rotmatrix(pose, q); } - // ps2_vu0_mul_matrix(pose, yrot, pose); - // ps2_vu0_mul_matrix(pose, pose, yrotinv); - // ps2_vu0_copy_matrix(car->body->transfer, pose); - // ps2_vu0_rot_matrix_y(car->body->transfer, car->body->transfer, degree2radian(car->y_angle)); + ps2_vu0_mul_matrix(pose, yrot, pose); + ps2_vu0_mul_matrix(pose, pose, yrotinv); + ps2_vu0_copy_matrix(car->body->transfer, pose); + ps2_vu0_rot_matrix_y(car->body->transfer, car->body->transfer, degree2radian(car->y_angle)); } void -car_update(CarPtr car) +car_update(Game *game,CarPtr car) { // 移動 - car_move(car); + car_move(game,car); // 摩擦ã«ã‚ˆã‚‹é€Ÿåº¦æ¸›å°‘ car->speed -= 0.005; @@ -283,16 +283,16 @@ void car_destroy(CarPtr p) { - // TEXTURE *t; + TEXTURE *t; - // if ((t = p->body->surfaces->texture)) { - // ps2util_tex_Exclude(t); - // free_texture(t); - // } - // ps2util_obj_Free(p->body); - // free(p->free_addr); + if ((t = p->body->surfaces->texture)) { + ps2util_tex_Exclude(t); + free_texture(t); + } + ps2util_obj_Free(p->body); + free(p->free_addr); #ifdef DEBUG - // fprintf(main_fp, "free car addr = %x\n", (int)p->free_addr); + fprintf(main_fp, "free car addr = %x\n", (int)p->free_addr); #endif }
--- a/car.h Thu May 19 16:41:21 2011 +0900 +++ b/car.h Thu May 26 14:44:03 2011 +0900 @@ -1,10 +1,12 @@ #ifndef CAR_H #define CAR_H +#include "libps2.h" + typedef struct car { - //FVECTOR direction; // å‘ã - //FVECTOR vertical; // - //FVECTOR location; // ä½ç½® + FVECTOR direction; // å‘ã + FVECTOR vertical; // + FVECTOR location; // ä½ç½® float speed; // 速度 float speed_accel; // åŠ é€Ÿåº¦ float speed_max; // 最高速度 @@ -13,7 +15,7 @@ float y_angle; // 角度 void *free_addr; struct car *next; - //OBJECT* body; + OBJECT* body; } Car, *CarPtr; extern CarPtr car_init(int id);
--- a/carNode.c Thu May 19 16:41:21 2011 +0900 +++ b/carNode.c Thu May 26 14:44:03 2011 +0900 @@ -1,9 +1,10 @@ #include <stdio.h> #include <stdlib.h> -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "car.h" #include "game.h" +#include "carNode.h" /* --- car.c --- */ extern void car_destroy(CarPtr car); @@ -23,18 +24,18 @@ } } -/* + void carNode_draw() { CarPtr p = car_list; while (p) { - //ps2util_obj_Draw(p->body); + ps2util_obj_Draw(p->body); p = p->next; } } -*/ + void carNode_destroy()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/carNode.h Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,14 @@ +#ifndef CARNODE_H +#define CARNODE_H + + +#include "car.h" + +/* --- car.c --- */ +extern void car_destroy(CarPtr car); + +void carNode_append(CarPtr new) ; +void carNode_draw(); +void carNode_destroy(); + +#endif
--- a/col.c Thu May 19 16:41:21 2011 +0900 +++ b/col.c Thu May 26 14:44:03 2011 +0900 @@ -1,8 +1,10 @@ #include <stdio.h> -//#include"libps2.h" -//#include"ps2util.h" +#include"libps2.h" +#include"ps2util.h" #include"col.h" #include"mytype.h" +#include <stdbool.h> +#include <string.h> extern FILE *main_fp; @@ -13,9 +15,9 @@ * ãã†ã§ãªã‘ã‚Œã°FALSEを戻ã™ã€‚境界ã¯å«ã‚€ã€‚ */ -/* -static bool -col_detect_approx(){ //FVECTOR p, FVECTOR v0, FVECTOR v1) + +bool +col_detect_approx(FVECTOR p, FVECTOR v0, FVECTOR v1){ float v_r1, v_r2, r1_r2, r1_r1, r2_r2; float a, b, r; @@ -30,20 +32,20 @@ b = (v_r2 * r1_r1 - v_r1 * r1_r2); r = (r1_r1 * r2_r2 - r1_r2 * r1_r2); - return false;//(a>=0 && b>=0 && a+b-r<=0) ? TRUE : FALSE; + return (a>=0 && b>=0 && a+b-r<=0) ? true : false; } -*/ + /** * 垂心oã®ç®—出. 点pã‹ã‚‰v0, v1ãŒæãé¢ã¸åž‚線を引ã„ãŸã¨ãã®äº¤ç‚¹oã‚’ * 垂心(orthocenter)ã¨å‘¼ã¶ã€‚ */ -//ãªã‚“ã‹ä¸€å›žã‚‚使ã‚ã‚Œã¦ã„ãªã„らã—ã„ã®ã§æ¶ˆã™ -//static void -//col_orthocenter()//FVECTOR o, FVECTOR p, FVECTOR p0, FVECTOR normal) -//{ - /* +//ãªã‚“ã‹ä¸€å›žã‚‚使ã‚ã‚Œã¦ã„ãªã„らã—ã„ã®ã§æ¶ˆã™ã€ã¯ãšã ã£ãŸ +static void +col_orthocenter(FVECTOR o, FVECTOR p, FVECTOR p0, FVECTOR normal) +{ + FVECTOR o0, d; ps2_vu0_sub_vector(o0, p, p0); @@ -54,8 +56,8 @@ o[X_AXIS] = p[X_AXIS] - d[X_AXIS]; o[Y_AXIS] = p[Y_AXIS] - d[Y_AXIS]; o[Z_AXIS] = p[Z_AXIS] - d[Z_AXIS]; - o[W_AXIS] = 1;*/ -//} + o[W_AXIS] = 1; +} /** * 点pã¨é¢ã¨ã®è¡çª(点pã¨detection faceé¢ã¨ã®åž‚心oãŒdetection faceé ˜åŸŸã® @@ -64,9 +66,9 @@ * vector)を戻ã™. */ -/* + bool -col_detect(ColFaceHd* hd)//, FVECTOR pose, FVECTOR p) +col_detect(ColFaceHd* hd, FVECTOR pose, FVECTOR p) { FVECTOR o, o0; int i; @@ -80,19 +82,19 @@ ps2_vu0_sub_vector(o0, o, col_face[i].p0); // * ベクトルv0, v1ã®æã三角形ã¨o0ã¨ã§å†…外判定(range approx detection)を行ㆠ- if (col_detect_approx(o0, col_face[i].v0, col_face[i].v1)==TRUE) { + if (col_detect_approx(o0, col_face[i].v0, col_face[i].v1)==true) { goto NOCOLLISION; } } - return FALSE; + return false; NOCOLLISION: ps2_vu0_copy_vector(p, o); ps2_vu0_copy_vector(pose, col_face[i].normal); - return TRUE; + return true; return false; } -*/ + /* * detection faceä½œæˆ @@ -100,9 +102,9 @@ void -col_init(ColFaceHd* hd)//, PolygonInfo* face) +col_init(ColFaceHd* hd, PolygonInfo* face) { - /* + int i; FVECTOR p1, p2; ColFacePtr colface; @@ -130,7 +132,7 @@ } hd->colface = colface; - */ + }
--- a/col.h Thu May 19 16:41:21 2011 +0900 +++ b/col.h Thu May 26 14:44:03 2011 +0900 @@ -1,11 +1,15 @@ #ifndef COL_H #define COL_H +#include "libps2.h" +#include "stdbool.h" + + typedef struct detection_face { - // FVECTOR p0; - // FVECTOR v0; - // FVECTOR v1; - // FVECTOR normal; + FVECTOR p0; + FVECTOR v0; + FVECTOR v1; + FVECTOR normal; } ColFace, *ColFacePtr; typedef struct col_face_handler { @@ -14,11 +18,16 @@ int facenum; } ColFaceHd; -extern void col_init(ColFaceHd* hd);//, PolygonInfo* face); -//extern bool col_detect(ColFaceHd* hd); +extern void col_init(ColFaceHd* hd, PolygonInfo* face); +extern bool col_detect(ColFaceHd* hd, FVECTOR pose, FVECTOR p); + + + + +bool col_detect_approx(FVECTOR p, FVECTOR v0, FVECTOR v1); #endif //FVECTOR p, FVECTOR v0, FVECTOR v1); -//, FVECTOR pose, FVECTOR p); +
--- a/controler.c Thu May 19 16:41:21 2011 +0900 +++ b/controler.c Thu May 26 14:44:03 2011 +0900 @@ -1,12 +1,12 @@ -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "controler.h" #include <stdbool.h> //SGO_PAD pad; #ifdef DEMO_CREATE -extern void setPadValue(int pad); +qextern void setPadValue(int pad); #endif extern int getPadValue();
--- a/field.c Thu May 19 16:41:21 2011 +0900 +++ b/field.c Thu May 26 14:44:03 2011 +0900 @@ -1,18 +1,15 @@ -/* - * $Id$ - */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> -//#include "libps2.h" -//#include "ps2util.h" +#include <string.h> +#include "libps2.h" +#include "ps2util.h" #include "mytype.h" #include "field.h" #include "car.h" #include "quotanion.h" #include <stdbool.h> -#define DEFAULT_SET (EFFECT_TEXTURE_USE | EFFECT_ALPHABLEND_UNUSE | EFFECT_SHADING_FLAT) #define BUFSIZE 256 /* --- main.c --- */ @@ -23,53 +20,53 @@ static FieldPtr field_list; static FieldPtr field_actual; -/* + static FieldPtr -field_create(char *fieldImg, char *colImg)//, TEXTURE* tex) +field_create(char *fieldImg, char *colImg, TEXTURE *tex) { FieldPtr self; - // OBJECT *obj; - // PolygonInfo *xml; + OBJECT *obj; + PolygonInfo *xml; void *free_addr; - // FVECTOR location = {0, 0, 0, 1}; - // FVECTOR direction = {0, 0, 0, 1}; + FVECTOR location = {0, 0, 0, 1}; + FVECTOR direction = {0, 0, 0, 1}; // obj = ps2util_obj_Create_fromXML(fieldImg); - // memcpy(obj->xyz, location, sizeof(FVECTOR)); - // memcpy(obj->angle, direction, sizeof(FVECTOR)); - // ps2util_obj_Renew_transMatrix(obj); - // ps2util_obj_Set_effect(obj, DEFAULT_SET); - // ps2util_obj_Set_texture(obj, tex); + memcpy(obj->xyz, location, sizeof(FVECTOR)); + memcpy(obj->angle, direction, sizeof(FVECTOR)); + ps2util_obj_Renew_transMatrix(obj); + ps2util_obj_Set_effect(obj, DEFAULT_SET); + ps2util_obj_Set_texture(obj, tex); // xml = xml_read_file(colImg); //ã“ã“ã§ã‚³ãƒ¼ã‚¹ã®èµ°ã‚Œã‚‹å ´æ‰€(当ãŸã‚Šåˆ¤å®š) - if (true){//malloc_align16(&free_addr, &self, sizeof(Field)) == -1) { + if (malloc_align16(&free_addr, &self, sizeof(Field)) == -1) { fprintf(stderr, "field.c: malloc_align16 error\n"); fflush(stderr); exit(EXIT_FAILURE); } - // self->object = obj; + self->object = obj; self->next = NULL; self->prev = NULL; self->free_addr = free_addr; #ifdef DEBUG - // fprintf(main_fp, "malloc fieldNode addr = %x(free), %x(obj)\n", (int)free_addr, (int)self); + fprintf(main_fp, "malloc fieldNode addr = %x(free), %x(obj)\n", (int)free_addr, (int)self); #endif - // col_init(&self->colface, xml); + col_init(&self->colface, xml); #ifdef DEBUG - // fprintf(main_fp, " facenum = %d\n", self->colface.facenum); - // fprintf(main_fp, " facenum = %x(free), ", (int)self->colface.free_addr); - // fprintf(main_fp, "facenum = %x(obj)\n", (int)self->colface.colface); + fprintf(main_fp, " facenum = %d\n", self->colface.facenum); + fprintf(main_fp, " facenum = %x(free), ", (int)self->colface.free_addr); + fprintf(main_fp, "facenum = %x(obj)\n", (int)self->colface.colface); #endif - // xml_free(xml); + //xml_free(xml); return self; } -//ã“ã£ã¡ã‚‚ã©ã“ã§ã‚‚呼ã°ã‚Œã¦ã„ãªã„らã—ã„(ãŠã‚Œã®ã›ã„ã§ã™orz) -*/ + + static void field_new_readCSV(FILE *fp, int id) @@ -79,7 +76,7 @@ FieldPtr prevField = NULL; char buff[BUFSIZE], *bufp; char fieldImg[BUFSIZE], colImg[BUFSIZE], texname[BUFSIZE]; - // TEXTURE *tex = NULL; + TEXTURE *tex = NULL; int course_id; bool flag = false; @@ -100,14 +97,14 @@ case 't': // テクスãƒãƒ£ã®ãƒãƒ¼ãƒ‰ if (flag) { sscanf(bufp, " %s\n", texname); - // tex = read_png_file(texname); - // ps2util_tex_Set(tex); + //tex = read_png_file(texname); + ps2util_tex_Set(tex); } break; case 'c': // コースã®ãƒãƒ¼ãƒ‰ if (flag) { sscanf(bufp, " %s %s\n", fieldImg, colImg); - // newField = field_create(fieldImg, colImg, tex); + newField = field_create(fieldImg, colImg, tex); if (!fieldHead) { fieldHead = prevField = newField; } else { @@ -154,19 +151,19 @@ fclose(fp); } -/* + static void field_draw(FieldPtr p) { - // ps2_vu0_unit_matrix(p->object->transfer); + ps2_vu0_unit_matrix(p->object->transfer); - // p->object->transfer[3][0] = p->location[0]; - // p->object->transfer[3][1] = p->location[1]; - // p->object->transfer[3][2] = p->location[2]; - // p->object->transfer[3][3] = p->location[3]; - // ps2util_obj_Draw(p->object); + p->object->transfer[3][0] = p->location[0]; + p->object->transfer[3][1] = p->location[1]; + p->object->transfer[3][2] = p->location[2]; + p->object->transfer[3][3] = p->location[3]; + ps2util_obj_Draw(p->object); } -*/ + void field_update(CarPtr car) @@ -175,30 +172,30 @@ p = field_actual; // current - // p->location[0] = -car->location[0]; - // p->location[1] = -car->location[1]; - // p->location[2] = -car->location[2]; - // p->location[3] = 1; - // field_draw(p); + p->location[0] = -car->location[0]; + p->location[1] = -car->location[1]; + p->location[2] = -car->location[2]; + p->location[3] = 1; + field_draw(p); // next p = field_actual->next; if (p) { - // p->location[0] = -car->location[0]; - // p->location[1] = -car->location[1]; - // p->location[2] = -car->location[2]; - // p->location[3] = 1; - // field_draw(p); + p->location[0] = -car->location[0]; + p->location[1] = -car->location[1]; + p->location[2] = -car->location[2]; + p->location[3] = 1; + field_draw(p); } // prev p = field_actual->prev; if (p) { - // p->location[0] = -car->location[0]; - // p->location[1] = -car->location[1]; - // p->location[2] = -car->location[2]; - // p->location[3] = 1; - // field_draw(p); + p->location[0] = -car->location[0]; + p->location[1] = -car->location[1]; + p->location[2] = -car->location[2]; + p->location[3] = 1; + field_draw(p); } } @@ -207,22 +204,22 @@ { FieldPtr p = field_list; FieldPtr d; - // TEXTURE *t; + TEXTURE *t; p->prev->next = NULL; - // t = p->object->surfaces->texture; - // ps2util_tex_Exclude(t); - // free_texture(t); + t = p->object->surfaces->texture; + ps2util_tex_Exclude(t); + free_texture(t); while (p) { d = p; p = p->next; - // ps2util_obj_Free(d->object); - // free(d->colface.free_addr); - // free(d->free_addr); + ps2util_obj_Free(d->object); + free(d->colface.free_addr); + free(d->free_addr); #ifdef DEBUG - // fprintf(main_fp, "free fieldNode addr = %x\n", (int)d->free_addr); + fprintf(main_fp, "free fieldNode addr = %x\n", (int)d->free_addr); #endif }
--- a/field.h Thu May 19 16:41:21 2011 +0900 +++ b/field.h Thu May 26 14:44:03 2011 +0900 @@ -1,15 +1,31 @@ +#ifndef FIELD_H +#define FIELD_H + + #include "col.h" +/* + ãŸã¶ã‚“ã€ps2ã§ã€ + ç”»åƒã‚’使ã†ã‹ã€ã‚¢ãƒ«ãƒ•ã‚¡ãƒ–レンドを使ã†ã‹ã€ã‚·ã‚§ãƒ¼ãƒ‰ã‚’使ã†ã‹ + ã£ã¦äº‹ã‚’èžã„ã¦ãã¦ã„ã‚‹ã ã¨æ€ã‚れる。 + ã‚ã¨ã§ã€ã‹ãšã—ã® ps2 ä¾å˜é–¢ä¿‚を見ã¦ã¿ãªã„ã¨ãƒ»ãƒ»ãƒ» +*/ +#define EFFECT_TEXTURE_USE 1 +#define EFFECT_ALPHABLEND_UNUSE 1 +#define EFFECT_SHADING_FLAT 1 + +#define DEFAULT_SET (EFFECT_TEXTURE_USE | EFFECT_ALPHABLEND_UNUSE | EFFECT_SHADING_FLAT) typedef struct field { struct field *next; struct field *prev; struct field *init; void *free_addr; - // OBJECT *object; - // FVECTOR location; - // ColFaceHd colface; + OBJECT *object; + FVECTOR location; + ColFaceHd colface; } Field, *FieldPtr; extern void field_init(int id); extern void field_destroy(); +#endif
--- a/gSprite.c Thu May 19 16:41:21 2011 +0900 +++ b/gSprite.c Thu May 26 14:44:03 2011 +0900 @@ -1,10 +1,7 @@ -/* - * $Id$ - */ #include <stdio.h> #include <stdlib.h> -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "gSprite.h" #include <stdbool.h> @@ -14,11 +11,11 @@ #define SCREEN_HALF_H 240 static SpriteTable sptable[DEFOBJ]; -//static ps2utilSprite sp[DEFOBJ]; // 表示スプライト用スタック +static ps2utilSprite sp[DEFOBJ]; // 表示スプライト用スタック static unsigned int sp_counter; -//static bool flag_spriteInited = false; // スプライトãƒãƒ¼ãƒ‰ãƒ•ãƒ©ã‚° +static bool flag_spriteInited = false; // スプライトãƒãƒ¼ãƒ‰ãƒ•ãƒ©ã‚° -//static TEXTURE *sprite_tex; +static TEXTURE *sprite_tex; void gSprite_DefSprite(int number, int tx, int ty, int tw, int th)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libps2.h Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,60 @@ +#ifndef LIBPS2_H +#define LIBPS2_H + +//dummy file + +typedef float FVECTOR[4] __attribute__((aligned (16))); +typedef float FMATRIX[4][4] __attribute__((aligned (16))); + + +//object.h よりコピー +typedef struct texture { + int width; // texture's width size + int height; // texture's height size + char *name; // texture's name + // TexEnv *texenv; + char *free_texenv; // pointer for free texenv + char *free_image; // pointer for free actual image data + // struct ps2_image g_img; // this struct must not be alignmented by 128bit +} TEXTURE; + + +//ã¾ãŸ object.h よりコピー +typedef struct surface { + int size; + char *surf_name; // object's surface name + char *tex_name; // surface's texture name + TEXTURE *texture; // pointer of this surface's texture + // ps2_giftag giftag; // own GIFtag data + // ps2_dmatag *packet; // pointer of actual object data + char *free_packet; // pointer for free object data + struct surface *next; +} SURFACE; + + +//ã¾ãŸã¾ãŸ object.h よりコピー +typedef struct object { + FVECTOR xyz; // position + FVECTOR angle; // angle + FMATRIX transfer; // transfer matrix + char *name; // object's name + char *free_me; // pointer for free myself + SURFACE *surfaces; +} OBJECT; + + +/* + æ§‹é€ ä½“ PolygonInfo ãŒè¦‹å½“ãŸã‚‰ãªã„ã®ã§è‡ªä½œ + 作りã¯é©å½“ +*/ +typedef struct popygon { + int siz; + FVECTOR pnts; +} PolygonInfo; + + +extern int malloc_align16(void *head, void *aligned, int size); + + + +#endif
--- a/linda.c Thu May 19 16:41:21 2011 +0900 +++ b/linda.c Thu May 26 14:44:03 2011 +0900 @@ -1,17 +1,18 @@ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> +#include <string.h> #include <math.h> -//#include <arpa/inet.h> -//#include <libps2.h> -//#include <ps2util.h> +#include <arpa/inet.h> +#include "libps2.h" +#include "ps2util.h" #include "car.h" #include "game.h" -//#include "Linda/lindaapi.h" +#include "Linda/lindaapi.h" #include "linda.h" -//extern void psx_free(unsigned char *); +extern void psx_free(unsigned char *); extern void carNode_append(CarPtr); extern FILE *main_fp; static int my_id; @@ -51,7 +52,7 @@ char *packet; unsigned int len = 0; - // if (data) len += sizeof(FMATRIX); + if (data) len += sizeof(FMATRIX); packet = (char*)malloc(PKT_HEADER_SIZE+len); @@ -60,7 +61,7 @@ set_header(courseid, packet, PKT_COURSEID_OFFSET); if (data) - // memcpy(packet+PKT_DATA_OFFSET, data, len); + memcpy(packet+PKT_DATA_OFFSET, data, len); return packet; } @@ -74,10 +75,10 @@ char *reply; int len = PKT_HEADER_SIZE; - // if (data) len += sizeof(FMATRIX); + if (data) len += sizeof(FMATRIX); - //reply = psx_reply(linda_seq[dest]) - /* + reply = psx_reply(linda_seq[dest]); + if (linda_seq[dest] == 0) { pkt = make_packet(mode, car, course, data); psx_out(dest, pkt, len); @@ -88,9 +89,9 @@ free(pkt); psx_free(reply); } - */ + pkt = make_packet(mode, car, course, data); - psx_out(dest, pkt, len); + //psx_out(dest, pkt, len); free(pkt); } @@ -108,8 +109,7 @@ if (mode) *mode = get_header(pkt, PKT_MODE_OFFSET); if (car) *car = get_header(pkt, PKT_CARID_OFFSET); if (course) *course = get_header(pkt, PKT_COURSEID_OFFSET); - if (data) - // memcpy(data, pkt+PKT_DATA_OFFSET, sizeof(FMATRIX)); + if (data) memcpy(data, pkt+PKT_DATA_OFFSET, sizeof(FMATRIX)); psx_free(reply); linda_seq[id] = psx_rd(id); } @@ -458,28 +458,28 @@ int i, flg, mode; int id = game->play_id; int connect = 1; - // FMATRIX po; + FMATRIX po; CarPtr mycar = game->jiki; CarPtr enemy = NULL; for (i=1; i<=CLIENT_MAX; i++) { - // ps2_vu0_unit_matrix(po); - // get_packet(i, &flg, &mode, NULL, NULL, (char*)po); + ps2_vu0_unit_matrix(po); + get_packet(i, &flg, &mode, NULL, NULL, (char*)po); if (i == id) { - // ps2_vu0_copy_matrix(po, mycar->body->transfer); - // ps2_vu0_copy_vector(po[3], mycar->location); + ps2_vu0_copy_matrix(po, mycar->body->transfer); + ps2_vu0_copy_vector(po[3], mycar->location); linda_seq[i] = psx_in(i); - // send_packet(i, MODE_MAIN, 0, 0, (char*)po); + send_packet(i, MODE_MAIN, 0, 0, (char*)po); } else { enemy = linda_carlist[i]; if (flg == 1 && mode == MODE_MAIN) { - /* ps2_vu0_copy_matrix(enemy->body->transfer, po); + ps2_vu0_copy_matrix(enemy->body->transfer, po); enemy->body->transfer[3][0] -= mycar->location[0]; enemy->body->transfer[3][1] -= mycar->location[1]; enemy->body->transfer[3][2] -= mycar->location[2]; - enemy->body->transfer[3][3] = 1;*/ + enemy->body->transfer[3][3] = 1; } } } @@ -658,7 +658,7 @@ #ifdef DEBUG // ã©ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã§outã•ã‚Œã¦ã‚‹ã‹è¦‹ã‚‹ // å¿…è¦ãªã¨ãã ã‘outã—ãªã„ã¨é‡ã„ã§ã™ã当然ã ã‘ã© - //fprintf(main_fp, "psx_out() jiki\n"); + fprintf(main_fp, "psx_out() jiki\n"); #endif linda_jiki_update(); // ç„¡ç†çŸ¢ç† @@ -666,7 +666,7 @@ // æ£ã—ã„ã‚„ã‚Šæ–¹ãŒä»–ã«æœ‰ã‚‹ã®ã‹ãªï¼Ÿ // 実行ã—続ã‘ã¦ã‚‹ã¨æœ€çµ‚çš„ã«æ¿€é‡ã«ãªã‚‹ã®ã§ // ã“ã“ら辺ã«å•é¡ŒãŒæœ‰ã‚‹ã®ã ã‚ã†ã‹ã€‚ - // psx_free(psx_reply(psx_in(game->play_id))); + psx_free(psx_reply(psx_in(game->play_id))); linda_seq[my_id]=psx_in(game->play_id); psx_out(game->play_id, (char*)&jiki, sizeof(CarInfo)); } @@ -687,7 +687,7 @@ while((reply = psx_reply(seq)) == 0) psx_sync_n(); id = atoi(reply+LINDA_HEADER_SIZE); - //psx_free(reply); + psx_free(reply); return id; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makefile Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,73 @@ +TARGET = main +CC = gcc +SRCS = main.c game.c car.c col.c quotanion.c controler.c field.c camera.c gSprite.c schedule.c mytype.c gFont.c carNode.c light.c title_scene.c game_time.c ps2util.c +#linda/lindaapi.c linda.c +OBJS = ${SRCS:.c=.o} +VU1DIR = vu1code + +#MPGOBJ = mpg.elf + +VPUSRCS = ${VU1DIR}/Makefile ${VU1DIR}/MPG.dsm ${VU1DIR}/basic.vsm ${VU1DIR}/vpu.cmd ${VU1DIR}/vumacros.h +VU1OBJ = ${VU1DIR}/mpg.elf + +INCLUDES = \ +#-I/usr/local/include/libps2a \ +#-I/usr/local/include/ps2util \ +#-I./Linda + +#DEFINES = -DDEBUG -DLINDA +DEBUGFLAGS = -Wall -g +#LIBPS2ARC = /usr/local/lib/libps2a.a + +CFLAGS = ${INCLUDES} ${DEFINES} ${DEBUGFLAGS} + +#LIBS = `xml-config --libs` -lps2util -lpng -lps2a + +all : ${TARGET} + +${VU1OBJ}: ${VPUSRCS} + cd ${VU1DIR}; make + cp ${VU1OBJ} . + +#${TARGET} : ${OBJS} ${VU1OBJ} +# ${CC} -o ${TARGET} ${OBJS} ${LIBS} + +#${AR} x ${LIBPS2ARC} ${MPGOBJ} + +#${TARGET} : ${OBJS} +# ${CC} -po ${TARGET} ${OBJS} ${LIBS} +${TARGET} : ${OBJS} + ${CC} -o ${TARGET} ${OBJS} + + +tag: + etags *.[ch] + +clean : + rm -f ${OBJS} + rm -f ${TARGET} + rm -f ${MPGOBJ} + rm -f ${VU1OBJ} + rm -f *~ + cd ${VU1DIR}; make clean +depend: + makedepend -- ${CFLAGS} -- ${SRCS} ${MAINSRC} +# DO NOT DELETE + +main.o: +game.o: #/Users/e095729/magoroku_racing/Linda/lindaapi.h +car.o: +col.o: +quotanion.o: +field.o: +camera.o: +gaSprite.o: +schedule.o: +demo.o: +mytype.o: +gFont.o: +carNode.o: +linda.o: #/Users/e095729/magoroku_racing/Linda/lindaapi.h +light.o: +title_scene.o: +game_time.o:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ps2util.c Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,246 @@ +#include <stdio.h> +#include <stdlib.h> +#include "libps2.h" +#include "ps2util.h" + + +/* + ãŸã¶ã‚“ã€æœ¬å½“ã¯èªã¿è¾¼ã‚“ã xml file ã‹ã‚‰æƒ…å ±ã‚’å–å¾—ã™ã‚‹ã¨ã‹ãã‚“ãªã‚“ã ã¨æ€ã† + ã©ã‚“ãªå‡¦ç†ã‹åˆ†ã‹ã‚‰ãªã„ã®ã§ã€ã¨ã‚Šã‚ãˆãšã€åˆæœŸåŒ–ã—ã¦ã„る。 +*/ + +OBJECT *ps2util_obj_Create_fromXML(char *filename) +{ + OBJECT *body; + /* + body->xyz = {0,0,0,0}; + body->angle = {0,0,0,0}; + body->transfer = { {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} }; + body->*name = filename; + body->*free_me = NULL; + */ + return body; +} + + + +void ps2util_obj_Set_effect(OBJECT *body, int def) +{ + //none +} + + +void ps2_vu0_copy_vector(FVECTOR directionA, FVECTOR directionB) +{ + //none +} + + +void ps2util_obj_Renew_transMatrix(OBJECT *car){ + //none +} + + +/* + ps2 内㮠texture.c ã‹ã‚‰ +*/ +TEXTURE* read_png_file(char *texname) +{ + //ã¨ã‚Šã‚ãˆãšæˆ»ã‚Šå€¤ã‚’è¿”ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’ã©ã†ã«ã‹ + TEXTURE* tex; + return tex; +} + + + +void ps2util_tex_Set(TEXTURE* tex) +{ + //none +} + + +void ps2util_obj_Set_texture(OBJECT* car_body, TEXTURE *tex) +{ + //none +} + +void ps2_vu0_unit_matrix(FMATRIX rot) +{ + //none +} + +void ps2_vu0_rot_matrix_y(FMATRIX rot1, FMATRIX rot2, float radian) +{ + //none +} + + +void ps2_vu0_apply_matrix(FVECTOR direction, FMATRIX rot, FVECTOR v) +{ + //none +} + + +void ps2_vu0_scale_vector(FVECTOR mov, FVECTOR car_direction, float car_speed) +{ + //none +} + +void ps2_vu0_add_vector(FVECTOR car_location1, FVECTOR car_location2,FVECTOR mov) +{ + //none +} + + +void ps2_vu0_outer_product(FVECTOR rotaxis, FVECTOR car_vertical, FVECTOR yd) +{ + //none +} + + +float ps2_vu0_inner_product(FVECTOR yd, FVECTOR car_vertical) +{ + float ret; + return ret; +} + + +void ps2_vu0_mul_matrix(FMATRIX pose1, FMATRIX yrot, FMATRIX pose2) +{ + //none +} + +void ps2_vu0_copy_matrix(FMATRIX car_body_transfer, FMATRIX pose) +{ + //none +} + + +void ps2util_tex_Exclude(TEXTURE* t) +{ + //none +} + +void ps2util_obj_Free(OBJECT* p_body) +{ + //none +} + + + +void ps2_vu0_sub_vector(FVECTOR o0, FVECTOR p, FVECTOR p0) +{ + //none +} + + + + +void ps2_vu0_normalize(FVECTOR colface_normal1, FVECTOR colface_normal2) +{ + //none +} + + +void xml_free(PolygonInfo xml) +{ + //none +} + + +void ps2util_obj_Draw(OBJECT *object) +{ + //none +} + + +void gSprite_Init() +{ + //none +} + + +void ps2util_sprite_Destroy(ps2utilSprite *title_sprite ) +{ + //none +} + + + + + + + +/* + ã‹ã‚‰ã®é–¢æ•° + ps2 ä¾å˜é–¢ä¿‚ã«ã‚ã£ãŸã‘ã©ã€( name_dictionary.c ) ã®ä¸ã®ã‚‚ã® + ã ã‘ã©ã€ä»–ã«ã‚‚æŒã£ã¦ãã‚‹ã‚‚ã®ãŒå¢—ãˆã‚‹ã®ã§ã€ã¨ã‚Šã‚ãˆãšã€ã‹ã‚‰ã®é–¢æ•°ã« +*/ +void delete_name_dictionary(const char *string) +{ + /* + int number; + NAME_DIC *dic_ptr; + + if (string == NULL) return; + + number = hash_func(string,NAME_HASH_SIZE); + + for (dic_ptr=name_hash+number;dic_ptr->name;dic_ptr=name_hash+number) { + if (!strcmp(string,dic_ptr->name)) { + dic_ptr->ref_num--; + if (dic_ptr->ref_num == 0) { + free(dic_ptr->name); + dic_ptr->name = NULL; + } + return; + } else { + number += REHASH_NUM; + if (number > NAME_HASH_SIZE) number -= NAME_HASH_SIZE; + } + } + */ +} + + + +/* + ps2 ä¾å˜é–¢ä¿‚ã‹ã‚‰æŒã£ã¦ããŸã€‚ + テクスãƒãƒ£ã«å‰²ã‚ŠæŒ¯ã£ãŸãƒ¡ãƒ¢ãƒªã®è§£æ”¾å‡¦ç†ï¼Ÿ + 元ファイル:texture.c +*/ +void free_texture(TEXTURE *tex) +{ + if (tex == NULL) return; + + delete_name_dictionary(tex->name); + free(tex->free_texenv); + free(tex->free_image); + free(tex); +} + + +/* + ps2 ä¾å˜é–¢ä¿‚内ã®ã€texture.c ã‹ã‚‰æ‹å€Ÿ + ã“ã® malloc ã«ã‚ˆã‚‹ãƒ¡ãƒ¢ãƒªå–å¾—ã‚’ã‚ã¡ã“ã¡ã§è¡Œã£ã¦ã„ã‚‹ã£ã½ã„ +*/ +int malloc_align16(void *free, void *aligned, int size) +{ + char *index; + unsigned int *f=(unsigned int *)free,*a=(unsigned int *)aligned; + + if (free == NULL || aligned == NULL || size <= 0) return(-1); + + index = (char *)malloc(size + ALIGN_16BYTE); + if (index == NULL) { + return(-1); + } + + *f = *a = (unsigned long int)index; + if (((unsigned long int)index % ALIGN_16BYTE) != 0) { + index += ALIGN_16BYTE - ((unsigned long int)index % ALIGN_16BYTE); + *a = (unsigned long int)index; + } + + return(0); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ps2util.h Thu May 26 14:44:03 2011 +0900 @@ -0,0 +1,75 @@ +#ifndef PS2UTIL_H +#define PS2UTIL_H + + +/* + ã©ã†å®£è¨€ã—ãŸã‚‚ã®ã‹è¿·ã† orz +*/ +#define ALIGN_16BYTE 64 + +#include "field.h" +#include "libps2.h" +#include "col.h" + +OBJECT *ps2util_obj_Create_fromXML(char *filename); + + +/* + ps2utilSprite... + å¿…è¦ã‚‰ã—ã„ã®ã§åˆ¶ä½œã€ã‚ã£ã¦ã„ã‚‹ã‹ã¯åˆ†ã‹ã‚‰ãªã„ã— + 絶対ã«ã‚ã£ã¦ã„ãªã„。 +*/ +typedef struct ps2sprite{ + +} ps2utilSprite; + + +/* + 引数㮠int ã¯ã‚ã£ã¦ã„ã‚‹ã‹ã©ã†ã‹çŸ¥ã‚‰ãªã„ã‘ã©ã€ + 引数ã¨ã—ã¦æŒã£ã¦ã“られるもã®ã®å®£è¨€ãŒã‚ã‚Œã ã£ãŸã®ã§ + 一応。 + bool ã‚‚ã‚ã‚‹ã‹ã‚‚ã‚ã‹ã‚‰ã‚“ +*/ +void ps2util_obj_Set_effect(OBJECT*, int); + +void ps2_vu0_copy_vector(FVECTOR , FVECTOR); +void ps2util_obj_Renew_transMatrix(OBJECT*); + +TEXTURE* read_png_file(char *texname); +void ps2util_tex_Set(TEXTURE*); +void ps2util_obj_Set_texture(OBJECT*, TEXTURE*); +void ps2_vu0_unit_matrix(FMATRIX); +void ps2_vu0_rot_matrix_y(FMATRIX , FMATRIX , float); +void ps2_vu0_apply_matrix(FVECTOR , FMATRIX , FVECTOR ); + +void ps2_vu0_scale_vector(FVECTOR , FVECTOR , float ); +void ps2_vu0_add_vector(FVECTOR , FVECTOR , FVECTOR ); + +void ps2_vu0_outer_product(FVECTOR rotaxis, FVECTOR car_vertical, FVECTOR yd); +float ps2_vu0_inner_product(FVECTOR yd, FVECTOR car_vertical); + +void ps2_vu0_mul_matrix(FMATRIX pose1, FMATRIX yrot, FMATRIX pose2); +void ps2_vu0_copy_matrix(FMATRIX car_body_transfer, FMATRIX pose); + +void ps2util_tex_Exclude(TEXTURE* t); + + +void free_texture(TEXTURE *tex); + +void ps2util_obj_Free(OBJECT* p_body); + + + +void ps2_vu0_sub_vector(FVECTOR o0, FVECTOR p, FVECTOR p0); +void ps2_vu0_normalize(FVECTOR colface_normal1, FVECTOR colface_normal2); +void xml_free(PolygonInfo xml); + +void ps2util_obj_Draw(OBJECT *object); + +void gSprite_Init(); + +void delete_name_dictionary(const char *string); + +void ps2util_sprite_Destroy(ps2utilSprite *title_sprite); + +#endif
--- a/quotanion.c Thu May 19 16:41:21 2011 +0900 +++ b/quotanion.c Thu May 26 14:44:03 2011 +0900 @@ -1,4 +1,4 @@ -//#include<libps2.h> +#include"libps2.h" #include<math.h> #include"mytype.h" @@ -8,13 +8,13 @@ angle : å›žè»¢é‡ ---------------------------*/ void -quotanion()//FVECTOR q, FVECTOR axis, float angle) +quotanion(FVECTOR q, FVECTOR axis, float angle) { - // float s=sin(angle/2); - // q[0] = axis[0]*s; - // q[1] = axis[1]*s; - // q[2] = axis[2]*s; - // q[3] = cos(angle/2); + float s=sin(angle/2); + q[0] = axis[0]*s; + q[1] = axis[1]*s; + q[2] = axis[2]*s; + q[3] = cos(angle/2); } /*----------------------- @@ -22,9 +22,9 @@ 変æ›è¡Œåˆ—rotを生æˆã™ã‚‹ -----------------------*/ void -quotanion_rotmatrix()//FMATRIX rot, FVECTOR q) +quotanion_rotmatrix(FMATRIX rot, FVECTOR q) { - /* rot[0][0] = q[3]*q[3] + q[0]*q[0] - q[1]*q[1] - q[2]*q[2]; + rot[0][0] = q[3]*q[3] + q[0]*q[0] - q[1]*q[1] - q[2]*q[2]; rot[0][1] = 2*(q[0]*q[1] - q[3]*q[2]); rot[0][2] = 2*(q[0]*q[2] + q[3]*q[1]); rot[0][3] = 0; @@ -40,7 +40,7 @@ rot[3][1] = 0; rot[3][2] = 0; rot[3][3] = 1; - */ + } float
--- a/quotanion.h Thu May 19 16:41:21 2011 +0900 +++ b/quotanion.h Thu May 26 14:44:03 2011 +0900 @@ -1,8 +1,10 @@ -#ifndef COL_H -#define COL_H +#ifndef QUOTANION_H +#define QUOTANION_H -extern void quotanion();//FVECTOR q, FVECTOR axis, float angle); -extern void quotanion_rotmatrix();//FMATRIX rot, FVECTOR q); +#include "libps2.h" + +extern void quotanion(FVECTOR q, FVECTOR axis, float angle); +extern void quotanion_rotmatrix(FMATRIX rot, FVECTOR q); extern float degree2radian(float digree); #endif
--- a/schedule.c Thu May 19 16:41:21 2011 +0900 +++ b/schedule.c Thu May 26 14:44:03 2011 +0900 @@ -2,8 +2,8 @@ #include <stdlib.h> #include <string.h> #include <stdbool.h> -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "field.h" #include "car.h" #include "gSprite.h" @@ -11,6 +11,7 @@ #include "game.h" #include "controler.h" #include "camera.h" +#include "carNode.h" //#include "light.h" #include "title_scene.h" #include "game_time.h" @@ -31,7 +32,6 @@ #define SP_SEL_CAR 50 #define SP_SEL_COURSE 80 -//extern Game *game; static void set_schedule(Game *game); static void sche_game_init(Game *game); @@ -52,24 +52,6 @@ -/* --- car.c --- */ -extern void car_update(CarPtr); -/* --- carNode.c */ -extern void carNode_append(CarPtr); -extern void carNode_draw(); -extern void carNode_destroy(); -/* --- fielc.c */ -extern void field_update(CarPtr); -/* --- mytype.c --- */ -extern void wait_init(); -//extern bool wait(double); -extern void time_RaceStart(); -extern double time_RaceTime(); -/* --- linda.c --- */ -extern void linda_env_init(); - - - /* timer */ static int start_time,time_count; static int RUNNIG=0; @@ -106,7 +88,7 @@ static void graphic_init() { - // gSprite_Init(); // グラフィック関連ã®åˆæœŸåŒ– + gSprite_Init(); // グラフィック関連ã®åˆæœŸåŒ– gFont_Init(); // フォント関連ã®åˆæœŸåŒ– } @@ -144,7 +126,7 @@ #ifdef LINDA sche_func = &sche_game_wait; - //set_schedule_assumption(sche_game_wait); + set_schedule_assumption(sche_game_wait); #else set_schedule_assumption(sche_game_opening); #endif @@ -173,7 +155,7 @@ gFont_SetString("CONNECT OK!!", 170, 300); if (game->play_id == 1) { gFont_SetString(" PUSH START ", 170, 400); - // if (pad.st != 1) { goto WAIT_READY; } + //if (pad.st != 1) { goto WAIT_READY; } } set_schedule_assumption(sche_game_opening); @@ -342,7 +324,7 @@ car_update(game->jiki); field_update(game->jiki); - // camera_update(game->jiki->body->transfer); + camera_update(game,game->jiki->body->transfer); // carNode_draw(); gFont_SetStringInt(game->rap, 50, 100); @@ -439,13 +421,13 @@ car_update(game->jiki); field_update(game->jiki); - // carNode_draw(); - // camera_update(game->jiki->body->transfer); - /* - if (pad.st == 1) { + carNode_draw(); + camera_update(game,game->jiki->body->transfer); + + if (true){//pad.st == 1) { set_schedule_assumption(sche_game_main_finish); } - */ + } void
--- a/schedule.h Thu May 19 16:41:21 2011 +0900 +++ b/schedule.h Thu May 26 14:44:03 2011 +0900 @@ -3,7 +3,6 @@ #include "game.h" extern void schedule(Game *game); - /* static void set_schedule(); static void sche_game_init(); @@ -25,4 +24,24 @@ extern void schedule(); extern Game *game; + +/* --- car.c --- */ +extern void car_update(CarPtr); +/* --- carNode.c */ +extern void carNode_append(CarPtr); +extern void carNode_draw(); +extern void carNode_destroy(); +/* --- fielc.c */ +extern void field_update(CarPtr); +/* --- mytype.c --- */ +extern void wait_init(); +//extern bool wait(double); +extern void time_RaceStart(); +extern double time_RaceTime(); +/* --- linda.c --- */ +extern void linda_env_init(); + + + + #endif
--- a/title_scene.c Thu May 19 16:41:21 2011 +0900 +++ b/title_scene.c Thu May 26 14:44:03 2011 +0900 @@ -1,5 +1,5 @@ -//#include "libps2.h" -//#include "ps2util.h" +#include "libps2.h" +#include "ps2util.h" #include "title_scene.h" typedef enum { @@ -9,9 +9,9 @@ } TITLE_STATE; -//static ps2utilSprite title_sprite; +static ps2utilSprite title_sprite; -//static TEXTURE *title_img; +static TEXTURE *title_img; #define TITLE_IMG_FILE "img/title.png" @@ -19,7 +19,7 @@ static void title_init() { - /* + /* load texture */ // title_img = read_png_file( TITLE_IMG_FILE ); @@ -46,9 +46,9 @@ static void title_finish() { - // ps2util_sprite_Destroy( &title_sprite ); - // ps2util_tex_Exclude( title_img ); - // free_texture( title_img ); + ps2util_sprite_Destroy( &title_sprite ); + ps2util_tex_Exclude( title_img ); + free_texture( title_img ); } void @@ -61,7 +61,7 @@ title_scene() { static TITLE_STATE state = TITLE_INIT; - int pad; + //int pad; switch (state) { case TITLE_INIT: