Mercurial > hg > old > magoroku_racing
changeset 90:8edae89a3877
compile on Mac OS X
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 May 2011 16:41:21 +0900 |
parents | aff757cc46d7 |
children | cb6c6de125dc |
files | Linda/lindaapi.h Makefile camera.c camera.h car.c car.h carNode.c col.c col.h controler.c controler.h field.c field.h gFont.c gSprite.c gSprite.h game.c game.h light.c light.h linda.c linda.h main.c mytype.c quotanion.c quotanion.h schedule.c schedule.h title_scene.c |
diffstat | 29 files changed, 819 insertions(+), 1242 deletions(-) [+] |
line wrap: on
line diff
--- a/Linda/lindaapi.h Thu May 19 16:38:44 2011 +0900 +++ b/Linda/lindaapi.h Thu May 19 16:41:21 2011 +0900 @@ -30,25 +30,26 @@ /*---------------------------------------------------------------------- 構造体定義 ----------------------------------------------------------------------*/ -typedef struct psx_reply{ +/*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; +} REPLY, *REPLY_PTR;*/ -typedef struct command_queue{ +/*typedef struct command_queue{ unsigned char *command; struct command_queue *next; unsigned int size; -} COMMAND, *COMMAND_PTR; +} COMMAND, *COMMAND_PTR;*/ /*---------------------------------------------------------------------- 静的関数テンプレート ----------------------------------------------------------------------*/ + int start_linda(char *hostname); void unix_chkserv(); @@ -83,3 +84,18 @@ 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:38:44 2011 +0900 +++ b/Makefile Thu May 19 16:41:21 2011 +0900 @@ -1,26 +1,26 @@ 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 +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 OBJS = ${SRCS:.c=.o} VU1DIR = vu1code -MPGOBJ = mpg.elf +#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/usr/local/include/libps2a \ +#-I/usr/local/include/ps2util \ -I./Linda DEFINES = -DDEBUG -DLINDA DEBUGFLAGS = -Wall -g -LIBPS2ARC = /usr/local/lib/libps2a.a +#LIBPS2ARC = /usr/local/lib/libps2a.a CFLAGS = ${INCLUDES} ${DEFINES} ${DEBUGFLAGS} -LIBS = `xml-config --libs` -lps2util -lpng -lps2a +#LIBS = `xml-config --libs` -lps2util -lpng -lps2a all : ${TARGET} @@ -31,9 +31,12 @@ #${TARGET} : ${OBJS} ${VU1OBJ} # ${CC} -o ${TARGET} ${OBJS} ${LIBS} +#${AR} x ${LIBPS2ARC} ${MPGOBJ} + +#${TARGET} : ${OBJS} +# ${CC} -po ${TARGET} ${OBJS} ${LIBS} ${TARGET} : ${OBJS} - ${AR} x ${LIBPS2ARC} ${MPGOBJ} - ${CC} -o ${TARGET} ${OBJS} ${LIBS} + ${CC} -o ${TARGET} ${OBJS} tag: @@ -50,575 +53,20 @@ makedepend -- ${CFLAGS} -- ${SRCS} ${MAINSRC} # DO NOT DELETE -main.o: /usr/include/stdio.h /usr/include/features.h /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 /usr/include/bits/pthreadtypes.h -main.o: /usr/include/bits/sched.h /usr/include/libio.h -main.o: /usr/include/_G_config.h /usr/include/wchar.h -main.o: /usr/include/bits/wchar.h /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 +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:
--- a/camera.c Thu May 19 16:38:44 2011 +0900 +++ b/camera.c Thu May 19 16:41:21 2011 +0900 @@ -1,22 +1,21 @@ -/* - * $Id$ - */ #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" +//#include "libps2.h" +//#include "ps2util.h" #include "car.h" #include "game.h" #include "controler.h" -extern SGO_PAD pad; +//紊у紊違у掩 +//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; def_camera.xyz[2] =-14; //0; @@ -36,8 +35,12 @@ def_camera.angle[1]=0; //yoh def_camera.angle[2]=0; //roll def_camera.angle[3]=0; + + //def_cameracamera潟 memcpy( &camera, &def_camera, sizeof(CAMERA)); - set_camera(&def_camera); + set_ +camera(&def_camera); + */ } @@ -47,41 +50,43 @@ * <篏臀荀鴻贋 */ void -camera_update(FMATRIX pose) +camera_update(Game *game)//FMATRIX pose) { - FVECTOR location, eyes, vertical, angle; + // 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(def_camera.angle[1]<=0.2){ - def_camera.angle[1]+=0.02; - } + //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; + }*/ } - else if(pad.right>0 && game.jiki->speed !=0){ - 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; + }*/ } 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:38:44 2011 +0900 +++ b/camera.h Thu May 19 16:41:21 2011 +0900 @@ -1,5 +1,2 @@ -/* - * $Id$ - */ -extern void camera_update(FMATRIX); +extern void camera_update(Game);//FMATRIX); extern void camera_init();
--- a/car.c Thu May 19 16:38:44 2011 +0900 +++ b/car.c Thu May 19 16:41:21 2011 +0900 @@ -1,22 +1,21 @@ -/* - * $Id$ - */ #include <stdio.h> #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" +#include <stdbool.h> +//#include "libps2.h" +//#include "ps2util.h" #include "field.h" #include "car.h" #include "mytype.h" #include "quotanion.h" #include "game.h" +#include "stdbool.h" #define DEFAULT_SET (EFFECT_TEXTURE_USE | EFFECT_ALPHABLEND_UNUSE | EFFECT_SHADING_FLAT) #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; @@ -31,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 (malloc_align16(&free_addr, &car, sizeof(Car)) == -1) { - fprintf(main_fp, "car.c: malloc_align16 error\n"); + if (true){//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; @@ -52,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; @@ -82,24 +81,24 @@ float speed_accel, speed_max, brake, rot; char buff[BUFSIZE], *bufp; char carImg[BUFSIZE], texImg[BUFSIZE]; - Bool flag; + bool flag; - flag = FALSE; + flag = false; while ((bufp = fgets(buff, BUFSIZE, fp)) != NULL) { bufp++; switch (buff[0]) { case 'n': - if (flag == FALSE) { + if (flag == false) { sscanf(bufp, " %d\n", &car_id); if (id == car_id) { - flag = TRUE; + flag = true; } } break; case 't': - if (flag == TRUE) { + if (flag == true) { sscanf(bufp, " %s %s %f %f %f %f\n", carImg, texImg, &speed_accel, &speed_max, &rot, &brake); new = car_create(id, carImg, texImg, @@ -141,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,7 +175,7 @@ 潟若鴻絮(紕茵腦)翫 FALSE菴 ---------------------------------*/ -static Bool +static bool car_field_check(CarPtr car) { FieldPtr p; @@ -184,32 +183,32 @@ // 憜潟若鴻ц腦糸紊ゅ p = f; - if (col_detect(&p->colface, car->vertical, car->location) == TRUE) { - goto FIELD_CHECK_OK; + if (true){//(col_detect(&p->colface, car->vertical, car->location) == true) { + goto FIELD_CHECK_OK; } // 憜潟若鴻罨<f・潟若鴻ц腦糸紊ゅ p = f->next; - if (col_detect(&p->colface, car->vertical, car->location) == TRUE) { + if (true){//if (col_detect(&p->colface, car->vertical, car->location) == true) { if (field_rap_increment(1)) { - game.rap++; + game->rap++; } goto FIELD_CHECK_OK; } // 憜潟若鴻f・潟若鴻ц腦糸紊ゅ p = f->prev; - if (col_detect(&p->colface, car->vertical, car->location) == TRUE) { + if (true){//if (col_detect(&p->colface, car->vertical, car->location) == true) { field_rap_increment(-1); goto FIELD_CHECK_OK; } // 潟若剛絮(紕茵腦) - return FALSE; + return false; FIELD_CHECK_OK: field_set_actual(p); - return TRUE; + return true; } @@ -221,14 +220,14 @@ static void car_move(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(car) == false) { + // ps2_vu0_copy_vector(car->location, prev_location); car->speed = car->speed*0.5; } } @@ -237,35 +236,34 @@ 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 @@ -285,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:38:44 2011 +0900 +++ b/car.h Thu May 19 16:41:21 2011 +0900 @@ -1,10 +1,10 @@ -/* - * $Id$ - */ +#ifndef CAR_H +#define CAR_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,9 +13,11 @@ float y_angle; // 茹綺 void *free_addr; struct car *next; - OBJECT* body; + //OBJECT* body; } Car, *CarPtr; extern CarPtr car_init(int id); extern void car_accelerate(CarPtr, int); extern void car_swerve(CarPtr, int); + +#endif
--- a/carNode.c Thu May 19 16:38:44 2011 +0900 +++ b/carNode.c Thu May 19 16:41:21 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 "car.h" #include "game.h" @@ -14,7 +11,7 @@ static CarPtr car_list; void -carNode_append(CarPtr new) +carNode_append(CarPtr new) { CarPtr p = car_list; @@ -26,16 +23,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()
--- a/col.c Thu May 19 16:38:44 2011 +0900 +++ b/col.c Thu May 19 16:41:21 2011 +0900 @@ -1,9 +1,6 @@ -/* - * $Id$ - */ #include <stdio.h> -#include"libps2.h" -#include"ps2util.h" +//#include"libps2.h" +//#include"ps2util.h" #include"col.h" #include"mytype.h" @@ -15,9 +12,11 @@ * p≪筝茹綵≪紊眼TRUE祉 * сFALSE祉紜 */ -static Bool -col_detect_approx(FVECTOR p, FVECTOR v0, FVECTOR v1) -{ + +/* +static 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; @@ -31,16 +30,20 @@ b = (v_r2 * r1_r1 - v_r1 * r1_r2); r = (r1_r1 * r2_r2 - r1_r2 * r1_r2); - return (a>=0 && b>=0 && a+b-r<=0) ? TRUE : FALSE; + return false;//(a>=0 && b>=0 && a+b-r<=0) ? TRUE : FALSE; } +*/ + /** * 綽o膊. pv0, 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); @@ -51,8 +54,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≪茵腦(pdetection face≪綽odetection face @@ -60,24 +63,23 @@ * сTRUE 綽(orthocenter)綽≪羈膩(normal * vector)祉. */ -Bool -col_detect(ColFaceHd* hd, FVECTOR pose, FVECTOR p) + +/* +bool +col_detect(ColFaceHd* hd)//, FVECTOR pose, FVECTOR p) { FVECTOR o, o0; int i; ColFacePtr col_face=hd->colface; for (i=0; i<hd->facenum; i++) { - /* - * 綽o羆 - */ + + // * 綽o羆 col_orthocenter(o, p, col_face[i].p0, col_face[i].normal); - /* - * detection face筝p0綽o吾o0羆 - */ + + // * detection face筝p0綽o吾o0羆 ps2_vu0_sub_vector(o0, o, col_face[i].p0); - /* - * v0, v1鋇茹綵≪o0у紊ゅ(range approx detection)茵 - */ + + // * v0, v1鋇茹綵≪o0у紊ゅ(range approx detection)茵 if (col_detect_approx(o0, col_face[i].v0, col_face[i].v1)==TRUE) { goto NOCOLLISION; } @@ -87,14 +89,20 @@ ps2_vu0_copy_vector(p, o); ps2_vu0_copy_vector(pose, col_face[i].normal); return TRUE; + + return false; } +*/ /* * detection face篏 */ + + void -col_init(ColFaceHd* hd, PolygonInfo* face) +col_init(ColFaceHd* hd)//, PolygonInfo* face) { + /* int i; FVECTOR p1, p2; ColFacePtr colface; @@ -122,4 +130,7 @@ } hd->colface = colface; + */ + } +
--- a/col.h Thu May 19 16:38:44 2011 +0900 +++ b/col.h Thu May 19 16:41:21 2011 +0900 @@ -1,11 +1,11 @@ -/* - * $Id$ - */ +#ifndef COL_H +#define COL_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,5 +14,11 @@ int facenum; } ColFaceHd; -extern void col_init(ColFaceHd* hd, PolygonInfo* face); -extern Bool col_detect(ColFaceHd* hd, FVECTOR pose, FVECTOR p); +extern void col_init(ColFaceHd* hd);//, PolygonInfo* face); +//extern bool col_detect(ColFaceHd* hd); + + +#endif + +//FVECTOR p, FVECTOR v0, FVECTOR v1); +//, FVECTOR pose, FVECTOR p);
--- a/controler.c Thu May 19 16:38:44 2011 +0900 +++ b/controler.c Thu May 19 16:41:21 2011 +0900 @@ -1,20 +1,17 @@ -/* - * $Id$ - */ -#include "libps2.h" -#include "ps2util.h" +//#include "libps2.h" +//#include "ps2util.h" #include "controler.h" +#include <stdbool.h> -SGO_PAD pad; +//SGO_PAD pad; #ifdef DEMO_CREATE extern void setPadValue(int pad); #endif extern int getPadValue(); -Bool -padCheck() -{ +bool padCheck() { + /* int pad1; pad1 = sjoy_get_ps2_button( JOYPAD_1 ); @@ -96,6 +93,8 @@ (pad1 & SJOY_PS2_L2) && (pad1 & SJOY_PS2_R2)) { return FALSE; } + */ - return TRUE; + + return true; }
--- a/controler.h Thu May 19 16:38:44 2011 +0900 +++ b/controler.h Thu May 19 16:41:21 2011 +0900 @@ -1,7 +1,3 @@ -/* - * $Id$ - */ - /* * c帥潟育我 * value = 0: 若 @@ -26,3 +22,4 @@ } SGO_PAD; extern SGO_PAD pad; +
--- a/field.c Thu May 19 16:38:44 2011 +0900 +++ b/field.c Thu May 19 16:41:21 2011 +0900 @@ -3,12 +3,14 @@ */ #include <stdio.h> #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" +#include <stdbool.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 @@ -21,51 +23,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); + // 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); - xml = xml_read_file(colImg); //с潟若鴻莎違贋(綵ゅ) + // xml = xml_read_file(colImg); //с潟若鴻莎違贋(綵ゅ) - if (malloc_align16(&free_addr, &self, sizeof(Field)) == -1) { + if (true){//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; } +//c<с若違鐚сorz鐚 +*/ static void field_new_readCSV(FILE *fp, int id) @@ -75,9 +79,9 @@ 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; + bool flag = false; while ((bufp = fgets(buff, BUFSIZE, fp)) != NULL) { bufp++; @@ -87,7 +91,7 @@ if (!flag) { sscanf(bufp, " %d\n", &course_id); if (id == course_id) { - flag = TRUE; + flag = true; } } else { goto FINISH_LOAD; @@ -96,14 +100,14 @@ case 't': // 鴻c若 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 { @@ -150,19 +154,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) @@ -171,30 +175,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); } } @@ -203,22 +207,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:38:44 2011 +0900 +++ b/field.h Thu May 19 16:41:21 2011 +0900 @@ -1,6 +1,3 @@ -/* - * $Id$ - */ #include "col.h" typedef struct field { @@ -8,10 +5,11 @@ 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(); +
--- a/gFont.c Thu May 19 16:38:44 2011 +0900 +++ b/gFont.c Thu May 19 16:41:21 2011 +0900 @@ -7,8 +7,9 @@ */ #include <stdio.h> #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" +#include <stdbool.h> +//#include "libps2.h" +//#include "ps2util.h" #include "gSprite.h" #define DEFOBJ 120 @@ -19,28 +20,28 @@ #define CHAR_H_SIZE 34 static SpriteTable sptable[DEFOBJ]; -static ps2utilSprite sp[DEFOBJ*2]; // 茵腓冴鴻ゃ鴻帥 +//static ps2utilSprite sp[DEFOBJ*2]; // 茵腓冴鴻ゃ鴻帥 static unsigned int sp_counter; -static Bool flag_spriteInited = FALSE; // 鴻ゃ若 +static bool flag_spriteInited = false; // 鴻ゃ若 -static TEXTURE *font_tex; +//static TEXTURE *font_tex; static void gFont_Init_Png(char *texname) { - if (!(font_tex = read_png_file(texname))) { + /* if (!(font_tex = read_png_file(texname))) { fprintf(stderr, "cannot creat texture - gFont_Init_Png().\n"); fflush(stderr); exit(EXIT_FAILURE); - } + }*/ - if (ps2util_tex_Set(font_tex) == -1) { + /* if (ps2util_tex_Set(font_tex) == -1) { fprintf(stderr, "cannot set texture - gFont_Init_Png().\n"); fflush(stderr); exit(EXIT_FAILURE); - } + }*/ } static void @@ -49,15 +50,15 @@ int i; for (i=0; i<DEFOBJ; i++) { - if (ps2util_sprite_Create(&sp[i], font_tex) == -1) { + /* if (ps2util_sprite_Create(&sp[i], font_tex) == -1) { fprintf(stderr, "cannot create sprite - gFont_Create()\n"); fflush(stderr); exit(EXIT_FAILURE); } - ps2util_sprite_Unuse_alpha(&sp[i]); + ps2util_sprite_Unuse_alpha(&sp[i]);*/ } - flag_spriteInited = TRUE; + flag_spriteInited = true; } static void @@ -90,17 +91,17 @@ static void gFont_PutSprite(int number, int x, int y) { - ps2utilSprite *p = &sp[sp_counter]; + // ps2utilSprite *p = &sp[sp_counter]; - ps2util_sprite_Set_basicAttribute( + /* ps2util_sprite_Set_basicAttribute( p, (ushort)x, (ushort)y, (ushort)sptable[number].tw*1.5, (ushort)sptable[number].th*1.5, (ushort)sptable[number].tx, (ushort)sptable[number].ty, (ushort)sptable[number].tw, (ushort)sptable[number].th, - SPRITE_PRIO_FOREGROUND); + SPRITE_PRIO_FOREGROUND);*/ - ps2util_sprite_Request(p); + // ps2util_sprite_Request(p); sp_counter++; } @@ -111,7 +112,7 @@ int i; for (i=0; i<DEFOBJ; i++) { - sprite_disappear(&sp[i].attribute); + // sprite_disappear(&sp[i].attribute); } sp_counter = 0; } @@ -119,8 +120,8 @@ void gFont_Draw_Reset() { - if (flag_spriteInited == TRUE) { - gFont_Clear(); + if (flag_spriteInited == true) { + gFont_Clear(); } }
--- a/gSprite.c Thu May 19 16:38:44 2011 +0900 +++ b/gSprite.c Thu May 19 16:41:21 2011 +0900 @@ -3,9 +3,10 @@ */ #include <stdio.h> #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" +//#include "libps2.h" +//#include "ps2util.h" #include "gSprite.h" +#include <stdbool.h> #define DEFOBJ 100 #define SPRITE_COL 0x4f @@ -13,11 +14,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) @@ -31,41 +32,42 @@ void gSprite_PutSprite(int number, int x, int y) { - ps2utilSprite *p = &sp[sp_counter]; + // ps2utilSprite *p = &sp[sp_counter]; - ps2util_sprite_Set_basicAttribute( + /* ps2util_sprite_Set_basicAttribute( p, (ushort)x, (ushort)y, (ushort)sptable[number].tw*2, (ushort)sptable[number].th*2, (ushort)sptable[number].tx, (ushort)sptable[number].ty, (ushort)sptable[number].tw, (ushort)sptable[number].th, - SPRITE_PRIO_FOREGROUND); + SPRITE_PRIO_FOREGROUND);*/ - ps2util_sprite_Request(p); + // ps2util_sprite_Request(p); sp_counter++; } void gSprite_PutSpriteEx(int number, int x, int y, float w, float h) { - ps2utilSprite *p = &sp[sp_counter]; + // ps2utilSprite *p = &sp[sp_counter]; - ps2util_sprite_Set_basicAttribute( + /* ps2util_sprite_Set_basicAttribute( p, (ushort)x, (ushort)y, (ushort)sptable[number].tw*w, (ushort)sptable[number].th*h, (ushort)sptable[number].tx, (ushort)sptable[number].ty, (ushort)sptable[number].tw, (ushort)sptable[number].th, - SPRITE_PRIO_FOREGROUND); + SPRITE_PRIO_FOREGROUND);*/ - ps2util_sprite_Request(p); + // ps2util_sprite_Request(p); sp_counter++; } +/* static void gSprite_Init_Png(char *texname) { - if (!(sprite_tex = read_png_file(texname))) { + if (!(sprite_tex = read_png_file(texname))) { fprintf(stderr, "cannot creat texture - init_png().\n"); fflush(stderr); @@ -77,17 +79,19 @@ "cannot set texture - init_png().\n"); fflush(stderr); exit(EXIT_FAILURE); - } + } } +*/ +/* static void gSprite_Create() { int i; for (i=0; i<DEFOBJ; i++) { - if (ps2util_sprite_Create(&sp[i], sprite_tex) == -1) { + if (ps2util_sprite_Create(&sp[i], sprite_tex) == -1) { fprintf(stderr, "cannot create sprite No.%d - create_sprite()\n", i); fflush(stderr); @@ -96,34 +100,38 @@ ps2util_sprite_Unuse_alpha(&sp[i]); } - flag_spriteInited = TRUE; + flag_spriteInited = false; } +*/ -void +/*void gSprite_Init() { - ps2util_graphic_Init(); - gSprite_Init_Png("img/main2.png"); - gSprite_Create(); // 鴻ゃ + // ps2util_graphic_Init(); + // gSprite_Init_Png("img/main2.png"); + // gSprite_Create(); // 鴻ゃ + - /* 鴻ゃ脂 */ - gSprite_DefSprite(10, 1, 1, 512, 666); /* 帥ゃ */ - gSprite_DefSprite(17, 1, 35, 33, 33); /* 御若 */ - gSprite_DefSprite(23, 1, 1, 106, 34); /* 鴻若<若帥 */ - gSprite_DefSprite(24, 51, 40, 18, 20); /* 勆√ */ - gSprite_DefSprite(25, 33, 40, 17, 20); /* 綏√ */ - gSprite_DefSprite(26, 56, 89, 55, 26); /* km/h */ - gSprite_DefSprite(27, 62, 62, 39, 26); /* Rap */ - gSprite_DefSprite(28, 430, 62, 53, 46); /* 1P */ - gSprite_DefSprite(29, 460, 6, 53, 46); /* 2P */ - gSprite_DefSprite(51, 333, 116, 165, 140); /* 御脂≪荵 */ + // 鴻ゃ脂 + gSprite_DefSprite(10, 1, 1, 512, 666); // 帥ゃ + gSprite_DefSprite(17, 1, 35, 33, 33); // 御若 + gSprite_DefSprite(23, 1, 1, 106, 34); // 鴻若<若帥 + gSprite_DefSprite(24, 51, 40, 18, 20); // 勆√ + gSprite_DefSprite(25, 33, 40, 17, 20); // 綏√ + gSprite_DefSprite(26, 56, 89, 55, 26); // km/h + gSprite_DefSprite(27, 62, 62, 39, 26); // Rap + gSprite_DefSprite(28, 430, 62, 53, 46); // 1p + gSprite_DefSprite(29, 460, 6, 53, 46); // 2P + gSprite_DefSprite(51, 333, 116, 165, 140); // 御脂≪荵 gSprite_DefSprite(52, 181, 116, 165, 140); gSprite_DefSprite(53, 12, 116, 165, 140); - gSprite_DefSprite(81, 115, 1, 148, 114); /* 御脂≪潟若 */ + gSprite_DefSprite(81, 115, 1, 148, 114); // 御脂≪潟若 // 綵 (82, 272,...)с篋ょ潟若合亀 gSprite_DefSprite(82, 272, 1, 148, 114); -} +}*/ + +/* static void gSprite_Clear() { @@ -134,7 +142,9 @@ } sp_counter = 0; } +*/ +/* void gSprite_Draw_Reset() { @@ -142,8 +152,11 @@ gSprite_Clear(); } } +*/ +/* void gSprite_PutSprite_Pause() { } +*/
--- a/gSprite.h Thu May 19 16:38:44 2011 +0900 +++ b/gSprite.h Thu May 19 16:41:21 2011 +0900 @@ -8,7 +8,7 @@ int th; } SpriteTable; -extern void gSprite_Init(); +//extern void gSprite_Init(); extern void gSprite_Draw_Reset(); extern void gSprite_PutSprite(int number, int x, int y); extern void gSprite_PutSpriteEx(int number, int x, int y, float w, float h);
--- a/game.c Thu May 19 16:38:44 2011 +0900 +++ b/game.c Thu May 19 16:41:21 2011 +0900 @@ -1,45 +1,45 @@ -/* - * $Id$ - */ - #include <stdio.h> #include <stdlib.h> -#include "libps2.h" -#include "ps2util.h" -#include "controler.h" -#include "lindaapi.h" +#include <stdbool.h> +//#include "libps2.h" +//#include "ps2util.h" +//#include "controler.h" +//#include "linda/lindaapi.h" #include "car.h" #include "game.h" +#include "schedule.h" -/* schedule.c */ -extern void schedule(); /* controler.c */ -extern Bool padCheck(); +//extern Bool padCheck(); /* linda.c */ #ifdef LINDA -extern int linda_init(); +//extern int linda_init(); #else #define linda_init 1 #endif -Game game; - void game_main() { - Bool flg = TRUE; - game.play_id = linda_init(); + Game *game; + bool flg = true; +#ifdef LINDA + game->play_id = linda_init(); +#endif while (1) { - flg = padCheck(); - if (flg == FALSE) { + flg = true;//padCheck(); + if (flg == false) { break; } - schedule(); + schedule(game); #ifdef LINDA psx_sync_n(); #endif } } + + +//ceriummain若潟眼
--- a/game.h Thu May 19 16:38:44 2011 +0900 +++ b/game.h Thu May 19 16:41:21 2011 +0900 @@ -1,6 +1,15 @@ -/* - * $Id$ - */ +#ifndef GAME_H +#define GAME_H + +#include "car.h" +#include "linda/lindaapi.h" + +extern void game_main(); +extern void schedule(); +extern int linda_init(); +extern void psx_sync_n(); + + typedef struct game { CarPtr jiki; @@ -11,4 +20,7 @@ int rap; } Game, *GamePtr; -extern Game game; + +extern Game *game; + +#endif
--- a/light.c Thu May 19 16:38:44 2011 +0900 +++ b/light.c Thu May 19 16:41:21 2011 +0900 @@ -1,17 +1,18 @@ #include <stdio.h> -#include "libps2.h" -#include "light.h" +//#include "libps2.h" +//#include "light.h" -FMATRIX normal_light; -FMATRIX light_color; +//FMATRIX normal_light; +//FMATRIX light_color; +/* void light_init(LIGHT *l) { - /**Three lights in all. - The color of the light of "light0" is color0. - The color of the light of "light1" is color1. - The color of the light of "light2" is color2. - **/ + //Three lights in all. + // The color of the light of "light0" is color0. + // The color of the light of "light1" is color1. + // The color of the light of "light2" is color2. + l->light0[0] = 0.0; l->light0[1] = 0.0; @@ -43,16 +44,19 @@ l->color2[2] = 0.4; l->color2[3] = 1.0; - /*Reflection degree of light*/ +//Reflection degree of light l->ambient[0] = 0.4; l->ambient[1] = 0.4; l->ambient[2] = 0.4; l->ambient[3] = 1.0; } +*/ + /* void light_set(LIGHT *l) { ps2_vu0_normal_light_matrix(normal_light, l->light0, l->light1, l->light2); ps2_vu0_light_color_matrix(light_color, l->color0, l->color1, l->color2, l->ambient); } + */
--- a/light.h Thu May 19 16:38:44 2011 +0900 +++ b/light.h Thu May 19 16:41:21 2011 +0900 @@ -1,2 +1,2 @@ -extern void light_init(LIGHT *l); -extern void light_set(LIGHT *l); +//extern void light_init(LIGHT *l); +//extern void light_set(LIGHT *l);
--- a/linda.c Thu May 19 16:38:44 2011 +0900 +++ b/linda.c Thu May 19 16:41:21 2011 +0900 @@ -1,25 +1,24 @@ -/* - * $Id$ - */ #include <stdio.h> #include <stdlib.h> +#include <stdbool.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 "lindaapi.h" +//#include "Linda/lindaapi.h" #include "linda.h" +//extern void psx_free(unsigned char *); extern void carNode_append(CarPtr); extern FILE *main_fp; static int my_id; static CarPtr linda_carlist[CLIENT_MAX+1]; static int linda_seq[CLIENT_MAX+1]; -static Bool (*sche_func)(int); +static bool (*sche_func)(int); static void set_header(unsigned int data, char *pkt, int offset) @@ -52,7 +51,7 @@ char *packet; unsigned int len = 0; - if (data) len += sizeof(FMATRIX); + // if (data) len += sizeof(FMATRIX); packet = (char*)malloc(PKT_HEADER_SIZE+len); @@ -61,7 +60,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; } @@ -72,10 +71,10 @@ unsigned int course, char *data) { char *pkt; - //char *reply; + char *reply; int len = PKT_HEADER_SIZE; - if (data) len += sizeof(FMATRIX); + // if (data) len += sizeof(FMATRIX); //reply = psx_reply(linda_seq[dest]) /* @@ -110,28 +109,27 @@ 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)); + // memcpy(data, pkt+PKT_DATA_OFFSET, sizeof(FMATRIX)); psx_free(reply); linda_seq[id] = psx_rd(id); } } static void -linda_set_schedule(void *func, int mode) +linda_set_schedule(void *func, int mode, Game *game) { - int id = game.play_id; + int id = game->play_id; linda_seq[id] = psx_in(id); sche_func = func; - send_packet(id, mode, game.car_id, game.course_id, NULL); + send_packet(id, mode, game->car_id, game->course_id, NULL); } -static Bool -linda_sche_wait0(int p) +static bool linda_sche_wait0(int p, Game *game) { int i, flg=0; int mode = 0; - int id = game.play_id; + int id = game->play_id; int connect = 1; // ・膓羝帥若倶 for (i=1; i<=CLIENT_MAX; i++) { @@ -144,33 +142,33 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_wait_ready0, MODE_WAIT_READY); - return TRUE; + linda_set_schedule(linda_sche_wait_ready0, MODE_WAIT_READY,game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_wait1(int p) +static bool +linda_sche_wait1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_WAIT_READY) { - linda_set_schedule(linda_sche_wait_ready1, MODE_WAIT_READY); - return TRUE; + linda_set_schedule(linda_sche_wait_ready1, MODE_WAIT_READY, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_wait_ready0(int p) +static bool +linda_sche_wait_ready0(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; for (i=1; i<=CLIENT_MAX; i++) { @@ -187,34 +185,34 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_opening0, MODE_OPENING); - return TRUE; + linda_set_schedule(linda_sche_opening0, MODE_OPENING,game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_wait_ready1(int p) +static bool +linda_sche_wait_ready1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_OPENING) { - linda_set_schedule(linda_sche_opening1, MODE_OPENING); - return TRUE; + linda_set_schedule(linda_sche_opening1, MODE_OPENING,game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_opening0(int p) +static bool +linda_sche_opening0(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; for (i=1; i<=CLIENT_MAX; i++) { @@ -227,33 +225,33 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_select_car0, MODE_SELECT_CAR); - return TRUE; + linda_set_schedule(linda_sche_select_car0, MODE_SELECT_CAR, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_opening1(int p) +static bool +linda_sche_opening1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_SELECT_CAR) { - linda_set_schedule(linda_sche_select_car1, MODE_SELECT_CAR); - return TRUE; + linda_set_schedule(linda_sche_select_car1, MODE_SELECT_CAR, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_select_car0(int p) +static bool +linda_sche_select_car0(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; for (i=1; i<=CLIENT_MAX; i++) { @@ -266,46 +264,46 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_select_course0, MODE_SELECT_COURSE); - return TRUE; + linda_set_schedule(linda_sche_select_course0, MODE_SELECT_COURSE, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_select_car1(int p) +static bool +linda_sche_select_car1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_SELECT_COURSE) { - linda_set_schedule(linda_sche_select_course1, MODE_SELECT_COURSE); - return TRUE; + linda_set_schedule(linda_sche_select_course1, MODE_SELECT_COURSE, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_select_course0(int p) +static bool +linda_sche_select_course0(int p, Game *game) { int i; int flg, mode; int connect = 1; - int id = game.play_id; + int id = game->play_id; static int course_id = 1; - if (course_id != game.course_id) { - course_id = game.course_id; + if (course_id != game->course_id) { + course_id = game->course_id; linda_seq[id] = psx_in(id); send_packet(id, MODE_SELECT_COURSE, 0, course_id, NULL); - return FALSE; + return false; } for (i=1; i<=CLIENT_MAX; i++) { - if (i == id) continue; + if (i == id) continue; get_packet(i, &flg, &mode, NULL, NULL, NULL); if (flg == 1 && mode == MODE_SELECT_COURSE) { connect++; @@ -315,37 +313,37 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_ready0, MODE_READY); - return TRUE; + linda_set_schedule(linda_sche_ready0, MODE_READY, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_select_course1(int p) +static bool +linda_sche_select_course1(int p, Game *game) { int mode, course_id; get_packet(PLAYER_1P, NULL, &mode, NULL, &course_id, NULL); if (mode == MODE_SELECT_COURSE) { - game.course_id = course_id; - return FALSE; + game->course_id = course_id; + return false; } else if (mode == MODE_READY) { - linda_set_schedule(linda_sche_ready1, MODE_READY); - return TRUE; + linda_set_schedule(linda_sche_ready1, MODE_READY, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_ready0(int p) +static bool +linda_sche_ready0(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; for (i=1; i<=CLIENT_MAX; i++) { @@ -358,33 +356,33 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_main_init, MODE_MAIN_INIT); - return TRUE; + linda_set_schedule(linda_sche_main_init, MODE_MAIN_INIT, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_ready1(int p) +static bool +linda_sche_ready1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_MAIN_INIT) { - linda_set_schedule(linda_sche_main_init, MODE_MAIN_INIT); - return TRUE; + linda_set_schedule(linda_sche_main_init, MODE_MAIN_INIT, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_main_init(int p) +static bool +linda_sche_main_init(int p, Game *game) { int i, flg, mode, car_id; - int id = game.play_id; + int id = game->play_id; int connect = 1; CarPtr car = NULL; @@ -405,21 +403,21 @@ if (p == 1 && connect == CLIENT_MAX) { if (id == PLAYER_1P) - linda_set_schedule(linda_sche_main_ready0, MODE_MAIN_READY); + linda_set_schedule(linda_sche_main_ready0, MODE_MAIN_READY, game); else - linda_set_schedule(linda_sche_main_ready1, MODE_MAIN_READY); - return TRUE; + linda_set_schedule(linda_sche_main_ready1, MODE_MAIN_READY, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_main_ready0(int p) +static bool +linda_sche_main_ready0(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; for (i=1; i<=CLIENT_MAX; i++) { @@ -432,76 +430,76 @@ } if (p == 1 && connect == CLIENT_MAX) { - linda_set_schedule(linda_sche_main, MODE_MAIN); - return TRUE; + linda_set_schedule(linda_sche_main, MODE_MAIN, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_main_ready1(int p) +static bool +linda_sche_main_ready1(int p, Game *game) { int mode; get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL); if (mode == MODE_MAIN) { - linda_set_schedule(linda_sche_main, MODE_MAIN); - return TRUE; + linda_set_schedule(linda_sche_main, MODE_MAIN, game); + return true; } else { - return FALSE; + return false; } } -static Bool -linda_sche_main(int p) +static bool +linda_sche_main(int p, Game *game) { int i, flg, mode; - int id = game.play_id; + int id = game->play_id; int connect = 1; - FMATRIX po; - CarPtr mycar = game.jiki; + // 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;*/ } } } if (p == 1 && connect == CLIENT_MAX) { if (id == PLAYER_1P) - linda_set_schedule(linda_sche_main_ready0, MODE_MAIN_READY); + linda_set_schedule(linda_sche_main_ready0, MODE_MAIN_READY, game); else - linda_set_schedule(linda_sche_main_ready1, MODE_MAIN_READY); - return TRUE; + linda_set_schedule(linda_sche_main_ready1, MODE_MAIN_READY, game); + return true; } else { - return FALSE; + return false; } - return FALSE; + return false; } -Bool -linda_update(int p) +bool +linda_update(int p, Game *game) { return sche_func(p); } @@ -513,7 +511,7 @@ * c罸莠号с... */ static int -linda_jiki_compareLocation() +linda_jiki_compareLocation(Game *game) { float x,y,z; double d; @@ -617,43 +615,43 @@ } if (connect == CLIENT_MAX) { - if (game.state == GAME_WAIT) { + if (game->state == GAME_WAIT) { gFont_SetString("CONNECT OK!!", 170, 300); - if (game.play_id == 1) + if (game->play_id == 1) gFont_SetString(" PUSH START ", 170, 400); } // <<... // ♂ - if (game.play_id == 1) { + if (game->play_id == 1) { // <井腴 if (common_state == GAME_GOAL) { - if (game.state == GAME_FINISH) { - common_state = game.state; + if (game->state == GAME_FINISH) { + common_state = game->state; } else { - game.state = common_state; + game->state = common_state; } } else if (barrier == CLIENT_MAX) { - common_state = game.state; + common_state = game->state; } else { - game.state = common_state; + game->state = common_state; } } else { - if (game.state == GAME_GOAL) { + if (game->state == GAME_GOAL) { if (common_state != GAME_FINISH) { - common_state = game.state; + common_state = game->state; } else { - game.state = common_state; + game->state = common_state; } } else { - game.state = common_state; + game->state = common_state; } } } else { - if (game.state == GAME_WAIT) { + if (game->state == GAME_WAIT) { gFont_SetString("WAITING...", 200, 100); } - game.state = common_state; + game->state = common_state; } if (linda_jiki_compare()) { @@ -668,9 +666,9 @@ // 罩c鴻篁鐚 // 絎茵膓腟羶 // 莨冴馹 - // 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)); + // 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)); } } #endif @@ -689,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; } @@ -707,7 +705,7 @@ int -linda_init() +linda_init(Game *game) { int i; @@ -727,7 +725,7 @@ } else { sche_func = &linda_sche_wait1; } - send_packet(game.play_id, MODE_WAIT, 1, 1, NULL); + send_packet(game->play_id, MODE_WAIT, 1, 1, NULL); return my_id; }
--- a/linda.h Thu May 19 16:38:44 2011 +0900 +++ b/linda.h Thu May 19 16:41:21 2011 +0900 @@ -1,3 +1,8 @@ +#ifndef LINDA_H +#define LINDA_H + + +//#include "linda/lindaapi.h" /* +-------+-------+-------+-----------+ | game | car | course| data | @@ -12,17 +17,6 @@ 若吟IDLinda_IDуゆ linda_seq[i]: 若ID=i */ -#define PKT_MODE_OFFSET 0 -#define PKT_CARID_OFFSET 4 -#define PKT_COURSEID_OFFSET 8 -#define PKT_DATA_OFFSET 12 - -#define PKT_HEADER_SIZE 12 - - -#define CLIENT_MAX 2 -#define LINDA_ASK_ID 65535 -#define LINDA_HOST "firefly.cr.ie.u-ryukyu.ac.jp" #define MODE_INIT 0 #define MODE_WAIT 1 @@ -39,23 +33,49 @@ #define MODE_MAIN_FINISH 12 #define MODE_FINISH 13 - #define PLAYER_1P 1 -static Bool linda_sche_wait0(int); -static Bool linda_sche_wait1(int); -static Bool linda_sche_wait_ready0(int); -static Bool linda_sche_wait_ready1(int); -static Bool linda_sche_opening0(int); -static Bool linda_sche_opening1(int); -static Bool linda_sche_select_car0(int); -static Bool linda_sche_select_car1(int); -static Bool linda_sche_select_course0(int); -static Bool linda_sche_select_course1(int); -static Bool linda_sche_ready0(int); -static Bool linda_sche_ready1(int); -static Bool linda_sche_main_init(int); -static Bool linda_sche_main_init(int); -static Bool linda_sche_main_ready0(int); -static Bool linda_sche_main_ready1(int); -static Bool linda_sche_main(int); +#define CLIENT_MAX 2 +#define LINDA_ASK_ID 65535 +#define LINDA_HOST "firefly.cr.ie.u-ryukyu.ac.jp" + + +#define PKT_MODE_OFFSET 0 +#define PKT_CARID_OFFSET 4 +#define PKT_COURSEID_OFFSET 8 +#define PKT_DATA_OFFSET 12 + +#define PKT_HEADER_SIZE 12 +#include "game.h" +//#include "schedule.h" +#include <stdbool.h> + +extern Game *game; + +static void linda_set_schedule(void *func, int mode, Game *game); +static bool linda_sche_wait0(int p, Game *game); +static bool linda_sche_wait1(int p, Game *game); +static bool linda_sche_wait_ready0(int p, Game *game); +static bool linda_sche_wait_ready1(int p, Game *game); +static bool linda_sche_opening0(int p, Game *game); +static bool linda_sche_opening1(int p, Game *game); +static bool linda_sche_select_car0(int p, Game *game); +static bool linda_sche_select_car1(int p, Game *game); +static bool linda_sche_select_course0(int p, Game *game); +static bool linda_sche_select_course1(int p, Game *game); +static bool linda_sche_ready0(int p, Game *game); +static bool linda_sche_ready1(int p, Game *game); +static bool linda_sche_main_init(int p, Game *game); +//static bool linda_sche_main_init(int p, Game *game); +static bool linda_sche_main_ready0(int p, Game *game); +static bool linda_sche_main_ready1(int p, Game *game); +static bool linda_sche_main(int p, Game *game); + +int linda_int(Game *game); + +extern void psx_id(unsigned char *); +extern void psx_linda(unsigned char *); +extern void psx_sync(unsigned char *); +//unsigned char psx_reply(int seq); + +#endif
--- a/main.c Thu May 19 16:38:44 2011 +0900 +++ b/main.c Thu May 19 16:41:21 2011 +0900 @@ -1,23 +1,20 @@ -/* - * $Id$ - */ #include <stdio.h> -#include "libps2.h" -#include "ps2util.h" +#include "game.h" +//#include "libps2.h" +//#include "ps2util.h" -extern void game_main(); FILE *main_fp; int main(int argc, char* argv[]) { - main_fp = fopen("/dev/stdout", "w"); + /*main_fp = fopen("/dev/stdout", "w"); if (!main_fp) { perror("main"); - } + }*/ game_main(); - ps2util_graphic_Finish(); +// ps2util_graphic_Finish(); return 0; }
--- a/mytype.c Thu May 19 16:38:44 2011 +0900 +++ b/mytype.c Thu May 19 16:41:21 2011 +0900 @@ -3,8 +3,9 @@ */ #include <time.h> #include <stdio.h> -#include "libps2.h" -#include "ps2util.h" +#include <stdbool.h> +//#include "libps2.h" +//#include "ps2util.h" #include "mytype.h" static clock_t start; @@ -20,7 +21,7 @@ * wait_init() * time腱(ゃ腱?)TRUE菴 */ -Bool +bool wait(double time) { clock_t t; @@ -29,10 +30,10 @@ t = clock(); a = (t-start)/(double)CLOCKS_PER_SEC; if (a > time) { - return TRUE; + return true; } - return FALSE; + return false; } void
--- a/quotanion.c Thu May 19 16:38:44 2011 +0900 +++ b/quotanion.c Thu May 19 16:41:21 2011 +0900 @@ -1,7 +1,4 @@ -/* - * $Id$ - */ -#include<libps2.h> +//#include<libps2.h> #include<math.h> #include"mytype.h" @@ -11,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); } /*----------------------- @@ -25,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; @@ -43,6 +40,7 @@ rot[3][1] = 0; rot[3][2] = 0; rot[3][3] = 1; + */ } float
--- a/quotanion.h Thu May 19 16:38:44 2011 +0900 +++ b/quotanion.h Thu May 19 16:41:21 2011 +0900 @@ -1,4 +1,8 @@ -extern void quotanion(FVECTOR q, FVECTOR axis, float angle); -extern void quotanion_rotmatrix(FMATRIX rot, FVECTOR q); +#ifndef COL_H +#define COL_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:38:44 2011 +0900 +++ b/schedule.c Thu May 19 16:41:21 2011 +0900 @@ -1,11 +1,9 @@ -/* - * $Id$ - */ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "libps2.h" -#include "ps2util.h" +#include <stdbool.h> +//#include "libps2.h" +//#include "ps2util.h" #include "field.h" #include "car.h" #include "gSprite.h" @@ -13,15 +11,18 @@ #include "game.h" #include "controler.h" #include "camera.h" -#include "light.h" +//#include "light.h" #include "title_scene.h" #include "game_time.h" #include "schedule.h" +#include "game.h" + + #ifdef LINDA -extern Bool linda_update(int); +bool linda_update(int p, Game *game); #else -#define linda_update(int) TRUE +#define linda_update(change_state, game) true #endif #define MAXCAR 3 // 御醇篏 @@ -30,6 +31,27 @@ #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); +static void sche_game_wait(Game *game); +static void sche_game_wait_ready(Game *game); +static void sche_game_opening(Game *game); +static void sche_game_select_car(Game *game); +static void sche_game_select_course(Game *game); +static void sche_game_ready(Game *game); +static void sche_game_main_init(Game *game); +static void sche_game_main_ready(Game *game); +static void sche_game_main(Game *game); +//static void sche_game_main_pause(Game *game); +static void sche_game_main_goal(Game *game); +static void sche_game_main_finish(Game *game); +static void sche_game_main_finish2(Game *game); + + + + /* --- car.c --- */ extern void car_update(CarPtr); /* --- carNode.c */ @@ -40,7 +62,7 @@ extern void field_update(CarPtr); /* --- mytype.c --- */ extern void wait_init(); -extern Bool wait(double); +//extern bool wait(double); extern void time_RaceStart(); extern double time_RaceTime(); /* --- linda.c --- */ @@ -54,7 +76,7 @@ char raptime[10]; static int ranking = 0; -static LIGHT l; +//static LIGHT l; static int i=0; @@ -75,7 +97,7 @@ } static void -set_schedule() +set_schedule(Game *game) { sche_func = sche_func_assumption; change_state = 0; @@ -84,26 +106,26 @@ static void graphic_init() { - gSprite_Init(); // 違c∫c + // gSprite_Init(); // 違c∫c gFont_Init(); // 潟∫c } static void -play_init() +play_init(Game *game) { - game.jiki = car_init(game.car_id); - carNode_append(game.jiki); - field_init(game.course_id); + game->jiki = car_init(game->car_id); + carNode_append(game->jiki); + field_init(game->course_id); } static void -game_env_init() +game_env_init(Game *game) { - game.car_id = 1; - game.course_id = 1; - game.camera_type = 0; - game.rap = 1; - game.jiki = NULL; + game->car_id = 1; + game->course_id = 1; + game->camera_type = 0; + game->rap = 1; + game->jiki = NULL; ranking = 0; @@ -114,9 +136,9 @@ void -sche_game_init() +sche_game_init(Game *game) { - game_env_init(); + game_env_init(game); graphic_init(); camera_init(); @@ -132,56 +154,58 @@ * 篆≦丈絨 * 若吟・膓障у */ + static void -sche_game_wait() +sche_game_wait(Game *game) { gFont_SetString("WAITING...", 200, 100); set_schedule_assumption(sche_game_wait_ready); } + /** * 篆≦丈絨 * 若吟・膓腆肴若喝冴 */ static void -sche_game_wait_ready() +sche_game_wait_ready(Game *game) { gFont_SetString("CONNECT OK!!", 170, 300); - if (game.play_id == 1) { + 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); -WAIT_READY: + //WAIT_READY: return; } void -sche_game_opening() +sche_game_opening(Game *game) { static int blink_count = 0; - if (game.play_id==1){ + if (game->play_id==1){ if (blink_count < 35) { gFont_SetString("PUSH START !!", 170, 380); } blink_count = (blink_count > 70) ? 0 : blink_count + 1; - if (pad.st != 1) { goto OPENING; } + // if (pad.st != 1) { goto OPENING; } } set_schedule_assumption(sche_game_select_car); -OPENING: + //OPENING: return; /* - if (game.play_id == 1) { + if (game->play_id == 1) { if (title_scene() < 0){ } - } else if (game.play_id == 2) { + } else if (game->play_id == 2) { if (i==0){ title_init_call(); i=1; @@ -191,75 +215,76 @@ } void -sche_game_select_car() +sche_game_select_car(Game *game) { if (i==1){ title_finish_call(); i=2; } - gSprite_PutSpriteEx(SP_SEL_CAR+game.car_id, 190, 200, 1.5, 1.5); - gSprite_PutSprite(24, 460, 300); - gSprite_PutSprite(25, 120, 300); - gFont_SetString("SELECT CAR", 180, 50); - + // gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 190, 200, 1.5, 1.5); + // gSprite_PutSprite(24, 460, 300); + // gSprite_PutSprite(25, 120, 300); + // gFont_SetString("SELECT CAR", 180, 50); + /* if (pad.right == 1) { - game.car_id = - (game.car_id > MAXCAR-1) ? 1 : game.car_id + 1; + game->car_id = + (game->car_id > MAXCAR-1) ? 1 : game->car_id + 1 } if (pad.left == 1) { - game.car_id = - (game.car_id < 2) ? MAXCAR : game.car_id - 1; + game->car_id = + (game->car_id < 2) ? MAXCAR : game->car_id - 1 } - if (game.play_id == 1) - if (pad.circle != 1) { goto SELECT_CAR; } - + if (game->play_id == 1) + if (pad.circle != 1) { goto SELECT_CAR; } + */ - set_schedule_assumption(sche_game_select_course); + set_schedule_assumption(sche_game_select_course); -SELECT_CAR: + //SELECT_CAR: return; } void -sche_game_select_course() +sche_game_select_course(Game *game) { - gSprite_PutSpriteEx(SP_SEL_COURSE+game.course_id, 190, 200, 1.7, 1.8); - gSprite_PutSprite(24, 460, 300); - gSprite_PutSprite(25, 120, 300); + // gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 190, 200, 1.7, 1.8); + // gSprite_PutSprite(24, 460, 300); + // gSprite_PutSprite(25, 120, 300); - gFont_SetString("SELECT COURSE", 150, 50); + // gFont_SetString("SELECT COURSE", 150, 50); - if (game.play_id == 1) { - if (pad.right == 1) { - game.course_id = - (game.course_id > MAXFIELD-1) ? 1 : game.course_id + 1; + if (game->play_id == 1) { + /* if (pad.right == 1) { + game->course_id = + (game->course_id > MAXFIELD-1) ? 1 : game->course_id + 1; goto SELECT_COURSE; } if (pad.left == 1) { - game.course_id = - (game.course_id < 2) ? MAXFIELD : game.course_id - 1; + game->course_id = + (game->course_id < 2) ? MAXFIELD : game->course_id - 1; goto SELECT_COURSE; } if (pad.circle != 1) { goto SELECT_COURSE; } + */ } set_schedule_assumption(sche_game_ready); -SELECT_COURSE: + //SELECT_COURSE: return; } void -sche_game_ready() +sche_game_ready(Game *game) { - static int blink_count = 0; + static int blink_count = 0;// - gSprite_PutSprite(27+game.play_id,265,10); - gSprite_PutSpriteEx(SP_SEL_CAR+game.car_id, 50, 120, 1.5, 1.5); - gSprite_PutSpriteEx(SP_SEL_COURSE+game.course_id, 340, 120, 1.7, 1.8); + gSprite_PutSprite(27+game->play_id,265,10); + gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 50, 120, 1.5, 1.5); + gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 340, 120, 1.7, 1.8); /* 号 */ if (blink_count < 35) { @@ -280,24 +305,24 @@ } void -sche_game_main_init() +sche_game_main_init(Game *game) { - if (!game.jiki) - play_init(); + if (!game->jiki) + play_init(game); RUNNIG=0; set_schedule_assumption(sche_game_main_ready); } static void -sche_game_main_ready() +sche_game_main_ready(Game *game) { gFont_SetString("Loading....", 180, 100); set_schedule_assumption(sche_game_main); } static void -sche_game_main() +sche_game_main(Game *game) { /** begin: dispaly RAP TIME **/ @@ -312,62 +337,65 @@ gFont_SetString(raptime,400,20); /** end: dispaly RAP TIME **/ - light_init(&l); - set_light(&l); + // light_init(&l); + // set_light(&l); - car_update(game.jiki); - field_update(game.jiki); - camera_update(game.jiki->body->transfer); - carNode_draw(); + car_update(game->jiki); + field_update(game->jiki); + // camera_update(game->jiki->body->transfer); + // carNode_draw(); - gFont_SetStringInt(game.rap, 50, 100); + gFont_SetStringInt(game->rap, 50, 100); /* 鴻若<若帥 */ - gSprite_DefSprite(23, 1, 1,(int)(106.0*(game.jiki->speed/game.jiki->speed_max)), 34); + gSprite_DefSprite(23, 1, 1,(int)(106.0*(game->jiki->speed/game->jiki->speed_max)), 34); gSprite_PutSprite(23, 400, 400); /* km/h */ gSprite_PutSprite(26, 470, 350); /* Rap */ gSprite_PutSprite(27, 80, 100); - if (game.rap > MAXRAP) { + if (game->rap > MAXRAP) { ranking = 1; set_schedule_assumption(sche_game_main_goal); } - gFont_SetStringInt((int)(100.0*game.jiki->speed), 380, 350); + gFont_SetStringInt((int)(100.0*game->jiki->speed), 380, 350); - if ((pad.right > 0) && ((game.jiki->speed != 0) || (pad.circle > 0))) { - car_swerve(game.jiki, 1); + /* + if ((pad.right > 0) && ((game->jiki->speed != 0) || (pad.circle > 0))) { + car_swerve(game->jiki, 1); } - if ((pad.left > 0) && ((game.jiki->speed != 0) || (pad.circle > 0))) { - car_swerve(game.jiki, -1); + if ((pad.left > 0) && ((game->jiki->speed != 0) || (pad.circle > 0))) { + car_swerve(game->jiki, -1); } if (pad.circle > 0) { - car_accelerate(game.jiki, 1); + car_accelerate(game->jiki, 1); } if (pad.cross > 0) { - car_accelerate(game.jiki, -1); + car_accelerate(game->jiki, -1); } if (pad.r1 == 1) { - game.camera_type = !game.camera_type; + game->camera_type = !game->camera_type; } if (pad.st == 1) { set_schedule_assumption(sche_game_main_pause); } + */ } +/* void -sche_game_main_pause() +sche_game_main_pause(Game *game) { static int select = 0; - field_update(game.jiki); - carNode_draw(); + field_update(game->jiki); + // carNode_draw(); - if (game.play_id == 1) { - /* 御若 */ + if (game->play_id == 1) { + // 御若 gSprite_PutSprite(17, 100, 190+select*100); gFont_SetString("BACK TO GAME", 200, 200); @@ -376,6 +404,7 @@ gFont_SetString("Pause ...", 200, 200); } + if (pad.circle == 1) { if (select == 0) { set_schedule_assumption(sche_game_main); @@ -387,10 +416,12 @@ } else if (pad.up == 1 || pad.down == 1) { select = !select; } + } +*/ void -sche_game_main_goal() +sche_game_main_goal(Game *game) { /** dispaly TOTAL TIME **/ game_time_set_raptime(raptime,time_count); @@ -406,51 +437,57 @@ gFont_SetString("You Lose...", 200, 250); #endif - car_update(game.jiki); - field_update(game.jiki); - carNode_draw(); - camera_update(game.jiki->body->transfer); + car_update(game->jiki); + field_update(game->jiki); + // carNode_draw(); + // camera_update(game->jiki->body->transfer); + /* if (pad.st == 1) { set_schedule_assumption(sche_game_main_finish); } + */ } void -sche_game_main_finish() +sche_game_main_finish(Game *game) { field_destroy(); carNode_destroy(); - game_env_init(); + game_env_init(game); set_schedule_assumption(sche_game_main_finish2); } void -sche_game_main_finish2() +sche_game_main_finish2(Game *game) { gFont_SetString("GAME OVER ...", 200, 200); + /* if (pad.st == 1) { set_schedule_assumption(sche_game_opening); } + */ } void -schedule() +schedule(Game *game) { - sche_func(); + sche_func(game); - if (linda_update(change_state) == TRUE) - set_schedule(); - else + if (linda_update(change_state, game) == true){ + set_schedule(game); + } + else{ unset_schedule(); + } - wait_sync(); - swap_dbuff(); - sjoy_poll(); + // wait_sync(game); + // swap_dbuff(); + // sjoy_poll(); - ps2util_sprite_Draw(); - gSprite_Draw_Reset(); - gFont_Draw_Reset(); + // ps2util_sprite_Draw(); + // gSprite_Draw_Reset(); + // gFont_Draw_Reset(); }
--- a/schedule.h Thu May 19 16:38:44 2011 +0900 +++ b/schedule.h Thu May 19 16:41:21 2011 +0900 @@ -1,3 +1,10 @@ +#ifndef SCHEDULE_H +#define SCHEDULE_H +#include "game.h" +extern void schedule(Game *game); + + +/* static void set_schedule(); static void sche_game_init(); static void sche_game_wait(); @@ -13,3 +20,9 @@ static void sche_game_main_goal(); static void sche_game_main_finish(); static void sche_game_main_finish2(); +*/ +/* schedule.c */ +extern void schedule(); +extern Game *game; + +#endif
--- a/title_scene.c Thu May 19 16:38:44 2011 +0900 +++ b/title_scene.c Thu May 19 16:41:21 2011 +0900 @@ -1,8 +1,5 @@ -/* - * $Id$ -*/ -#include "libps2.h" -#include "ps2util.h" +//#include "libps2.h" +//#include "ps2util.h" #include "title_scene.h" typedef enum { @@ -12,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" @@ -25,17 +22,19 @@ /* load texture */ - title_img = read_png_file( TITLE_IMG_FILE ); - ps2util_tex_Set( title_img ); + // title_img = read_png_file( TITLE_IMG_FILE ); + // ps2util_tex_Set( title_img ); /* create sprite object */ + /* ps2util_sprite_Create( &title_sprite, title_img ); ps2util_sprite_Set_basicAttribute( &title_sprite, - 0, 0, 650, 500, 0, 0, 512, 256, SPRITE_PRIO_FOREGROUND ); + 0, 0, 650, 500, 0, 0, 512, 256, SPRITE_PRIO_FOREGROUND ); ps2util_sprite_Use_alpha( &title_sprite ); ps2util_sprite_Request( &title_sprite ); + */ } void @@ -47,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 @@ -71,8 +70,8 @@ break; case TITLE_MAIN: - pad = sjoy_get_ps2_button( JOYPAD_1 ); - state = (pad & SJOY_PS2_START) ? TITLE_FINISH : TITLE_MAIN; + // pad = sjoy_get_ps2_button( JOYPAD_1 ); + // state = (pad & SJOY_PS2_START) ? TITLE_FINISH : TITLE_MAIN; break; case TITLE_FINISH: