diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile new file mode 100644 index 00000000..d62f1b10 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile @@ -0,0 +1,16 @@ +CC = i586-mingw32msvc-gcc +CXX = i586-mingw32msvc-++ +RM = rm -f +DEFAULT_CFLAGS = -Wall -O2 -ffast-math -I/usr/i586-mingw32msvc/include/SDL +CFLAGS = $(DEFAULT_CFLAGS) +CXXFLAGS = $(DEFAULT_CFLAGS) +LDFLAGS = -logg -lvorbis -lvorbisenc -lvorbisfile -lsmpeg -lmingw32 -lSDL_gfx -lSDL_mixer -lSDLmain -lSDL -mwindows -mno-cygwin + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o stageselect.o demo.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw new file mode 100644 index 00000000..4accc257 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw @@ -0,0 +1,19 @@ +CC = /usr/bin/arm-linux-gnueabihf-gcc +CXX = /usr/bin/arm-linux-gnueabihf-g++ +RM = rm -f + +CFLAGS = -Wall -O2 `sdl-config --cflags` -Igfx -DHOME_PATH +CXXFLAGS = $(CFLAGS) +LDFLAGS = -lSDL -lSDL_mixer -lm -L/usr/lib/arm-linux-gnueabihf + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o ./gfx/SDL_rotozoom.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm *.o ./gfx/*.o diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0 b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0 new file mode 100644 index 00000000..3cca647a --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0 @@ -0,0 +1,21 @@ +CC = gcc +CXX = g++ +RM = rm -f + +CFLAGS = -Wall -O2 `sdl-config --cflags` -Igfx +CXXFLAGS = $(CFLAGS) +LDFLAGS = -L/lib/arm-linux-gnueabihf/ `sdl-config --libs` -lSDL_mixer -L/lib/arm-linux-gnueabihf/ -lc-2.28 + + + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o ./gfx/SDL_rotozoom.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm *.o diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0.1 b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0.1 new file mode 100644 index 00000000..9060ed58 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gcw0.1 @@ -0,0 +1,19 @@ +CC = gcc +CXX = g++ +RM = rm -f + +CFLAGS = -Wall -O2 `sdl-config --cflags` -Igfx +CXXFLAGS = $(CFLAGS) +LDFLAGS = `sdl-config --libs` -lSDL_mixer + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o ./gfx/SDL_rotozoom.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm *.o diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gp2x b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gp2x new file mode 100644 index 00000000..4ee3771a --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.gp2x @@ -0,0 +1,26 @@ + + +CROSS_COMPILE = C:/devkitGP2X/bin/arm-linux- +SDL_BASE = C:/devkitGP2X/bin/arm-linux- +LDFLAGS = -static + +CC = $(CROSS_COMPILE)gcc +CXX = $(CROSS_COMPILE)g++ +STRIP = $(CROSS_COMPILE)strip + +CFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall -DGP2X +CXXFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall -DGP2X +#LIBS = -L"C:/GP2X/devkitGP2X/lib" -lSDL -lSDL_gfx --start-group -lSDL_ttf -lfreetype -lSDL --end-group -lSDL_gfx -lSDL_image -ljpeg -lpng12 -lz --start-group -lSDL_mixer -lvorbisidec -lmikmod -lsmpeg -lSDL --end-group -lgcc -lm -lc -lexpat -lpthread -ldl +LIBS = `$(SDL_BASE)sdl-config --libs` + +SDLTEST_TARGET = RotateGear.gpe +SDLTEST_OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o stageselect.o demo.o + +all : $(SDLTEST_TARGET) + +$(SDLTEST_TARGET) : $(SDLTEST_OBJS) + $(CXX) $(LDFLAGS) -o $(SDLTEST_TARGET) $(SDLTEST_OBJS) $(LIBS) + $(STRIP) $(SDLTEST_TARGET) + +clean: + rm -f $(ALL_TARGETS) *.o *~ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.linux b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.linux new file mode 100644 index 00000000..1e7d3132 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.linux @@ -0,0 +1,19 @@ +CC = gcc +CXX = g++ +RM = rm -f + +CFLAGS = -Wall -O0 `sdl-config --cflags` -Igfx -DHOME_PATH -g +CXXFLAGS = $(CFLAGS) +LDFLAGS = -lSDL -lSDL_mixer -lm + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o ./gfx/SDL_rotozoom.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm *.o ./gfx/*.o diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.macosx b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.macosx new file mode 100644 index 00000000..cccd61d3 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.macosx @@ -0,0 +1,34 @@ +CC = gcc +CXX = g++ +RM = rm -f +FRAMEWORKS = /Library/Frameworks +DEFAULT_CFLAGS = -Wall -O2 -ffast-math -I$(FRAMEWORKS)/SDL.framework/Headers -I$(FRAMEWORKS)/SDL_mixer.framework/Headers -I./ +CFLAGS = $(DEFAULT_CFLAGS) -DMacOS +CXXFLAGS = $(DEFAULT_CFLAGS) -DMacOS +#LDFLAGS = `sdl-config --libs` +#LDFLAGS = -L/usr/local/mingw32/lib -logg -lvorbis -lvorbisenc -lvorbisfile -lsmpeg -lmingw32 -lSDL_gfx -lSDL_mixer -lSDLmain -lSDL -mwindows -mno-cygwin +LDFLAGS = -Wl,-framework,SDL -Wl,-framework,SDL_mixer -Wl,-framework,Cocoa -L./ -lSDL_gfx NIBless/SDLMain.o + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o stageselect.o demo.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +ifeq ($(wildcard .depend),.depend) +do-it-all: RotateGear +include .depend +else +do-it-all: depend recursive +recursive: + make -f Makefile.macosx +endif + +.PHONY: depend +depend: $(OBJS) + $(CC) -MM $(CFLAGS) $(SOURCES) > .depend + +.PHONY: clean +clean: + $(RM) $(OBJS) *~ .depend RotateGear.exe + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.mingw b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.mingw new file mode 100644 index 00000000..90aa07b1 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.mingw @@ -0,0 +1,19 @@ +CC = i586-mingw32msvc-gcc +CXX = i586-mingw32msvc-g++ +RM = rm -f + +CFLAGS = -Wall -O2 -I/usr/i586-mingw32msvc/include/SDL -DMINGW -DBUILD_DLL +CXXFLAGS = $(CFLAGS) +LDFLAGS = -lmingw32 -lSDLmain -lSDL -lSDL_mixer -mwindows + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o gfx/SDL_rotozoom.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +all: RotateGear.exe + +RotateGear.exe: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) + +clean: + rm *.o ./gfx/*.o diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.pspumode b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.pspumode new file mode 100644 index 00000000..ee434ab3 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.pspumode @@ -0,0 +1,28 @@ +TARGET = ChampyonshippKaitenPatissier +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o demo.o stageselect.o + +BUILD_PRX = 1 +PSP_FW_VERSION = 401 + +CFLAGS = -O2 -G0 -Wall -w -g -Wextra -DPSPUMODE +CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -fno-builtin-printf +ASFLAGS = $(CFLAGS) + +LIBDIR = +LIBS = -L/usr/local/pspsdk/lib +LDFLAGS = + +EXTRA_TARGETS = EBOOT.PBP +PSP_EBOOT_TITLE = Champyonshipp Kaiten Pattisier PSP +PSP_EBOOT_ICON = ICON0.png + +PSPSDK=$(shell psp-config --pspsdk-path) +PSPBIN = $(PSPSDK)/../bin +CFLAGS += -I/usr/local/pspdev/psp/include/SDL +LIBS += $(shell $(PSPBIN)/freetype-config --libs) +LIBS += -lSDL_mixer +LIBS += /usr/local/pspdev/psp/lib/libvorbisidec.a /usr/local/pspdev/psp/lib/libvorbis.a /usr/local/pspdev/psp/lib/libogg.a +LIBS += -L/usr/local/pspdev/psp/lib -lSDL -lSDL_gfx -lm -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet +LIBS += -lSDL_ttf -lfreetype +LIBS += -lpng -ljpeg -lz -lm -lpsppower -lmad -lpspaudio -lpspaudiolib +include $(PSPSDK)/lib/build.mak diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.win b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.win new file mode 100644 index 00000000..f30dcf01 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/Makefile.win @@ -0,0 +1,33 @@ +CC = gcc +CXX = g++ +RM = rm -f +DEFAULT_CFLAGS = -Wall -O2 -ffast-math `sdl-config --cflags` +CFLAGS = $(DEFAULT_CFLAGS) +CXXFLAGS = $(DEFAULT_CFLAGS) +#LDFLAGS = `sdl-config --libs` +LDFLAGS = -L/usr/local/mingw32/lib -logg -lvorbis -lvorbisenc -lvorbisfile -lsmpeg -lmingw32 -lSDL_gfx -lSDL_mixer -lSDLmain -lSDL -mwindows -mno-cygwin + +OBJS = ram.o util_snd.o function.o dconv.o scene.o title.o init.o act.o option.o ending.o logo.o stageselect.o demo.o bush.o + +SOURCES = $(patsubst %.o, %.c, $(OBJS)) + +ifeq ($(wildcard .depend),.depend) +do-it-all: RotateGear +include .depend +else +do-it-all: depend recursive +recursive: + make +endif + +.PHONY: depend +depend: $(OBJS) + $(CC) -MM $(CFLAGS) $(SOURCES) > .depend + + +.PHONY: clean +clean: + $(RM) $(OBJS) *~ .depend RotateGear.exe + +RotateGear: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/RotateGear b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/RotateGear new file mode 100644 index 00000000..f0d344bc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/RotateGear differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.c new file mode 100644 index 00000000..964237c7 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.c @@ -0,0 +1,6820 @@ +#include +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "act.h" +#include "include/dconv.h" +#include "include/general.h" + +// 関数プロトタイプ +void act_main( void ); +void act_init( void ); +void act_relese( void ); +void act_keys( void ); +void fram_set( ); +void jmp_st( ); +void jmp( ); +void idou_l( ); +void idou_r( ); +void cleaer_ankr( long ankr_flag ); +void act_drow( void ); +void save_file_w( ); +void save_file( ); +void clear_save_file( ); +void playerdisp( ); +void bg_disp(); +void bakdisp1(); +void bakdisp2( ); +void bak_make( void ); +void bak_rot( void ); +void wait_scl( long type, long d_num ); +void wait_scl2( long d_num ,long init_x, long init_y ); +void wait_scl3( ); +void snack_counter_disp(); +void minimap_disp( void ); +void mapdisp(); +void bgm_midi( long BgmWavNo ); +void se_wav(long SeWavNo); +void stage_start( ); +void stage_endj( ); +void stage_claer( ); +void stage_end( ); +void end_scl( long s_num ); +void p_shot_set( long type , long muki, long houkou ); +void p_shot_disp( ); +void p_shot_f_set( long x, long y , long type ); +void p_shot_f_disp( ); +void p_shot_f2_set( long x, long y , long muki ); +void p_shot_f2_disp( ); +void item_set( long type, long x, long y, long iti, long g_num ); +long item_sonzai( long map1, long map2 ); +void item_disp( ); +void item_jmp( int i ); +void item_line( void ); +long item_up_Isitem( long item_index ); +long item_up( ); +long item_up2( ); +long item_event( ); +void init_event_set_enm( long event_no , long b_num ); +void init_event_set( long event_no , long b_num ); +void event_set( long event_no , long b_num ); +void event_set_enm( long event_no , long b_num ); +void event_disp( ); +void event_save( ); +void load_save_file( ); +void event_kaihuku( ); +void event_return( ); +void event_warp( ); +void enm_set( long type, long x, long y ); +void enm_set2( long type, long x, long y ,long muki ); +long e_hp( long type ); +void enm_disp(); +void e_move( long i ); +void boss_dead( long x, long y ); +void e_shot_set( long type , long i , long x, long y ); +void e_shot_disp( ); +void enmjmp( long i ); +long map1_item_j( long x, long y ); +long map1_item_j_Isitem( long x, long y, long item_index ); +void kane_set( long x, long y ); +void kane_disp( ); +void k_jmp( long i ); +void p_jump_f_set( long x, long y ); +void p_jump_f_disp( ); +void screen_BackupPlane( ); +void window_disp( ); +void window_keys( ); +long labs( long para ); +void p_mgc_set( long muki , long p3 ); +void p_mgc_disp( ); +void BlendExBltRectW( long plane_no, long x, long y, long sx, long sy, long hx, long hy, long func, long blend ); +void BlendExBltW( long plane_no, long x, long y, long func, long blend ); +void BlendExBltFastW( long plane_no, long x, long y, long func, long blend ); +void replay_input_save( void ); +void replay_input_load( void ); +void replay_file_save_w( void ); +void replay_file_save( long type ); +long replay_file_load( void ); +long GetKyori( long i1, long i2 ); +void rotmap( long rot ); +void rotchangemap( long x1, long y1, long deg, long *x2, long *y2 ); +void rotchange( long x1, long y1, long deg, long *x2, long *y2 ); +void debugdisp( void ); +void mapviwe_keys( void ); + +char string[1024]; +// 変数宣言 +static long scene_exit; +static long sn = 0; /* 場面用変数これを変えることによって描画関数内の処理を変える */ + +static long enm1_parameter[10 * 20] = +{ +/* HP */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0未使用 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 7 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 11 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 12 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 20未使用 */ +}; + +static long enm2_parameter[10 * 20] = +{ +/* HP */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0未使用 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 7 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 20未使用 */ +}; + +static long enm3_parameter[10 * 20] = +{ +/* HP 金 攻撃 属性 相性 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0未使用 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 7 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 20未使用 */ +}; + +static long enm4_parameter[10 * 20] = +{ +/* HP */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0未使用 */ + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1ボス */ + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 */ + 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ + 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 7 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 20未使用 */ +}; + +static long item_data[3] = { 32, 50, 20 }; /* アイテムの情報 サイズ、最大配置個数、1データバッファ数 */ +static long enm_data[3] = { 0, 30, 30 }; /* 敵の情報 予備、最大配置個数、1データバッファ数 */ +static long MapInfo[10] = +{ + 20 * 5 /* 0:マップのxサイズ */ +, 15 * 5 /* 1:マップのyサイズ */ +, ( 20 * 5 ) * 32 /* 2:マップのx表示サイズ */ +, ( 15 * 5 ) * 32 /* 3:マップのy表示サイズ */ +, 20 /* 4:ヘッダデータ部のデータ数 */ +}; +static long char_size[10] = +{ + 32 /* char_size[0] 横幅 */ +, 32 /* char_size[1] 高さ */ +, 10 /* char_size[2] 判定しない幅左(左からドットでカウント) */ +, ( 32 - 10 ) /* char_size[3] 判定しない幅右(左からドットでカウント) */ +, 8 /* char_size[4] アニメーションパターン数 */ +}; + +static long player[50]; /* プレイヤー用バッファ */ + /* player[0] X */ + /* player[1] Y */ + /* player[2] 状態 */ + /* player[3] 向き */ + /* player[4] BMP内の表示位置X */ + /* player[5] BMP内の表示位置Y */ + /* player[6] 掴み中の移動補正X */ + /* player[7] 掴み中の移動補正Y */ + /* player[8] 現在HP */ + /* player[9] 敵を掴んでいる */ + /* player[10] アニメーションフレームカウンタ */ + /* player[11] アニメーションカウンタ */ + /* player[12] アニメーションフレーム指定 */ + /* player[13] ジャンプフレームカウンタ */ + /* player[14] ジャンプカウンタ */ + /* player[15] ミスの場合のX */ + /* player[16] ミスの場合のY */ + /* player[17] 無敵時間 */ + /* player[18] 着地モーション用カウンタ */ + /* player[19] 回転可能か */ + /* player[20] マップの回転角度 */ + /* player[21] マップの回転角度目標 */ + /* player[22] 回転入力のウエイト */ + /* player[23] 回転角度差分 */ + /* player[24] secret item get 表示時間 */ + /* player[25] ボタンをおしてジャンプしたフラグ */ + /* player[26] 長時間落下したフラグ(着地フェクト用) */ + /* player[27] 掴んだときに入力されていたキー */ + /* player[28] 移動床モーション */ + /* player[29] 横ばね吹き飛び中 */ + /* player[30] lastone表示 */ + /* player[31] カットインの表示 */ + /* player[32] カットインの種類 */ + /* player[33] アイテムを押した時の移動量 */ + /* player[34] */ + /* player[35] */ + /* player[36] */ + /* player[37] */ + /* player[38] */ +static long dp_x; /* プレイヤーの表示位置(画面内の相対座標) */ +static long dp_y; /* プレイヤーの表示位置(画面内の相対座標) */ +static long dp_x2 = 80; /* プレイヤーの表示位置(画面内の相対座標) */ +static long demo[10]; +static long map1[10200]; /* ( MapInfo[0] * MapInfo[1] ) + MapInfo[4] 背景用バッファ レイヤー1 */ +static long map2[10200]; /* MapInfo[0] * MapInfo[1] 背景用バッファ レイヤー2 */ +static long mapfile[10200]; /* MapInfo[0] * MapInfo[1] 背景用バッファ レイヤー2 */ +static long map_data[21]; /* ヘッダ情報 */ +static long bak_cnt = 0; /* 背景アニメーション用カウンタ */ +static long bak_alldrow = 0; /* 背景の描画をクリップするか */ +static long d_x = 0; /* 背景表示位置 */ +static long d_y = 0; /* 背景表示位置 */ +static long kamera = 0; +//static long disp_data[60]; /* セーブ一覧 */ +static long next_px = 0; /* 画面切り替え時のキャラ移動対策 */ +static long next_py = 0; + +static long map_rot_info = 0; /* マップの向き */ +#ifdef GP2X +static const long atk_rr1 =30; /* 腕の回転速度 */ +#else +static const long atk_rr1 =5; /* 腕の回転速度 */ +#endif +//long atk_rr = 360 / 32; /* 腕の回転速度 */ + +static long stage = 0; /* ステージ番号 */ +static long secretitemget = 0; /* 隠しアイテムの取得 */ +static long target_save[1024]; + +static long pshot[10 * 10]; /* プレイヤー攻撃用情報 */ +static long pshotf[10 * 40]; /* プレイヤー攻撃用情報 */ +static long pshotf2[10 * 80]; /* プレイヤー攻撃用情報 */ +static long pmshot[20 * 40]; /* プレイヤー攻撃用情報 */ +static long pjumpf[100]; /* プレイヤー攻撃用情報 */ +static long item[20 * 50]; /* アイテム用バッファ */ +static long item_wk[(5*100)+1]; /* 地面 その他のマップ情報 */ +//static long enemy[40 * 20]; /* 敵情報 */ +static long enemy[30 * 30]; /* enm_data[1] * enm_data[2] 敵情報 */ + +static long mgc_e[10 * 20] ; /* MGC表示情報 */ +static long p_ef[1000] ; /* 汎用バッファ(足跡等) */ +//static long life_a[5]; /* HPアニメーション用 */ +static long kane[200]; /* アイテム用バッファ */ + +static long Jump_counts = 0; +static long snack_count = 0; +static long all_snack_count = 0; +static long save_data[512]; /* 保存情報 */ +static long test[5]; +static long rayer[5]; /* 背景スクロール量 */ +static long play_time[5]; +/* リプレイ20分 */ +static long replay[60 * 60 * 10]; /* フレーム*秒*分 */ +static long replay_time = 1; +static long replay_time_MAX = 60 * 60 * 10; /* 最大時間 */ +static long replay_load_key[10]; +static long replay_file_name = 0; +static long replay_save_flag = 0; /* 保存を行うか 1:しない */ +static long rrkey[5]; /* 入力キー方向 */ + +//static long event_buff[100]; +/* event_buff[0] 文字用ウィンドウ表示 */ +/* event_buff[1] 顔表示 */ +/* event_buff[2] キー入力待ち */ +/* event_buff[3] wait */ +/* event_buff[4] 実行イベントバッファポインタ */ +/* event_buff[5] 顔表示 */ +/* event_buff[7] i */ +/* event_buff[8] player[2] */ +/* event_buff[9] player[3] */ +/* event_buff[10] 画面更新 */ +/* event_buff[11] 画面演出 */ + +/* TextLayer( 10 )はイベントで使用(固定) */ +/* プレーン80〜90はイベントで使用 */ +/* wav30はイベントで使用 */ +//static long file_handle = 0 ; +static long one_event = 0; /* 重なって発生するイベントの前回重なっていたかのフラグ */ +//static long start_plyer_disp = 1; /* 開始時に表示するかフラグ */ +//static long start_effct_disp = 0; /* 開始時に効果を表示するかフラグ */ + + +//---------------------------------------------------------------------- +// メイン関数 +void act_main( void ) +{ + long exit_code; + + exit_code = 0; + + act_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + +// act_keys( ); // キー処理 + act_drow( ); // 描画 + + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + act_relese( ); // 終了 +} + +void act_init( void ) +{ + long i; + long x; + long y; + long wk; + long d_num; + + scene_exit = 1; + sn = 0; + bak_cnt = 0; /* 背景アニメーション用カウンタ */ + bak_alldrow = 0; /* 背景の描画をクリップするか */ + d_x = 0; /* 背景表示位置 */ + d_y = 0; /* 背景表示位置 */ + next_px = 0; /* 画面切り替え時のキャラ移動対策 */ + next_py = 0; + stage = 0; /* ステージ番号 */ + Jump_counts = 0; + snack_count = 0; + all_snack_count = 0; + replay_time = 1; + replay_time_MAX = 60 * 60 * 10; /* 最大時間 */ + replay_save_flag = 0; /* 保存を行うか 1:しない */ + one_event = 0; /* 重なって発生するイベントの前回重なっていたかのフラグ */ + map_rot_info = 0; /* マップの向き */ + secretitemget = 0; /* 隠しアイテムの取得 */ + +//#if false + memset( player, 0, sizeof( player ) ); /* プレイヤー用バッファ */ + memset( demo, 0, sizeof( demo ) ); + memset( map1, 0, sizeof( map1 ) ); /* 背景用バッファ レイヤー1 */ + memset( map2, 0, sizeof( map2 ) ); /* 背景用バッファ レイヤー2 */ + memset( map_data, 0, sizeof( map_data ) ); + memset( pshot, 0, sizeof( pshot ) ); /* プレイヤー攻撃用情報 */ + memset( pshotf, 0, sizeof( pshotf ) ); /* プレイヤー攻撃用情報 */ + memset( pshotf2, 0, sizeof( pshotf2 ) ); /* プレイヤー攻撃用情報 */ + memset( pmshot, 0, sizeof( pmshot ) ); /* プレイヤー攻撃用情報 */ + memset( pjumpf, 0, sizeof( pjumpf ) ); /* プレイヤー攻撃用情報 */ + memset( item, 0, sizeof( item ) ); /* アイテム用バッファ */ + memset( item_wk, 0, sizeof( item_wk ) ); /* 地面 その他のマップ情報 */ + memset( enemy, 0, sizeof( enemy ) ); /* 敵情報 */ + memset( mgc_e, 0, sizeof( mgc_e ) ) ; /* MGC表示情報 */ + memset( p_ef, 0, sizeof( p_ef ) ) ; /* 汎用バッファ(足跡等) */ + memset( kane, 0, sizeof( kane ) ); /* アイテム用バッファ */ + memset( save_data, 0, sizeof( save_data ) ); /* 保存情報 */ + memset( test, 0, sizeof( test ) ); + memset( rayer, 0, sizeof( rayer ) ); /* 背景スクロール量 */ + memset( play_time, 0, sizeof( play_time ) ); + memset( replay, 0, sizeof( replay ) ); /* フレーム*秒*分 */ + memset( replay_load_key, 0, sizeof( replay_load_key ) ); + memset( rrkey, 0, sizeof( rrkey ) ); /* 入力キー方向 */ + memset( string, 0, sizeof( string ) ); /* 入力キー方向 */ + memset( target_save, 0, sizeof( target_save ) ); +//#endif + + /* かけら取得情報 */ + ResetGameFlag2(); /* ファイルなし */ +// LoadGameFlag2("save/item_wk.sav"); + for ( i = 0; i <= 500; i++ ) + { + item_wk[i] = gameflag2[i]; + } + + ResetGameFlag2( ); + LoadGameFlag2( "save/work.sav"); + for ( i = 0; i < 512; i++ ) + { + save_data[i] = gameflag2[i]; + } + + LoadFile( "save/target", &target_save[0], sizeof( target_save ) ); + +// player[6] = save_data[8]; /* スキル */ +// player[7] = save_data[7]; /* ハートのかけら所持個数 */ + player[8] = 1; /* HP */ + stage = save_data[2]; + d_num = save_data[3]; /* 画面 */ +// player[3] = save_data[4]; /* 向き */ + gameflag[120] = d_num; + + + player[20] = 0; + player[21] = 0; + player[22] = 1; + + + /* レイヤー1 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", ( int )stage , ( int )1, ( int )d_num ); + if ( 0 == LoadFile( string, map1, sizeof( map1 ) ) ) + { + } + else + { + /* ファイルがない */ + if ( gameflag[132] == 1 ) /* リプレイ */ + { + g_scene = EN_SN_TITLE; /* タイトルへ */ + } + else + { +// gameflag[40] = 5; /* エンディングへ */ + g_scene = EN_SN_ENDING; /* タイトルへ */ + } + sn = 10; + } + for ( i = 0 ; i <= 20 ; i++ ) + { + map_data[i] = map1[i + ( MapInfo[0] * MapInfo[1] )]; + } + + for ( i = 0 ; i < 5 ; i++ ) + { + if ( map_data[11 + i] != 0 ) + { + sprintf(string,"image/bak/%d_256.bmp", ( int )map_data[11 + i] ); +// sprintf(string,"image/bak/%d.bmp", ( long )map_data[11 + i] ); + if ( LoadBitmap(string,110 + i , 0 ) != 0 ) //プレーンナンバー2にシステム用BMPを読み込む + { + ReleaseBitmap(110 + i); + } + } + } + +// if ( gameflag[70] == 1 ) +// { +// gameflag[70] = 0; +// player[0] = save_data[0]; /* X */ +// player[1] = save_data[1]; /* Y */ +// } +// else +// { + player[0] = map_data[9] * 32; + player[1] = ( map_data[10] * 32 ); +// } + if ( gameflag[128] != 0 ) //マップビュー + { + item_set( 1, player[0], player[1], 0, d_num ); + } + + /* レイヤー2 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", ( int )stage , ( int )2, ( int )d_num ); + LoadFile( string, map2, sizeof( map2 ) ); + + /* アイテム配置 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/i%d_%d.map", ( int )stage , ( int )1, ( int )d_num ); +// SetConstParam( "MessageBox", "" , string ); + LoadFile( string, mapfile, sizeof( mapfile ) ); + { + for ( x = 0; x < MapInfo[0] ; x++ ) + { + for ( y = 0; y < MapInfo[1] ; y++ ) + { + if ( mapfile[x + ( y * MapInfo[0] )] != 0 ) + { + if ( mapfile[x + ( y * MapInfo[0] )] == 1 ) + { + //キャラクター + } + else + { + item_set( mapfile[x + ( y * MapInfo[0] )], x * 32, ( ( MapInfo[1] - 1 - y ) * 32 ), x + ( y * MapInfo[0] ), d_num ); + } + } + } + } + } + + + + ResetGameFlag2(); /* ファイルなし */ + sprintf( string,"data/%d/e%d_%d.map", ( int )stage , ( int )1, ( int )d_num ); + LoadFile( string, mapfile, sizeof( mapfile ) ); + + /* 敵配置 */ + for ( x = 0; x < MapInfo[0] ; x++ ) + { + for ( y = 0; y < MapInfo[1] ; y++ ) + { + if ( mapfile[x + ( y * MapInfo[0] )] != 0 ) + { + enm_set( mapfile[x + ( y * MapInfo[0] )], x * 32, ( ( MapInfo[1] - 1 - y ) * 32 ) ); + } + } + } + + player[14] = 10; /* ジャンプカウンタ */ + player[15] = player[0]; + player[16] = player[1]; + player[2] = 0; + + /* for test start */ +// player[7] = 9; +/* + save_data[40] = 1; + save_data[41] = 1; + save_data[42] = 1; + save_data[43] = 1; +*/ + /* for test end */ + +// bak_make( ); + + if ( gameflag[132] == 1 ) + { + if ( 1 != replay_file_load( ) ) + { + /* ファイルが読めなかった */ + g_scene = EN_SN_TITLE; /* タイトルへ */ +// gameflag[40] = 1; + sn = 10; + return; + } + } + else + { + } + + + soundSetVolumeMasterBgm( 100 ); + if ( gameflag[70] == 1 ) + { + if ( + ( ( save_data[3] > 0 ) && ( save_data[3] <= 10 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME02 ); + } + if ( + ( ( save_data[3] > 10 ) && ( save_data[3] <= 20 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME03 ); + } + if ( + ( ( save_data[3] > 20 ) && ( save_data[3] <= 30 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME04 ); + } + if ( + ( ( save_data[3] > 30 ) && ( save_data[3] <= 40 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME05 ); + } + if ( + ( ( save_data[3] > 40 ) && ( save_data[3] <= 50 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME06 ); + } + } + else + { + if ( gameflag[71] == 0 ) + { + if ( + ( ( save_data[3] == 1 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME02 ); + } + if ( + ( ( save_data[3] == 11 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME03 ); + } + if ( + ( ( save_data[3] == 21 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME04 ); + } + if ( + ( ( save_data[3] == 31 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME05 ); + } + if ( + ( ( save_data[3] == 41 ) ) + ) + { + soundPlayBgm( EN_BGM_GAME06 ); + } + } + } + + gameflag[71] = 0; + gameflag[70] = 0; + + if ( gameflag[127] == 1 ) //トータルアタック + { +// sprintf( string[0],"%d", gameflag[135] ); +// MidStr(string[0],6,2,string[1]); + wk = get2keta( gameflag[135] , 1 ); + play_time[0] = play_time[0] + wk; + if ( play_time[0] >= 60 ) + { + play_time[0] = play_time[0] - 60; + play_time[1]++; + } +// sprintf( string[0],"%d", gameflag[135] ); +// MidStr(string[0],4,2,string[1]); + wk = get2keta( gameflag[135] , 100 ); + play_time[1] = play_time[1] + wk; + if ( play_time[1] >= 60 ) + { + play_time[1] = play_time[1] - 60; + play_time[2]++; + } + +// sprintf( string[0],"%d", gameflag[135] ); +// MidStr(string[0],2,2,string[1]); + wk = get2keta( gameflag[135] , 10000 ); + play_time[2] = play_time[2] + wk; + if ( play_time[2] >= 999 ) + { + play_time[2] = 999; + play_time[1] = 59; + play_time[0] = 59; + } + + if ( gameflag[40] == 5 ) + { + if ( gameflag[137] > gameflag[135] ) //トータルアタック クリア時間 + { + gameflag[137] = gameflag[135]; + } + if ( gameflag[138] > gameflag[136] ) //トータルアタック クリアジャンプ + { + gameflag[138] = gameflag[136]; + } + } + } + + + sprintf(string,"image/player/ri%d.bmp", ( int )gameflag[122] ); + LoadBitmap(string,1,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/mgc1.bmp",2,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/atk1.bmp",3,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/atk2.bmp",4,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/player/atkf.bmp",5,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/cutin.bmp",6,true); //プレーンナンバー2にシステム用BMPを読み込む + + sprintf(string,"image/map/map%d_1.bmp", ( int )stage ); + LoadBitmap(string,10,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/map/map%d_2.bmp", ( int )stage ); + LoadBitmap(string,11,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/map/item%d.bmp", ( int )stage ); + LoadBitmap(string,12,true); //プレーンナンバー2にシステム用BMPを読み込む + + + LoadBitmap("image/sys/map_f0.bmp",15,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/map_f1.bmp",16,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/map_f2.bmp",17,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/fonts2.bmp",18,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/sc.bmp",19,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/sys/p_data.bmp",20,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/skill.bmp",21,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/hp.bmp",22,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/hp2.bmp",23,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/sys/pause.bmp",24,true); //プレーンナンバー2にシステム用BMPを読み込む + + /* 25〜30はイベントで使用 */ + + /* 31は画面効果で使用 */ + + LoadBitmap("image/enm/e32.bmp",40,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/enm/e48.bmp",41,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/enm/e64.bmp",42,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/enm/e_shot.bmp",50,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/player/font_d.bmp",51,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/hp.bmp",52,true); //プレーンナンバー2にシステム用BMPを読み込む + + + LoadBitmap("image/sys/menu.bmp",60,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/scl.bmp",61,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/window_item.bmp",62,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/player/arm.bmp",65,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/player/arm2.bmp",66,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/input.bmp",67,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/new.bmp",68,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/new2.bmp",69,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/mini_map.bmp",70,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/stagestart.bmp",71,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/0.bmp",72,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/new3.bmp",73,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/scor.bmp",74,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/houkou.bmp",75,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/sys/waku.bmp",109,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/color.bmp",127,false); + + CreateSurface( 125, 640, 640 ); + SetPalette(127, 125); // パレットの設定 + SetColorKey(125, true ); // カラーキーの設定 +/* + SaveBmp( -1, "bmp1.bmp" ); + SaveBmp( 125, "bmp125.bmp" ); + SaveBmp( 127, "bmp127.bmp" ); +*/ + + CreateSurface( 124, 640 * 5, 480 * 5 ); + SetPalette(127, 124); // パレットの設定 + + if ( gameflag[128] != 0 ) //マップビュー + { + sn = 6; + } + +} + +void act_relese( void ) +{ + long i; + + save_file_w( ); + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } +// soundStopBgm(EN_BGM_GAME01); + +} + + +void act_keys( void ) +{ + long i; + long old_x; + long houkou; + long kakudosa; + + houkou = 0; + kakudosa = 0; + + if ( ( sn == 1 ) || ( sn == 5 ) ) + { + play_time[0] = play_time[0] + 1; + if ( play_time[0] >= 60 ) + { + play_time[0] = 0; + play_time[1] = play_time[1] + 1; + if ( play_time[1] >= 60 ) + { + play_time[1] = 0; + play_time[2] = play_time[2] + 1; + if ( play_time[2] >= 60 ) + { + if ( play_time[2] >= 10 ) + { + play_time[2] = 10; + } + } + } + } + } + if ( gameflag[132] == 0 ) + { + replay_input_save( ); /* リプレイデータ保存 */ + } + else + { + replay_input_load( ); /* リプレイデータ再生 */ + } + replay_time++; + if ( replay_time > replay_time_MAX ) + { + replay_time = replay_time_MAX; /* 最大時間を越えた、保存しない */ + replay_save_flag = 1; /* 保存しない */ + } + + for ( i = 0; i < 5; i++ ) + { + rrkey[i] = 0; /* 入力キー方向 */ + } + + player[17]--; /* 無敵時間 */ + if ( player[17] <= 0 ) + { + player[17] = 0; + } + if ( player[9] == 0 ) + { + jmp( ); + } + + + if ( ( item_up( ) != -1 ) && ( player[14] == 10 ) ) /* アイテムの上に乗っている */ + { + player[1] = item_up( ); + } + + player[19] = 0; // 回転可能かフラグ + + if ( player[2] == 31 ) + { + if ( player[3] == 1 ) + { +// player[0] = player[0] + 3; +// idou_r( ); + } + else + { +// player[0] = player[0] - 3; +// idou_l( ); + } + } + else + { + old_x = player[0]; + + if ( player[9] == 1 ) //回転中 + { + } + else + { + if ( ( ( IsPressKey( gameflag[2] ) ) && ( gameflag[132] == 0 ) ) // 左 + || ( ( replay_load_key[0] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + + player[3] = 1; /* 向き */ + if ( player[2] == 0 ) + { + player[10] = 0; /* アニメーション間隔フレーム設定 */ + player[11] = 0; /* アニメーションカウンタ */ + player[2] = 1; /* 歩き */ + } + else if ( player[2] == 1 ) + { + player[0] = player[0] - 2; /* キャラクター移動 */ + } + else if ( player[2] == 21 ) + { + player[0] = player[0] - 2; /* キャラクター移動 */ + } + + } + else if ( ( ( IsPressKey( gameflag[3] ) ) && ( gameflag[132] == 0 ) ) // 右 + || ( ( replay_load_key[1] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + player[3] = 0; + if ( player[2] == 0 ) + { + player[10] = 0; + player[11] = 0; + player[2] = 1; + } + else if ( player[2] == 1 ) + { + player[0] = player[0] + 2; + } + else if ( player[2] == 21 ) + { + player[0] = player[0] + 2; + } + } + else + { + if ( player[2] == 1 ) + { + player[10] = 0; + player[11] = 0; + player[2] = 0; + } + } + } + + + + if ( player[28] != 0 ) /* 移動床 */ + { + player[0] = player[0] + player[28]; + } + player[28] = 0; + + if ( player[29] > 0 ) /* 移動床 */ + { + player[0] = player[0] + ( player[29] * 1 ); + player[29] = player[29] - 1; + } + else if ( player[29] < 0 ) + { + player[0] = player[0] + ( player[29] * 1 ); + player[29] = player[29] + 1; + } + + /* 前回の位置から移動した */ + if ( old_x > player[0] ) + { + idou_l( ); /* 左移動の壁判定 */ + } + else if ( old_x < player[0] ) + { + idou_r( ); /* 右移動の壁判定 */ + } + player[33] = ( player[0] - old_x ); + + + if ( ( ( IsPressKey( gameflag[0] ) ) && ( gameflag[132] == 0 ) ) + || ( ( replay_load_key[2] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + /* 立ち、歩き */ +// if ( ( player[2] == 0 ) || ( player[2] == 1 ) ) +// { +// item_event( ); +// } + } + else if ( ( ( IsPressKey( gameflag[1] ) ) && ( gameflag[132] == 0 ) ) + || ( ( replay_load_key[3] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + } + + + // スペースキーが押される + if ( ( ( IsPressKey( gameflag[4] ) ) && ( gameflag[132] == 0 ) ) /* 移動速度低下 */ + || ( ( replay_load_key[4] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + if ( player[19] != 0 ) // + { + if ( player[9] == 0 ) + { + soundPlaySe( EN_SE_PAWA ); + sn = 5; + player[20] = 0; + player[21] = 0; + player[22] = 0; + + player[10] = 0; + player[11] = 0; + player[4] = 0; + player[5] = 3; + player[2] = 2; // つかみ + + bak_make( ); + + + if ( player[19] == 1 ) // + { + player[22] = 10; + player[20] = player[21]; + player[21] = player[21] + 90; + } + if ( player[19] == 2 ) // + { + player[22] = 10; + player[20] = player[21]; + player[21] = player[21] - 90; + } + if ( player[21] < 0 ) + { + player[21] = player[21] + 360; + } + if ( player[21] >= 360 ) + { + player[21] = player[21] - 360; + } + + } + player[9] = 1; + } + } + + kakudosa = ( player[21] - player[20] ); // 回転が終了した + if ( kakudosa == 0 ) // 差がない場合は回さない + { + if ( player[9] == 1 ) + { + Jump_counts++; + soundPlaySe( EN_SE_ATK1 ); + rotmap( player[21] ); // 回転 + + player[10] = 0; + player[11] = 0; + player[2] = 0; // ニュートラル + + player[14] = 0; // 落下 + player[13] = 0; + + player[1] = player[1] + 8; // あたり判定が長方形なので浮かせる + + sn = 1; + player[9] = 0; + + switch( player[21] ) + { + case 90: + map_rot_info = map_rot_info - 1; /* マップの向き */ + break; + case 180: + map_rot_info = map_rot_info + 2; /* マップの向き */ + break; + case 270: + map_rot_info = map_rot_info + 1; /* マップの向き */ + break; + default: + break; + } + if ( map_rot_info < 0 ) // 超えた + { + map_rot_info = map_rot_info + 4; + } + if ( map_rot_info > 3 ) // 超えた + { + map_rot_info = map_rot_info - 4; + } + + } + } + else + { + if ( kakudosa == 0 ) // 差がない場合は回さない + { + } + else if ( kakudosa < 0 ) // 目標角度に対して現在地はプラス + { + if ( -180 > kakudosa ) // 180度超えている場合は逆回転 + { + player[20] = player[20] + atk_rr1; + houkou = 1; + } + else + { + player[20] = player[20] - atk_rr1; + houkou = 0; + } + } + else if ( kakudosa > 0 ) // 目標角度に対して現在地はマイナス + { + if ( 180 < kakudosa ) + { + player[20] = player[20] - atk_rr1; + houkou = 0; + } + else + { + player[20] = player[20] + atk_rr1; + houkou = 1; + } + } + // 360度を越えた場合は0度にオフセット + if ( player[20] < 0 ) + { + player[20] = player[20] + 360; + } + if ( player[20] >= 360 ) + { + player[20] = player[20] - 360; + } + } + + //Bが押される + if ( ( ( ( IsPushKey( gameflag[5] ) ) || ( IsPushKey( gameflag[0] ) && ( gameflag[133] == 1 ) ) ) && ( gameflag[132] == 0 ) ) + || ( ( replay_load_key[6] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + if ( player[9] == 0 ) // つかんでいない + { + if ( ( player[2] != 11 ) && ( player[2] != 31 ) && ( player[14] == 10 ) ) /* 地上で攻撃、ダメージじゃない */ + { + if ( + ( ( ( map1_item_j( player[0] + ( char_size[0] / 2 ), player[1] + ( char_size[1] / 2 ) ) >= 100 ) + && ( map1_item_j( player[0] + ( char_size[0] / 2 ), player[1] + ( char_size[1] / 2 ) ) <= 119 ) ) + || ( ( map1_item_j( player[0] + ( char_size[0] / 2 ), player[1] + ( char_size[1] / 2 ) ) >= 200 ) + && ( map1_item_j( player[0] + ( char_size[0] / 2 ), player[1] + ( char_size[1] / 2 ) ) <= 219 ) ) ) + ) + { + } + else + { + soundPlaySe( EN_SE_JUMP ); + /* アイテムに乗っていない場合はそこがリトライ位置 */ + if ( item_up( ) == -1 ) + { + player[15] = player[0]; + player[16] = player[1]; + } + player[10] = 0; + player[11] = 0; + player[2] = 21; /* 空中 */ + player[14] = 5; + player[13] = 0; + player[25] = 1; + jmp_st( ); + } + } + } + } + if ( ( ( IsPressKey( gameflag[5] ) ) && ( gameflag[132] == 0 ) ) + || ( ( replay_load_key[5] == 1 ) && ( gameflag[132] == 1 ) ) ) + { + } + else + { + if ( player[14] == 10 ) + { + } + else + { + if ( ( player[14] > 0 ) && ( player[25] == 1 ) ) /* 途中で落下 */ + { +// player[14] = -1; + } + } + player[25] = 0; + } + + + } + if ( Jump_counts > 99 ) + { + Jump_counts = 99; + } + + /* 12ボタン か Cが押された */ + if ( IsPushKey( gameflag[6] ) ) + { + if ( sn != 5 ) //回転中ではない + { + sn = 4; + demo[0] = 0; + demo[1] = 0; + } + } + + /* スキルショートカットウィンドウ */ + if ( IsPushKey( gameflag[7] ) ) + { + } + + + + if ( player[0] < 0 ) /* 画面左端判定 */ + { + player[0] = 0; + /* + イベント中にsave_data[9]を設定することで、一時的にスクロール不可とする。 + ボス戦などに使用 + */ + if ( save_data[9] == 1 ) /* スクロール不可 */ + { + } + /* アイテムに乗っている場合はスクロールしない */ +/* + else if ( ( stage == 7 ) && ( item_up( ) != -1 ) ) + { + } +*/ + else + { + if ( player[1] <= 460 ) /* キャラクター上方向が画面内 */ + { + if ( map_data[4] == 1 ) /* スクロール情報あり */ + { + wait_scl( 2, map_data[5] ); /* スクロール */ + } + else if ( map_data[4] == 2 ) /* ステージ移動情報あり */ + { + end_scl( map_data[5] ); /* ステージ移動 */ + } + } + } + } + if ( player[0] > ( MapInfo[2] - char_size[0] ) ) /* 画面右端判定 */ + { + player[0] = MapInfo[2] - char_size[0]; + if ( save_data[9] == 1 ) /* スクロール不可 */ + { + } +/* + else if ( ( stage == 7 ) && ( item_up( ) != -1 ) ) + { + } +*/ + else + { + if ( player[1] <= ( MapInfo[1] ) ) + { + if ( map_data[6] == 1 ) + { + wait_scl( 3, map_data[7] ); + } + else if ( map_data[6] == 2 ) + { + end_scl( map_data[7] ); + } + } + } + } + if ( player[1] <= 0 ) /* 画面下 */ + { + if ( save_data[9] == 1 ) /* スクロール不可 */ + { + } + else + { + if ( map_data[2] == 1 ) + { + wait_scl( 1, map_data[3] ); + } + else if ( map_data[2] == 2 ) + { + end_scl( map_data[3] ); + } + } + } + if ( player[1] >= ( MapInfo[3] - char_size[1] ) ) /* 画面上 */ + { + if ( save_data[9] == 1 ) /* スクロール不可 */ + { + } + else + { + if ( map_data[0] == 1 ) + { + wait_scl( 0 , map_data[1] ); + } + else if ( map_data[0] == 2 ) + { + end_scl( map_data[1] ); + } + } + } + +} + +void fram_set( ) +{ + if ( player[2] == 0 ) /* ニュートラル */ + { + player[12] = 10; + } + if ( player[2] == 1 ) /* 歩き */ + { + player[12] = 10; + } + if ( player[2] == 2 ) /* つかみ */ + { + player[12] = 5; + } + if ( player[2] == 11 ) /* 攻撃 */ + { + player[12] = 2; + } + if ( player[2] == 21 ) /* 空中 */ + { + player[12] = 5; + } + if ( player[2] == 31 ) /* やられ */ + { + player[12] = 10; + } + if ( player[2] == 33 ) /* クリア */ + { + player[12] = 10; + } + if ( player[2] == 61 ) /* 上向き */ + { + player[12] = 10; + } +} + + +/* すい中の場合はジャンプ力増加 */ +void jmp_st( ) +{ + long px1 ; + long px2 ; + long py ; + long py2 ; + + px1 = ( player[0] + char_size[2] ) / 32; + px2 = ( player[0] + char_size[3] ) / 32; + py = ( MapInfo[1] - ( ( player[1] + ( char_size[1] - 5 ) ) / 32 ) ); + py2 = ( MapInfo[1] - ( ( player[1] + char_size[1] + ( char_size[1] - 5 ) ) / 32 ) ); + /* 水中判定 */ + + if ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 319 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 319 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 419 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 419 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 318 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 318 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 418 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 418 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 719 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 719 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 718 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 718 ) ) + { +// player[14] = player[14] + 1; /* ジャンプフラグ */ +// if ( player[14] >= 9 ) +// { +// player[14] = 9; +// } + } + else + { + } +} + +/* ジャンプY位置計算 */ +void jmp( ) +{ + long y1; + long px ; + long px1 ; + long px2 ; + long py ; + long py3 ; + + /* ジャンプフレームカウント */ + player[13]++; + if ( player[13] >= 10 ) + { + player[13] = 0; + } + + if ( player[2] == 41 ) /* はしご中 */ + { + player[18] = 0; /* つかみからジャンプ */ + player[28] = 0; /* 流されている */ + + player[14] = 10; + return; + } + + /* 今回の位置 */ + px = ( player[0] + ( char_size[0] / 2 ) ) / 32; + px1 = ( player[0] + char_size[2] ) / 32; + px2 = ( player[0] + char_size[3] ) / 32; +// py = ( 16 - ( ( player[1] + ( char_size[1] - 5 ) ) / 32 ) ); + py = ( MapInfo[1] - ( ( player[1] + ( char_size[1] - 5 ) ) / 32 ) ); + + if ( player[14] == 10 ) /* 地上 */ + { + + /* 100 〜 200は地面 */ + /* 足元が地面ではない */ + if ( ( ( !( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 119 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 119 ) ) ) + && ( !( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 219 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 219 ) ) ) + && ( !( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) ) ) + || ( ( ( player[1] ) % 32 ) != 0 ) ) + { + if ( item_up( ) != -1 ) /* アイテムの上に乗っている */ + { + player[1] = item_up( ); + player[14] = 10; + return; + } + + /* 歩き中なら空中状態へ移行 */ + if ( ( player[2] == 0 ) + || ( player[2] == 1 ) ) + { + player[10] = 0; + player[11] = 0; + player[2] = 21; /* 空中 */ + } + player[14] = -1; /* 落下開始 */ + player[13] = 0; + + if ( player[2] == 31 ) /* ダメージ中 */ + { + } + } + else + { + return; + } + } + else + { + /* 歩き中なら空中状態へ移行 */ + if ( ( player[2] == 0 ) + || ( player[2] == 1 ) ) + { + player[10] = 0; + player[11] = 0; + player[2] = 21; /* 空中 */ + } + player[22] = 0; /* 盾カウンタ */ + } + + /* 10フレームに1回Y座標計算 */ + if ( player[13] == 0 ) + { + player[14] = player[14] - 2; /* ジャンプ力減少 */ + + /* 頂点付近は-1落下開始とする */ + if ( ( player[14] <= 2 ) && ( player[14] > -2 ) ) + { + player[14] = -1; + } + + if ( player[14] < -4 ) /* 最速落下を設定 */ + { + player[14] = -4; + } + + if ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 319 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 319 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 419 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 419 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 318 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 318 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 418 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 418 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 719 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 719 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 718 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 718 ) ) + { + } + } + + /* 水中判定等の背景によって落下速度が変わる場合は判定する */ + /* 今回の位置 */ + y1 = ( ( 0 - player[14] ) * ( 0 - player[14] ) * ( 0 - player[14] ) ); + px1 = ( player[0] + char_size[2] ) / 32; + px2 = ( player[0] + char_size[3] ) / 32; + py = ( MapInfo[1] - ( ( player[1] + ( char_size[1] - 5 ) ) / 32 ) ); + + if ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 319 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 319 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 419 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 419 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 318 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 318 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 418 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 418 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 719 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 719 ) + || ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] == 718 ) || ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] == 718 ) ) + { + if ( player[14] > 0 ) /* 上昇中 */ + { + player[1] = player[1] - ( y1 / 15 ); + } + else + { + player[1] = player[1] - ( y1 / 50 ); + } + } + else + { + + player[1] = player[1] - ( y1 / 20 ); /* Y移動 */ + } + + + /* 落下、上昇可能判定 */ + /* 画面外の場合は行わない */ + if ( player[1] >= ( MapInfo[3] - char_size[1] ) ) + { + return; + } + py3 = ( MapInfo[1] - ( ( player[1] + char_size[1] + 32 ) / 32 ) ); + + /* 落下 */ + if ( player[14] <= 0 ) /* 上り中は判定しない */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 219 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 219 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) ) + { + /* 着地 */ + if ( player[8] > 0 ) /* HPがある場合は効果音を鳴らす */ + { + soundPlaySe( EN_SE_LANDING ); + se_wav( 9 ); + } + if ( ( player[2] != 31 ) && ( player[2] != 32 ) ) /* ダメージ中じゃない */ + { + player[2] = 0; /* 立ち状態へ */ + player[11] = 0; /* アニメーションカウンタクリア */ + } + player[1] = ( ( MapInfo[1] - py ) * 32 ); /* 着地したマスのY座標に合わせる */ + player[14] = 10; /* ジャンプ力を地上に設定 */ + + player[18] = 0; /* つかみからジャンプ */ + player[28] = 0; /* 流されている */ + + p_jump_f_set( player[0], player[1] ); + } + else + { + if ( item_up( ) != -1 ) /* アイテムの上に乗っている */ + { + soundPlaySe( EN_SE_LANDING ); + se_wav( 9 ); + if ( ( player[2] != 31 ) && ( player[2] != 32 ) ) /* ダメージ中じゃない */ + { + player[2] = 0; /* 着地 */ + player[11] = 0; /* アニメーションカウンタクリア */ + } + player[1] = item_up( ); + player[14] = 10; + + player[18] = 0; /* つかみからジャンプ */ + player[28] = 0; /* 流されている */ + + p_jump_f_set( player[0], player[1] ); + } + } + } + else /* 上昇中 */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] <= 219 ) ) + || ( ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] <= 219 ) ) ) + { + /* 頭がぶつかった */ + player[13] = 0; + player[14] = -3; /* 落下 */ + } + else + { + if ( item_up2( ) != -1 ) /* アイテムに頭がぶつかる */ + { + player[1] = item_up2( ); + player[13] = 0; + player[14] = -3; + } + } + } + /* 画面外、下に行った */ + if ( player[1] <= -14 ) + { + if ( map_data[2] == 0 ) /* スクロールしない場合はダメージ */ + { + if ( player[8] > 0 ) /* HPがある */ + { + if ( player[17] == 0 ) /* 無敵時間が無い */ + { + player[17] = 120; /* 無敵時間 */ + player[8] = player[8] - 1;/* ダメージ */ + se_wav( 1 ); /* ダメージ効果音 */ + } + if ( player[8] > 0 ) /* HPがある */ + { + player[0] = player[15]; /* リトライ位置に移動 */ + player[1] = player[16]; + wait_scl2( save_data[3] ,player[0], player[1] ); /* 暗転戻り */ + +// player[13] = 0; +// player[14] = 6; + } + else + { + player[1] = -14; + } + } + else + { + player[1] = -14; + } + } + } + +} + +/* 左方向への移動判定 */ +void idou_l( ) +{ + long px ; + long py1 ; + long py2 ; + long bx ; + long by ; + + long i; + + + /* 今回の位置 */ + /* player[29]横バネ吹き飛び補正 */ + px = ( player[0] + char_size[2] + player[29] ) / 32; + py1 = ( MapInfo[1] - ( ( player[1] + 32 + ( char_size[1] / 2 ) ) / 32 ) ); + py2 = ( MapInfo[1] - ( ( player[1] + 32 + 5 ) / 32 ) ); /* 足より5ドット高い場所を判定する */ + /* 画面外は一番上で判定 */ + if ( player[1] >= ( MapInfo[3] - char_size[1] ) ) + { + py1 = 0; + py2 = 0; + } + + /* 502はしご上 501はしご中 */ + /* 壁に埋まった場合は壁際に移動 */ + if ( ( ( map1[ px + ( ( py1 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px + ( ( py1 ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px + ( ( py2 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px + ( ( py2 ) * MapInfo[0] ) ] <= 299 ) ) ) + { + px = ( player[0] + 16 ) / 32; + player[0] = px * 32 - char_size[2]; + player[29] = 0; + + player[19] = 1; // + } + else + { + + } + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[( i * item_data[2] ) + 3 ] % 100; + by = item[( i * item_data[2] ) + 3 ] / 100; + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] ) < (player[0] + player[29] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + player[29] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + item_data[0] ) ) + && ( (item[2 + ( i * item_data[2] )] ) < (player[1] + char_size[1] - 5 ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + item_data[0] ) ) ) ) + { + if ( + ( by == 3 ) /* 移動不可アイテム */ + || ( by == 6 ) /* 移動不可アイテム */ +// || ( ( by == 10 ) && ( bx == 7 ) ) /* 移動不可アイテム */ + ) + { +// player[0] = item[( i * item_data[2] ) + 1 ] + item_data[0] - char_size[2]; + px = ( player[0] + 16 ) / 32; + player[0] = px * 32 - char_size[2]; + + player[29] = 0; + player[19] = 1; // + } + } + } + } + +} +/* 自分の左右に移動可能か? */ +void idou_r( ) +{ + long px ; + long py1 ; + long py2 ; + long bx ; + long by ; + + long i; + + /* 今回の位置 */ + /* player[29]横バネ吹き飛び補正 */ + px = ( player[0] + char_size[3] + player[29] ) / 32; + py1 = ( MapInfo[1] - ( ( player[1] + 32 + ( char_size[1] / 2 ) ) / 32 ) ); + py2 = ( MapInfo[1] - ( ( player[1] + 32 + 5 ) / 32 ) ); /* 足より5ドット高い場所を判定する */ + /* 画面外は一番上で判定 */ + if ( player[1] >= ( MapInfo[3] - char_size[1] ) ) + { + py1 = 0; + py2 = 0; + } + + /* 502はしご上 501はしご中 */ + if ( ( ( map1[ px + ( ( py1 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px + ( ( py1 ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px + ( ( py2 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px + ( ( py2 ) * MapInfo[0] ) ] <= 299 ) ) ) + { + px = ( player[0] + 16 ) / 32; + player[0] = px * 32 + 9; + player[29] = 0; + + player[19] = 2; + } + else + { + } + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[( i * item_data[2] ) + 3 ] % 100; + by = item[( i * item_data[2] ) + 3 ] / 100; + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] ) < (player[0] + player[29] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + player[29] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + 32 ) ) + && ( (item[2 + ( i * item_data[2] )] ) < (player[1] + char_size[1] - 5 ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + 32 ) ) ) ) + { + if ( + ( by == 3 ) /* 移動不可アイテム */ + || ( by == 6 ) /* 移動不可アイテム */ +// || ( ( by == 10 ) && ( bx == 7 ) ) /* 移動不可アイテム */ + ) + { +// player[0] = item[( i * item_data[2] ) + 1 ] - char_size[3]; + px = ( player[0] + 16 ) / 32; + player[0] = px * 32 + 9; + + player[29] = 0; + player[19] = 2; + } + } + } + + } + +} + +void cleaer_ankr( long ankr_flag ) +{ +} + +void act_drow( void ) +{ + //------------------------------------------------------------- + //変数宣言 + //------------------------------------------------------------- + + //背景クリア +// ClearSecondary(); + + switch( sn ) /* snによって描画するものを変える */ + { + case 0: //開始デモ + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + enm_disp( ); + playerdisp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + stage_start( ); + debugdisp( ); + //----------------------------------------------------------------------------------- + break; + case 1 : //アクション + act_keys( ); + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + kane_disp( ); + enm_disp( ); + e_shot_disp( ); + playerdisp( ); + p_jump_f_disp( ); + p_shot_disp( ); + p_mgc_disp( ); + p_shot_f2_disp( ); + p_shot_f_disp( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + debugdisp( ); /* デバッグ情報 */ + stage_endj( ); + //----------------------------------------------------------------------------------- + break; + case 2 : //クリアデモ + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); +// enm_disp( ); +// e_shot_disp( ); +// jmp( ); +// p_shot_disp( ); +// p_mgc_disp( ); + p_shot_f2_disp( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + stage_claer( ); + playerdisp( ); + debugdisp( ); + //----------------------------------------------------------------------------------- + break; + case 3 : //ゲームオーバー + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + enm_disp( ); + e_shot_disp( ); + jmp( ); + playerdisp( ); + p_shot_disp( ); + p_mgc_disp( ); + p_shot_f2_disp( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + stage_end( ); + debugdisp( ); + //----------------------------------------------------------------------------------- + break; + case 4 : //アイテム + window_keys( ); + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + kane_disp( ); + enm_disp( ); + e_shot_disp( ); + playerdisp( ); + p_jump_f_disp( ); + p_shot_disp( ); + p_mgc_disp( ); + p_shot_f2_disp( ); + p_shot_f_disp( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + window_disp( ); + debugdisp( ); + //----------------------------------------------------------------------------------- + break; + case 5 : //回転 + //----------------------------------------------------------------------------------- + act_keys( ); + bg_disp(); + bak_rot( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + debugdisp( ); /* デバッグ情報 */ + break; + case 6 : //マップビュー + //----------------------------------------------------------------------------------- + mapviwe_keys( ); + bg_disp(); + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + kane_disp( ); + enm_disp( ); + e_shot_disp( ); + playerdisp( ); + p_jump_f_disp( ); + p_shot_disp( ); + p_mgc_disp( ); + p_shot_f2_disp( ); + p_shot_f_disp( ); +// minimap_disp( ); + snack_counter_disp( ); // おやつカウンタ + mapdisp( ); + debugdisp( ); /* デバッグ情報 */ + stage_endj( ); + break; + default : // どの条件にも満たない場合 + + /* 画面切り替え時の表示対策 */ + player[0] = next_px; + player[1] = next_py; + + scene_exit = 0; + break; + } + + if ( gameflag[61] == 0 ) + { + Blt( 109 , -160, -120 ); + } + + //画面の描画 + SDL_Flip( g_screen ); // 描画 + //キー入力検査 + KeyInput(); + +} + +/* 一時ファイル保存 */ +void save_file_w( ) +{ + long i; + + SaveGameFlag("save/config"); + + + ResetGameFlag2( ); +// save_data[7] = player[7]; /* ハートのかけら所持個数 */ + save_data[5] = player[8]; /* HP */ + save_data[2] = stage; + + save_data[0] = player[0]; /* X */ + save_data[1] = player[1]; /* Y */ + save_data[4] = player[3]; /* 向き */ +// save_data[8] = player[6]; /* スキル */ + + for ( i = 0; i < 512; i++ ) + { + gameflag2[i] = save_data[i]; + } + SaveGameFlag2( "save/work.sav"); + + /* アイテム取得情報 */ + ResetGameFlag2(); + for ( i = 0; i < 500; i++ ) + { + gameflag2[i] = item_wk[i]; + } + SaveGameFlag2("save/item_wk.sav"); + +} + + +/**********************************/ +/* プレイヤーの状態決定処理 */ +/**********************************/ + +void playerdisp( ) +{ + long arm_muki; + + arm_muki = 0; + + player[10]++; + if ( player[10] >= player[12] ) + { + player[10] = 0; + + player[11]++; + /* 8パターンで1パターン目に戻る */ + if ( player[11] >= char_size[4] ) + { + player[11] = 0; + if ( player[2] == 21 ) /* 空中 */ + { + player[11] = ( char_size[4] - 1 - 3 ); /* 5に戻す */ + } + if ( player[2] == 11 ) /* 攻撃終了 */ + { + player[2] = 0; + if ( player[14] != 10 ) /* 空中 */ + { + player[2] = 21; + } + } + if ( player[2] == 31 ) /* ダメージ */ + { + player[2] = 0; + if ( player[14] != 10 ) /* 空中 */ + { + player[2] = 21; + } + } + if ( player[2] == 32 ) /* ダウンゲームオーバー */ + { + player[2] = 32; + player[11] = ( char_size[4] - 1 ); /* 最終パターンのまま */ + } + if ( player[2] == 33 ) /* クリア */ + { + player[2] = 33; + player[11] = ( char_size[4] - 1 - 3 ); /* 5に戻す */ + } + } + } + fram_set( ); + + /* 画面相対座標での表示位置 */ + if ( player[3] == 1 ) + { + if ( kamera < 0 ) + { + kamera = 0; + } + kamera = kamera + 1; + if ( kamera > 20 ) + { + kamera = 20; + } + dp_x2 = dp_x2 + ( kamera / 6 ); + if ( dp_x2 > 200 ) + { + dp_x2 = 200; + } + } + else + { + if ( kamera > 0 ) + { + kamera = 0; + } + kamera = kamera - 1; + if ( kamera < -20 ) + { + kamera = -20; + } + dp_x2 = dp_x2 + ( kamera / 6 ); + if ( dp_x2 < 80 ) + { + dp_x2 = 80; + } + } + dp_x2 = 160; +/* + if ( player[0] < dp_x2 ) + { + dp_x = player[0]; + } + else if ( player[0] >= ( MapInfo[2] - ( 320 - dp_x2 ) ) ) + { + dp_x = player[0] - ( MapInfo[2] - 320 ); + } + else + { + dp_x = dp_x2; + } +*/ + dp_x = dp_x2 - 16; +// dp_x = 160 - 16; +/* + if ( player[1] < 100 ) + { + dp_y = player[1]; + } + else if ( player[1] >= ( MapInfo[3] - 140 ) ) + { + dp_y = player[1] - ( MapInfo[3] - 240 ); + } + else + { + dp_y = 100; + } +*/ + dp_y = 120 - 16; +// dp_y = ( 120 - 16 ); + + if ( player[2] == 0 ) + { + player[4] = 0; + player[5] = 0; + } + if ( player[18] > 0 ) /* 着地モーション表示 */ + { + player[18]--; + } + if ( player[2] != 0 ) + { + player[18] = 0; + } + else + { + } + + + if ( player[2] == 1 ) /* 歩き */ + { + player[4] = 0; + player[5] = 1; + } + if ( player[2] == 2 ) /* つかみ */ + { + player[4] = 0; + player[5] = 3; + } + if ( player[2] == 11 ) + { + player[4] = 0; + player[5] = 3; + } + if ( player[2] == 21 ) + { + player[4] = 0; + player[5] = 2; + if ( player[14] < 0 ) /* 落ちてる */ + { + player[5] = 7; + } + } + if ( player[2] == 31 ) /* ダメージ */ + { + player[4] = 0; + player[5] = 5; + + } + if ( player[2] == 32 ) /* ゲームオーバー */ + { + player[4] = 0; + player[5] = 5; + + } + if ( player[2] == 33 ) /* クリア */ + { + player[4] = 0; + player[5] = 8; + + } + + if ( gameflag[128] == 0 ) //マップビューではない + { + if ( ( player[17] % 2 ) == 0 ) + { + BltRect( 1, + dp_x, + 240 - dp_y - char_size[1], + ( player[11] * char_size[0] ) + ( player[4] * ( char_size[0] * char_size[4] ) ), + ( player[5] * ( char_size[1] * 2 ) ) + ( player[3] * char_size[1] ), + char_size[0], + char_size[1] ); + } + if ( player[30] > 0 ) + { + player[30]--; + BltRect( 18, dp_x - 30, 240 - dp_y + 4, 0, 160, 100, 8 ); /* last one */ + } + if ( player[24] > 0 ) + { + player[24]--; + BltRect( 18, dp_x - 30, 240 - dp_y + 4 + 10, 0, 184, 200, 16 ); /* secret item get */ + } + + + switch ( player[19] ) + { + case 1: + BltRect( 5, + dp_x - 32, + 240 - dp_y - char_size[1], + 0, + 80, + 32, + 32 ); + break; + case 2: + BltRect( 5, + dp_x + 32, + 240 - dp_y - char_size[1], + 32, + 80, + 32, + 32 ); + break; + default: + break; + } + } +} +//------------------------------------------------------------- +//背景表示 +void bg_disp() +{ + long x; + long y; + long b_x; + long b_y; + long i; + + x = 0; + y = 0; + b_x = 0; + b_y = 0; + i = 0; + + if ( gameflag[67] == 1 ) + { + rayer[0] = rayer[0] + 1; + if ( rayer[0] > 640 ) + { + rayer[0] = rayer[0] - 640; + } + rayer[1] = rayer[1] + 2; + if ( rayer[1] > 640 ) + { + rayer[1] = rayer[1] - 640; + } + rayer[2] = rayer[2] + 4; + if ( rayer[2] > 640 ) + { + rayer[2] = rayer[2] - 640; + } + } + + //画面背景を画面全体に転送 + bak_cnt = bak_cnt + 1; + if ( bak_cnt >= 40 ) + { + bak_cnt = 0; + } + +/* + if ( player[0] < dp_x2 ) + { + d_x = 0; + } + else if ( player[0] >= ( MapInfo[2] - ( 320 - dp_x2 ) ) ) + { + d_x = ( MapInfo[2] - 320 ); + } + else + { + d_x = player[0] - dp_x2 ; + } +*/ + d_x = player[0] - dp_x2 + 16 ; +/* + if ( player[1] < ( 100 ) ) + { + d_y = ( MapInfo[3] - 240 ); + } + else if ( player[1] >= ( MapInfo[3] - 140 ) ) + { + d_y = 0 ; + } + else + { + d_y = ( MapInfo[3] - 240 ) + 100 - player[1]; + } +*/ + d_y = ( MapInfo[3] - 240 ) + ( 120 - 16 ) - player[1]; +// d_y = ( 360 - 16 ) - player[1]; + + /* 背景アニメーションON */ + Blt( 112, 0, 0 ); /* 背景スクロール演出 */ +// Blt( 110, 0 - rayer[0] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +// Blt( 110, 640 - rayer[0] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +// Blt( 111, 0 - rayer[1] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +// Blt( 111, 640 - rayer[1] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +// Blt( 112, 0 - rayer[2] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +// Blt( 112, 640 - rayer[2] - d_x, 0 - d_y ); /* 背景スクロール演出 */ +} +void bakdisp1() +{ + long x; + long y; + long b_x; + long b_y; + long i; + + x = 0; + y = 0; + b_x = 0; + b_y = 0; + i = 0; + + /* stage13,14,17は多重スクロール */ + /* 地面表示 */ + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + + if ( ( ( ( d_x - 32 ) <= ( x * 32 ) ) + && ( ( d_y - 32 ) <= ( y * 32 ) ) + && ( ( d_x + 320 + 32 ) >= ( x * 32 ) ) + && ( ( d_y + 240 + 32 ) >= ( y * 32 ) ) ) + || ( bak_alldrow == 1 ) /* 背景の描画をクリップするか */ + ) + { + b_y = map1[ x + ( y * MapInfo[0] ) ] / 100; + b_x = map1[ x + ( y * MapInfo[0] ) ] % 100; + if ( ( map1[ x + ( y * MapInfo[0] ) ] >= 100 ) && ( map1[ x + ( y * MapInfo[0] ) ] <= 219 ) ) + { + BltRect( 10, ( x * 32 ) - d_x , ( y * 32 ) - d_y , 0 * 32 , 0 * 32 ,32, 32 ); + } + else + { + if ( b_y == 1 ) + { + BltRect( 10, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 5 + map_rot_info ) * 32 ,32, 32 ); + } + if ( b_y == 3 ) + { + BltRect( 10, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 9 + map_rot_info ) * 32 ,32, 32 ); + } + } + } + } + } + +} +void bakdisp2( ) +{ + long i; + long x; + long y; + long b_x; + long b_y; + + i = bak_cnt / 10; + + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + + if ( ( ( ( d_x - 32 ) <= ( x * 32 ) ) + && ( ( d_y - 32 ) <= ( y * 32 ) ) + && ( ( d_x + 320 + 32 ) >= ( x * 32 ) ) + && ( ( d_y + 240 + 32 ) >= ( y * 32 ) ) ) + || ( bak_alldrow == 1 ) /* 背景の描画をクリップするか */ + ) + { + + if ( ( map1[ x + ( y * MapInfo[0] ) ] >= 100 ) && ( map1[ x + ( y * MapInfo[0] ) ] <= 219 ) ) + { + b_y = map1[ x + ( y * MapInfo[0] ) ] / 100; + b_x = map1[ x + ( y * MapInfo[0] ) ] % 100; + if ( b_y == 1 ) + { + BltRect( 10, ( x * 32 ) - d_x , ( y * 32 ) - d_y , ( b_x + ( ( map_data[13] - 1) * 2 ) ) * 32 , ( 5 + map_rot_info ) * 32 ,32, 32 ); + } + if ( b_y == 3 ) + { + BltRect( 10, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 9 + map_rot_info ) * 32 ,32, 32 ); + } + + b_y = map2[ x + ( y * MapInfo[0] ) ] / 100; + b_x = map2[ x + ( y * MapInfo[0] ) ] % 100; + if ( b_y == 1 ) + { + BltRect( 11, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 5 + map_rot_info ) * 32 ,32, 32 ); + } + if ( b_y == 3 ) + { + BltRect( 11, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 9 + map_rot_info ) * 32 ,32, 32 ); + } + } + else + { + b_y = map2[ x + ( y * MapInfo[0] ) ] / 100; + b_x = map2[ x + ( y * MapInfo[0] ) ] % 100; + if ( b_y == 1 ) + { + BltRect( 11, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 5 + map_rot_info ) * 32 ,32, 32 ); + } + if ( b_y == 3 ) + { + BltRect( 11, ( x * 32 ) - d_x , ( y * 32 ) - d_y , b_x * 32 , ( 9 + map_rot_info ) * 32 ,32, 32 ); + } + } + } + } + } +} + +void bak_make( void ) +{ + + long bak_d_x; + long bak_d_y; + + + SwapToSecondary( 125 ); + + SDL_Rect rect; + rect.x = 0; + rect.y = 0; + rect.w = 640; + rect.h = 640; + SDL_FillRect(g_screen, &rect, SDL_MapRGBA(g_screen->format,16,99,62,255)); + + bak_d_x = d_x; + bak_d_y = d_y; + + d_x = d_x - 160 ; + d_y = d_y - 200; + + bak_alldrow = 1; /* 背景の描画をクリップするか */ + + bakdisp1( ); + bakdisp2( ); + item_disp( ); + item_line( ); + kane_disp( ); + enm_disp( ); + e_shot_disp( ); + BltRect( 1, 320 - 16, 288 + 16 , ( player[11] * 32 ) + ( player[4] * 320 ), ( player[5] * 64 ) + ( player[3] * 32 ), 32, 32 ); + p_jump_f_disp( ); + p_shot_disp( ); + p_mgc_disp( ); + p_shot_f2_disp( ); + p_shot_f_disp( ); + + SwapToSecondary( 125 ); + + bak_alldrow = 0; /* 背景の描画をクリップするか */ + + d_x = bak_d_x; + d_y = bak_d_y; + +// SaveBmp( 125, "temp.bmp" ); + +} +void bak_rot( void ) +{ + BltRectRotZoom( 125, 160, 120, 0, 0, 640, 640, player[20], 1, 0 ); +} + + + +/* WAITつきスクロール */ +void wait_scl( long type, long d_num ) +{ +/* + 0:上 1:下 2:左 3:右 + よみこむファイルNO +*/ + long i; + long x; + long y; + + se_wav( 14 ); + screen_BackupPlane( ); + + /* バッファクリア */ + for ( i = 0; i < 100; i++ ) + { + p_ef[i * 5] = 0; /* 存在 */ + } + for ( i = 0; i < 40; i++ ) + { + pmshot[i * 20 + 2] = 0; /* 存在 */ + } + for ( i = 0; i < 10; i++ ) + { + pshot[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 40; i++ ) + { + pshotf[i * 10 + 0] = 0 ; + } + /* バッファクリア */ + for ( i = 0; i < 50; i++ ) + { + item[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 20; i++ ) + { + enemy[i * 20 + 0] = 0 ; /* 存在してない */ + } + for ( i = 0; i < 20; i++ ) + { + mgc_e[i * 10 + 0] = 0 ; /* 存在してない */ + } + for ( i = 0; i < 20; i++ ) + { + kane[i * 10 + 0] = 0 ; /* 存在してない */ + } + + /* 次画面バッファ読み込み */ +/* + for ( i = 0 ; i < 2 ; i++ ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } + DisableBackupPlane(); // バックアッププレーンの使用終了 + + for ( j = 0 ; j < 2; j++ ) + { + ClearSecondary(); + halt; + } +*/ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2(string); + { + for ( i = 0; i <= 319; i++ ) + { + map1[i] = gameflag2[i]; + } + } + for ( i = 0 ; i <= 20 ; i++ ) + { + map_data[i] = gameflag2[i + 320]; + } + + for ( i = 0 ; i < 5 ; i++ ) + { + sprintf(string,"image/bak/%d.bmp", (int)map_data[11 + i] ); + + if ( ( i == 0 ) || ( map_data[11 + i] != 0 ) ) + { + LoadBitmap(string,110 + i , 0 ); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + ReleaseBitmap(110 + i); + } + } + + + + /* レイヤー2 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)2, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( i = 0; i <= 319; i++ ) + { + map2[i] = gameflag2[i]; + } + } +// bak_make(); + + + /* アイテム配置 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/i%d_%d.map", (int)stage , (int)1, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { + item_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16, x + ( y * 20 ), d_num ); + } + } + } + } + + ResetGameFlag2(); /* ファイルなし */ + sprintf( string,"data/%d/e%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2( string ); /* 敵配置 */ + /* 敵配置 */ + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { + enm_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16 ); + } + } + } + + save_data[3] = d_num; + + /* 上スクロール */ + if ( type == 0 ) + { + player[1] = 0; + } + /* 下スクロール */ + if ( type == 1 ) + { + player[1] = ( 480 - 32 - 16 ); + } + /* 横スクロール */ + if ( type == 3 ) + { + player[0] = 0; + } + /* 横スクロール */ + if ( type == 2 ) + { + player[0] = ( 640 - 32 ); + } + + +/* + screen_BackupPlane( ); + + for ( i = 2 ; i >= 0 ; i-- ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } + DisableBackupPlane(); // バックアッププレーンの使用終了 +*/ + /* リトライ場所設定 */ + player[15] = player[0]; + player[16] = player[1]; + + player[9] = 0; /* 掴んでいる敵は消える */ + +} + +/* WAITつきスクロール */ +void wait_scl2( long d_num ,long init_x, long init_y ) +{ +/* + 0:上 1:下 2:左 3:右 + よみこむファイルNO +*/ + long i; + long x; + long y; + +// se_wav( 14 ); +// screen_BackupPlane( ); + + /* バッファクリア */ + for ( i = 0; i < 100; i++ ) + { + p_ef[i * 5] = 0; /* 存在 */ + } + for ( i = 0; i < 40; i++ ) + { + pmshot[i * 20 + 2] = 0; /* 存在 */ + } + for ( i = 0; i < 10; i++ ) + { + pshot[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 40; i++ ) + { + pshotf[i * 10 + 0] = 0 ; + } + /* バッファクリア */ + for ( i = 0; i < 50; i++ ) + { + item[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 20; i++ ) + { + enemy[i * 20 + 0] = 0 ; /* 存在してない */ + } + for ( i = 0; i < 20; i++ ) + { + mgc_e[i * 10 + 0] = 0 ; /* 存在してない */ + } + for ( i = 0; i < 20; i++ ) + { + kane[i * 10 + 0] = 0 ; /* 存在してない */ + } + + /* 次画面バッファ読み込み */ +/* + for ( i = 0 ; i < 2 ; i++ ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } + DisableBackupPlane(); // バックアッププレーンの使用終了 + + for ( j = 0 ; j < 2; j++ ) + { + ClearSecondary(); + halt; + } +*/ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2(string); + { + for ( i = 0; i <= 319; i++ ) + { + map1[i] = gameflag2[i]; + } + } + for ( i = 0 ; i <= 20 ; i++ ) + { + map_data[i] = gameflag2[i + 320]; + } + + for ( i = 0 ; i < 5 ; i++ ) + { + sprintf(string,"image/bak/%d.bmp", (int)map_data[11 + i] ); + + if ( ( i == 0 ) || ( map_data[11 + i] != 0 ) ) + { + LoadBitmap(string,110 + i , 0 ); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + ReleaseBitmap(110 + i); + } + } + + + + /* レイヤー2 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)2, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( i = 0; i <= 319; i++ ) + { + map2[i] = gameflag2[i]; + } + } +// bak_make(); + + + /* アイテム配置 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/i%d_%d.map", (int)stage , (int)1, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { + item_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16, x + ( y * 20 ), d_num ); + } + } + } + } + + ResetGameFlag2(); /* ファイルなし */ + sprintf( string,"data/%d/e%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2( string ); /* 敵配置 */ + /* 敵配置 */ + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { + enm_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16 ); + } + } + } + + save_data[3] = d_num; + + player[0] = init_x; + player[1] = init_y; +/* + screen_BackupPlane( ); + + for ( i = 2 ; i >= 0 ; i-- ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } +// DisableBackupPlane(); // バックアッププレーンの使用終了 +// screen_BackupPlane( ); +*/ + /* リトライ場所設定 */ + player[15] = player[0]; + player[16] = player[1]; + + +} + +/* WAITつきスクロール(reload専用、敵の再配置を行わない) */ +void wait_scl3( ) +{ +/* + 0:上 1:下 2:左 3:右 + よみこむファイルNO +*/ + long i; + long x; + long y; + long d_num; + + d_num = save_data[3]; + +// se_wav( 14 ); +// screen_BackupPlane( ); + + /* バッファクリア */ + for ( i = 0; i < 100; i++ ) + { + p_ef[i * 10] = 0; /* 存在 */ + } + for ( i = 0; i < 40; i++ ) + { + pmshot[i * 20 + 2] = 0; /* 存在 */ + } + for ( i = 0; i < 10; i++ ) + { + pshot[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 40; i++ ) + { + pshotf[i * 10 + 0] = 0 ; + } + /* バッファクリア */ + for ( i = 0; i < 50; i++ ) + { + item[i * 10 + 0] = 0 ; + } + for ( i = 0; i < 20; i++ ) + { + if ( enemy[0 + ( i * 20 )] == 1 ) /* 存在してない */ + { + enemy[1 + ( i * 20 )] = enemy[14 + ( i * 20 )] ; /* 存在してない */ + enemy[2 + ( i * 20 )] = enemy[15 + ( i * 20 )] ; /* 存在してない */ + } + } + for ( i = 0; i < 20; i++ ) + { + mgc_e[i * 10 + 0] = 0 ; /* 存在してない */ + } + + /* 次画面バッファ読み込み */ +/* + for ( i = 0 ; i < 2 ; i++ ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } + DisableBackupPlane(); // バックアッププレーンの使用終了 + + for ( j = 0 ; j < 2; j++ ) + { + ClearSecondary(); + halt; + } +*/ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2(string); + { + for ( i = 0; i <= 319; i++ ) + { + map1[i] = gameflag2[i]; + } + } + for ( i = 0 ; i <= 20 ; i++ ) + { + map_data[i] = gameflag2[i + 320]; + } + + for ( i = 0 ; i < 5 ; i++ ) + { + sprintf(string,"image/bak/%d.bmp", (int)map_data[11 + i] ); + + if ( ( i == 0 ) || ( map_data[11 + i] != 0 ) ) + { + LoadBitmap(string,110 + i , 0 ); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + ReleaseBitmap(110 + i); + } + } + + + + /* レイヤー2 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/%d_%d.map", (int)stage , (int)2, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( i = 0; i <= 319; i++ ) + { + map2[i] = gameflag2[i]; + } + } +// bak_make(); + + + /* アイテム配置 */ + ResetGameFlag2( ); + sprintf(string,"data/%d/i%d_%d.map", (int)stage , (int)1, (int)d_num ); + if ( LoadGameFlag2(string) == 0 ) + { + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { + item_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16, x + ( y * 20 ), d_num ); + } + } + } + } + + ResetGameFlag2(); /* ファイルなし */ + sprintf( string,"data/%d/e%d_%d.map", (int)stage , (int)1, (int)d_num ); + LoadGameFlag2( string ); /* 敵配置 */ + /* 敵配置 */ + for ( x = 0; x <= 19 ; x++ ) + { + for ( y = 0; y <= 16 ; y++ ) + { + if ( gameflag2[x + ( y * 20 )] != 0 ) + { +// enm_set( gameflag2[x + ( y * 20 )], x * 32, ( ( 14 - y ) * 32 ) + 16 ); + } + } + } + +// save_data[7] = d_num; + +/* + player[0] = init_x; + player[1] = init_y; +*/ +/* + screen_BackupPlane( ); + + for ( i = 2 ; i >= 0 ; i-- ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } +*/ +// DisableBackupPlane(); // バックアッププレーンの使用終了 +// screen_BackupPlane( ); + + /* リトライ場所設定 */ + player[15] = player[0]; + player[16] = player[1]; + + +} + +void rotmap( long rot ) +{ + long i; + long size; + long x; + long y; + long wx; + long wy; + long k; + long by; + long bx; +/* + long bak_d_x; + long bak_d_y; + bak_d_x = d_x; + bak_d_y = d_y; + + d_x = 0 ; + d_y = 0; +*/ + k = 0; + wx = 0; + wy = 0; + by = 0; + bx = 0; + + x = 0; + y = 0; +/* + switch( rot ) + { + case 0: // 移動無し + case 360: // 移動無し + break; + case 90: + memcpy( mapfile, map1, sizeof( map1 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map1[ ( y ) + ( ( MapInfo[1] - x - 1 ) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + memcpy( mapfile, map2, sizeof( map2 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map2[ ( y ) + ( ( MapInfo[1] - x - 1 ) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + break; + case 180: + memcpy( mapfile, map1, sizeof( map1 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map1[ ( MapInfo[1] - x - 1 ) + ( ( MapInfo[1] - y - 1) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + memcpy( mapfile, map2, sizeof( map2 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map2[ ( MapInfo[1] - x - 1 ) + ( ( MapInfo[1] - y - 1) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + break; + case 270: + memcpy( mapfile, map1, sizeof( map1 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map1[ ( ( MapInfo[1] - y - 1 ) ) + ( ( x ) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + memcpy( mapfile, map2, sizeof( map2 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + map2[ ( ( MapInfo[1] - y - 1 ) ) + ( ( x ) * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + break; + } +*/ + switch( rot ) + { + case 0: // 移動無し + case 360: // 移動無し + break; + default: +// memset( mapfile, map2, sizeof( map2 ) ); + memcpy( mapfile, map1, sizeof( map1 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + rotchangemap( x, y, rot , &wx, &wy ); + map1[ wx + ( wy * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + + memcpy( mapfile, map2, sizeof( map2 ) ); + for ( x = 0; x < MapInfo[1]; x++ ) + { + for ( y = 0; y < MapInfo[1]; y++ ) + { + rotchangemap( x, y, rot , &wx, &wy ); + map2[ wx + ( wy * MapInfo[0] ) ] = mapfile[ ( x ) + ( y * MapInfo[0] ) ]; + } + } + + break; + } + +/* + SwapToSecondary( 124 ); + SDL_Rect rect; + rect.x = 0; + rect.y = 0; + rect.w = 2400; + rect.h = 2400; + SDL_FillRect(g_screen, &rect, SDL_MapRGBA(g_screen->format,16,99,62,255)); + + bakdisp1( ); + bakdisp2( ); + SwapToSecondary( 124 ); + SaveBmp( 124, "temp.bmp" ); + d_x = bak_d_x; + d_y = bak_d_y; +*/ + wx = 0; + wy = 0; + // プレイヤーの座標を変換 + rotchange( player[0] + ( char_size[0] / 2 ), player[1] + ( char_size[1] / 2 ), rot, &wx, &wy ); + + player[0] = wx - ( char_size[0] / 2 ) - 1; //壁に埋まってしまうため補正 + player[1] = wy - ( char_size[1] / 2 ); + + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + rotchange( item[( i * item_data[2] ) + 1 ] + ( item_data[0] / 2 ), item[( i * item_data[2] ) + 2 ] + ( item_data[0] / 2 ), rot, &wx, &wy ); + item[( i * item_data[2] ) + 1 ] = wx - ( item_data[0] / 2 ); + item[( i * item_data[2] ) + 2 ] = wy - ( item_data[0] / 2 ); + + } + } + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + by = item[( i * item_data[2] ) + 3 ] / 100; + bx = item[( i * item_data[2] ) + 3 ] % 100; + switch ( by ) + { + case 2: // 上方向 + case 3: + case 4: + if ( item[7 + ( i * item_data[2] )] >= 0 ) + { + k = item[7 + ( i * item_data[2] )]; // 支点の取得 + item[6 + ( i * item_data[2] )] = 12; + item[8 + ( i * item_data[2] )] = ( ( item[( k * item_data[2] ) + 1 ] + item[4 + ( i * item_data[2] )] ) - item[( i * item_data[2] ) + 1 ] ) / 10; + item[9 + ( i * item_data[2] )] = ( ( item[( k * item_data[2] ) + 2 ] + item[5 + ( i * item_data[2] )] ) - item[( i * item_data[2] ) + 2 ] ) / 10; + } + break; + case 10: + switch( bx ) + { + case 3: + case 4: + case 5: + case 6: + if ( rot == 270 ) + { + item[( i * item_data[2] ) + 3 ] = item[( i * item_data[2] ) + 3 ] + 1; + } + else + { + item[( i * item_data[2] ) + 3 ] = item[( i * item_data[2] ) + 3 ] - 1; + } + if ( item[( i * item_data[2] ) + 3 ] > 1006 ) + { + item[( i * item_data[2] ) + 3 ] = item[( i * item_data[2] ) + 3 ] - 4; + } + if ( item[( i * item_data[2] ) + 3 ] < 1003 ) + { + item[( i * item_data[2] ) + 3 ] = item[( i * item_data[2] ) + 3 ] + 4; + } + break; + default: + break; + } + break; + default: + break; + } + } + } + for ( i = 0; i < enm_data[1]; i++ ) + { + if ( enemy[0 +( i * enm_data[2] )] == 1 ) + { + size = 32; + /* 敵のサイズ取得 */ + if ( enemy[3 + ( i * enm_data[2] )] == 1 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 2 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 3 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 4 ) /* 4ボス */ + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 5 ) /* 5ボス */ + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 6 ) /* 6ボス */ + { + size = 32; + } + rotchange( enemy[( i * enm_data[2] ) + 1 ] + ( size / 2 ), enemy[( i * enm_data[2] ) + 2 ] + ( size / 2 ), rot, &wx, &wy ); + enemy[( i * enm_data[2] ) + 1 ] = wx - ( size / 2 ); + enemy[( i * enm_data[2] ) + 2 ] = wy - ( size / 2 ); + } + } + //パーティクルの移動 + for ( i = 0; i < 80; i++ ) + { + if ( pshotf2[i * 10 + 2] != 0 ) + { + rotchange( ( pshotf2[i * 10 + 5] >> 16 ) + 16, ( pshotf2[i * 10 + 6] >> 16 ) + 16, rot, &wx, &wy ); + pshotf2[i * 10 + 5] = ( wx ) << 16 ; /* 初期位置の設定 */ + pshotf2[i * 10 + 6] = ( wy ) << 16 ; + } + } + +#ifdef GP2X + replay_time = replay_time + 15; +#endif + +} + +void rotchangemap( long x1, long y1, long deg, long *x2, long *y2 ) +{ + long rad; // 回転角度(ラジアン) + + rad = 360 - deg; + + long cx = MapInfo[1] / 2; // マップの中心座標(X) + long cy = MapInfo[1] / 2; // マップの中心座標(Y) + + long dx = x1 - cx; // 中心からの距離(X) + long dy = y1 - cy; // 中心からの距離(Y) + + long tmpX = dx*funcCos(rad) - dy*funcSin(rad); // 回転 + long tmpY = dx*funcSin(rad) + dy*funcCos(rad); + + tmpX = tmpX + ( 1 << 15 ); + tmpY = tmpY + ( 1 << 15 ); + + *x2 = ( cx + ( tmpX >> 16 ) ); // 元の座標にオフセットする + *y2 = ( cy + ( tmpY >> 16 ) ); + +} + +void rotchange( long x1, long y1, long deg, long *x2, long *y2 ) +{ + long rad; // 回転角度(ラジアン) + + rad = deg; + + long cx = MapInfo[3] / 2; // マップの中心座標(X) + long cy = MapInfo[3] / 2; // マップの中心座標(Y) + + long dx = x1 - cx; // 中心からの距離(X) + long dy = y1 - cy; // 中心からの距離(Y) + + long tmpX = dx*funcCos(rad) - dy*funcSin(rad); // 回転 + long tmpY = dx*funcSin(rad) + dy*funcCos(rad); + + tmpX = tmpX + ( 1 << 15 ); + tmpY = tmpY + ( 1 << 15 ); + + *x2 = ( cx + ( tmpX >> 16 ) ); // 元の座標にオフセットする + *y2 = ( cy + ( tmpY >> 16 ) ); + +} + +//----------------------------------------------------------------------------------- +// おやつカウンター表示 +void snack_counter_disp() +{ + long px; + long py; + long x; + long dx; + long dy; + long i; + long old_count; + // おやつカウント + + old_count = snack_count; + snack_count = 0; + + for(i = 0; i < enm_data[1]; i++) + { + if ( ( enemy[0 +( i * enm_data[2] )] == 1 ) && ( enemy[3 +( i * enm_data[2] )] != 4 ) ) + { + snack_count++; + } + } + + if ( ( old_count != snack_count ) && ( snack_count == 1 ) ) + { + //last oneの表示 + player[30] = 180; + } + if ( ( old_count != snack_count ) && ( snack_count == 0 ) ) + { + //last oneの表示 + player[30] = 0; + } + // 左上 + px = 10; + py = 18; + // 文字サイズ + dx = 10; + dy = 8; + // 'rest' 残りおやつ + x = 0; + BltRect( 18, 105, 2, 0, 72, 100, 8 ); /* replay */ + // 残りの数 +// x = x + dx * 2; +// px = px + rand(3)-1; // ぶるぶる +// py = py + rand(3)-1; // ぶるぶる +// BltNumericImage2( count, 2, 140 + rand(3)-1, 2 + rand(3)-1, 18, 0, 0, 10, 8 ); + BltNumericImage2( snack_count, 2, 155, 2, 18, 0, 0, 10, 8 ); +} + +//----------------------------------------------------------------------------------- +//ミニマップの表示 +void minimap_disp( void ) +{ + long px; + long py; + long size; + long width; + long height; + long i; + long x; + long y; + // 左上 + px = 2; + py = 12; + size = 1; + width = size*MapInfo[1]; + height = size*MapInfo[1]; + + if ( gameflag[132] == 0 ) + { + return; + } + + + // 20 x 15 +// BlendExBltFastW( 70, px, py, 0, 100 ); + Blt( 70, px, py ); + // プレイヤー + x = px + 0 + ((player[0] / 32 + 0) * size); + y = py + height - ((player[1] / 32 + 1) * size); + BltRect( 127, x, y, 127, 191, size, size ); + // おやつ + for( i = 0; i < enm_data[1]; i++) + { + if ( enemy[0 +( i * enm_data[2] )] == 1 ) + { + x = px + 0 + ((enemy[1 +( i * enm_data[2])] / 32 + 0) * size); + y = py + height - ((enemy[2 +( i * enm_data[2])] / 32 + 1) * size); + BltRect( 127, x, y, 127, 127, size, size ); + } + + } +} + +//----------------------------------------------------------------------------------- +//情報表示 +void mapdisp() +{ + int stage_hosei; + + stage_hosei = 0; + if ( stage == 2 ) + { + stage_hosei = 50; + } + + long wk; + /* プレイヤー状態表示 */ +// Blt( 20, 0, 0 ); /* 枠 */ + if ( gameflag[128] != 0 ) //マップビュー + { + BltRect( 18, 10, 15, 0, 136, 100, 8 * 3 ); /* mapviwe */ + } + if ( gameflag[132] == 1 ) + { + if ( stage != 0 ) + { + BltRect( 18, 10, 15, 0, 32, 100, 8 ); /* replay */ + } + /* キー入力 */ + if ( replay_load_key[0] == 1 ) /* l */ + { + if ( replay_load_key[2] == 1 ) /* up */ + { + BltRect( 67, 10, 150, 256, 0, 64, 64 ); /* l */ + } + else if ( replay_load_key[3] == 1 ) /* down */ + { + BltRect( 67, 10, 150, 192, 64, 64, 64 ); /* l */ + } + else + { + BltRect( 67, 10, 150, 128, 64, 64, 64 ); /* l */ + } + } + else if ( replay_load_key[1] == 1 ) /* r */ + { + if ( replay_load_key[2] == 1 ) /* up */ + { + BltRect( 67, 10, 150, 192, 0, 64, 64 ); /* r */ + } + else if ( replay_load_key[3] == 1 ) /* down */ + { + BltRect( 67, 10, 150, 256, 64, 64, 64 ); /* r */ + } + else + { + BltRect( 67, 10, 150, 64, 64, 64, 64 ); /* r */ + } + } + else + { + if ( replay_load_key[2] == 1 ) /* up */ + { + BltRect( 67, 10, 150, 64, 0, 64, 64 ); /* r */ + } + else if ( replay_load_key[3] == 1 ) /* down */ + { + BltRect( 67, 10, 150, 128, 0, 64, 64 ); /* r */ + } + else + { + BltRect( 67, 10, 150, 0, 0, 64, 64 ); /* r */ + } + } + if ( replay_load_key[4] == 1 ) /* 1 */ + { + BltRect( 67, 90, 190, 32, 128, 32, 32 ); /* off */ + } + else + { + BltRect( 67, 90, 190, 0, 128, 32, 32 ); /* on */ + } + if ( replay_load_key[5] == 1 ) /* 2 */ + { + BltRect( 67, 130, 190, 32, 128, 32, 32 ); /* off */ + } + else + { + BltRect( 67, 130, 190, 0, 128, 32, 32 ); /* on */ + } + } + + if ( stage != 0 ) + { + if ( gameflag[127] == 1 ) //トータルアタック + { + BltRect( 18, 5, 220, 0, 128, 100, 8 ); /* rank */ + } + else if ( stage == 2 ) + { + BltRect( 18, 5, 220, 0, 112, 100, 8 ); /* rank */ + } + else + { + if ( ( save_data[3] >= 1 ) && ( save_data[3] <= 10 ) ) + { + BltRect( 18, 5, 220, 0, 88, 100, 8 ); /* rank */ + } + if ( ( save_data[3] >= 11 ) && ( save_data[3] <= 30 ) ) + { + BltRect( 18, 5, 220, 0, 96, 100, 8 ); /* rank */ + } + if ( ( save_data[3] >= 31 ) && ( save_data[3] <= 50 ) ) + { + BltRect( 18, 5, 220, 0, 104, 100, 8 ); /* rank */ + } + } + + BltRect( 18, 10, 2, 0, 40, 100, 8 ); /* */ + BltNumericImage2( save_data[3], 2, 70, 2, 18, 0, 0, 10, 8 ); /* d_num */ + + if ( gameflag[127] == 1 ) //トータルアタック + { + BltRect( 18, 180, 2, 0, 120, 100, 8 ); /* */ + BltNumericImage2( gameflag[136], 3, 250, 2, 18, 0, 0, 10, 8 ); /* miss count */ + } + else + { + BltRect( 18, 190, 2, 0, 80, 100, 8 ); /* */ + BltNumericImage2( Jump_counts, 2, 280, 2, 18, 0, 0, 10, 8 ); /* Jump_counts */ + } + + BltRect( 18, 50, 230, 0, 8, 100, 8 ); /* */ + BltRect( 18, 5, 230, 0, 16, 100, 8 ); /* */ + + BltRect( 18, 200, 230 , 0, 8, 100, 8 ); /* */ + BltRect( 18, 155, 230 , 0, 24, 100, 8 ); /* */ + + BltNumericImage( play_time[0], 2, 110, 230, 18, 0, 0, 10, 8 ); /* 時間 */ + BltNumericImage( play_time[1], 2, 80, 230, 18, 0, 0, 10, 8 ); /* 時間 */ + BltNumericImage( play_time[2], 2, 50, 230, 18, 0, 0, 10, 8 ); /* 時間 */ + + if ( gameflag[127] == 1 ) //トータルアタック + { + // sprintf( string,"%d", gameflag[200 + save_data[3]] ); + // MidStr(string,6,2,string[1]); + wk = get2keta( gameflag[137] , 1 ); + BltNumericImage( wk, 2, 260, 230, 18, 0, 0, 10, 8 ); + // sprintf( string,"%d", gameflag[200 + save_data[3]] ); + // MidStr(string,4,2,string[1]); + wk = get2keta( gameflag[137] , 100 ); + BltNumericImage( wk, 2, 230, 230, 18, 0, 0, 10, 8 ); + // sprintf( string,"%d", gameflag[200 + save_data[3]] ); + // MidStr(string,2,2,string[1]); + wk = get2keta( gameflag[137] , 10000 ); + BltNumericImage( wk, 2, 200, 230, 18, 0, 0, 10, 8 ); + } + else + { + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 1 ); + BltNumericImage( wk, 2, 260, 230, 18, 0, 0, 10, 8 ); + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 100 ); + BltNumericImage( wk, 2, 230, 230, 18, 0, 0, 10, 8 ); + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 10000 ); + BltNumericImage( wk, 2, 200, 230, 18, 0, 0, 10, 8 ); + } + } + else + { + BltRect( 18, 190, 2, 0, 80, 100, 8 ); /* */ + BltNumericImage2( Jump_counts, 2, 280, 2, 18, 0, 0, 10, 8 ); /* Jump_counts */ + } + + // 方向の表示 + BltRect( 75, 280, 122, 0 + ( map_rot_info * 32 ), 0, 32, 32 ); /* */ + + //完成品の表示 + BltRect( 6, 240, 240 - 96, 0, 64 , 96, 96 ); /* */ + if ( ( sn == 1 ) || ( sn == 5 ) || ( sn == 4 ) ) + { + if ( snack_count != all_snack_count ) + { + BltRect( 6, 240 + 32, 240 - 96 + 32, 0 + ( ( ( save_data[3] - 1 ) % 10 ) * 32 ), 160 + ( ( ( save_data[3] - 1 ) / 10 ) * 32 ) , 32 - ( ( snack_count * 100 ) / ( ( all_snack_count * 100 ) / 32 ) ), 32 ); /* */ + } + } + + //カットインの表示 + if ( player[31] > 0 ) + { + wk = player[31]; + if ( wk < 60 ) + { + wk = 0; + } + else + { + wk = wk - 60; + } + BltRect( 6, ( 320 - 64 ) + ( wk * wk ), 240 - 64 - 20, 0 + ( player[32] * 64 ), 0 , 64, 64 ); /* */ + player[31]--; + } + +// BltRect( 22, 24, 10, 0, 0, 16 * save_data[6], 12 ); /* 最大HP */ +// BltRect( 23, 24, 10, 0, life_a[1] * 12 , 16 * player[8], 12 ); /* 現在HP */ +// /* hpアニメーション */ +// life_a[0]++; +// if ( life_a[0] >= 10 ) +// { +// life_a[0] = 0; +// life_a[1]++; +// if ( life_a[1] >= 4 ) +// { +// life_a[1] = 0; +// } +// } + + +} + + +//----------------------------------------------------------------------------------- +/* bgm再生 */ +/* ステージの開始に呼ぶ */ +void bgm_midi( long BgmWavNo ) +{ + + +} + + +//----------------------------------------------------------------------------------- +/* se再生 */ +void se_wav(long SeWavNo) +{ + +} + + + +//----------------------------------------------------------------------------------- + +//----------------------------------------------------------------------------------- +//開始 +void stage_start( ) +{ + int x = 0; + int y = 0; + int rec = 0; + int rec2 = 0; +/* + long i; + long j; + screen_BackupPlane( ); + + for ( i = 2 ; i >= 0 ; i-- ) + { + for ( j = 0 ; j < 2; j++ ) + { + BltFromBackupPlane(); // バックアッププレーンからのBlt + Blt( 15 + i , 0, 0 ); + halt; + } + } + DisableBackupPlane(); // バックアッププレーンの使用終了 +*/ + + KeyInput( ); // キー入力 + demo[0]++; + + rec = 32 - ( demo[0] * 2 ); + if ( rec < 0 ) + { + rec = 0; + } + rec2 = demo[0]; + if ( rec2 > 16 ) + { + rec2 = 16; + } + + for ( x = 0; x < 10; x++ ) + { + for ( y = 0; y < 8; y++ ) + { + BltRect( 72, ( x * 32 ) + rec2, ( y * 32 ) + rec2, 0, 0, rec, rec ); + } + } + // stage start + BltRect( 71, 90, 80, 0, 0, 200, 32 ); + if ( demo[0] >= 120 ) + { + // go + BltRect( 71, 150, 140, 0, 64, 200, 32 ); + } + else if ( demo[0] >= 60 ) + { + // ready + BltRect( 71, 130, 140, 0, 32, 200, 32 ); + } + + if ( + ( demo[0] >= 180 ) + || ( ( g_DebugStageProduction != 0 ) && ( demo[0] >= 2 ) ) + || ( ( gameflag[134] != 0 ) && ( demo[0] >= 2 ) ) + ) + { + demo[0] = 0; + sn = 1; + } + +} + +void stage_endj( ) +{ + + if ( player[8] <= 0 ) /* ライフ0 */ + { + + player[2] = 32; /* ダウンモーション */ + player[10] = 0; /* ダウンモーション */ + player[11] = 0; /* ダウンモーション */ + + +// ReleaseMIDI(); +// gameflag[40] = 6; + sn = 3; + demo[0] = 0; + } +} + +void stage_claer( ) +{ + int stage_hosei; + int rec = 0; + int rec2 = 0; + int x = 0; + int y = 0; + int newrecode = 0; + int fead = 0; + int wk = 0; + + stage_hosei = 0; + if ( stage == 2 ) + { + stage_hosei = 50; + } + + + if ( demo[0] == 0 ) + { + demo[1] = 62; +// demo[2] = 126; + demo[2] = 148; + } + demo[0]++; + + + play_time[4] = 1000000 + ( play_time[2] * 10000 ) + ( play_time[1] * 100 ) + ( play_time[0] ); + + fead = demo[0] - 140; + if ( fead < 0 ) + { + fead = 0; + } + rec = ( fead * 2 ); + if ( rec > 32 ) + { + rec = 32; + } + rec2 = 16 - fead; + if ( rec2 < 0 ) + { + rec2 = 0; + } + + for ( x = 0; x < 10; x++ ) + { + for ( y = 0; y < 8; y++ ) + { + BltRect( 72, ( x * 32 ) + rec2, ( y * 32 ) + rec2, 0, 0, rec, rec ); + } + } + + if ( gameflag[127] == 0 ) //トータルアタック + { + if ( ( gameflag[300 + save_data[3] + stage_hosei] > Jump_counts ) ) + { + if ( gameflag[132] == 0 ) + { + // 新記録 + Blt( 69, 0, 0 ); + newrecode = 1; + } + } + if ( ( gameflag[200 + save_data[3] + stage_hosei] > play_time[4] ) ) + { + if ( gameflag[132] == 0 ) + { + // 新記録 + Blt( 68, 0, 0 ); + newrecode = 1; + } + } + } + if ( newrecode == 0 ) + { + // stage clear + Blt( 73, 0, 0 ); + BltRect( 71, 90, 180, 0, 96, 200, 32 ); + if ( demo[0] == 1 ) + { + soundSetVolumeMasterBgm( 10 ); + soundPlaySe( EN_SE_CL21 + ( ( save_data[3] - 1 ) / 10 ) ); + } + } + else + { + if ( demo[0] == 1 ) + { + soundSetVolumeMasterBgm( 10 ); + soundPlaySe( EN_SE_CL1 + ( ( save_data[3] - 1 ) / 10 ) ); + } + } + + if ( stage != 0 ) + { + Blt( 74, 0, 0 ); + //目標タイム + if ( target_save[200 + save_data[3] + stage_hosei] >= play_time[4] ) + { + BltRect( 61, 20, 138, 0, 128 , 20, 20 ); + } + //目標回転 + if ( target_save[300 + save_data[3] + stage_hosei] >= Jump_counts ) + { + BltRect( 61, 20, 154, 0, 128 , 20, 20 ); + } + // best + wk = get2keta( target_save[200 + save_data[3] + stage_hosei], 1 ); + BltNumericImage( wk, 2, 250, 146, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( target_save[200 + save_data[3] + stage_hosei], 100 ); + BltNumericImage( wk, 2, 220, 146, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( target_save[200 + save_data[3] + stage_hosei], 10000 ); + BltNumericImage( wk, 2, 190, 146, 18, 0, 0, 10, 8 ); /* */ + BltNumericImage2( target_save[300 + save_data[3] + stage_hosei], 2, 190, 162, 18, 0, 0, 10, 8 ); /* Jump_counts */ + // now + wk = get2keta( play_time[4], 1 ); + BltNumericImage( wk, 2, 250, 138, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( play_time[4], 100 ); + BltNumericImage( wk, 2, 220, 138, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( play_time[4], 10000 ); + BltNumericImage( wk, 2, 190, 138, 18, 0, 0, 10, 8 ); /* */ + BltNumericImage2( Jump_counts, 2, 190, 154, 18, 0, 0, 10, 8 ); /* Jump_counts */ + if ( secretitemget == 1 ) + { + BltRect( 18, 190, 170, 0, 176, 200, 8 ); /* タイム */ + BltRect( 61, 20, 170, 0, 128 , 20, 20 ); + } + else + { + BltRect( 18, 190, 170, 0, 168, 200, 8 ); /* タイム */ + } + + BltRect( 18, 200, 230 , 0, 8, 100, 8 ); /* */ + BltRect( 18, 155, 230 , 0, 24, 100, 8 ); /* */ + + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 1 ); + BltNumericImage( wk, 2, 260, 230, 18, 0, 0, 10, 8 ); + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 100 ); + BltNumericImage( wk, 2, 230, 230, 18, 0, 0, 10, 8 ); + wk = get2keta( gameflag[200 + save_data[3] + stage_hosei] , 10000 ); + BltNumericImage( wk, 2, 200, 230, 18, 0, 0, 10, 8 ); + + + + } + //完成品の取得1 + if ( demo[2] > 0 ) + { + demo[2] = demo[2] - 1; + if ( demo[2] <= 0 ) + { +// soundPlaySe( EN_SE_CL1 ); + } + demo[1] = demo[1] + 3; + if ( demo[1] > 360 ) + { + demo[1] = demo[1] - 360; + } + x = 160 + ( ( funcSin( demo[1] ) * ( demo[2] ) ) >> 16 ); + y = 120 + ( ( funcCos( demo[1] ) * ( demo[2] ) ) >> 16 ); + BltRect( 6, x - 16, y - 16, 0 + ( ( ( save_data[3] - 1 ) % 10 ) * 32 ), 160 + ( ( ( save_data[3] - 1 ) / 10 ) * 32 ), 32, 32 ); /* */ + p_shot_f2_set( x, y , 2 + ( rand( ) % 3 ) ); + p_shot_f2_set( x, y , 2 + ( rand( ) % 3 ) ); + } + else + { + BltRect( 6, 110, 104, 0 + ( ( ( save_data[3] - 1 ) % 10 ) * 32 ), 160 + ( ( ( save_data[3] - 1 ) / 10 ) * 32 ), 32, 32 ); /* */ + } + if ( demo[0] >= ( 60 * 3 ) ) + { + demo[0] = ( 60 * 3 ); + BltRect( 18, 180, 114, 0, 144, 100, 8 * 2 ); /* 1 key to exit */ + } + + if ( ( ( demo[0] >= ( 60 * 3 ) ) && ( IsPushOKKey( ) ) )|| ( ( g_DebugStageProduction != 0 ) && ( demo[0] >= 2 ) ) ) + { + if ( gameflag[132] == 0 ) + { + if ( gameflag[127] == 1 ) //トータルアタック + { + gameflag[135] = play_time[4]; + } + else + { + replay_file_save_w( ); + if ( gameflag[200 + save_data[3] + stage_hosei] > play_time[4] ) + { + gameflag[200 + save_data[3] + stage_hosei] = play_time[4]; /* スコア保存 */ + + replay_file_save( 0 ); + } + + if ( gameflag[300 + save_data[3] + stage_hosei] > Jump_counts ) + { + gameflag[300 + save_data[3] + stage_hosei] = Jump_counts; /* スコア保存 */ + + replay_file_save( 1 ); + } + + if ( secretitemget == 1 ) + { + gameflag[400 + save_data[3] + stage_hosei] = 1; + } + } + + if ( gameflag[129] != 0 ) //ステージセレクトから開始 + { + gameflag[40] = 1; + g_scene = EN_SN_STAGESELECT; + } + else + { + save_data[3]++; + gameflag[120] = save_data[3]; + if ( + ( save_data[3] == 1 ) + || ( save_data[3] == 11 ) + || ( save_data[3] == 21 ) + || ( save_data[3] == 31 ) + || ( save_data[3] == 41 ) + ) + { + if ( gameflag[127] == 0 ) //トータルアタックではない + { + g_scene = EN_SN_DEMO; + } + } + } + if ( gameflag[121] < save_data[3] ) + { + gameflag[121] = save_data[3]; + } + } + else + { +// replay_file_save_w( ); + if ( gameflag[129] != 0 ) //ステージセレクトから開始 + { + gameflag[40] = 1; + g_scene = EN_SN_STAGESELECT; + } + else + { + save_data[3]++; + } + if ( ( gameflag[124] == 1 ) || ( stage == 0 ) ) /* リプレイONE */ + { + gameflag[40] = 1; + g_scene = EN_SN_TITLE; + } + } + sn = 10; + } +// if ( player[14] == 10 ) +// { + if ( player[2] != 33 ) + { + player[10] = 0 ; + player[11] = 0 ; + player[2] = 33 ; + } +// } + +} + +void stage_end( ) +{ + demo[0]++; + if ( demo[0] > 60 ) + { + if ( player[8] <= 0 ) /* ライフ0 */ + { + gameflag[136]++; + if ( gameflag[136] > 999 ) /* ミスカウント */ + { + gameflag[136] = 999; + } + } + if ( gameflag[127] == 1 ) //トータルアタック + { + play_time[4] = 1000000 + ( play_time[2] * 10000 ) + ( play_time[1] * 100 ) + ( play_time[0] ); + gameflag[135] = play_time[4]; + } + gameflag[71] = 1; + sn = 10; + } +} + +/* マップの端に触れてステージ移動 */ +void end_scl( long s_num ) +{ +} + + + +void p_shot_set( long type , long muki, long houkou ) +{ + long i; + + for ( i = 0; i < 10; i++ ) + { + if ( pshot[( i * 10 ) + 0 ] == 0 ) + { + pshot[( i * 10 ) + 0 ] = 1; + pshot[( i * 10 ) + 1 ] = player[0]; + pshot[( i * 10 ) + 2 ] = player[1]; + pshot[( i * 10 ) + 3 ] = houkou; /* 左右 */ + pshot[( i * 10 ) + 4 ] = muki; /* 方向 */ + pshot[( i * 10 ) + 5 ] = 0; + pshot[( i * 10 ) + 6 ] = 0; + pshot[( i * 10 ) + 7 ] = type; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + + break; + } + } +} + +void p_shot_disp( ) +{ + long i; + + for ( i = 0; i < 10; i++ ) + { + if ( pshot[( i * 10 ) + 0 ] == 1 ) + { + /* 位置補正 */ + pshot[( i * 10 ) + 1 ] = player[0]; + pshot[( i * 10 ) + 2 ] = player[1]; + + if ( pshot[( i * 10 ) + 3 ] == 0 ) + { + if ( pshot[( i * 10 ) + 4 ] == 0 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 16; + pshot[( i * 10 ) + 2 ] = player[1] + 16; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + } + if ( pshot[( i * 10 ) + 4 ] == 1 ) + { + pshot[( i * 10 ) + 1 ] = player[0] + 5; + pshot[( i * 10 ) + 2 ] = player[1] + 10; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + } + if ( pshot[( i * 10 ) + 4 ] == 2 ) + { + pshot[( i * 10 ) + 1 ] = player[0] + 5; + pshot[( i * 10 ) + 2 ] = player[1] - 16; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + } + if ( pshot[( i * 10 ) + 4 ] == 3 ) + { + pshot[( i * 10 ) + 1 ] = player[0] + 5; + pshot[( i * 10 ) + 2 ] = player[1] - 43; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + } + if ( pshot[( i * 10 ) + 4 ] == 4 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 16; + pshot[( i * 10 ) + 2 ] = player[1] - 43; + pshot[( i * 10 ) + 8 ] = 0; /* あたり判定座標X */ + pshot[( i * 10 ) + 9 ] = 0; /* あたり判定座標X */ + } + } + else if ( pshot[( i * 10 ) + 3 ] == 1 ) + { + if ( pshot[( i * 10 ) + 4 ] == 0 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 16; + pshot[( i * 10 ) + 2 ] = player[1] + 16; + } + if ( pshot[( i * 10 ) + 4 ] == 1 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 37; + pshot[( i * 10 ) + 2 ] = player[1] + 10; + } + if ( pshot[( i * 10 ) + 4 ] == 2 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 37; + pshot[( i * 10 ) + 2 ] = player[1] - 16; + } + if ( pshot[( i * 10 ) + 4 ] == 3 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 37; + pshot[( i * 10 ) + 2 ] = player[1] - 43; + } + if ( pshot[( i * 10 ) + 4 ] == 4 ) + { + pshot[( i * 10 ) + 1 ] = player[0] - 16; + pshot[( i * 10 ) + 2 ] = player[1] - 43; + } + } + + + BltRect( 3, pshot[( i * 10 ) + 1 ] - d_x, 480 - pshot[( i * 10 ) + 2 ] - 64 - d_y , pshot[( i * 10 ) + 6 ] * 64, pshot[( i * 10 ) + 3 ] * 256, 64, 64 ); +// BlendExBltRectW( 3, pshot[( i * 10 ) + 1 ] - d_x, 480 - pshot[( i * 10 ) + 2 ] - 64 - d_y, ( pshot[( i * 10 ) + 6 ] * 64 ) + ( pshot[( i * 10 ) + 3 ] * 256 ), pshot[( i * 10 ) + 4 ] * 64, 64 , 64 ,0 , 180 ); + + + pshot[( i * 10 ) + 5 ]++; + if ( pshot[( i * 10 ) + 5 ] >= 4 ) + { + pshot[( i * 10 ) + 5 ] = 0; + pshot[( i * 10 ) + 6 ]++; + if ( pshot[( i * 10 ) + 6 ] >= 4 ) + { + pshot[( i * 10 ) + 6 ] = 0; + pshot[( i * 10 ) + 0 ] = 0; + } + } + } + } +} + +void p_shot_f_set( long x, long y , long type ) +{ + long i; + + for ( i = 0; i < 40; i++ ) + { + if ( pshotf[( i * 10 ) + 0 ] == 0 ) + { + pshotf[( i * 10 ) + 0 ] = 1; + pshotf[( i * 10 ) + 1 ] = x; + pshotf[( i * 10 ) + 2 ] = y; + pshotf[( i * 10 ) + 5 ] = 120 / 10; + pshotf[( i * 10 ) + 6 ] = 70 / 10; + pshotf[( i * 10 ) + 7 ] = type; + pshotf[( i * 10 ) + 8 ] = 0; + break; + } + } +} +void p_shot_f_disp( ) +{ + long i; + + for ( i = 0; i < 40; i++ ) + { + if ( pshotf[( i * 10 ) + 0 ] == 1 ) + { +// BltRect( 5, pshotf[( i * 10 ) + 1 ] - d_x, 480 - pshotf[( i * 10 ) + 2 ] - 32 - d_y , pshotf[( i * 10 ) + 6 ] * 32, pshotf[( i * 10 ) + 7 ] * 32, 32, 32 ); + pshotf[( i * 10 ) + 1 ] = pshotf[( i * 10 ) + 1 ] + pshotf[( i * 10 ) + 5 ]; + pshotf[( i * 10 ) + 2 ] = pshotf[( i * 10 ) + 2 ] + pshotf[( i * 10 ) + 6 ]; + BltRect( 40 , + pshotf[( i * 10 ) + 1 ] - 16, + pshotf[( i * 10 ) + 2 ] - 16, + ( ( ( pshotf[( i * 10 ) + 7 ] / 100 ) - 1 ) * 128 ) , + 32 * ( pshotf[( i * 10 ) + 7 ] % 100 ), + 32, + 32 ); +// BlendExBltRectW( 5, pshotf[( i * 10 ) + 1 ] - d_x, 480 - pshotf[( i * 10 ) + 2 ] - 32 - d_y , pshotf[( i * 10 ) + 6 ] * 32, pshotf[( i * 10 ) + 7 ] * 32, 32, 32 , 0 , ( 200 - ( pshotf[( i * 10 ) + 6 ] * 10 ) ) ); + + pshotf[( i * 10 ) + 8 ]++; + if ( pshotf[( i * 10 ) + 8 ] >= 10 ) + { + pshotf[( i * 10 ) + 0 ] = 0; + } + } + } +} +void p_shot_f2_set( long x, long y , long muki ) +{ + long i; + long k; + long ii; + long rg; + long max; + + /* 発生位置X */ + /* 発生位置Y */ + + if ( + ( muki == 2 ) + || ( muki == 3 ) + || ( muki == 4 ) + ) + { + max = 1; + } + else + { + max = 10; + } + + for ( i = 0; i < max; i++ ) + { + rg = ( ( rand( ) % 360 ) ); + + k = ( rand( ) % 5 ) + 1; + + for ( ii = 0; ii < 80; ii++ ) + { + if ( pshotf2[ii * 10 + 2] == 0 ) + { + pshotf2[ii * 10 + 0] = funcSin( rg ) * k; /* 弾速x */ + pshotf2[ii * 10 + 1] = funcCos( rg ) * k; /* 弾速y */ + pshotf2[ii * 10 + 2] = 1; /* 存在 */ + pshotf2[ii * 10 + 3] = 1; /* 方向 */ + pshotf2[ii * 10 + 4] = 0 ; /* 消えるまでのフレーム数 */ + pshotf2[ii * 10 + 5] = ( x ) << 16 ; /* 初期位置の設定 */ + pshotf2[ii * 10 + 6] = ( y ) << 16 ; + pshotf2[ii * 10 + 7] = 0 ; /* 消えるまでのフレーム数 */ + pshotf2[ii * 10 + 8] = 10 ; /* 消えるまでのフレーム数 */ + pshotf2[ii * 10 + 9] = muki ; /* type */ + break; + } + } + } +} +void p_shot_f2_disp( ) +{ + long ii; + + for ( ii = 0; ii < 80; ii++ ) + { + if ( pshotf2[ii * 10 + 2] == 1 ) + { + if ( + ( pshotf2[ii * 10 + 9] == 2 ) + || ( pshotf2[ii * 10 + 9] == 3 ) + || ( pshotf2[ii * 10 + 9] == 4 ) + ) + { + BltRect( 5, ( pshotf2[ii * 10 + 5] >> 16 ), ( pshotf2[ii * 10 + 6] >> 16 ) - 32, pshotf2[ii * 10 + 4] * 32, 128 + ( ( pshotf2[ii * 10 + 9] - 2 ) * 32 ) , 32, 32 ); + pshotf2[ii * 10 + 5] = pshotf2[ii * 10 + 0] + pshotf2[ii * 10 + 5]; /* 弾速x */ + pshotf2[ii * 10 + 6] = pshotf2[ii * 10 + 1] + pshotf2[ii * 10 + 6]; /* 弾速x */ + pshotf2[ii * 10 + 3] = 1; /* 方向 */ + pshotf2[ii * 10 + 7]++ ; /* 消えるまでのフレーム数 */ + if ( pshotf2[ii * 10 + 7] >= pshotf2[ii * 10 + 8] ) + { + pshotf2[ii * 10 + 7] = 0; + pshotf2[ii * 10 + 4] = pshotf2[ii * 10 + 4] + 1 ; /* 消えるまでのフレーム数 */ + if ( pshotf2[ii * 10 + 4] >= 2 ) + { + pshotf2[ii * 10 + 2] = 0; /* 存在無し */ + } + } + } + else + { + BltRect( 5, ( pshotf2[ii * 10 + 5] >> 16 ) - d_x, ( 0 - ( pshotf2[ii * 10 + 6] >> 16 ) ) + MapInfo[3] - 32 - d_y, pshotf2[ii * 10 + 4] * 32, 32, 32, 32 ); + pshotf2[ii * 10 + 5] = pshotf2[ii * 10 + 0] + pshotf2[ii * 10 + 5]; /* 弾速x */ + pshotf2[ii * 10 + 6] = pshotf2[ii * 10 + 1] + pshotf2[ii * 10 + 6]; /* 弾速x */ + pshotf2[ii * 10 + 3] = 1; /* 方向 */ + pshotf2[ii * 10 + 7]++ ; /* 消えるまでのフレーム数 */ + if ( pshotf2[ii * 10 + 7] >= pshotf2[ii * 10 + 8] ) + { + pshotf2[ii * 10 + 7] = 0; + pshotf2[ii * 10 + 4] = pshotf2[ii * 10 + 4] + 1 ; /* 消えるまでのフレーム数 */ + if ( pshotf2[ii * 10 + 4] >= 4 ) + { + pshotf2[ii * 10 + 2] = 0; /* 存在無し */ + } + } + } +// BlendExBltRectW( 5, ( pshotf2[ii * 10 + 5] >> 16 ) - d_x, 480 - ( pshotf2[ii * 10 + 6] >> 16 ) - 4 - d_y, ( pshotf2[ii * 10 + 4] * 4 ) , 32, 4, 4 , 1 , ( 255 - ( pshotf2[ii * 10 + 4] * 20 ) ) ); + } + } + +} + + +void item_set( long type, long x, long y, long iti, long g_num ) +{ + long i; + long bx; + long by; + + i = 0; + bx = 0; + by = 0; +/* + + if ( iti != 0 ) + { + if ( 0 == item_sonzai( iti, g_num ) ) + { + return; + } + } + if ( iti < 0 ) + { + return; + } +*/ + by = type / 100; + if ( by == 5 ) + { + //スイッチの描画順は前 + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 0 ) + { + item[( i * item_data[2] ) + 0 ] = 1; + item[( i * item_data[2] ) + 1 ] = x; + item[( i * item_data[2] ) + 2 ] = y; + item[( i * item_data[2] ) + 3 ] = type; + item[( i * item_data[2] ) + 4 ] = 0; // 支点からの相対位置X + item[( i * item_data[2] ) + 5 ] = 0; // 支点からの相対位置Y + item[( i * item_data[2] ) + 6 ] = 0; /* 移動カウンタ */ + item[( i * item_data[2] ) + 7 ] = -1; /* 支点のポインタ */ + item[( i * item_data[2] ) + 8 ] = 0; /* 移動量X */ + item[( i * item_data[2] ) + 9 ] = 0; /* 移動量Y */ + item[( i * item_data[2] ) + 10 ] = -1; /* 敵のポインタ */ + + + break; + } + } + } + else + { + for ( i = ( item_data[1] - 1 ); i > 0; i-- ) + { + if ( item[( i * item_data[2] ) + 0 ] == 0 ) + { + item[( i * item_data[2] ) + 0 ] = 1; + item[( i * item_data[2] ) + 1 ] = x; + item[( i * item_data[2] ) + 2 ] = y; + item[( i * item_data[2] ) + 3 ] = type; + item[( i * item_data[2] ) + 4 ] = 0; // 支点からの相対位置X + item[( i * item_data[2] ) + 5 ] = 0; // 支点からの相対位置Y + item[( i * item_data[2] ) + 6 ] = 0; /* 移動カウンタ */ + item[( i * item_data[2] ) + 7 ] = -1; /* 支点のポインタ */ + item[( i * item_data[2] ) + 8 ] = 0; /* 移動量X */ + item[( i * item_data[2] ) + 9 ] = 0; /* 移動量Y */ + item[( i * item_data[2] ) + 10 ] = -1; /* 敵のポインタ */ + + + break; + } + } + } + +} +long item_sonzai( long map1, long map2 ) +{ + long i; + long rc; + + rc = 1; + for ( i = 0; i < 100; i++ ) + { + if ( item_wk[0 + ( i * 5 )] == 1 ) + { + if ( ( item_wk[1 + ( i * 5 )] == map1 ) + && ( item_wk[2 + ( i * 5 )] == map2 ) + && ( item_wk[3 + ( i * 5 )] == stage ) ) + { + rc = 0; + break; + } + } + } + return( rc ); + +} + + +void item_disp( ) +{ + long i; + long k; + long bx; + long by; + long k_f; + long wbx; + long disp_x_j; + long disp_y_j; + long ii; + long bx2; + long by2; + + ii = 0; + bx2 = 0; + by2 = 0; + wbx = 0; + k_f = 0; + disp_x_j = 0; + disp_y_j = 0; + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + + disp_x_j = item[1 + ( i * item_data[2] )]; + disp_y_j = ( 0 - item[2 + ( i * item_data[2] )] ) + MapInfo[3]; + if ( ( ( ( d_x - item_data[0] ) <= ( disp_x_j ) ) + && ( ( d_y - item_data[0] ) <= ( disp_y_j ) ) + && ( ( d_x + 320 + item_data[0] ) >= ( disp_x_j ) ) + && ( ( d_y + 240 + item_data[0] ) >= ( disp_y_j ) ) ) + || ( bak_alldrow == 1 ) /* 背景の描画をクリップするか */ + ) + { + + BltRect( 12 , item[1 + ( i * item_data[2] )] - d_x, ( 0 - item[2 + ( i * item_data[2] )] ) + MapInfo[3] - item_data[0] - d_y, item_data[0] * bx, by * item_data[0], item_data[0], item_data[0] ); + } + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] + 0 ) <= (player[0] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + item_data[0] - 0 ) ) + && ( (item[2 + ( i * item_data[2] )] + 0 ) < (player[1] + ( char_size[1] - 10 ) ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + item_data[0] - 0 ) ) ) + && ( sn == 1 ) ) + { + k_f = 1; + if ( + ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + //押せるブロック + //キャラクターが地面にいる + if ( player[33] > 0 ) + { + if ( ( player[14] == 10 ) && ( item[( i * item_data[2] ) + 4 ] == 10 ) ) + { + /* 壁じゃなかったら */ + if ( + ( ( ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + item_data[0] + player[33], item[2 + ( i * item_data[2] )] + 16, i ) >= 100 ) + && ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + item_data[0] + player[33], item[2 + ( i * item_data[2] )] + 16, i ) <= 119 ) ) + || ( ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + item_data[0] + player[33], item[2 + ( i * item_data[2] )] + 16, i ) >= 200 ) + && ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + item_data[0] + player[33], item[2 + ( i * item_data[2] )] + 16, i ) <= 219 ) ) ) + ) + { + player[0] = item[1 + ( i * item_data[2] )] - ( char_size[3] ); + player[29] = 0; + } + else + { + if ( item[8 + ( i * item_data[2] )] >= 0 ) + { + item[( i * item_data[2] ) + 1 ] = item[( i * item_data[2] ) + 1 ] + player[33] ; + player[29] = 0; + } + } + } + else + { + player[0] = item[1 + ( i * item_data[2] )] - ( char_size[3] ); + player[29] = 0; + } + } + else if ( player[33] < 0 ) + { + /* 壁じゃなかったら */ + if ( ( player[14] == 10 ) && ( item[( i * item_data[2] ) + 4 ] == 10 ) ) + { + if ( + ( ( ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + player[33] , item[2 + ( i * item_data[2] )] + 16, i ) >= 100 ) + && ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + player[33] , item[2 + ( i * item_data[2] )] + 16, i ) <= 119 ) ) + || ( ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + player[33] , item[2 + ( i * item_data[2] )] + 16, i ) >= 200 ) + && ( map1_item_j_Isitem( item[1 + ( i * item_data[2] )] + player[33] , item[2 + ( i * item_data[2] )] + 16, i ) <= 219 ) ) ) + ) + { + player[0] = item[1 + ( i * item_data[2] )] + item_data[0] - char_size[2]; + player[29] = 0; + } + else + { + if ( item[8 + ( i * item_data[2] )] >= 0 ) + { + item[( i * item_data[2] ) + 1 ] = item[( i * item_data[2] ) + 1 ] + player[33] ; + player[29] = 0; + } + } + } + else + { + player[0] = item[1 + ( i * item_data[2] )] + item_data[0] - char_size[2]; + player[29] = 0; + } + } + } + + } + if ( ( ( (item[1 + ( i * item_data[2] )] + 10 ) <= (player[0] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + item_data[0] - 10 ) ) + && ( (item[2 + ( i * item_data[2] )] + 10 ) < (player[1] + ( char_size[1] - 10 ) ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + item_data[0] - 10 ) ) ) + && ( sn == 1 ) ) + { + //地面にいる +// if ( player[14] == 10 ) +// { + if ( one_event == 0 ) + { + one_event = 1; + if ( + ( ( by == 10 ) && ( bx == 1 ) ) + || ( ( by == 10 ) && ( bx == 2 ) ) + ) + { + //回転床 + soundPlaySe( EN_SE_PAWA ); + sn = 5; + player[20] = 0; + player[21] = 0; + player[22] = 0; + + player[10] = 0; + player[11] = 0; + player[4] = 0; + player[5] = 3; + player[2] = 2; // つかみ + + bak_make( ); + + + player[22] = 10; + player[20] = player[21]; + //乗っているアイテムによって回転方向を決定 + if ( ( by == 10 ) && ( bx == 1 ) ) + { + player[21] = player[21] - 90; + } + if ( ( by == 10 ) && ( bx == 2 ) ) + { + player[21] = player[21] + 90; + } + + if ( player[21] < 0 ) + { + player[21] = player[21] + 360; + } + if ( player[21] >= 360 ) + { + player[21] = player[21] - 360; + } + player[9] = 1; + } + } + if ( ( by == 10 ) && ( bx == 3 ) ) + { + //上バネ + soundPlaySe( EN_SE_JUMP ); + /* アイテムに乗っていない場合はそこがリトライ位置 */ + if ( player[2] != 31 ) + { + player[10] = 0; + player[11] = 0; + player[2] = 21; /* 空中 */ + } + player[14] = 7; + player[13] = 0; + player[25] = 1; + jmp_st( ); + } + if ( + ( ( by == 10 ) && ( bx == 4 ) ) + || ( ( by == 10 ) && ( bx == 6 ) ) + ) + { + //横バネ + soundPlaySe( EN_SE_JUMP ); + /* アイテムに乗っていない場合はそこがリトライ位置 */ +/* + if ( player[2] != 31 ) + { + player[10] = 0; + player[11] = 0; + player[2] = 21; // 空中 + } +*/ + if ( ( by == 10 ) && ( bx == 4 ) ) + { + player[29] = 20; // 横バネふき飛び力 + } + else + { + player[29] = -20; // 横バネふき飛び力 + } +// jmp_st( ); + } + } + + if ( + ( sn == 1 ) + || ( sn == 6 ) + ) + { + switch ( by ) + { + case 2: // 上方向 + case 3: + case 4: + if ( item[( i * item_data[2] ) + 7 ] >= 0 ) // 支点が存在する + { + if ( item[6 + ( i * item_data[2] )] > 0 ) + { + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] + item[( i * item_data[2] ) + 8 ] ) <= (player[0] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + item_data[0] + item[( i * item_data[2] ) + 8 ] ) ) + && ( (item[2 + ( i * item_data[2] )] + item[( i * item_data[2] ) + 9 ] ) < (player[1] + ( char_size[1] ) ) ) + && ( (player[1] ) < ( item[2 + ( i * item_data[2] )] + item_data[0] + item[( i * item_data[2] ) + 9 ] ) ) ) + && ( by == 3 ) + ) + { + //移動終了 +// item[6 + ( i * item_data[2] )] = -1; + } + else + { + item[( i * item_data[2] ) + 1 ] = item[( i * item_data[2] ) + 1 ] + item[( i * item_data[2] ) + 8 ] ; + item[( i * item_data[2] ) + 2 ] = item[( i * item_data[2] ) + 2 ] + item[( i * item_data[2] ) + 9 ] ; + item[( i * item_data[2] ) + 6 ]--; + } + + if ( item[6 + ( i * item_data[2] )] == 1 ) // 移動フレーム数が停止の場合 + { + k = item[7 + ( i * item_data[2] )]; // 支点の取得 + item[( i * item_data[2] ) + 1 ] = ( item[( k * item_data[2] ) + 1 ] + item[4 + ( i * item_data[2] )] ) ; + item[( i * item_data[2] ) + 2 ] = ( item[( k * item_data[2] ) + 2 ] + item[5 + ( i * item_data[2] )] ) ; + item[( i * item_data[2] ) + 6 ] = 0; + } + if ( item[( i * item_data[2] ) + 10 ] >= 0 ) // 敵のポインタが存在する + { + k = item[10 + ( i * item_data[2] )]; // 支点の取得 + enemy[1 +( k * enm_data[2] )] = item[1 + ( i * item_data[2] )]; + enemy[2 +( k * enm_data[2] )] = item[2 + ( i * item_data[2] )]; + } + } + } + else + { + if ( item[( i * item_data[2] ) + 7 ] == -1 ) // 初回検索 + { + //支点を検索 + item[( i * item_data[2] ) + 7 ] = -2; //無し + for ( ii = 0; ii < item_data[1]; ii++ ) + { + if ( item[( ii * item_data[2] ) + 0 ] != 0 ) + { + bx2 = item[( ii * item_data[2] ) + 3 ] % 100; + by2 = item[( ii * item_data[2] ) + 3 ] / 100; + switch( by ) + { + case 2: + case 3: + case 4: + if ( ( by2 == 1 ) && ( bx2 == bx ) ) + { + // 支点からの相対位置を保存 + item[( i * item_data[2] ) + 4 ] = item[( i * item_data[2] ) + 1 ] - item[( ii * item_data[2] ) + 1 ]; /* 動作用バッファ */ + item[( i * item_data[2] ) + 5 ] = item[( i * item_data[2] ) + 2 ] - item[( ii * item_data[2] ) + 2 ]; /* 動作用バッファ */ + item[( i * item_data[2] ) + 7 ] = ii; + } + break; + default: + break; + } + if ( item[( i * item_data[2] ) + 7 ] != -2 ) + { + // 支点が見つかった + break; + } + } + } + } + if ( by == 4 ) // 敵移動アイテム + { + if ( item[( i * item_data[2] ) + 10 ] == -1 ) // 初回検索 + { + //支点を検索 + item[( i * item_data[2] ) + 10 ] = -2; //無し + for ( ii = 0; ii < enm_data[1]; ii++ ) + { + if ( enemy[0 +( ii * enm_data[2] )] == 1 ) + { + //同じ座標に敵がいる場合ポインタの取得 + if ( + ( enemy[1 +( ii * enm_data[2] )] == item[( i * item_data[2] ) + 1 ] ) + && ( enemy[2 +( ii * enm_data[2] )] == item[( i * item_data[2] ) + 2 ] ) + ) + { + item[( i * item_data[2] ) + 10 ] = ii; /* 動作用バッファ */ + } + } + } + } + } + } + break; + case 10: + if ( bx == 7 ) + { + if ( gameflag[128] == 0 ) //マップビューではない + { + //箱 + item_jmp( i ); + } + } + break; + case 5: + // スイッチ + k = 0; + if ( ( ( (item[1 + ( i * item_data[2] )] + 0 ) <= (player[0] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + char_size[2] ) < (item[1 + ( i * item_data[2] )] + item_data[0] - 0 ) ) + && ( (item[2 + ( i * item_data[2] )] + 0 ) < (player[1] + ( char_size[1] - 10 ) ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + item_data[0] - 0 ) ) ) + && ( sn == 1 ) ) + { + // スイッチが入っている + k = 1; + } + else + { + for ( ii = 0; ii < item_data[1]; ii++ ) + { + if ( item[( ii * item_data[2] ) + 0 ] != 0 ) + { + bx2 = item[( ii * item_data[2] ) + 3 ] % 100; + by2 = item[( ii * item_data[2] ) + 3 ] / 100; + if ( + ( ( by2 == 10 ) && ( bx2 == 7 ) ) + || ( by2 == 2 ) + || ( by2 == 3 ) + || ( by2 == 4 ) + ) + { + //箱を検索して当たり判定を行う + if ( ( ( (item[1 + ( i * item_data[2] )] ) < ( item[1 + ( ii * item_data[2] )] + item_data[0] ) ) /* 自機とのあたり判定 */ + && ( (item[1 + ( ii * item_data[2] )] ) < ( item[1 + ( i * item_data[2] )] + item_data[0] ) ) + && ( (item[2 + ( i * item_data[2] )] ) < ( item[2 + ( ii * item_data[2] )] + item_data[0] ) ) + && ( (item[2 + ( ii * item_data[2] )] ) < ( item[2 + ( i * item_data[2] )] + item_data[0] ) ) ) ) + { + k = 1; + } + } + } + } + } + if ( k == 1 ) + { + // スイッチが入っている + if ( item[4 + ( i * item_data[2] )] == 0 ) + { + //前回が押されていなかった + soundPlaySe( EN_SE_SW ); + } + item[4 + ( i * item_data[2] )] = 1; + } + else + { + item[4 + ( i * item_data[2] )] = 0; + } + break; + case 6: + case 7: + //スイッチで消えるブロック + //スイッチが入っていない + item[3 + ( i * item_data[2] )] = 600 + bx; + for ( ii = 0; ii < item_data[1]; ii++ ) + { + if ( item[( ii * item_data[2] ) + 0 ] != 0 ) + { + bx2 = item[( ii * item_data[2] ) + 3 ] % 100; + by2 = item[( ii * item_data[2] ) + 3 ] / 100; + if ( ( by2 == 5 ) && ( bx2 == bx ) ) + { + if ( item[( ii * item_data[2] ) + 4 ] != 0 ) + { + //スイッチが入っている + item[3 + ( i * item_data[2] )] = 700 + bx; + } + } + } + } +/* + if ( item[( i * item_data[2] ) + 7 ] >= 0 ) // 支点が存在する + { + k = item[7 + ( i * item_data[2] )]; // スイッチの状態を検索 + if ( item[4 + ( k * item_data[2] )] != 0 ) + { + //スイッチが入っている + item[3 + ( i * item_data[2] )] = 700 + bx; + } + else + { + //スイッチが入っていない + item[3 + ( i * item_data[2] )] = 600 + bx; + } + } + else + { + if ( item[( i * item_data[2] ) + 7 ] == -1 ) // 初回検索 + { + //スイッチを検索 + item[( i * item_data[2] ) + 7 ] = -2; //無し + for ( ii = 0; ii < item_data[1]; ii++ ) + { + if ( item[( ii * item_data[2] ) + 0 ] != 0 ) + { + bx2 = item[( ii * item_data[2] ) + 3 ] % 100; + by2 = item[( ii * item_data[2] ) + 3 ] / 100; + if ( ( by2 == 5 ) && ( bx2 == bx ) ) + { + // スイッチからの相対位置を保存 + item[( i * item_data[2] ) + 7 ] = ii; + } + if ( item[( i * item_data[2] ) + 7 ] != -2 ) + { + // スイッチが見つかった + break; + } + } + } + } + + } +*/ + break; + default: + break; + } + } + } + } + if ( ( k_f == 0 ) && ( sn == 1 ) ) + { + one_event = 0; + } +} +/* アイテムのY座標計算 */ +void item_jmp( int i ) +{ + int y1; + int px1 ; + int px2 ; + int py ; + int py2 ; + int py3 ; + + test[1] = 0; + px1 = ( item[( i * item_data[2] ) + 1 ] + 5 ) / 32; + px2 = ( item[( i * item_data[2] ) + 1 ] + ( 32 - 5 ) ) / 32; + py = ( MapInfo[1] - ( ( item[( i * item_data[2] ) + 2 ] + 28 ) / 32 ) ); + + item[( i * item_data[2] ) + 5 ]++; + if ( item[( i * item_data[2] ) + 5 ] >= 10 ) + { + item[( i * item_data[2] ) + 5 ] = 0; + } + + if ( item[( i * item_data[2] ) + 4 ] == 10 ) + { + /* 地面判定 */ + if ( ( ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) ) + && ( ( ( item[( i * item_data[2] ) + 2 ] ) % 32 ) == 0 ) ) + { + return; + } + else + { + if ( item_up_Isitem( i ) != -1 ) /* アイテムの上に乗っている */ + { + item[( i * item_data[2] ) + 2 ] = item_up_Isitem( i ); + item[( i * item_data[2] ) + 4 ] = 10; + return; + } + item[( i * item_data[2] ) + 4 ] = -1; + item[( i * item_data[2] ) + 5 ] = 0; + } + } + + + if ( item[( i * item_data[2] ) + 5 ] == 0 ) + { + item[( i * item_data[2] ) + 4 ] = item[( i * item_data[2] ) + 4 ] - 3; + if ( ( item[( i * item_data[2] ) + 4 ] <= 2 ) && ( item[( i * item_data[2] ) + 4 ] > -2 ) ) + { + item[( i * item_data[2] ) + 4 ] = -1; + } + if ( item[( i * item_data[2] ) + 4 ] < -4 ) + { + item[( i * item_data[2] ) + 4 ] = -4; + } + /* 地面判定 */ + } + + /* 画面端で落ちるのを防止 */ + if ( ( item[( i * item_data[2] ) + 1 ] < 0 ) || ( item[( i * item_data[2] ) + 1 ] > ( MapInfo[2] - 32 ) ) ) + { + item[( i * item_data[2] ) + 4 ] = 0; + } + /* 今回の位置 */ + y1 = ( ( 0 - item[( i * item_data[2] ) + 4 ] ) * ( 0 - item[( i * item_data[2] ) + 4 ] ) * ( 0 - item[( i * item_data[2] ) + 4 ] ) ); + + px1 = ( item[( i * item_data[2] ) + 1 ] + 16 ) / 32; + px2 = ( item[( i * item_data[2] ) + 1 ] + 16 ) / 32; + py = ( MapInfo[1] - ( ( item[( i * item_data[2] ) + 2 ] + 28 ) / 32 ) ); + py2 = ( MapInfo[1] - ( ( item[( i * item_data[2] ) + 2 ] + 49 + 48 ) / 32 ) ); + item[( i * item_data[2] ) + 2 ] = item[( i * item_data[2] ) + 2 ] - ( y1 / 20 ); + py3 = ( MapInfo[1] - ( ( item[( i * item_data[2] ) + 2 ] + 32 + 32 + 16 ) / 32 ) ); + + if ( item[( i * item_data[2] ) + 2 ] > MapInfo[3] ) + { + return; + } + + if ( item[( i * item_data[2] ) + 4 ] <= 0 ) /* 上り中は判定しない */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 299 ) ) + || ( ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) + || ( ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * MapInfo[0] ) ] <= 619 ) ) ) + { + item[( i * item_data[2] ) + 2 ] = ( ( MapInfo[1] - py ) * 32 ); + item[( i * item_data[2] ) + 4 ] = 10; + } + else + { + if ( item_up_Isitem( i ) != -1 ) /* アイテムの上に乗っている */ + { + item[( i * item_data[2] ) + 2 ] = item_up_Isitem( i ); + item[( i * item_data[2] ) + 4 ] = 10; + return; + } + } + } + else /* 上昇中 */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px1 + ( ( py3 ) * MapInfo[0] ) ] <= 219 ) ) + || ( ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] >= 100 ) && ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] <= 119 ) ) + || ( ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] >= 200 ) && ( map1[ px2 + ( ( py3 ) * MapInfo[0] ) ] <= 219 ) ) ) + { + item[( i * item_data[2] ) + 4 ] = -1; + } + } + if ( item[( i * item_data[2] ) + 2 ] <= -14 ) + { + item[( i * item_data[2] ) + 0 ] = 0; + } + +} + +// アイテム同士に線を +void item_line( void ) +{ + int i; + int by; + int k; + int harfsize; + int x1; + int y1; + int x2; + int y2; + + k = 0; + i = 0; + by = 0; + harfsize = item_data[0] / 2; // 半分 + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + by = item[( i * item_data[2] ) + 3 ] / 100; + switch ( by ) + { + case 2: // 上方向 + case 3: + case 4: + if ( item[7 + ( i * item_data[2] )] >= 0 ) + { + k = item[7 + ( i * item_data[2] )]; // 支点の取得 + x1 = ( ( item[1 + ( i * item_data[2] )] + harfsize ) - d_x ) << 16; + y1 = ( ( 0 - item[2 + ( i * item_data[2] )] ) + MapInfo[3] - item_data[0] - d_y + harfsize - 1 ) << 16; + x2 = ( ( item[1 + ( k * item_data[2] )] + harfsize ) - d_x ) << 16; + y2 = ( ( 0 - item[2 + ( k * item_data[2] )] ) + MapInfo[3] - item_data[0] - d_y + harfsize - 1 ) << 16; + // 線の描画 + drawGRPline( x1, y1, x2, y2, SDL_MapRGB(g_screen->format,255,255,255) ); + } + break; + default: + break; + } + } + } +} +//アイテムの落下時に使用 +//進入不可アイテムが足元にある場合は、座標を返す +long item_up_Isitem( long item_index ) +{ + long i; + long bx; + long by; + long px; + long py; + + px = item[1 + ( item_index * item_data[2] )]; + py = item[2 + ( item_index * item_data[2] )]; + + for ( i = 0; i < item_data[1]; i++ ) + { +// if ( ( item[( i * item_data[2] ) + 0 ] == 1 ) && ( item_index != i ) ) + if ( ( item[( i * item_data[2] ) + 0 ] == 1 ) ) + { + //自分は判定しない + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + + if ( + ( by == 2 ) + || ( by == 3 ) + || ( by == 6 ) + || ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + if ( ( ( (item[1 + ( i * item_data[2] )] ) < ( px + item_data[0] - 5 ) ) /* 自機とのあたり判定 */ + && ( (px + 5) < (item[1 + ( i * item_data[2] )] + item_data[0] ) ) + && ( (item[2 + ( i * item_data[2] )] + 27 ) < (py + 10 ) ) + && ( (py - 1) < ( item[2 + ( i * item_data[2] )] + item_data[0] ) ) ) ) + { + return( item[2 + ( i * item_data[2] )] + 32 ); + } + } + } + } + if ( ( ( (player[0] + 10 ) < ( px + item_data[0] ) ) /* 自機とのあたり判定 */ + && ( (px ) < (player[0] + 22 ) ) + && ( (player[1] + 27 ) < (py + 10 ) ) + && ( (py - 1) < ( player[1] + 32 ) ) ) ) + { + return( player[1] + 32 ); + } + + return( -1 ); +} + +long item_up( ) +{ + long i; + long bx; + long by; + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + + if ( + ( by == 2 ) + || ( by == 3 ) + || ( by == 6 ) + || ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + if ( ( ( (item[1 + ( i * item_data[2] )] ) < (player[0] + 22 ) ) /* 自機とのあたり判定 */ + && ( (player[0] + 10 ) < (item[1 + ( i * item_data[2] )] + 32 ) ) + && ( (item[2 + ( i * item_data[2] )] + 27 ) < (player[1] + 10 ) ) + && ( (player[1] - 1 ) < ( item[2 + ( i * item_data[2] )] + 32 ) ) ) ) + { + return( item[2 + ( i * item_data[2] )] + 32 ); + } + } + } + } + return( -1 ); +} +long item_up2( ) +{ + long i; + long bx; + long by; + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + + if ( + ( by == 3 ) + || ( by == 6 ) + || ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + if ( ( ( (item[1 + ( i * item_data[2] )] ) < (player[0] + 22 ) ) /* 自機とのあたり判定 */ + && ( (player[0] + 10 ) < (item[1 + ( i * item_data[2] )] + 32 ) ) + && ( (item[2 + ( i * item_data[2] )] + 0 ) < (player[1] + 33 ) ) + && ( (player[1] + 20 ) < ( item[2 + ( i * item_data[2] )] + 32 ) ) ) ) + { + return( item[2 + ( i * item_data[2] )] - 32 ); + } + } + } + } + return( -1 ); +} + +/* アイテムに重なって上が押された時のイベント */ +long item_event( ) +{ + long i; + long rc; + long r_f; + + rc = 0; + + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + r_f = 0; + + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] ) < (player[0] + 22 ) ) /* 自機とのあたり判定 */ + && ( (player[0] + 10 ) < (item[1 + ( i * item_data[2] )] + 32 ) ) + && ( (item[2 + ( i * item_data[2] )] ) < (player[1] + 32 ) ) + && ( (player[1] + 5 ) < ( item[2 + ( i * item_data[2] )] + 32 ) ) ) + && ( player[14] == 10 ) ) + { + r_f = 1; + player[18] = 0; /* 着地モーションとほったらかしアニメーションの解除 */ + + } + + if ( ( r_f == 1 ) && ( item[( i * item_data[2] ) + 7 ] == 0 ) ) + { + if ( ( item[( i * 10 ) + 3 ] >= 100 ) && ( item[( i * 10 ) + 3 ] <= 220 ) ) /* 看板 */ + { + rc = 1; +// event_set( item[( i * 10 ) + 3 ] , i ); + } + break; + } + + } + } + return( rc ); +} + + +//敵作成 +/* マップファイルから生成する場合 */ +void enm_set( long type, long x, long y ) +{ + int i; + int size; + int syu; + int j; + + + for ( i = 0; i < enm_data[1]; i++ ) + { + if ( enemy[0 + ( i * enm_data[2] )] == 0 ) + { + for ( j = 0; j < enm_data[2] ; j++ ) + { + enemy[j + ( i * enm_data[2] )] = 0; + } + + + enemy[0 + ( i * enm_data[2] )] = 1; + enemy[1 + ( i * enm_data[2] )] = x; + enemy[2 + ( i * enm_data[2] )] = y; + size = type / 100; + syu = type % 100; + enemy[3 + ( i * enm_data[2] )] = size; +// if ( size >= 4 ) /* ボス */ +// { +// sprintf(string,"image/enm/boss%d.bmp", syu ); +// LoadBitmap(string[0],39 + size,true); //プレーンナンバー2にシステム用BMPを読み込む +// syu = 1; +// } + enemy[4 + ( i * enm_data[2] )] = syu; +// enemy[5 + ( i * enm_data[2] )] = e_hp( type ) ; + enemy[5 + ( i * enm_data[2] )] = 1 ; + enemy[6 + ( i * enm_data[2] )] = 0; /* やられカウンタ */ + enemy[7 + ( i * enm_data[2] )] = 0; /* 位置補正 */ + enemy[8 + ( i * enm_data[2] )] = 0; /* 表示パターン */ + enemy[9 + ( i * enm_data[2] )] = 0; /* 向き */ + enemy[10+ ( i * enm_data[2] )] = 0; /* 表示Y */ + enemy[11+ ( i * enm_data[2] )] = type; /* 種類 */ + enemy[12+ ( i * enm_data[2] )] = 0; /* ジャンプフレームカウンタ */ + enemy[13+ ( i * enm_data[2] )] = 0; /* ジャンプカウンタ */ + enemy[14+ ( i * enm_data[2] )] = x; /* 再配置情報X */ + enemy[15+ ( i * enm_data[2] )] = y; /* 再配置情報Y */ + enemy[16+ ( i * enm_data[2] )] = 0; /* 無敵時間 */ + enemy[17+ ( i * enm_data[2] )] = 0; /* ダメージ */ + enemy[18+ ( i * enm_data[2] )] = 1; /* 再配置を行うか */ + enemy[19+ ( i * enm_data[2] )] = 0;/* Gold */ + enemy[20+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[21+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[22+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[23+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[24+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[25+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[26+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[27+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[28+ ( i * enm_data[2] )] = 0; /* 移動量X */ + enemy[29+ ( i * enm_data[2] )] = 0; /* 移動量Y */ + + if ( size != 4 ) + { + all_snack_count++; + } + /* 配置時にイベントを行いたい場合はここの判断文を追加する */ +// if ( size >= 4 ) /* ボス */ +// { +// init_event_set_enm( enemy[11+ ( i * enm_data[2] )] , i ); /* 配置時のイベントを実行 */ +// } + break; + } + } +} + +//敵作成 +/* 敵から敵が生成される場合 */ +void enm_set2( long type, long x, long y ,long muki ) +{ + int i; + int size; + int syu; + int j; + + for ( i = 0; i < enm_data[1]; i++ ) + { + if ( enemy[0 + ( i * enm_data[2] )] == 0 ) + { + for ( j = 0; j < enm_data[2] ; j++ ) + { + enemy[j + ( i * enm_data[2] )] = 0; + } + + + enemy[0 + ( i * enm_data[2] )] = 1; + enemy[1 + ( i * enm_data[2] )] = x; + enemy[2 + ( i * enm_data[2] )] = y; + size = type / 100; + syu = type % 100; + enemy[3 + ( i * enm_data[2] )] = size; +// if ( size >= 4 ) /* ボス */ +// { +// sprintf(string,"image/enm/boss%d.bmp", syu ); +// LoadBitmap(string[0],39 + size,true); //プレーンナンバー2にシステム用BMPを読み込む +// syu = 1; +// } + enemy[4 + ( i * enm_data[2] )] = syu; +// enemy[5 + ( i * enm_data[2] )] = e_hp( type ) ; + enemy[5 + ( i * enm_data[2] )] = 1 ; + enemy[6 + ( i * enm_data[2] )] = 0; /* やられカウンタ */ + enemy[7 + ( i * enm_data[2] )] = 0; /* 位置補正 */ + enemy[8 + ( i * enm_data[2] )] = 0; /* 表示パターン */ + enemy[9 + ( i * enm_data[2] )] = muki; /* 向き */ + enemy[10+ ( i * enm_data[2] )] = 0; /* 表示Y */ + enemy[11+ ( i * enm_data[2] )] = type; /* 種類 */ + enemy[12+ ( i * enm_data[2] )] = 0; /* ジャンプフレームカウンタ */ + enemy[13+ ( i * enm_data[2] )] = 0; /* ジャンプカウンタ */ + enemy[14+ ( i * enm_data[2] )] = x; /* 再配置情報X */ + enemy[15+ ( i * enm_data[2] )] = y; /* 再配置情報Y */ + enemy[16+ ( i * enm_data[2] )] = 0; /* 無敵時間 */ + enemy[17+ ( i * enm_data[2] )] = 0; /* ダメージ */ + enemy[18+ ( i * enm_data[2] )] = 0; /* 再配置を行うか */ + enemy[19+ ( i * enm_data[2] )] = 0;/* Gold */ + enemy[20+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[21+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[22+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[23+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[24+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[25+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[26+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[27+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[28+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + enemy[29+ ( i * enm_data[2] )] = 0; /* 動作用バッファ */ + + +// if ( size >= 4 ) /* ボス */ +// { +// init_event_set_enm( enemy[11+ ( i * enm_data[2] )] , i ); +// } + break; + } + } +} + + +/* 敵のHPを設定(e_setで使われる) */ +long e_hp( long type ) +{ + long rc; + rc = 1; + if ( ( type / 100 ) == 1 ) /* 32 */ + { + rc = enm1_parameter[ 10 * ( type - 100 ) + 0 ]; + } + if ( ( type / 100 ) == 2 ) /* 48 */ + { + rc = enm2_parameter[ 10 * ( type - 200 ) + 0 ]; + } + if ( ( type / 100 ) == 3 ) /* 64 */ + { + rc = enm3_parameter[ 10 * ( type - 300 ) + 0 ]; + } + if ( ( type / 100 ) == 4 ) /* 128 */ + { + rc = enm4_parameter[ 10 * ( type - 400 ) + 0 ]; + } + return ( rc ); +} + +void enm_disp() +{ + long i; + long k; + long size ; + long size2; + long akt_size2; + long p_h; + long all; + long size_hosei_x; + long size_hosei_y; + long isclaer; + long is_tukami; + long disp_x_j; + long disp_y_j; + + disp_x_j = 0; + disp_y_j = 0; + + is_tukami = 0; + isclaer = 0; + size_hosei_x = 0; + size_hosei_y = 0; + p_h = 32; /* プレイヤーの当たり判定 */ + all = 1; + size = 0; + akt_size2 = 0; + + for ( i = 0; i < enm_data[1]; i++ ) + { + if ( enemy[0 +( i * enm_data[2] )] == 1 ) + { + if ( enemy[3 + ( i * enm_data[2] )] != 4 ) /* 4ボス */ + { + isclaer = 1; + } + all = 0; + /* 無敵時間が存在する場合はカウント */ + if ( enemy[16 + ( i * enm_data[2] )] > 0 ) + { + enemy[16 + ( i * enm_data[2] )]--; + } + + /* 敵のサイズ取得 */ + if ( enemy[3 + ( i * enm_data[2] )] == 1 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 2 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 3 ) + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 4 ) /* 4ボス */ + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 5 ) /* 5ボス */ + { + size = 32; + } + if ( enemy[3 + ( i * enm_data[2] )] == 6 ) /* 6ボス */ + { + size = 32; + } + + /* ボスのサイズ補正 */ +// if ( ( enemy[11+ ( i * enm_data[2] )] == 401 ) || ( enemy[11+ ( i * enm_data[2] )] == 501 ) ) +// { +// size_hosei_x = 5; +// size_hosei_y = 10; +// } +// else +// { + size_hosei_x = 5; + size_hosei_y = 10; +// } + + /* 画面内の敵だけ描画する */ + disp_x_j = enemy[1 + ( i * enm_data[2] )]; + disp_y_j = ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3]; + + if ( ( ( ( d_x - size ) <= ( disp_x_j ) ) + && ( ( d_y - size ) <= ( disp_y_j ) ) + && ( ( d_x + 320 + size ) >= ( disp_x_j ) ) + && ( ( d_y + 240 + size ) >= ( disp_y_j ) ) ) + || ( bak_alldrow == 1 ) /* 背景の描画をクリップするか */ + ) + { + + if ( enemy[6 + ( i * enm_data[2] )] > 0 ) /* やられ */ + { + if ( ( ( enemy[16 + ( i * enm_data[2] )] % 2 ) == 0 ) || ( sn != 1 ) ) + { +// if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* ボスのときは表示方法が違う */ +// { +// BltRect( 39 + enemy[3 + ( i * enm_data[2] )] , enemy[1 + ( i * enm_data[2] )] - d_x, ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3] - size - d_y, ( size * 4 ) , size + ( size * enemy[9 + ( i * enm_data[2] )] ), size, size ); +// } +// else +// { + BltRect( 39 + enemy[3 + ( i * enm_data[2] )], + enemy[1 + ( i * enm_data[2] )] - d_x, + ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3] - size - d_y, + ( size * 8 ) + ( enemy[9 + ( i * enm_data[2])] * size ), + size * ( enemy[4 + ( i * enm_data[2] )] + enemy[10+ ( i * enm_data[2] )] ), + size, + size ); +// } + } + } + else + { + + if ( ( ( enemy[16 + ( i * enm_data[2] )] % 2 ) == 0 ) || ( sn != 1 ) ) + { +// if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* ボスのときは表示方法が違う */ +// { +// BltRect( 39 + enemy[3 + ( i * enm_data[2] )] , +// enemy[1 + ( i * enm_data[2] )] - d_x, +// ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3] - size - d_y, +// ( size * enemy[8 + ( i * enm_data[2] )] ) , +// size * ( enemy[4 + ( i * enm_data[2] )] + enemy[10+ ( i * enm_data[2] )] ) + ( enemy[9 + ( i * enm_data[2] )] * size ), +// size, +// size ); +// } +// else +// { +// BltRect( 39 + enemy[3 + ( i * enm_data[2] )] , + if ( enemy[3 + ( i * enm_data[2] )] == 4 ) //隠しアイテム + { + if ( snack_count == 1 ) + { + BltRect( 40 , + enemy[1 + ( i * enm_data[2] )] - d_x, + ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3] - size - d_y, + ( size * enemy[8 + ( i * enm_data[2] )] ) + ( enemy[9 + ( i * enm_data[2] )] * ( size * 4 ) ) + ( ( enemy[3 + ( i * enm_data[2] )] - 1 ) * 128 ) , + size * ( enemy[4 + ( i * enm_data[2] )] + enemy[10+ ( i * enm_data[2] )] ), + size, + size ); + } + } + else + { + BltRect( 40 , + enemy[1 + ( i * enm_data[2] )] - d_x, + ( 0 - enemy[2 + ( i * enm_data[2] )] ) + MapInfo[3] - size - d_y, + ( size * enemy[8 + ( i * enm_data[2] )] ) + ( enemy[9 + ( i * enm_data[2] )] * ( size * 4 ) ) + ( ( enemy[3 + ( i * enm_data[2] )] - 1 ) * 128 ) , + size * ( enemy[4 + ( i * enm_data[2] )] + enemy[10+ ( i * enm_data[2] )] ), + size, + size ); + } +// } + } + } + } + + /* 画面内の敵だけ描画する */ + if ( ( ( d_x - 320 - 64 ) <= ( disp_x_j ) ) + && ( ( d_y - 240 - 64 ) <= ( disp_y_j ) ) + && ( ( d_x + 640 + 64 ) >= ( disp_x_j ) ) + && ( ( d_y + 480 + 64 ) >= ( disp_y_j ) ) ) + { + e_move( i ); /* 敵キャラ種類別動作 */ + } + + /* ボスは画面外へ移動しない */ +#if false + if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* 5ボス */ + { + if ( enemy[i * enm_data[2] + 1] > ( MapInfo[2] - size ) ) + { + enemy[i * enm_data[2] + 1] = ( MapInfo[2] - size ); + } + if ( enemy[i * enm_data[2] + 1] < 1 ) + { + enemy[i * enm_data[2] + 1] = 1; + } + } +#endif + /* 画面外へ移動した場合は消去 */ + if ( ( enemy[1 + ( i * enm_data[2] )] >= ( MapInfo[2] + size ) ) + || ( enemy[1 + ( i * enm_data[2] )] <= ( 0 - size ) ) + || ( enemy[2 + ( i * enm_data[2] )] <= ( 0 - size ) ) + || ( enemy[2 + ( i * enm_data[2] )] >= ( MapInfo[3] + size ) ) ) + { +// /* 画面外の場合に再配置を行う */ +// if ( enemy[18 + ( i * enm_data[2] )] == 1 ) +// { +// set_enmreset_tbl( enemy[14 + ( i * enm_data[2] )], enemy[15 + ( i * enm_data[2] )], enemy[11 + ( i * enm_data[2] )] ); +// } +// enemy[0 + ( i * enm_data[2] )] = 0; + } +/* + if ( sn != 1 ) + { + return; + } +*/ + + /* プレイヤーとの当たり判定 */ + if ( ( ( (enemy[1 + i * enm_data[2]] + size_hosei_x ) < (player[0] + char_size[3] ) ) /* 自機とのあたり判定 */ + && ( (player[0] + char_size[2] ) < (enemy[1 + i * enm_data[2]] + size - size_hosei_x ) ) + && ( (enemy[2 + i * enm_data[2]] + size_hosei_y ) < (player[1] + p_h) ) + && ( (player[1] + 5 ) < ( enemy[2 + i * enm_data[2]] + size - size_hosei_y - 10 ) ) ) + && ( player[17] == 0 ) /* 無敵時間が無い */ + && ( enemy[6 + i * enm_data[2]] == 0 ) ) /* 敵の無敵時間がない */ + { + if ( gameflag[128] == 0 ) //マップビューではない + { + if ( enemy[3 + ( i * enm_data[2] )] == 4 ) + { + if ( snack_count == 1 ) + { + enemy[0 + i * enm_data[2]] = 0; /* 消去 */ + soundPlaySe( EN_SE_L1 ); + p_shot_f2_set( ( enemy[1 + i * enm_data[2]] ) , ( enemy[2 + i * enm_data[2]] ), 0 ); + p_shot_f_set( 160 ,120, enemy[11 + i * enm_data[2]] ); + player[24] = 180; + player[31] = 70; //カットイン + player[32] = ( rand( ) % 3 ); //カットイン + secretitemget = 1; /* 隠しアイテムの取得 */ + } + } + else + { + enemy[0 + i * enm_data[2]] = 0; /* 消去 */ + soundPlaySe( EN_SE_L1 ); + p_shot_f2_set( ( enemy[1 + i * enm_data[2]] ) , ( enemy[2 + i * enm_data[2]] ), 0 ); + p_shot_f_set( 160 ,120, enemy[11 + i * enm_data[2]] ); + player[31] = 70; //カットイン + player[32] = ( rand( ) % 3 ); //カットイン + } + } + } + + /* 倒せない特別な敵(針等) */ + +// if ( +// ( ( enemy[11 + i * enm_data[2]] == 406 ) && ( ( enemy[8+ ( i * enm_data[2] )] == 1 ) || ( enemy[8+ ( i * enm_data[2] )] == 2 ) ) ) /* 6ボス */ +// ) +// { +// } +// else + { + /* 敵とオブジェクトの当たり判定 */ + for ( k = 0; k < 40 ; k++ ) + { + /* オブジェクトのサイズ */ + size2 = 32; + /* プレイヤーの弾との当たり判定 */ + if ( ( ( ( enemy[1 + i * enm_data[2]] + size_hosei_x ) < ( ( pmshot[5 + k * 20] >> 16 ) + size2 ) ) + && ( ( ( pmshot[5 + k * 20] >> 16 ) + akt_size2 ) < ( enemy[1 + i * enm_data[2]] + size - size_hosei_x ) ) + && ( ( enemy[2 + i * enm_data[2]] + size_hosei_y ) < ( ( pmshot[6 + k * 20] >> 16 ) + size2 ) ) + && ( ( ( pmshot[6 + k * 20] >> 16 ) + akt_size2 ) < ( enemy[2 + i * enm_data[2]] + size - size_hosei_y - 10 ) ) ) + && ( pmshot[2 + k * 20] == 1 ) ) + { + /* 無敵時間が存在しない */ + if ( enemy[16 + ( i * enm_data[2] )] == 0 ) + { + /* 攻撃が効かない特別な敵 */ +#if false + if ( + ( ( enemy[11 + ( i * enm_data[2] )] == 114 ) && ( enemy[ 9 + ( i * enm_data[2] )] == 1 ) && ( pmshot[3 + k * 20] == 2 ) ) /* コサクン */ + || ( ( enemy[11 + ( i * enm_data[2] )] == 114 ) && ( enemy[ 9 + ( i * enm_data[2] )] == 0 ) && ( pmshot[3 + k * 20] == 3 ) ) /* コサクン */ + || ( ( enemy[11 + ( i * enm_data[2] )] == 114 ) && ( pmshot[3 + k * 20] == 1 ) ) /* コサクン */ + || ( ( enemy[11 + ( i * enm_data[2] )] == 112 ) && ( enemy[8 + ( i * enm_data[2] )] == 0 ) ) /* アーン */ + || ( ( enemy[11 + ( i * enm_data[2] )] == 112 ) && ( enemy[8 + ( i * enm_data[2] )] == 1 ) ) /* アーン */ + ) + { + pmshot[2 + k * 20] = 0; /* 弾消去 */ + se_wav( 2 ); + /* 下攻撃の場合はジャンプ */ + if ( pmshot[3 + k * 20] == 1 ) + { + /* はねる */ + player[10] = 0; /* アニメーションフレームカウンタのクリア */ + player[11] = 0; /* アニメーションカウンタのクリア */ + player[2] = 21; /* 空中状態 */ + + player[14] = 5; /* ジャンプ力の設定、これによって高さが変わる 1〜9 */ + player[13] = 0; /* ジャンプフレームカウンタのクリア */ + // player[25] = 1; /* ボタンを押してジャンプしたフラグ */ + } + } + else + { + /* 攻撃ヒット効果の表示を配置 */ + p_shot_f_set( ( pmshot[5 + k * 20] >> 16 ) , ( pmshot[6 + k * 20] >> 16 ), 0 ); + + /* 敵HPを減少 */ + enemy[5 + ( i * enm_data[2] )] = enemy[5 + ( i * enm_data[2] )] - 1; + + /* 向き設定 */ + if ( enemy[3 + ( i * enm_data[2] )] < 4 ) /* 4ボスは変わらない */ + { + if ( pmshot[10 + k * 20] == 1 ) + { + enemy[9 + ( i * enm_data[2] )] = 0; + } + else + { + enemy[9 + ( i * enm_data[2] )] = 1; + } + } + +// pmshot[2 + k * 20] = 0; /* 弾消去 */ + if ( enemy[5 + ( i * enm_data[2] )] <= 0 ) /* 倒した */ + { + + /* 倒した際のイベントを実行 */ + /* ボス以外でも行う場合はここの判断文を追加 */ + if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* 4ボス */ + { + enemy[16 + ( i * enm_data[2] )] = 59; /* 無敵時間の設定 */ +// boss_dead( enemy[1 + ( i * enm_data[2] )], enemy[2 + ( i * enm_data[2] )], i ); +// event_set_enm( enemy[11 + ( i * enm_data[2] )] , i ); +#if false + for ( l = 0; l < enm_data[1]; l++ ) + { + enemy[5 + ( l * enm_data[2] )] = 0; + enemy[6 + ( l * enm_data[2] )] = 60; /* 消去 */ + enemy[16 + ( l * enm_data[2] )] = 60; + } +#endif + } + + p_shot_f2_set( ( pmshot[5 + k * 20] >> 16 ) - 4, ( pmshot[6 + k * 20] >> 16 ) + 4, 0 ); + enemy[6 + ( i * enm_data[2] )] = 30; /* ダメージくらいモーション表示フレーム数 */ + enemy[16 + ( i * enm_data[2] )] = 60; /* 無敵時間の設定 */ + se_wav( 5 ); + } + else + { + /* 倒してない */ + /* 無敵時間設定 */ + enemy[6 + ( i * enm_data[2] )] = 30; /* のけぞり時間 */ + enemy[7 + ( i * enm_data[2] )] = 6; /* 位置補正 */ + enemy[16 + ( i * enm_data[2] )] = 60; /* 無敵時間 */ + se_wav( 4 ); + if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* ボスのときはのけぞりがない */ + { + enemy[6 + ( i * enm_data[2] )] = 0; /* のけぞり時間 */ + enemy[7 + ( i * enm_data[2] )] = 0; /* 位置補正 */ + } + } + } +#endif + } + } + } + } + + if ( enemy[7 + ( i * enm_data[2] )] > 0 ) + { + enemy[7 + ( i * enm_data[2] )]--; /* 移動補正 */ + /* 壁に埋まらないように判定 */ + if ( enemy[9 + ( i * enm_data[2] )] == 0 ) + { + if ( ( ( map1_item_j( enemy[1 + ( i * enm_data[2] )] - 4 , enemy[2 + ( i * enm_data[2] )] + 2 ) >= 100 ) + && ( map1_item_j( enemy[1 + ( i * enm_data[2] )] - 4 , enemy[2 + ( i * enm_data[2] )] + 2 ) <= 119 ) ) + || ( ( map1_item_j( enemy[1 + ( i * enm_data[2] )] - 4 , enemy[2 + ( i * enm_data[2] )] + 2 ) >= 200 ) + && ( map1_item_j( enemy[1 + ( i * enm_data[2] )] - 4 , enemy[2 + ( i * enm_data[2] )] + 2 ) <= 219 ) ) ) + { + } + else + { + enemy[1 + ( i * enm_data[2] )] = enemy[1 + ( i * enm_data[2] )] - ( enemy[7 + ( i * enm_data[2] )] * enemy[7 + ( i * enm_data[2] )] ); + } + } + else + { + if ( ( ( map1_item_j( enemy[1 + ( i * enm_data[2] )] + size + 4, enemy[2 + ( i * enm_data[2] )] + 2 ) >= 100 ) + && ( map1_item_j( enemy[1 + ( i * enm_data[2] )] + size + 4, enemy[2 + ( i * enm_data[2] )] + 2 ) <= 119 ) ) + || ( ( map1_item_j( enemy[1 + ( i * enm_data[2] )] + size + 4, enemy[2 + ( i * enm_data[2] )] + 2 ) >= 200 ) + && ( map1_item_j( enemy[1 + ( i * enm_data[2] )] + size + 4, enemy[2 + ( i * enm_data[2] )] + 2 ) <= 219 ) ) ) + { + } + else + { + enemy[1 + ( i * enm_data[2] )] = enemy[1 + ( i * enm_data[2] )] + ( enemy[7 + ( i * enm_data[2] )] * enemy[7 + ( i * enm_data[2] )] ); + } + } + } + + /* ダメージくらいモーション */ + if ( enemy[6 + ( i * enm_data[2] )] > 0 ) + { + enemy[6 + ( i * enm_data[2] )]--; /* 消えるまでカウンタ */ + if ( enemy[6 + ( i * enm_data[2] )] == 0 ) + { + if ( enemy[5 + ( i * enm_data[2] )] <= 0 ) /* HPが無い場合 */ + { + if ( enemy[3 + ( i * enm_data[2] )] >= 4 ) /* ボス */ + { + se_wav( 18 ); /* ボスを倒した効果音 */ + + } + else + { +#if false + if ( Rand( 5 ) == 0 ) /* ライフ出現 */ + { + se_wav( 7 ); + kane_set( enemy[1 + ( i * enm_data[2] )] + ( ( size / 2 ) - 16 ), enemy[2 + ( i * enm_data[2] )] , 0, enemy[19+ ( i * enm_data[2] )] ); + } + else + { + se_wav( 7 ); + kane_set( enemy[1 + ( i * enm_data[2] )] + ( ( size / 2 ) - 16 ), enemy[2 + ( i * enm_data[2] )] , 1, enemy[19+ ( i * enm_data[2] )] ); + } + /* 画面外の場合に再配置を行う */ + if ( enemy[18 + ( i * enm_data[2] )] == 1 ) + { + set_enmreset_tbl( enemy[14 + ( i * enm_data[2] )], enemy[15 + ( i * enm_data[2] )], enemy[11 + ( i * enm_data[2] )] ); + } +#endif + } + enemy[0 + ( i * enm_data[2] )] = 0; /* 消去 */ + + } + } + } + } + } + +// if ( ( isclaer == 0 ) && ( sn == 1 ) ) + if ( ( isclaer == 0 ) ) /* ミスしてとってもクリア */ + { + /* 全部とった */ +// player[14] = 0; +// player[9] = 0; + + sn = 2; + demo[0] = 0; + } +} + +void e_move( long i ) +{ + + if ( enemy[6 + ( i * enm_data[2] )] > 0 ) + { + return; + } + if ( enemy[5 + ( i * enm_data[2] )] <= 0 ) /* 倒した */ + { + return; + } + + enemy[8 + ( i * enm_data[2] )] = map_rot_info; /* アニメーションパターン */ + enemy[9 + ( i * enm_data[2] )] = 0; /* アニメーションパターン */ + enemy[14 + ( i * enm_data[2] )] = 0; + +} + +/* ボスを倒した演出 */ +void boss_dead( long x, long y ) +{ +/* + long i; + long xx; + long yy; + for ( i = 0; i < 100; i++ ) + { +// BltFromBackupPlane(); // バックアッププレーンからのBlt + if ( ( i % 10 ) == 0 ) + { + xx = ( rand( ) % 96 ); + yy = ( rand( ) % 96 ); + se_wav( 24 + ( rand( ) % 3 ) ); + p_shot_f_set( x + xx, y + yy, 0 ); + p_shot_f2_set( x + xx + 15, y + yy + 15, 0 ); + } + p_shot_f_disp( ); + p_shot_f2_disp( ); + halt; + } +*/ +} + +//----------------------------------------------------------------------------------- +/* 敵ショット生成 */ +void e_shot_set( long type , long i , long x, long y ) +{ + long ii; + long j; + long rg; + long mx; + long my; + + /* 発生位置X */ + /* 発生位置Y */ + for ( ii = 0; ii < 20; ii++ ) + { + if ( mgc_e[ii * 10 + 0] == 0 ) /* 存在してない */ + { + + for ( j = 0 ; j <= 9 ;j++ ) + { + mgc_e[ii * 10 + j] = 0; + } + if ( type == 1061 ) /* ヤドカリ */ + { + mx = ( ( 32 / 2 ) - 5 ) + player[0] - x; + my = ( ( 32 / 2 ) - 5 ) + player[1] - y; + rg = funcTan2( mx, my ); + rg = ( 90 ); + mgc_e[ii * 10 + 1] = x << 16; /* X */ + mgc_e[ii * 10 + 2] = y << 16; /* Y */ + mgc_e[ii * 10 + 3] = 0; /* アニメーションカウンタ */ + mgc_e[ii * 10 + 4] = funcSin( rg ) * 4; /* 移動方向 */ + mgc_e[ii * 10 + 5] = funcCos( rg ) * 4; /* 移動方向 */ + mgc_e[ii * 10 + 6] = 6; /* ダメージ */ + mgc_e[ii * 10 + 7] = 2; /* 属性 */ + mgc_e[ii * 10 + 9] = type; /* タイプplayer[10] */ + } + + mgc_e[ii * 10 + 0] = 1; /* 存在あり */ + break; + } + } + +} +/* ショット移動 */ +void e_shot_disp( ) +{ + long i; + long p_h; + long size ; + + p_h = 22; /* プレイヤーの当たり判定 */ + size = 0; + + /* 発生位置X */ + /* 発生位置Y */ + for ( i = 0; i < 20; i++ ) + { + if ( mgc_e[i * 10 + 0] == 1 ) /* 存在している */ + { + if ( mgc_e[i * 10 + 9] == 4010 ) /* 1ボス */ + { + size = 32; + BltRect( 50, ( mgc_e[i * 10 + 1] >> 16 ) - d_x , ( 0 - ( mgc_e[i * 10 + 2] >> 16 ) ) + 480 - 32 - d_y, mgc_e[i * 10 + 3] * 32, 0 , 32, 32 ); + mgc_e[i * 10 + 1] = mgc_e[i * 10 + 1] + mgc_e[i * 10 + 4]; /* X */ + mgc_e[i * 10 + 2] = mgc_e[i * 10 + 2] + mgc_e[i * 10 + 5]; /* Y */ + mgc_e[i * 10 + 3]++; /* アニメーションカウンタ */ + if ( mgc_e[i * 10 + 3] >= 4 ) + { + mgc_e[i * 10 + 3] = 0; + } + } + + /* プレイヤーとの当たり判定 */ + if ( ( ( ( ( mgc_e[1 + i * 10] >> 16 ) ) < (player[0] + 22 ) ) /* 自機とのあたり判定 */ + && ( (player[0] + 10 ) < ( ( mgc_e[1 + i * 10] >> 16 ) + size ) ) + && ( ( ( mgc_e[2 + i * 10] >> 16 ) ) < (player[1] + p_h) ) + && ( (player[1] + 5 ) < ( ( mgc_e[2 + i * 10] >> 16 ) + size ) ) ) + && ( player[17] == 0 ) ) + { + player[10] = 0; + player[11] = 0; + player[12] = 4; + player[13] = 0; + player[2] = 31; /* ダメージ */ + player[17] = 120; /* 無敵時間 */ + player[8] = player[8] - 1; + + se_wav( 1 ); + } + + + if ( ( ( mgc_e[i * 10 + 1] >> 16 ) >= 640 ) || ( ( mgc_e[i * 10 + 1] >> 16 ) <= 0 ) || ( ( mgc_e[i * 10 + 2] >> 16 ) <= -100 )|| ( ( mgc_e[i * 10 + 2] >> 16 ) >= 480 )) + { + mgc_e[i * 10 + 0] = 0; + } + } + } +} + +/* 敵用ジャンプ */ +void enmjmp( long i ) +{ + long y1; + long px ; + long px1 ; + long px2 ; + long py ; + long py2 ; + + long size; + long e10; + /* 画面外では行わない */ +/* + if ( enemy[1 + ( i * 20 )] > 460 ) + { + return; + } +*/ + if ( enemy[3 + ( i * 20 )] == 1 ) + { + size = 16; + } + else if ( enemy[3 + ( i * 20 )] == 2 ) + { + size = 24; + } + else + { + size = 16; + } + + if ( enemy[13 + ( i * 20 )] == 10 ) + { + /* 今回の位置 */ + px = ( enemy[1 + ( i * 20 )] + 32 ) / 32; + px1 = ( enemy[1 + ( i * 20 )] + size ) / 32; + px2 = ( enemy[1 + ( i * 20 )] + size ) / 32; + py = ( 16 - ( ( enemy[2 + ( i * 20 )] + 28 ) / 32 ) ); + /* 100 〜 200は地面 */ + if ( ( !( ( map1[ px1 + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 119 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 119 ) ) ) + && ( !( ( map1[ px1 + ( ( py ) * 20 ) ] >= 200 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 219 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * 20 ) ] >= 200 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 219 ) ) ) + && ( !( ( map1[ px1 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 619 ) ) ) + && ( !( ( map1[ px2 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 619 ) ) ) ) + { + enemy[13+ ( i * 20 )] = 0; + enemy[12+ ( i * 20 )] = 0; + } + else + { + return; + } + } + + enemy[12 + ( i * 20 )]++; + if ( enemy[12+ ( i * 20 )] >= 10 ) + { + enemy[12+ ( i * 20 )] = 0; + + enemy[13 + ( i * 20 )] = enemy[13 + ( i * 20 )] - 3; +// if ( player[5] == 0 ) +// { +// player[5] = -3; +// } + if ( ( enemy[13 + ( i * 20 )] <= 2 ) && ( enemy[13 + ( i * 20 )] > -2 ) ) + { + enemy[13 + ( i * 20 )] = -3; + } + if ( enemy[13 + ( i * 20 )] < -8 ) + { + enemy[13 + ( i * 20 )] = -8; + } + /* 地面判定 */ + } + + + /* 画面端で落ちるのを防止 */ + e10 = enemy[13 + ( i * 20 )]; + if ( enemy[1+ ( i * 20 )] > ( 630 - size - size ) ) + { + if ( enemy[13+ ( i * 20 )] < 0 ) /* 落下 */ + { + e10 = 0; + } + } + + + /* 今回の位置 */ + y1 = ( ( 0 - e10 ) * ( 0 - e10 ) * ( 0 - e10 ) ); +// player[1] = player[1] - ( y1 / 30 ); + + + enemy[2 + ( i * 20 )] = enemy[2 + ( i * 20 )] - ( y1 / 25 ); + px1 = ( enemy[1 + ( i * 20 )] + size ) / 32; + px2 = ( enemy[1 + ( i * 20 )] + size ) / 32; + py = ( 16 - ( ( enemy[2 + ( i * 20 )] + 28 ) / 32 ) ); + py2 = ( 16 - ( ( enemy[2 + ( i * 20 )] + 49 + 48 ) / 32 ) ); +// py = ( 16 - ( ( player[1] ) / 32 ) ); + + if ( enemy[2 + ( i * 20 )] > 480 ) + { + return; + } + + if ( enemy[13 + ( i * 20 )] <= 0 ) /* 上り中は判定しない */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 119 ) ) + || ( ( map1[ px1 + ( ( py ) * 20 ) ] >= 200 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 219 ) ) + || ( ( map1[ px1 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 619 ) ) + || ( ( map1[ px2 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 619 ) ) ) + { + enemy[2 + ( i * 20 )] = ( ( 16 - py ) * 32 ) - 16; + enemy[13 + ( i * 20 )] = 10; + } + } + else /* 上昇中 */ + { + if ( enemy[1+ ( i * 20 )] < ( 630 - size - size ) ) + { + px = ( enemy[1 + ( i * 20 )] + size ) / 32; + py = ( 16 - ( ( enemy[2 + ( i * 20 )] - ( y1 / 25 ) + 16 + 48 ) / 32 ) ); + + /* 地面判定 */ + if ( ( ( map1[ px + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px + ( ( py ) * 20 ) ] <= 119 ) ) + || ( ( map1[ px + ( ( py ) * 20 ) ] >= 200 ) && ( map1[ px + ( ( py ) * 20 ) ] <= 219 ) ) ) + { + enemy[13+ ( i * 20 )] = -3; + enemy[12+ ( i * 20 )] = 0; + } + } + + } + if ( enemy[2 + ( i * 20 )] <= -14 ) + { + enemy[0 + ( i * 20 )] = 0; + } + +} + + +/* 移動後の座標のマスを返す */ +long map1_item_j( long x, long y ) +{ + int px ; + int py ; + int i; + int rc; + long bx; + long by; + + px = ( x ) / 32; + py = ( MapInfo[1] - 1 - ( ( y ) / 32 ) ); + + if ( py <= 0 ) + { + py = 0; + } + + rc = map1[ px + ( ( py ) * MapInfo[0] ) ]; + + /* アイテムとのあたり判定 */ + for ( i = 0; i < item_data[1]; i++ ) + { + if ( item[( i * item_data[2] ) + 0 ] == 1 ) + { + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] ) < ( x ) ) /* 自機とのあたり判定 */ + && ( ( x ) < (item[1 + ( i * item_data[2] )] + ( item_data[0] - 1 ) ) ) + && ( (item[2 + ( i * item_data[2] )] ) < ( y ) ) + && ( ( y ) < ( item[2 + ( i * item_data[2] )] + item_data[0] ) ) ) ) + { + if ( +// ( by == 2 ) + ( by == 3 ) + || ( by == 6 ) + || ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + rc = 101; + break; + } + } + } + + } + + + return( rc ); + + + + +} +long map1_item_j_Isitem( long x, long y, long item_index ) +{ + int px ; + int py ; + int i; + int rc; + long bx; + long by; + + px = ( x ) / 32; + py = ( MapInfo[1] - 1 - ( ( y ) / 32 ) ); + + if ( py <= 0 ) + { + py = 0; + } + + rc = map1[ px + ( ( py ) * MapInfo[0] ) ]; + + /* アイテムとのあたり判定 */ + for ( i = 0; i < item_data[1]; i++ ) + { + if ( ( item[( i * item_data[2] ) + 0 ] == 1 ) && ( item_index != i ) ) + { + bx = item[3 + ( i * item_data[2] )] % 100 ; + by = item[3 + ( i * item_data[2] )] / 100 ; + /* プレイヤーとの当たり判定 */ + if ( ( ( (item[1 + ( i * item_data[2] )] ) < ( x ) ) /* 自機とのあたり判定 */ + && ( ( x ) < (item[1 + ( i * item_data[2] )] + ( item_data[0] - 1 ) ) ) + && ( (item[2 + ( i * item_data[2] )] ) < ( y ) ) + && ( ( y ) < ( item[2 + ( i * item_data[2] )] + item_data[0] ) ) ) ) + { + if ( +// ( by == 2 ) + ( by == 3 ) + || ( by == 6 ) + || ( ( by == 10 ) && ( bx == 7 ) ) + ) + { + rc = 101; + break; + } + } + } + + } + + + return( rc ); + + + + +} + + +void kane_set( long x, long y ) +{ + long i; + + for ( i = 0; i < 20; i++ ) + { + if ( kane[0 + ( i * 10 )] == 0 ) + { + kane[0 + ( i * 10 )] = 1; + kane[1 + ( i * 10 )] = x; + kane[2 + ( i * 10 )] = y; + kane[4 + ( i * 10 )] = 0; + kane[3 + ( i * 10 )] = 0; + kane[5 + ( i * 10 )] = 0; + kane[6 + ( i * 10 )] = 6; + kane[7 + ( i * 10 )] = 0; + kane[8 + ( i * 10 )] = 0; + kane[9 + ( i * 10 )] = 0; + break; + } + } +} + +void kane_disp( ) +{ + long i; + + for ( i = 0; i < 20; i++ ) + { + if ( kane[0 + ( i * 10 )] == 1 ) + { + kane[8 + ( i * 10 )]++; + if ( kane[8 + ( i * 10 )] >= 10 ) + { + kane[8 + ( i * 10 )] = 0; + kane[7 + ( i * 10 )]++; + if ( kane[7 + ( i * 10 )] >= 4 ) + { + kane[7 + ( i * 10 )] = 0; + } + } + if ( ( ( kane[9 + ( i * 10 )] % 2 ) == 0 ) || ( kane[9 + ( i * 10 )] < 240 ) ) + { + BltRect( 12 , kane[1 + ( i * 10 )] - d_x, ( 0 - kane[2 + ( i * 10 )] ) + 480 - 32 - d_y, 32 * 4 , 0, 32, 32 ); + } + + kane[9 + ( i * 10 )]++; + if ( kane[9 + ( i * 10 )] >= 300 ) + { + kane[0 + ( i * 10 )] = 0; + } + kane[5 + ( i * 10 )]++; + if ( kane[5 + ( i * 10 )] >= 10 ) + { + kane[5 + ( i * 10 )] = 0; + } + + k_jmp( i ); + /* とった */ + if ( ( ( (kane[1 + ( i * 10 )] ) < (player[0] + 10 ) ) /* 自機とのあたり判定 */ + && ( (player[0] + 22 ) < (kane[1 + ( i * 10 )] + 32 ) ) + && ( (kane[2 + ( i * 10 )] ) < (player[1] + 32 ) ) + && ( (player[1] + 5 ) < ( kane[2 + ( i * 10 )] + 32 ) ) ) ) + { + se_wav( 15 ); + player[8]++; + if ( player[8] > save_data[6] ) + { + player[8] = save_data[6]; + } + kane[0 + ( i * 10 )] = 0; + } + } + } +} +/* ジャンプY位置計算 */ +void k_jmp( long i ) +{ + long y1; + long px1 ; + long px2 ; + long py ; + long py2 ; + long py3 ; + + if ( kane[6 + ( i * 10 )] == 10 ) + { + return; + } + + if ( kane[5 + ( i * 10 )] == 0 ) + { + kane[6 + ( i * 10 )] = kane[6 + ( i * 10 )] - 3; + if ( ( kane[6 + ( i * 10 )] <= 2 ) && ( kane[6 + ( i * 10 )] > -2 ) ) + { + kane[6 + ( i * 10 )] = -3; + } + if ( kane[6 + ( i * 10 )] < -8 ) + { + kane[6 + ( i * 10 )] = -8; + } + /* 地面判定 */ + } + + /* 画面端で落ちるのを防止 */ + if ( ( kane[1 + ( i * 10 )] < 0 ) || ( kane[1 + ( i * 10 )] > 610 ) ) + { + kane[6 + ( i * 10 )] = 0; + } + /* 今回の位置 */ + y1 = ( ( 0 - kane[6 + ( i * 10 )] ) * ( 0 - kane[6 + ( i * 10 )] ) * ( 0 - kane[6 + ( i * 10 )] ) ); + + px1 = ( kane[1 + ( i * 10 )] + 16 ) / 32; + px2 = ( kane[1 + ( i * 10 )] + 16 ) / 32; + py = ( 16 - ( ( kane[2 + ( i * 10 )] + 28 ) / 32 ) ); + py2 = ( 16 - ( ( kane[2 + ( i * 10 )] + 49 + 48 ) / 32 ) ); + kane[2 + ( i * 10 )] = kane[2 + ( i * 10 )] - ( y1 / 25 ); + py3 = ( 16 - ( ( kane[2 + ( i * 10 )] + 32 + 32 + 16 ) / 32 ) ); + + if ( kane[2 + ( i * 10 )] > 480 ) + { + return; + } + + if ( kane[6 + ( i * 10 )] <= 0 ) /* 上り中は判定しない */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 299 ) ) + || ( ( map1[ px2 + ( ( py ) * 20 ) ] >= 100 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 299 ) ) + || ( ( map1[ px1 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px1 + ( ( py ) * 20 ) ] <= 619 ) ) + || ( ( map1[ px2 + ( ( py ) * 20 ) ] >= 600 ) && ( map1[ px2 + ( ( py ) * 20 ) ] <= 619 ) ) ) + { + kane[2 + ( i * 10 )] = ( ( 16 - py ) * 32 ) - 16; + kane[6 + ( i * 10 )] = 10; + } + } + else /* 上昇中 */ + { + /* 地面判定 */ + if ( ( ( map1[ px1 + ( ( py3 ) * 20 ) ] >= 100 ) && ( map1[ px1 + ( ( py3 ) * 20 ) ] <= 119 ) ) + || ( ( map1[ px1 + ( ( py3 ) * 20 ) ] >= 200 ) && ( map1[ px1 + ( ( py3 ) * 20 ) ] <= 219 ) ) + || ( ( map1[ px2 + ( ( py3 ) * 20 ) ] >= 100 ) && ( map1[ px2 + ( ( py3 ) * 20 ) ] <= 119 ) ) + || ( ( map1[ px2 + ( ( py3 ) * 20 ) ] >= 200 ) && ( map1[ px2 + ( ( py3 ) * 20 ) ] <= 219 ) ) ) + { + kane[6 + ( i * 10 )] = -1; + kane[5 + ( i * 10 )] = 0; + } + } + if ( kane[2 + ( i * 10 )] <= -14 ) + { + kane[0 + ( i * 10 )] = 0; + } + +} + +void p_jump_f_set( long x, long y ) +{ + long i; + + for ( i = 0; i < 10; i++ ) + { + if ( pjumpf[( i * 10 ) + 0 ] == 0 ) + { + pjumpf[( i * 10 ) + 0 ] = 1; + pjumpf[( i * 10 ) + 1 ] = x; + pjumpf[( i * 10 ) + 2 ] = y; + pjumpf[( i * 10 ) + 5 ] = 0; + pjumpf[( i * 10 ) + 6 ] = 0; + break; + } + } +} + +void p_jump_f_disp( ) +{ + long i; + + for ( i = 0; i < 10; i++ ) + { + if ( pjumpf[( i * 10 ) + 0 ] == 1 ) + { + BltRect( 5, pjumpf[( i * 10 ) + 1 ] - d_x, ( 0 - pjumpf[( i * 10 ) + 2 ] ) + MapInfo[3] - 32 - d_y , 128 + ( pjumpf[( i * 10 ) + 6 ] * 32 ), 0, 32, 32 ); + + pjumpf[( i * 10 ) + 5 ]++; + if ( pjumpf[( i * 10 ) + 5 ] >= 5 ) + { + pjumpf[( i * 10 ) + 5 ] = 0; + pjumpf[( i * 10 ) + 6 ]++; + if ( pjumpf[( i * 10 ) + 6 ] >= 4 ) + { + pjumpf[( i * 10 ) + 6 ] = 0; + pjumpf[( i * 10 ) + 0 ] = 0; + } + } + } + } +} + +void screen_BackupPlane( ) +{ +} + +/* メニューの表示 */ +void window_disp( ) +{ + BltRect( 61, 100, 72 + ( 32 * demo[0] ), ( demo[1] / 10 ) * 16, 0 , 16, 16 ); + Blt( 60, 0, 0 ); + + demo[1]++; + if ( demo[1] >= 40 ) + { + demo[1] = 0; + } +} + +/* メニューでのキー操作 */ +void window_keys( ) +{ + if ( IsPushKey( gameflag[0] ) ) + { + soundPlaySe( EN_SE_SELECT ); + demo[0]--; + if ( demo[0] < 0 ) + { + demo[0] = 2; + } + } + else if ( IsPushKey( gameflag[1] ) ) + { + soundPlaySe( EN_SE_SELECT ); + demo[0]++; + if ( demo[0] > 2 ) + { + demo[0] = 0; + } + } + // スペースキーが押される + if ( IsPushOKKey( ) ) + { + if ( demo[0] == 0 ) + { + if ( player[9] != 0 ) //回転中 + { + sn = 5; + } + else + { + sn = 1; + } + } + if ( demo[0] == 1 ) + { + gameflag[71] = 1; + sn = 10; + } + if ( demo[0] == 2 ) + { + if ( gameflag[129] != 0 ) //ステージセレクトから開始 + { + g_scene = EN_SN_STAGESELECT; + } + else + { + g_scene = EN_SN_TITLE; /* タイトルへ */ + } +// gameflag[40] = 1; + sn = 10; + } + } + //Bが押される + if ( IsPushCancelKey( ) ) + { + if ( player[9] != 0 ) //回転中 + { + sn = 5; + } + else + { + sn = 1; + } + } + +} + + +/* マップビューでのキー操作 */ +void mapviwe_keys( void ) +{ + if ( IsPressKey( gameflag[0] ) ) //上  + { + player[1] = player[1] + 2; + } + if ( IsPressKey( gameflag[1] ) ) //下  + { + player[1] = player[1] - 2; + } + if ( IsPressKey( gameflag[2] ) ) //左  + { + player[0] = player[0] - 2; + } + if ( IsPressKey( gameflag[3] ) ) //右  + { + player[0] = player[0] + 2; + } + + if ( player[0] < 0 ) /* 画面左端判定 */ + { + player[0] = 0; + } + if ( player[0] > ( MapInfo[2] - char_size[0] ) ) /* 画面右端判定 */ + { + player[0] = MapInfo[2] - char_size[0]; + } + if ( player[1] <= 0 ) /* 画面下 */ + { + player[1] = 0; + } + if ( player[1] >= ( MapInfo[3] - char_size[1] ) ) /* 画面上 */ + { + player[1] = ( MapInfo[3] - char_size[1] ); + } + + // スペースキーが押される + if ( IsPushOKKey( ) ) + { + g_scene = EN_SN_TITLE; /* タイトルへ */ +// gameflag[40] = 1; + sn = 10; + } + //Bが押される + if ( IsPushCancelKey( ) ) + { + g_scene = EN_SN_TITLE; /* タイトルへ */ +// gameflag[40] = 1; + sn = 10; + } + +} + +/* 絶対値を返す */ +long labs( long para ) +{ + long rc; + + rc = para; + + if ( para < 0 ) + { + rc = para * -1; + } + return( rc ); +} + +/* 魔法生成 */ +void p_mgc_set( long muki , long p3 ) +{ + long i; + long k; + long ii; + long rg; + long max; + + rg = 0; + + if ( muki == 0 ) + { + rg = ( 0 ); + } + else if ( muki == 1 ) + { + rg = ( 45 ); + } + else if ( muki == 2 ) + { + rg = ( 90 ); + } + else if ( muki == 3 ) + { + rg = ( 135 ); + } + else if ( muki == 4 ) + { + rg = ( 180 ); + } + + if ( p3 == 1 ) + { + rg = rg * -1; + } + + /* 発生位置X */ + /* 発生位置Y */ + + max = 1; + for ( i = 0; i < max; i++ ) + { + + k = 5; + + for ( ii = 0; ii < 40; ii++ ) + { + if ( pmshot[ii * 20 + 2] == 0 ) + { + pmshot[ii * 20 + 0] = funcSin( rg ) * k; /* 弾速x */ + pmshot[ii * 20 + 1] = funcCos( rg ) * k; /* 弾速y */ + pmshot[ii * 20 + 2] = 1; /* 存在 */ + pmshot[ii * 20 + 3] = 0; /* 種類 */ + pmshot[ii * 20 + 4] = 0 ; /* */ + pmshot[ii * 20 + 5] = ( player[0] ) << 16 ; /* 初期位置の設定 */ + pmshot[ii * 20 + 6] = ( player[1] ) << 16 ; + pmshot[ii * 20 + 7] = muki; /* 方向 */ + + pmshot[ii * 20 + 8] = 0; /* */ + pmshot[ii * 20 + 9] = 0 ; /* */ + pmshot[ii * 20 + 10] = 0 ; /* */ + break; + } + } + } + + +} + +void p_mgc_disp( ) +{ + long ii; + long f; + long b; + + for ( ii = 0; ii < 40; ii++ ) + { + if ( pmshot[ii * 20 + 2] == 1 ) + { + + f = 1; + b = 230; + + + BltRect( 4, ( pmshot[ii * 20 + 5] >> 16 ) - d_x, 480 - ( pmshot[ii * 20 + 6] >> 16 ) - 32 - d_y, 0, 96, 32, 32 ); +// BlendExBltRectW( 4, ( pmshot[ii * 20 + 5] >> 16 ) - d_x, 480 - ( pmshot[ii * 20 + 6] >> 16 ) - 32 - d_y, 0, 96, 32, 32 , f, b ); + + pmshot[ii * 20 + 5] = pmshot[ii * 20 + 0] + pmshot[ii * 20 + 5]; /* 弾速x */ + pmshot[ii * 20 + 6] = pmshot[ii * 20 + 1] + pmshot[ii * 20 + 6]; /* 弾速x */ + + if ( ( ( pmshot[ii * 20 + 5] >> 16 ) > 640 ) || ( ( pmshot[ii * 20 + 5] >> 16 ) < -32 ) ) + { + pmshot[ii * 20 + 2] = 0; /* 存在無し */ + } + if ( ( ( pmshot[ii * 20 + 6] >> 16 ) > 480 ) || ( ( pmshot[ii * 20 + 6] >> 16 ) < -32 ) ) + { + pmshot[ii * 20 + 2] = 0; /* 存在無し */ + } + + if ( ( ( map1_item_j( ( pmshot[ii * 20 + 5] >> 16 ) + 16 , ( pmshot[ii * 20 + 6] >> 16 ) + 16 ) >= 100 ) + && ( map1_item_j( ( pmshot[ii * 20 + 5] >> 16 ) + 16 , ( pmshot[ii * 20 + 6] >> 16 ) + 16 ) <= 220 ) ) ) + { + pmshot[ii * 20 + 2] = 0; /* 存在無し */ + p_shot_f2_set( ( pmshot[5 + ii * 20] >> 16 ) + 15, ( pmshot[6 + ii * 20] >> 16 ) + 15, 0 ); + if ( pmshot[3 + ii * 20] == 2 ) /* スキルクラッシュショット */ + { + p_shot_f_set( ( pmshot[5 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, ( pmshot[6 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, 0 ); + p_shot_f_set( ( pmshot[5 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, ( pmshot[6 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, 0 ); + p_shot_f_set( ( pmshot[5 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, ( pmshot[6 + ii * 20] >> 16 ) + ( rand( ) % 32 ) - 16, 0 ); + } + else + { + p_shot_f_set( ( pmshot[5 + ii * 20] >> 16 ) , ( pmshot[6 + ii * 20] >> 16 ), 0 ); + } + } + + + } + } + +} + +void replay_input_save( void ) +{ + long input_keys; + input_keys = 0; + + /* キー処理は基本的にplayer[2]が何状態の時にキーを入れたらどうなるを記述していく */ + if ( IsPressKey( gameflag[2] ) ) + { + input_keys = input_keys + 1; + } + else if ( IsPressKey( gameflag[3] ) ) + { + input_keys = input_keys + 10; + } + + if ( IsPressKey( gameflag[0] ) ) + { + input_keys = input_keys + 100; + } + else if ( IsPressKey( gameflag[1] ) ) + { + input_keys = input_keys + 1000; + } + + // スペースキーが押される + if ( IsPressKey( gameflag[4] ) ) + { + input_keys = input_keys + 10000; + } + + //Bが押される + if ( IsPressKey( gameflag[5] ) ) + { + input_keys = input_keys + 100000; + } + + //Bが押される + if ( ( IsPushKey( gameflag[5] ) ) || ( IsPushKey( gameflag[0] ) && ( gameflag[133] == 1 ) ) ) + { + input_keys = input_keys + 1000000; + } + /* 12ボタン か Cが押された */ +// if ( ( ( IsPushJoyKey(6) != 0 ) || ( IsPushJoyKey(12) != 0 ) || IsPushKey( gameflag[6] ) ) ) +// { +// input_keys = input_keys + 10000000; +// } + + replay[replay_time] = input_keys; +} + +void replay_input_load( void ) +{ + long i; + long input_keys; + input_keys = 0; + + for ( i = 0; i < 10 ; i++ ) + { + replay_load_key[i] = 0 ; + } + + input_keys = replay[replay_time]; + +// if ( input_keys >= 10000000 ) +// { +// input_keys = input_keys - 10000000; +// replay_load_key[7] = 1 ; +// } + if ( input_keys >= 1000000 ) + { + input_keys = input_keys - 1000000; + replay_load_key[6] = 1 ; + } + if ( input_keys >= 100000 ) + { + input_keys = input_keys - 100000; + replay_load_key[5] = 1 ; + } + if ( input_keys >= 10000 ) + { + input_keys = input_keys - 10000; + replay_load_key[4] = 1 ; + } + if ( input_keys >= 1000 ) + { + input_keys = input_keys - 1000; + replay_load_key[3] = 1 ; + } + if ( input_keys >= 100 ) + { + input_keys = input_keys - 100; + replay_load_key[2] = 1 ; + } + if ( input_keys >= 10 ) + { + input_keys = input_keys - 10; + replay_load_key[1] = 1 ; + } + if ( input_keys >= 1 ) + { + input_keys = input_keys - 1; + replay_load_key[0] = 1 ; + } +} + +void replay_file_save_w( void ) +{ + + long d_num; + d_num = 1; + sprintf(string,"replay/%d/replay_data_w_%d.dat", (int)stage, (int)save_data[3] ); + SaveFile( string, &replay[0], sizeof( replay ) ); + +} +void replay_file_save( long type ) +{ + + long d_num; + d_num = replay_file_name; + if ( type == 0 ) + { + sprintf(string,"replay/%d/replay_data_%d.dat", (int)stage, (int)save_data[3] ); + } + else + { + sprintf(string,"replay/%d/replay_data_j%d.dat", (int)stage, (int)save_data[3] ); + } + SaveFile( string, &replay[0], sizeof( replay ) ); +} + +long replay_file_load( void ) +{ + long rc ; + long d_num; + + rc = 1; + d_num = 1; + + if ( gameflag[125] == 0 ) + { + sprintf( string, "replay/%d/replay_data_%d.dat", (int)stage, (int)save_data[3] ); + } + else + { + sprintf( string, "replay/%d/replay_data_j%d.dat", (int)stage, (int)save_data[3] ); + } + if ( LoadFile( string, &replay[0], sizeof( replay ) ) ) + { + rc = 0; + } + + return( rc ); +} + + +long GetKyori( long i1, long i2 ) +{ + long rc = 0; + + rc = ( long )sqrt( ( i1 * i1 ) + ( i2 * i2 ) ); + + return ( rc ); +} + +void debugdisp( void ) +{ + if ( g_DebugDisp != 0 ) + { + BltNumericImage( player[32], 8, 10, 10, 18, 0, 0, 10, 8 ); + BltNumericImage( snack_count, 8, 10, 20, 18, 0, 0, 10, 8 ); + BltNumericImage( player[20], 8, 10, 30, 18, 0, 0, 10, 8 ); + BltNumericImage( player[21], 8, 10, 40, 18, 0, 0, 10, 8 ); + BltNumericImage( map_rot_info, 8, 10, 50, 18, 0, 0, 10, 8 ); + BltNumericImage( funcTan2( player[30],player[31] ), 8, 10, 60, 18, 0, 0, 10, 8 ); + BltNumericImage( ( MOTatan(player[30] * 256,player[31] * 256) ), 8, 10, 70, 18, 0, 0, 10, 8 ); + } + // 線の描画 +} + + + + + + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.h new file mode 100644 index 00000000..9e29bef7 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.h @@ -0,0 +1,6 @@ +#ifndef __ACT +#define __ACT + +extern void act_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.o new file mode 100644 index 00000000..5c91401e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/act.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/ICON0.png b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/ICON0.png new file mode 100644 index 00000000..ed9059c0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/ICON0.png differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/rg.ico b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/rg.ico new file mode 100644 index 00000000..1052ce9f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/assets/rg.ico differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/check.sh b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/check.sh new file mode 100644 index 00000000..3651dae7 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/check.sh @@ -0,0 +1 @@ +cppcheck --enable=all --inconclusive . 2> err.txt \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/config.json b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/config.json new file mode 100644 index 00000000..3789386b --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/config.json @@ -0,0 +1,7 @@ +{ +"label":"Champ Kaiten Patissier", +"icon":"ico.png", +"iconsel":"", +"launch":"launch.sh", +"description":"Champ Kaiten Patissier" +} diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/1_1.map new file mode 100644 index 00000000..28e309fc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/2_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/2_1.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/2_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/bmp.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/bmp.txt new file mode 100644 index 00000000..7e24e91e --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/bmp.txt @@ -0,0 +1,4 @@ +map1bmp:../image/map/map1_1.bmp +ibmp:../image/map/item1.bmp +ebmp:../image/map/e32.bmp +map2bmp:../image/map/map1_2.bmp \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/e1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/e1_1.map new file mode 100644 index 00000000..57ad1151 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/e1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/i1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/i1_1.map new file mode 100644 index 00000000..1c16c809 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/0/i1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_1.map new file mode 100644 index 00000000..a2868475 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_10.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_10.map new file mode 100644 index 00000000..d7c538fd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_10.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_11.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_11.map new file mode 100644 index 00000000..736c4afb Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_11.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_12.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_12.map new file mode 100644 index 00000000..a71e928d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_12.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_13.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_13.map new file mode 100644 index 00000000..4ce2f761 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_13.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_14.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_14.map new file mode 100644 index 00000000..3d9e2421 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_14.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_15.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_15.map new file mode 100644 index 00000000..d57f7afa Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_15.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_16.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_16.map new file mode 100644 index 00000000..64a4a9cf Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_16.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_17.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_17.map new file mode 100644 index 00000000..8ba898a2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_17.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_18.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_18.map new file mode 100644 index 00000000..dade0700 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_18.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_19.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_19.map new file mode 100644 index 00000000..8c35bb49 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_19.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_2.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_2.map new file mode 100644 index 00000000..b12f9092 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_2.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_20.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_20.map new file mode 100644 index 00000000..f3e79b3b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_20.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_21.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_21.map new file mode 100644 index 00000000..a99e70e3 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_21.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_22.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_22.map new file mode 100644 index 00000000..c3d05e9b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_22.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_23.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_23.map new file mode 100644 index 00000000..f18a2ab6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_23.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_24.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_24.map new file mode 100644 index 00000000..20d227e8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_24.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_25.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_25.map new file mode 100644 index 00000000..e4588914 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_25.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_26.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_26.map new file mode 100644 index 00000000..b3930ed8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_26.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_27.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_27.map new file mode 100644 index 00000000..2ebc1ff0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_27.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_28.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_28.map new file mode 100644 index 00000000..aacbf61d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_28.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_29.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_29.map new file mode 100644 index 00000000..978407ad Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_29.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_3.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_3.map new file mode 100644 index 00000000..b6a36e56 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_3.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_30.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_30.map new file mode 100644 index 00000000..7d3bc723 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_30.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_31.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_31.map new file mode 100644 index 00000000..c3d9fd05 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_31.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_32.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_32.map new file mode 100644 index 00000000..24bc41f0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_32.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_33.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_33.map new file mode 100644 index 00000000..18deb82c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_33.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_34.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_34.map new file mode 100644 index 00000000..8924e5b0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_34.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_35.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_35.map new file mode 100644 index 00000000..f33dd48e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_35.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_36.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_36.map new file mode 100644 index 00000000..b886feaa Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_36.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_37.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_37.map new file mode 100644 index 00000000..256b967e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_37.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_38.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_38.map new file mode 100644 index 00000000..05cd3f49 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_38.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_39.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_39.map new file mode 100644 index 00000000..f7e01bc1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_39.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_4.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_4.map new file mode 100644 index 00000000..aee868e9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_4.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_40.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_40.map new file mode 100644 index 00000000..c52c0234 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_40.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_41.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_41.map new file mode 100644 index 00000000..a1bf440d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_41.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_42.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_42.map new file mode 100644 index 00000000..6d9f9635 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_42.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_43.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_43.map new file mode 100644 index 00000000..f2759876 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_43.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_44.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_44.map new file mode 100644 index 00000000..4fdf7ef9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_44.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_45.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_45.map new file mode 100644 index 00000000..1561d899 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_45.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_46.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_46.map new file mode 100644 index 00000000..a502912b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_46.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_47.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_47.map new file mode 100644 index 00000000..c3354dba Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_47.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_48.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_48.map new file mode 100644 index 00000000..b2093338 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_48.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_49.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_49.map new file mode 100644 index 00000000..b8321ebb Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_49.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_5.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_5.map new file mode 100644 index 00000000..85098c51 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_5.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_50.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_50.map new file mode 100644 index 00000000..7c1b9c0f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_50.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_6.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_6.map new file mode 100644 index 00000000..d640ec5b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_6.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_7.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_7.map new file mode 100644 index 00000000..aa3a952f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_7.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_8.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_8.map new file mode 100644 index 00000000..19071d12 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_8.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_9.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_9.map new file mode 100644 index 00000000..5c316a90 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/1_9.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_1.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_10.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_10.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_10.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_11.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_11.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_11.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_12.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_12.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_12.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_13.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_13.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_13.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_14.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_14.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_14.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_15.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_15.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_15.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_16.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_16.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_16.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_17.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_17.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_17.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_18.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_18.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_18.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_19.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_19.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_19.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_2.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_2.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_2.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_20.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_20.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_20.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_21.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_21.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_21.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_22.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_22.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_22.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_23.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_23.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_23.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_24.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_24.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_24.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_25.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_25.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_25.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_26.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_26.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_26.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_27.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_27.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_27.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_28.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_28.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_28.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_29.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_29.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_29.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_3.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_3.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_3.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_30.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_30.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_30.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_31.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_31.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_31.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_32.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_32.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_32.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_33.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_33.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_33.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_34.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_34.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_34.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_35.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_35.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_35.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_36.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_36.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_36.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_37.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_37.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_37.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_38.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_38.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_38.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_39.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_39.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_39.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_4.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_4.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_4.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_40.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_40.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_40.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_41.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_41.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_41.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_42.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_42.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_42.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_43.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_43.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_43.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_44.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_44.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_44.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_45.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_45.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_45.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_46.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_46.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_46.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_47.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_47.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_47.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_48.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_48.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_48.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_49.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_49.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_49.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_5.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_5.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_5.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_50.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_50.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_50.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_6.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_6.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_6.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_7.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_7.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_7.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_8.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_8.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_8.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_9.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_9.map new file mode 100644 index 00000000..77a06d64 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/2_9.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/bmp.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/bmp.txt new file mode 100644 index 00000000..7e24e91e --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/bmp.txt @@ -0,0 +1,4 @@ +map1bmp:../image/map/map1_1.bmp +ibmp:../image/map/item1.bmp +ebmp:../image/map/e32.bmp +map2bmp:../image/map/map1_2.bmp \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_1.map new file mode 100644 index 00000000..834a9658 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_10.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_10.map new file mode 100644 index 00000000..10bb4170 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_10.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_11.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_11.map new file mode 100644 index 00000000..5f0ddfad Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_11.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_12.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_12.map new file mode 100644 index 00000000..e2dd6785 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_12.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_13.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_13.map new file mode 100644 index 00000000..1c65c449 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_13.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_14.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_14.map new file mode 100644 index 00000000..a65b3fa8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_14.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_15.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_15.map new file mode 100644 index 00000000..eedd88ad Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_15.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_16.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_16.map new file mode 100644 index 00000000..b43b98d2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_16.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_17.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_17.map new file mode 100644 index 00000000..93f9b3f7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_17.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_18.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_18.map new file mode 100644 index 00000000..b658293d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_18.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_19.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_19.map new file mode 100644 index 00000000..854bcd3a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_19.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_2.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_2.map new file mode 100644 index 00000000..1169eaa9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_2.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_20.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_20.map new file mode 100644 index 00000000..6e094863 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_20.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_21.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_21.map new file mode 100644 index 00000000..6ed09b11 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_21.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_22.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_22.map new file mode 100644 index 00000000..7dc3461e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_22.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_23.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_23.map new file mode 100644 index 00000000..401981e1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_23.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_24.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_24.map new file mode 100644 index 00000000..5757e16b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_24.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_25.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_25.map new file mode 100644 index 00000000..a2013f46 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_25.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_26.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_26.map new file mode 100644 index 00000000..80de0997 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_26.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_27.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_27.map new file mode 100644 index 00000000..d9b52188 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_27.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_28.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_28.map new file mode 100644 index 00000000..68bb4637 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_28.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_29.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_29.map new file mode 100644 index 00000000..d5ce3133 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_29.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_3.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_3.map new file mode 100644 index 00000000..9af80b8f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_3.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_30.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_30.map new file mode 100644 index 00000000..6c1382b6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_30.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_31.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_31.map new file mode 100644 index 00000000..c1272850 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_31.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_32.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_32.map new file mode 100644 index 00000000..9e22d854 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_32.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_33.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_33.map new file mode 100644 index 00000000..b90a7e8a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_33.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_34.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_34.map new file mode 100644 index 00000000..b7304628 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_34.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_35.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_35.map new file mode 100644 index 00000000..33b56ab4 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_35.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_36.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_36.map new file mode 100644 index 00000000..a341b180 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_36.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_37.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_37.map new file mode 100644 index 00000000..25ef1038 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_37.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_38.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_38.map new file mode 100644 index 00000000..ee05fcc7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_38.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_39.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_39.map new file mode 100644 index 00000000..e1483ac8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_39.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_4.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_4.map new file mode 100644 index 00000000..0de8dce5 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_4.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_40.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_40.map new file mode 100644 index 00000000..9819f1a0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_40.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_41.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_41.map new file mode 100644 index 00000000..4656cf1b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_41.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_42.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_42.map new file mode 100644 index 00000000..f2cfc50f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_42.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_43.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_43.map new file mode 100644 index 00000000..74b8fc1d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_43.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_44.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_44.map new file mode 100644 index 00000000..e08b9a10 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_44.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_45.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_45.map new file mode 100644 index 00000000..ad99f7ad Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_45.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_46.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_46.map new file mode 100644 index 00000000..306a4199 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_46.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_47.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_47.map new file mode 100644 index 00000000..472865d8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_47.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_48.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_48.map new file mode 100644 index 00000000..f50561eb Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_48.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_49.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_49.map new file mode 100644 index 00000000..adc9e59e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_49.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_5.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_5.map new file mode 100644 index 00000000..627b2ce2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_5.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_50.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_50.map new file mode 100644 index 00000000..352afcc9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_50.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_6.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_6.map new file mode 100644 index 00000000..0cfebbb1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_6.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_7.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_7.map new file mode 100644 index 00000000..08885ed0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_7.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_8.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_8.map new file mode 100644 index 00000000..44389ae5 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_8.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_9.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_9.map new file mode 100644 index 00000000..e2f67cc6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/e1_9.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_1.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_1.map new file mode 100644 index 00000000..b50de851 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_1.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_10.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_10.map new file mode 100644 index 00000000..209dd598 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_10.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_11.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_11.map new file mode 100644 index 00000000..c82575bd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_11.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_12.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_12.map new file mode 100644 index 00000000..ae4e507b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_12.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_13.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_13.map new file mode 100644 index 00000000..d61a9dcd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_13.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_14.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_14.map new file mode 100644 index 00000000..8d7fcf9c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_14.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_15.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_15.map new file mode 100644 index 00000000..758bf335 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_15.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_16.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_16.map new file mode 100644 index 00000000..f269887e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_16.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_17.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_17.map new file mode 100644 index 00000000..b68e9a08 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_17.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_18.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_18.map new file mode 100644 index 00000000..730fd552 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_18.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_19.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_19.map new file mode 100644 index 00000000..cf216bae Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_19.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_2.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_2.map new file mode 100644 index 00000000..3cd47998 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_2.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_20.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_20.map new file mode 100644 index 00000000..46ca8cab Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_20.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_21.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_21.map new file mode 100644 index 00000000..4fd94569 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_21.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_22.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_22.map new file mode 100644 index 00000000..a4b1d830 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_22.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_23.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_23.map new file mode 100644 index 00000000..e5c6f4be Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_23.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_24.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_24.map new file mode 100644 index 00000000..1cb90716 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_24.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_25.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_25.map new file mode 100644 index 00000000..5709b6c7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_25.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_26.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_26.map new file mode 100644 index 00000000..8af69849 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_26.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_27.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_27.map new file mode 100644 index 00000000..7eb9357b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_27.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_28.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_28.map new file mode 100644 index 00000000..775ba25c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_28.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_29.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_29.map new file mode 100644 index 00000000..1797650a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_29.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_3.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_3.map new file mode 100644 index 00000000..7850eb32 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_3.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_30.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_30.map new file mode 100644 index 00000000..6a83e7f0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_30.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_31.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_31.map new file mode 100644 index 00000000..4dab7595 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_31.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_32.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_32.map new file mode 100644 index 00000000..757a14b3 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_32.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_33.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_33.map new file mode 100644 index 00000000..5579cede Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_33.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_34.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_34.map new file mode 100644 index 00000000..3ede4b54 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_34.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_35.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_35.map new file mode 100644 index 00000000..810035ff Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_35.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_36.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_36.map new file mode 100644 index 00000000..ac62fb26 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_36.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_37.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_37.map new file mode 100644 index 00000000..7de8dd0b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_37.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_38.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_38.map new file mode 100644 index 00000000..1554b29a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_38.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_39.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_39.map new file mode 100644 index 00000000..13b205f8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_39.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_4.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_4.map new file mode 100644 index 00000000..ff560411 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_4.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_40.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_40.map new file mode 100644 index 00000000..c0574bca Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_40.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_41.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_41.map new file mode 100644 index 00000000..e71930d9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_41.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_42.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_42.map new file mode 100644 index 00000000..bc94fc60 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_42.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_43.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_43.map new file mode 100644 index 00000000..c8a48bf6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_43.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_44.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_44.map new file mode 100644 index 00000000..5f965db2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_44.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_45.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_45.map new file mode 100644 index 00000000..082e1879 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_45.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_46.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_46.map new file mode 100644 index 00000000..676f7d11 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_46.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_47.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_47.map new file mode 100644 index 00000000..dd4cbba7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_47.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_48.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_48.map new file mode 100644 index 00000000..3b2cc916 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_48.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_49.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_49.map new file mode 100644 index 00000000..4cf6841d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_49.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_5.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_5.map new file mode 100644 index 00000000..ca7fdb2c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_5.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_50.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_50.map new file mode 100644 index 00000000..1c3dbe4f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_50.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_6.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_6.map new file mode 100644 index 00000000..cdba44bf Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_6.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_7.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_7.map new file mode 100644 index 00000000..2c197549 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_7.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_8.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_8.map new file mode 100644 index 00000000..ed66aec3 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_8.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_9.map b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_9.map new file mode 100644 index 00000000..6923473c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/1/i1_9.map differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/enm_event/401.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/enm_event/401.txt new file mode 100644 index 00000000..eeb2fa20 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/data/enm_event/401.txt @@ -0,0 +1,33 @@ +event_del_flag:105 +// +bgm:off +se:boss_dead +// +text:on +// +charbmp1:yuu1 +char1:on +// +おい!動かねぇぞ!? +// +charbmp1:uto1 +僕のメカが・・・ +// +charbmp1:pia1 +どうしたんだい!? +// +charbmp1:tria1 +さぁ石像を返してもらうわよ +// +charbmp1:pia1 +えぇい、お前たち脱出するよ! +// +charbmp1:tria1 +あ、まてっ! +// +bgm:3 +flag0:9 +// +flag1:105 +// +//reload diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.c new file mode 100644 index 00000000..ae7059f7 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.c @@ -0,0 +1,423 @@ + +#include "include/general.h" +#include "include/dconv.h" + +static UINT32 DCNVnext = 1UL; + +static UINT16 SinTable[1025] = +{ + 0x0000,0x0064,0x00c9,0x012d,0x0192,0x01f6,0x025b,0x02bf, /* 0.000 */ + 0x0324,0x0388,0x03ed,0x0451,0x04b6,0x051a,0x057f,0x05e3, /* 0.703 */ + 0x0648,0x06ac,0x0711,0x0775,0x07da,0x083e,0x08a3,0x0907, /* 1.406 */ + 0x096c,0x09d0,0x0a35,0x0a99,0x0afe,0x0b62,0x0bc6,0x0c2b, /* 2.109 */ + 0x0c8f,0x0cf4,0x0d58,0x0dbc,0x0e21,0x0e85,0x0eea,0x0f4e, /* 2.812 */ + 0x0fb2,0x1017,0x107b,0x10df,0x1144,0x11a8,0x120c,0x1270, /* 3.516 */ + 0x12d5,0x1339,0x139d,0x1401,0x1466,0x14ca,0x152e,0x1592, /* 4.219 */ + 0x15f6,0x165a,0x16bf,0x1723,0x1787,0x17eb,0x184f,0x18b3, /* 4.922 */ + 0x1917,0x197b,0x19df,0x1a43,0x1aa7,0x1b0b,0x1b6f,0x1bd3, /* 5.625 */ + 0x1c37,0x1c9b,0x1cff,0x1d63,0x1dc7,0x1e2a,0x1e8e,0x1ef2, /* 6.328 */ + 0x1f56,0x1fba,0x201d,0x2081,0x20e5,0x2148,0x21ac,0x2210, /* 7.031 */ + 0x2273,0x22d7,0x233b,0x239e,0x2402,0x2465,0x24c9,0x252c, /* 7.734 */ + 0x2590,0x25f3,0x2656,0x26ba,0x271d,0x2781,0x27e4,0x2847, /* 8.438 */ + 0x28aa,0x290e,0x2971,0x29d4,0x2a37,0x2a9a,0x2afe,0x2b61, /* 9.141 */ + 0x2bc4,0x2c27,0x2c8a,0x2ced,0x2d50,0x2db3,0x2e15,0x2e78, /* 9.844 */ + 0x2edb,0x2f3e,0x2fa1,0x3004,0x3066,0x30c9,0x312c,0x318e, /* 10.547 */ + 0x31f1,0x3254,0x32b6,0x3319,0x337b,0x33de,0x3440,0x34a2, /* 11.250 */ + 0x3505,0x3567,0x35c9,0x362c,0x368e,0x36f0,0x3752,0x37b4, /* 11.953 */ + 0x3817,0x3879,0x38db,0x393d,0x399f,0x3a01,0x3a62,0x3ac4, /* 12.656 */ + 0x3b26,0x3b88,0x3bea,0x3c4b,0x3cad,0x3d0f,0x3d70,0x3dd2, /* 13.359 */ + 0x3e33,0x3e95,0x3ef6,0x3f58,0x3fb9,0x401b,0x407c,0x40dd, /* 14.062 */ + 0x413e,0x41a0,0x4201,0x4262,0x42c3,0x4324,0x4385,0x43e6, /* 14.766 */ + 0x4447,0x44a8,0x4508,0x4569,0x45ca,0x462b,0x468b,0x46ec, /* 15.469 */ + 0x474d,0x47ad,0x480e,0x486e,0x48ce,0x492f,0x498f,0x49ef, /* 16.172 */ + 0x4a50,0x4ab0,0x4b10,0x4b70,0x4bd0,0x4c30,0x4c90,0x4cf0, /* 16.875 */ + 0x4d50,0x4db0,0x4e0f,0x4e6f,0x4ecf,0x4f2e,0x4f8e,0x4fed, /* 17.578 */ + 0x504d,0x50ac,0x510c,0x516b,0x51ca,0x522a,0x5289,0x52e8, /* 18.281 */ + 0x5347,0x53a6,0x5405,0x5464,0x54c3,0x5522,0x5581,0x55df, /* 18.984 */ + 0x563e,0x569d,0x56fb,0x575a,0x57b8,0x5817,0x5875,0x58d3, /* 19.688 */ + 0x5931,0x5990,0x59ee,0x5a4c,0x5aaa,0x5b08,0x5b66,0x5bc4, /* 20.391 */ + 0x5c22,0x5c7f,0x5cdd,0x5d3b,0x5d98,0x5df6,0x5e53,0x5eb1, /* 21.094 */ + 0x5f0e,0x5f6b,0x5fc9,0x6026,0x6083,0x60e0,0x613d,0x619a, /* 21.797 */ + 0x61f7,0x6254,0x62b1,0x630d,0x636a,0x63c7,0x6423,0x6480, /* 22.500 */ + 0x64dc,0x6539,0x6595,0x65f1,0x664d,0x66a9,0x6705,0x6761, /* 23.203 */ + 0x67bd,0x6819,0x6875,0x68d1,0x692d,0x6988,0x69e4,0x6a3f, /* 23.906 */ + 0x6a9b,0x6af6,0x6b51,0x6bad,0x6c08,0x6c63,0x6cbe,0x6d19, /* 24.609 */ + 0x6d74,0x6dcf,0x6e29,0x6e84,0x6edf,0x6f39,0x6f94,0x6fee, /* 25.312 */ + 0x7049,0x70a3,0x70fd,0x7157,0x71b1,0x720c,0x7265,0x72bf, /* 26.016 */ + 0x7319,0x7373,0x73cd,0x7426,0x7480,0x74d9,0x7533,0x758c, /* 26.719 */ + 0x75e5,0x763f,0x7698,0x76f1,0x774a,0x77a3,0x77fb,0x7854, /* 27.422 */ + 0x78ad,0x7906,0x795e,0x79b7,0x7a0f,0x7a67,0x7ac0,0x7b18, /* 28.125 */ + 0x7b70,0x7bc8,0x7c20,0x7c78,0x7cd0,0x7d27,0x7d7f,0x7dd7, /* 28.828 */ + 0x7e2e,0x7e86,0x7edd,0x7f34,0x7f8b,0x7fe2,0x803a,0x8090, /* 29.531 */ + 0x80e7,0x813e,0x8195,0x81ec,0x8242,0x8299,0x82ef,0x8345, /* 30.234 */ + 0x839c,0x83f2,0x8448,0x849e,0x84f4,0x854a,0x85a0,0x85f5, /* 30.938 */ + 0x864b,0x86a1,0x86f6,0x874b,0x87a1,0x87f6,0x884b,0x88a0, /* 31.641 */ + 0x88f5,0x894a,0x899f,0x89f4,0x8a48,0x8a9d,0x8af1,0x8b46, /* 32.344 */ + 0x8b9a,0x8bee,0x8c42,0x8c96,0x8cea,0x8d3e,0x8d92,0x8de6, /* 33.047 */ + 0x8e39,0x8e8d,0x8ee0,0x8f34,0x8f87,0x8fda,0x902d,0x9080, /* 33.750 */ + 0x90d3,0x9126,0x9179,0x91cc,0x921e,0x9271,0x92c3,0x9315, /* 34.453 */ + 0x9368,0x93ba,0x940c,0x945e,0x94b0,0x9502,0x9553,0x95a5, /* 35.156 */ + 0x95f6,0x9648,0x9699,0x96ea,0x973c,0x978d,0x97de,0x982e, /* 35.859 */ + 0x987f,0x98d0,0x9921,0x9971,0x99c2,0x9a12,0x9a62,0x9ab2, /* 36.562 */ + 0x9b02,0x9b52,0x9ba2,0x9bf2,0x9c42,0x9c91,0x9ce1,0x9d30, /* 37.266 */ + 0x9d7f,0x9dcf,0x9e1e,0x9e6d,0x9ebc,0x9f0a,0x9f59,0x9fa8, /* 37.969 */ + 0x9ff6,0xa045,0xa093,0xa0e1,0xa12f,0xa17e,0xa1cb,0xa219, /* 38.672 */ + 0xa267,0xa2b5,0xa302,0xa350,0xa39d,0xa3ea,0xa438,0xa485, /* 39.375 */ + 0xa4d2,0xa51f,0xa56b,0xa5b8,0xa605,0xa651,0xa69d,0xa6ea, /* 40.078 */ + 0xa736,0xa782,0xa7ce,0xa81a,0xa866,0xa8b1,0xa8fd,0xa948, /* 40.781 */ + 0xa994,0xa9df,0xaa2a,0xaa75,0xaac0,0xab0b,0xab56,0xaba0, /* 41.484 */ + 0xabeb,0xac35,0xac80,0xacca,0xad14,0xad5e,0xada8,0xadf2, /* 42.188 */ + 0xae3b,0xae85,0xaece,0xaf18,0xaf61,0xafaa,0xaff3,0xb03c, /* 42.891 */ + 0xb085,0xb0ce,0xb117,0xb15f,0xb1a8,0xb1f0,0xb238,0xb280, /* 43.594 */ + 0xb2c8,0xb310,0xb358,0xb3a0,0xb3e7,0xb42f,0xb476,0xb4bd, /* 44.297 */ + 0xb504,0xb54b,0xb592,0xb5d9,0xb620,0xb667,0xb6ad,0xb6f3, /* 45.000 */ + 0xb73a,0xb780,0xb7c6,0xb80c,0xb852,0xb897,0xb8dd,0xb922, /* 45.703 */ + 0xb968,0xb9ad,0xb9f2,0xba37,0xba7c,0xbac1,0xbb06,0xbb4a, /* 46.406 */ + 0xbb8f,0xbbd3,0xbc17,0xbc5b,0xbca0,0xbce3,0xbd27,0xbd6b, /* 47.109 */ + 0xbdae,0xbdf2,0xbe35,0xbe78,0xbebc,0xbeff,0xbf41,0xbf84, /* 47.812 */ + 0xbfc7,0xc009,0xc04c,0xc08e,0xc0d0,0xc112,0xc154,0xc196, /* 48.516 */ + 0xc1d8,0xc21a,0xc25b,0xc29c,0xc2de,0xc31f,0xc360,0xc3a1, /* 49.219 */ + 0xc3e2,0xc422,0xc463,0xc4a3,0xc4e3,0xc524,0xc564,0xc5a4, /* 49.922 */ + 0xc5e4,0xc623,0xc663,0xc6a2,0xc6e2,0xc721,0xc760,0xc79f, /* 50.625 */ + 0xc7de,0xc81d,0xc85b,0xc89a,0xc8d8,0xc916,0xc955,0xc993, /* 51.328 */ + 0xc9d1,0xca0e,0xca4c,0xca8a,0xcac7,0xcb04,0xcb41,0xcb7f, /* 52.031 */ + 0xcbbb,0xcbf8,0xcc35,0xcc72,0xccae,0xccea,0xcd26,0xcd63, /* 52.734 */ + 0xcd9f,0xcdda,0xce16,0xce52,0xce8d,0xcec8,0xcf04,0xcf3f, /* 53.438 */ + 0xcf7a,0xcfb4,0xcfef,0xd02a,0xd064,0xd09f,0xd0d9,0xd113, /* 54.141 */ + 0xd14d,0xd187,0xd1c0,0xd1fa,0xd233,0xd26d,0xd2a6,0xd2df, /* 54.844 */ + 0xd318,0xd351,0xd389,0xd3c2,0xd3fa,0xd433,0xd46b,0xd4a3, /* 55.547 */ + 0xd4db,0xd512,0xd54a,0xd582,0xd5b9,0xd5f0,0xd627,0xd65f, /* 56.250 */ + 0xd695,0xd6cc,0xd703,0xd739,0xd770,0xd7a6,0xd7dc,0xd812, /* 56.953 */ + 0xd848,0xd87e,0xd8b3,0xd8e9,0xd91e,0xd953,0xd988,0xd9bd, /* 57.656 */ + 0xd9f2,0xda27,0xda5b,0xda90,0xdac4,0xdaf8,0xdb2c,0xdb60, /* 58.359 */ + 0xdb94,0xdbc7,0xdbfb,0xdc2e,0xdc61,0xdc94,0xdcc7,0xdcfa, /* 59.062 */ + 0xdd2d,0xdd5f,0xdd92,0xddc4,0xddf6,0xde28,0xde5a,0xde8c, /* 59.766 */ + 0xdebe,0xdeef,0xdf20,0xdf52,0xdf83,0xdfb4,0xdfe4,0xe015, /* 60.469 */ + 0xe046,0xe076,0xe0a6,0xe0d6,0xe106,0xe136,0xe166,0xe196, /* 61.172 */ + 0xe1c5,0xe1f4,0xe224,0xe253,0xe282,0xe2b0,0xe2df,0xe30d, /* 61.875 */ + 0xe33c,0xe36a,0xe398,0xe3c6,0xe3f4,0xe422,0xe44f,0xe47d, /* 62.578 */ + 0xe4aa,0xe4d7,0xe504,0xe531,0xe55e,0xe58a,0xe5b7,0xe5e3, /* 63.281 */ + 0xe60f,0xe63b,0xe667,0xe693,0xe6be,0xe6ea,0xe715,0xe740, /* 63.984 */ + 0xe76b,0xe796,0xe7c1,0xe7ec,0xe816,0xe841,0xe86b,0xe895, /* 64.688 */ + 0xe8bf,0xe8e9,0xe912,0xe93c,0xe965,0xe98e,0xe9b7,0xe9e0, /* 65.391 */ + 0xea09,0xea32,0xea5a,0xea83,0xeaab,0xead3,0xeafb,0xeb23, /* 66.094 */ + 0xeb4b,0xeb72,0xeb99,0xebc1,0xebe8,0xec0f,0xec36,0xec5c, /* 66.797 */ + 0xec83,0xeca9,0xecd0,0xecf6,0xed1c,0xed41,0xed67,0xed8d, /* 67.500 */ + 0xedb2,0xedd7,0xedfc,0xee21,0xee46,0xee6b,0xee8f,0xeeb4, /* 68.203 */ + 0xeed8,0xeefc,0xef20,0xef44,0xef68,0xef8b,0xefaf,0xefd2, /* 68.906 */ + 0xeff5,0xf018,0xf03b,0xf05d,0xf080,0xf0a2,0xf0c5,0xf0e7, /* 69.609 */ + 0xf109,0xf12a,0xf14c,0xf16d,0xf18f,0xf1b0,0xf1d1,0xf1f2, /* 70.312 */ + 0xf213,0xf233,0xf254,0xf274,0xf294,0xf2b5,0xf2d4,0xf2f4, /* 71.016 */ + 0xf314,0xf333,0xf353,0xf372,0xf391,0xf3b0,0xf3ce,0xf3ed, /* 71.719 */ + 0xf40b,0xf42a,0xf448,0xf466,0xf484,0xf4a1,0xf4bf,0xf4dc, /* 72.422 */ + 0xf4fa,0xf517,0xf534,0xf550,0xf56d,0xf58a,0xf5a6,0xf5c2, /* 73.125 */ + 0xf5de,0xf5fa,0xf616,0xf632,0xf64d,0xf668,0xf684,0xf69f, /* 73.828 */ + 0xf6ba,0xf6d4,0xf6ef,0xf709,0xf724,0xf73e,0xf758,0xf772, /* 74.531 */ + 0xf78b,0xf7a5,0xf7be,0xf7d7,0xf7f1,0xf80a,0xf822,0xf83b, /* 75.234 */ + 0xf853,0xf86c,0xf884,0xf89c,0xf8b4,0xf8cc,0xf8e3,0xf8fb, /* 75.938 */ + 0xf912,0xf929,0xf940,0xf957,0xf96e,0xf984,0xf99b,0xf9b1, /* 76.641 */ + 0xf9c7,0xf9dd,0xf9f3,0xfa09,0xfa1e,0xfa33,0xfa49,0xfa5e, /* 77.344 */ + 0xfa73,0xfa87,0xfa9c,0xfab0,0xfac5,0xfad9,0xfaed,0xfb01, /* 78.047 */ + 0xfb14,0xfb28,0xfb3b,0xfb4e,0xfb61,0xfb74,0xfb87,0xfb9a, /* 78.750 */ + 0xfbac,0xfbbf,0xfbd1,0xfbe3,0xfbf5,0xfc06,0xfc18,0xfc29, /* 79.453 */ + 0xfc3b,0xfc4c,0xfc5d,0xfc6e,0xfc7e,0xfc8f,0xfc9f,0xfcaf, /* 80.156 */ + 0xfcbf,0xfccf,0xfcdf,0xfcef,0xfcfe,0xfd0d,0xfd1c,0xfd2b, /* 80.859 */ + 0xfd3a,0xfd49,0xfd57,0xfd66,0xfd74,0xfd82,0xfd90,0xfd9e, /* 81.562 */ + 0xfdab,0xfdb9,0xfdc6,0xfdd3,0xfde0,0xfded,0xfdfa,0xfe06, /* 82.266 */ + 0xfe13,0xfe1f,0xfe2b,0xfe37,0xfe43,0xfe4e,0xfe5a,0xfe65, /* 82.969 */ + 0xfe70,0xfe7b,0xfe86,0xfe91,0xfe9b,0xfea6,0xfeb0,0xfeba, /* 83.672 */ + 0xfec4,0xfece,0xfed7,0xfee1,0xfeea,0xfef3,0xfefc,0xff05, /* 84.375 */ + 0xff0e,0xff16,0xff1f,0xff27,0xff2f,0xff37,0xff3f,0xff46, /* 85.078 */ + 0xff4e,0xff55,0xff5c,0xff63,0xff6a,0xff71,0xff78,0xff7e, /* 85.781 */ + 0xff84,0xff8a,0xff90,0xff96,0xff9c,0xffa1,0xffa6,0xffac, /* 86.484 */ + 0xffb1,0xffb5,0xffba,0xffbf,0xffc3,0xffc7,0xffcb,0xffcf, /* 87.188 */ + 0xffd3,0xffd7,0xffda,0xffdd,0xffe1,0xffe4,0xffe7,0xffe9, /* 87.891 */ + 0xffec,0xffee,0xfff0,0xfff2,0xfff4,0xfff6,0xfff8,0xfff9, /* 88.594 */ + 0xfffb,0xfffc,0xfffd,0xfffe,0xfffe,0xffff,0xffff,0xffff, /* 89.297 */ + 0x0000 /* 90.000 */ +}; + +static UINT16 AtanTable[1025] = +{ + 0x0000,0x000a,0x0014,0x001e,0x0028,0x0032,0x003d,0x0047, /* 0 0.000000 : 0.00 */ + 0x0051,0x005b,0x0065,0x0070,0x007a,0x0084,0x008e,0x0098, /* 8 0.007813 : 0.45 */ + 0x00a2,0x00ad,0x00b7,0x00c1,0x00cb,0x00d5,0x00e0,0x00ea, /* 16 0.015625 : 0.90 */ + 0x00f4,0x00fe,0x0108,0x0112,0x011d,0x0127,0x0131,0x013b, /* 24 0.023438 : 1.34 */ + 0x0145,0x0150,0x015a,0x0164,0x016e,0x0178,0x0182,0x018d, /* 32 0.031250 : 1.79 */ + 0x0197,0x01a1,0x01ab,0x01b5,0x01bf,0x01ca,0x01d4,0x01de, /* 40 0.039063 : 2.24 */ + 0x01e8,0x01f2,0x01fc,0x0207,0x0211,0x021b,0x0225,0x022f, /* 48 0.046875 : 2.68 */ + 0x0239,0x0243,0x024e,0x0258,0x0262,0x026c,0x0276,0x0280, /* 56 0.054688 : 3.13 */ + 0x028b,0x0295,0x029f,0x02a9,0x02b3,0x02bd,0x02c7,0x02d2, /* 64 0.062500 : 3.58 */ + 0x02dc,0x02e6,0x02f0,0x02fa,0x0304,0x030e,0x0318,0x0323, /* 72 0.070313 : 4.02 */ + 0x032d,0x0337,0x0341,0x034b,0x0355,0x035f,0x0369,0x0374, /* 80 0.078125 : 4.47 */ + 0x037e,0x0388,0x0392,0x039c,0x03a6,0x03b0,0x03ba,0x03c4, /* 88 0.085938 : 4.91 */ + 0x03ce,0x03d9,0x03e3,0x03ed,0x03f7,0x0401,0x040b,0x0415, /* 96 0.093750 : 5.36 */ + 0x041f,0x0429,0x0433,0x043d,0x0448,0x0452,0x045c,0x0466, /* 104 0.101563 : 5.80 */ + 0x0470,0x047a,0x0484,0x048e,0x0498,0x04a2,0x04ac,0x04b6, /* 112 0.109375 : 6.24 */ + 0x04c0,0x04ca,0x04d4,0x04de,0x04e8,0x04f2,0x04fd,0x0507, /* 120 0.117188 : 6.68 */ + 0x0511,0x051b,0x0525,0x052f,0x0539,0x0543,0x054d,0x0557, /* 128 0.125000 : 7.13 */ + 0x0561,0x056b,0x0575,0x057f,0x0589,0x0593,0x059d,0x05a7, /* 136 0.132813 : 7.57 */ + 0x05b1,0x05bb,0x05c5,0x05cf,0x05d9,0x05e3,0x05ed,0x05f7, /* 144 0.140625 : 8.00 */ + 0x0601,0x060b,0x0614,0x061e,0x0628,0x0632,0x063c,0x0646, /* 152 0.148438 : 8.44 */ + 0x0650,0x065a,0x0664,0x066e,0x0678,0x0682,0x068c,0x0696, /* 160 0.156250 : 8.88 */ + 0x06a0,0x06aa,0x06b3,0x06bd,0x06c7,0x06d1,0x06db,0x06e5, /* 168 0.164063 : 9.32 */ + 0x06ef,0x06f9,0x0703,0x070d,0x0716,0x0720,0x072a,0x0734, /* 176 0.171875 : 9.75 */ + 0x073e,0x0748,0x0752,0x075c,0x0765,0x076f,0x0779,0x0783, /* 184 0.179688 : 10.19 */ + 0x078d,0x0797,0x07a0,0x07aa,0x07b4,0x07be,0x07c8,0x07d2, /* 192 0.187500 : 10.62 */ + 0x07db,0x07e5,0x07ef,0x07f9,0x0803,0x080c,0x0816,0x0820, /* 200 0.195313 : 11.05 */ + 0x082a,0x0834,0x083d,0x0847,0x0851,0x085b,0x0864,0x086e, /* 208 0.203125 : 11.48 */ + 0x0878,0x0882,0x088b,0x0895,0x089f,0x08a9,0x08b2,0x08bc, /* 216 0.210938 : 11.91 */ + 0x08c6,0x08cf,0x08d9,0x08e3,0x08ed,0x08f6,0x0900,0x090a, /* 224 0.218750 : 12.34 */ + 0x0913,0x091d,0x0927,0x0930,0x093a,0x0944,0x094d,0x0957, /* 232 0.226563 : 12.77 */ + 0x0961,0x096a,0x0974,0x097e,0x0987,0x0991,0x099b,0x09a4, /* 240 0.234375 : 13.19 */ + 0x09ae,0x09b8,0x09c1,0x09cb,0x09d4,0x09de,0x09e8,0x09f1, /* 248 0.242188 : 13.61 */ + 0x09fb,0x0a04,0x0a0e,0x0a17,0x0a21,0x0a2b,0x0a34,0x0a3e, /* 256 0.250000 : 14.04 */ + 0x0a47,0x0a51,0x0a5a,0x0a64,0x0a6d,0x0a77,0x0a80,0x0a8a, /* 264 0.257813 : 14.46 */ + 0x0a94,0x0a9d,0x0aa7,0x0ab0,0x0aba,0x0ac3,0x0acd,0x0ad6, /* 272 0.265625 : 14.88 */ + 0x0ae0,0x0ae9,0x0af2,0x0afc,0x0b05,0x0b0f,0x0b18,0x0b22, /* 280 0.273438 : 15.29 */ + 0x0b2b,0x0b35,0x0b3e,0x0b47,0x0b51,0x0b5a,0x0b64,0x0b6d, /* 288 0.281250 : 15.71 */ + 0x0b77,0x0b80,0x0b89,0x0b93,0x0b9c,0x0ba5,0x0baf,0x0bb8, /* 296 0.289063 : 16.12 */ + 0x0bc2,0x0bcb,0x0bd4,0x0bde,0x0be7,0x0bf0,0x0bfa,0x0c03, /* 304 0.296875 : 16.53 */ + 0x0c0c,0x0c16,0x0c1f,0x0c28,0x0c32,0x0c3b,0x0c44,0x0c4d, /* 312 0.304688 : 16.95 */ + 0x0c57,0x0c60,0x0c69,0x0c73,0x0c7c,0x0c85,0x0c8e,0x0c98, /* 320 0.312500 : 17.35 */ + 0x0ca1,0x0caa,0x0cb3,0x0cbc,0x0cc6,0x0ccf,0x0cd8,0x0ce1, /* 328 0.320313 : 17.76 */ + 0x0ceb,0x0cf4,0x0cfd,0x0d06,0x0d0f,0x0d18,0x0d22,0x0d2b, /* 336 0.328125 : 18.17 */ + 0x0d34,0x0d3d,0x0d46,0x0d4f,0x0d58,0x0d62,0x0d6b,0x0d74, /* 344 0.335938 : 18.57 */ + 0x0d7d,0x0d86,0x0d8f,0x0d98,0x0da1,0x0daa,0x0db4,0x0dbd, /* 352 0.343750 : 18.97 */ + 0x0dc6,0x0dcf,0x0dd8,0x0de1,0x0dea,0x0df3,0x0dfc,0x0e05, /* 360 0.351563 : 19.37 */ + 0x0e0e,0x0e17,0x0e20,0x0e29,0x0e32,0x0e3b,0x0e44,0x0e4d, /* 368 0.359375 : 19.77 */ + 0x0e56,0x0e5f,0x0e68,0x0e71,0x0e7a,0x0e83,0x0e8c,0x0e95, /* 376 0.367188 : 20.16 */ + 0x0e9e,0x0ea7,0x0eaf,0x0eb8,0x0ec1,0x0eca,0x0ed3,0x0edc, /* 384 0.375000 : 20.56 */ + 0x0ee5,0x0eee,0x0ef7,0x0eff,0x0f08,0x0f11,0x0f1a,0x0f23, /* 392 0.382813 : 20.95 */ + 0x0f2c,0x0f35,0x0f3d,0x0f46,0x0f4f,0x0f58,0x0f61,0x0f69, /* 400 0.390625 : 21.34 */ + 0x0f72,0x0f7b,0x0f84,0x0f8d,0x0f95,0x0f9e,0x0fa7,0x0fb0, /* 408 0.398438 : 21.72 */ + 0x0fb8,0x0fc1,0x0fca,0x0fd3,0x0fdb,0x0fe4,0x0fed,0x0ff5, /* 416 0.406250 : 22.11 */ + 0x0ffe,0x1007,0x1010,0x1018,0x1021,0x102a,0x1032,0x103b, /* 424 0.414063 : 22.49 */ + 0x1044,0x104c,0x1055,0x105d,0x1066,0x106f,0x1077,0x1080, /* 432 0.421875 : 22.87 */ + 0x1089,0x1091,0x109a,0x10a2,0x10ab,0x10b3,0x10bc,0x10c5, /* 440 0.429688 : 23.25 */ + 0x10cd,0x10d6,0x10de,0x10e7,0x10ef,0x10f8,0x1100,0x1109, /* 448 0.437500 : 23.63 */ + 0x1111,0x111a,0x1122,0x112b,0x1133,0x113c,0x1144,0x114d, /* 456 0.445313 : 24.00 */ + 0x1155,0x115e,0x1166,0x116e,0x1177,0x117f,0x1188,0x1190, /* 464 0.453125 : 24.38 */ + 0x1199,0x11a1,0x11a9,0x11b2,0x11ba,0x11c2,0x11cb,0x11d3, /* 472 0.460938 : 24.75 */ + 0x11dc,0x11e4,0x11ec,0x11f5,0x11fd,0x1205,0x120e,0x1216, /* 480 0.468750 : 25.11 */ + 0x121e,0x1226,0x122f,0x1237,0x123f,0x1248,0x1250,0x1258, /* 488 0.476563 : 25.48 */ + 0x1260,0x1269,0x1271,0x1279,0x1281,0x1289,0x1292,0x129a, /* 496 0.484375 : 25.84 */ + 0x12a2,0x12aa,0x12b3,0x12bb,0x12c3,0x12cb,0x12d3,0x12db, /* 504 0.492188 : 26.21 */ + 0x12e4,0x12ec,0x12f4,0x12fc,0x1304,0x130c,0x1314,0x131c, /* 512 0.500000 : 26.57 */ + 0x1325,0x132d,0x1335,0x133d,0x1345,0x134d,0x1355,0x135d, /* 520 0.507813 : 26.92 */ + 0x1365,0x136d,0x1375,0x137d,0x1385,0x138d,0x1395,0x139d, /* 528 0.515625 : 27.28 */ + 0x13a5,0x13ad,0x13b5,0x13bd,0x13c5,0x13cd,0x13d5,0x13dd, /* 536 0.523438 : 27.63 */ + 0x13e5,0x13ed,0x13f5,0x13fd,0x1405,0x140d,0x1415,0x141c, /* 544 0.531250 : 27.98 */ + 0x1424,0x142c,0x1434,0x143c,0x1444,0x144c,0x1454,0x145b, /* 552 0.539063 : 28.33 */ + 0x1463,0x146b,0x1473,0x147b,0x1483,0x148a,0x1492,0x149a, /* 560 0.546875 : 28.67 */ + 0x14a2,0x14aa,0x14b1,0x14b9,0x14c1,0x14c9,0x14d0,0x14d8, /* 568 0.554688 : 29.02 */ + 0x14e0,0x14e8,0x14ef,0x14f7,0x14ff,0x1507,0x150e,0x1516, /* 576 0.562500 : 29.36 */ + 0x151e,0x1525,0x152d,0x1535,0x153c,0x1544,0x154c,0x1553, /* 584 0.570313 : 29.70 */ + 0x155b,0x1563,0x156a,0x1572,0x1579,0x1581,0x1589,0x1590, /* 592 0.578125 : 30.03 */ + 0x1598,0x159f,0x15a7,0x15ae,0x15b6,0x15be,0x15c5,0x15cd, /* 600 0.585938 : 30.37 */ + 0x15d4,0x15dc,0x15e3,0x15eb,0x15f2,0x15fa,0x1601,0x1609, /* 608 0.593750 : 30.70 */ + 0x1610,0x1618,0x161f,0x1627,0x162e,0x1636,0x163d,0x1644, /* 616 0.601563 : 31.03 */ + 0x164c,0x1653,0x165b,0x1662,0x166a,0x1671,0x1678,0x1680, /* 624 0.609375 : 31.36 */ + 0x1687,0x168e,0x1696,0x169d,0x16a5,0x16ac,0x16b3,0x16bb, /* 632 0.617188 : 31.68 */ + 0x16c2,0x16c9,0x16d1,0x16d8,0x16df,0x16e6,0x16ee,0x16f5, /* 640 0.625000 : 32.01 */ + 0x16fc,0x1704,0x170b,0x1712,0x1719,0x1721,0x1728,0x172f, /* 648 0.632813 : 32.33 */ + 0x1736,0x173d,0x1745,0x174c,0x1753,0x175a,0x1761,0x1769, /* 656 0.640625 : 32.64 */ + 0x1770,0x1777,0x177e,0x1785,0x178c,0x1794,0x179b,0x17a2, /* 664 0.648438 : 32.96 */ + 0x17a9,0x17b0,0x17b7,0x17be,0x17c5,0x17cd,0x17d4,0x17db, /* 672 0.656250 : 33.27 */ + 0x17e2,0x17e9,0x17f0,0x17f7,0x17fe,0x1805,0x180c,0x1813, /* 680 0.664063 : 33.59 */ + 0x181a,0x1821,0x1828,0x182f,0x1836,0x183d,0x1844,0x184b, /* 688 0.671875 : 33.90 */ + 0x1852,0x1859,0x1860,0x1867,0x186e,0x1875,0x187c,0x1883, /* 696 0.679688 : 34.20 */ + 0x188a,0x1890,0x1897,0x189e,0x18a5,0x18ac,0x18b3,0x18ba, /* 704 0.687500 : 34.51 */ + 0x18c1,0x18c8,0x18ce,0x18d5,0x18dc,0x18e3,0x18ea,0x18f1, /* 712 0.695313 : 34.81 */ + 0x18f7,0x18fe,0x1905,0x190c,0x1913,0x1919,0x1920,0x1927, /* 720 0.703125 : 35.11 */ + 0x192e,0x1935,0x193b,0x1942,0x1949,0x1950,0x1956,0x195d, /* 728 0.710938 : 35.41 */ + 0x1964,0x196a,0x1971,0x1978,0x197f,0x1985,0x198c,0x1993, /* 736 0.718750 : 35.71 */ + 0x1999,0x19a0,0x19a7,0x19ad,0x19b4,0x19ba,0x19c1,0x19c8, /* 744 0.726563 : 36.00 */ + 0x19ce,0x19d5,0x19dc,0x19e2,0x19e9,0x19ef,0x19f6,0x19fd, /* 752 0.734375 : 36.29 */ + 0x1a03,0x1a0a,0x1a10,0x1a17,0x1a1d,0x1a24,0x1a2a,0x1a31, /* 760 0.742188 : 36.58 */ + 0x1a37,0x1a3e,0x1a44,0x1a4b,0x1a51,0x1a58,0x1a5e,0x1a65, /* 768 0.750000 : 36.87 */ + 0x1a6b,0x1a72,0x1a78,0x1a7f,0x1a85,0x1a8c,0x1a92,0x1a99, /* 776 0.757813 : 37.16 */ + 0x1a9f,0x1aa5,0x1aac,0x1ab2,0x1ab9,0x1abf,0x1ac5,0x1acc, /* 784 0.765625 : 37.44 */ + 0x1ad2,0x1ad9,0x1adf,0x1ae5,0x1aec,0x1af2,0x1af8,0x1aff, /* 792 0.773438 : 37.72 */ + 0x1b05,0x1b0b,0x1b12,0x1b18,0x1b1e,0x1b25,0x1b2b,0x1b31, /* 800 0.781250 : 38.00 */ + 0x1b37,0x1b3e,0x1b44,0x1b4a,0x1b50,0x1b57,0x1b5d,0x1b63, /* 808 0.789063 : 38.28 */ + 0x1b69,0x1b70,0x1b76,0x1b7c,0x1b82,0x1b88,0x1b8f,0x1b95, /* 816 0.796875 : 38.55 */ + 0x1b9b,0x1ba1,0x1ba7,0x1bae,0x1bb4,0x1bba,0x1bc0,0x1bc6, /* 824 0.804688 : 38.82 */ + 0x1bcc,0x1bd2,0x1bd9,0x1bdf,0x1be5,0x1beb,0x1bf1,0x1bf7, /* 832 0.812500 : 39.09 */ + 0x1bfd,0x1c03,0x1c09,0x1c0f,0x1c16,0x1c1c,0x1c22,0x1c28, /* 840 0.820313 : 39.36 */ + 0x1c2e,0x1c34,0x1c3a,0x1c40,0x1c46,0x1c4c,0x1c52,0x1c58, /* 848 0.828125 : 39.63 */ + 0x1c5e,0x1c64,0x1c6a,0x1c70,0x1c76,0x1c7c,0x1c82,0x1c88, /* 856 0.835938 : 39.89 */ + 0x1c8e,0x1c94,0x1c9a,0x1ca0,0x1ca5,0x1cab,0x1cb1,0x1cb7, /* 864 0.843750 : 40.16 */ + 0x1cbd,0x1cc3,0x1cc9,0x1ccf,0x1cd5,0x1cdb,0x1ce0,0x1ce6, /* 872 0.851563 : 40.42 */ + 0x1cec,0x1cf2,0x1cf8,0x1cfe,0x1d04,0x1d09,0x1d0f,0x1d15, /* 880 0.859375 : 40.67 */ + 0x1d1b,0x1d21,0x1d26,0x1d2c,0x1d32,0x1d38,0x1d3e,0x1d43, /* 888 0.867188 : 40.93 */ + 0x1d49,0x1d4f,0x1d55,0x1d5a,0x1d60,0x1d66,0x1d6c,0x1d71, /* 896 0.875000 : 41.19 */ + 0x1d77,0x1d7d,0x1d83,0x1d88,0x1d8e,0x1d94,0x1d99,0x1d9f, /* 904 0.882813 : 41.44 */ + 0x1da5,0x1daa,0x1db0,0x1db6,0x1dbb,0x1dc1,0x1dc7,0x1dcc, /* 912 0.890625 : 41.69 */ + 0x1dd2,0x1dd8,0x1ddd,0x1de3,0x1de9,0x1dee,0x1df4,0x1df9, /* 920 0.898438 : 41.94 */ + 0x1dff,0x1e05,0x1e0a,0x1e10,0x1e15,0x1e1b,0x1e20,0x1e26, /* 928 0.906250 : 42.18 */ + 0x1e2c,0x1e31,0x1e37,0x1e3c,0x1e42,0x1e47,0x1e4d,0x1e52, /* 936 0.914063 : 42.43 */ + 0x1e58,0x1e5d,0x1e63,0x1e68,0x1e6e,0x1e73,0x1e79,0x1e7e, /* 944 0.921875 : 42.67 */ + 0x1e84,0x1e89,0x1e8f,0x1e94,0x1e99,0x1e9f,0x1ea4,0x1eaa, /* 952 0.929688 : 42.91 */ + 0x1eaf,0x1eb5,0x1eba,0x1ebf,0x1ec5,0x1eca,0x1ed0,0x1ed5, /* 960 0.937500 : 43.15 */ + 0x1eda,0x1ee0,0x1ee5,0x1eea,0x1ef0,0x1ef5,0x1efb,0x1f00, /* 968 0.945313 : 43.39 */ + 0x1f05,0x1f0b,0x1f10,0x1f15,0x1f1b,0x1f20,0x1f25,0x1f2a, /* 976 0.953125 : 43.63 */ + 0x1f30,0x1f35,0x1f3a,0x1f40,0x1f45,0x1f4a,0x1f4f,0x1f55, /* 984 0.960938 : 43.86 */ + 0x1f5a,0x1f5f,0x1f64,0x1f6a,0x1f6f,0x1f74,0x1f79,0x1f7f, /* 992 0.968750 : 44.09 */ + 0x1f84,0x1f89,0x1f8e,0x1f93,0x1f99,0x1f9e,0x1fa3,0x1fa8, /* 1000 0.976563 : 44.32 */ + 0x1fad,0x1fb3,0x1fb8,0x1fbd,0x1fc2,0x1fc7,0x1fcc,0x1fd1, /* 1008 0.984375 : 44.55 */ + 0x1fd7,0x1fdc,0x1fe1,0x1fe6,0x1feb,0x1ff0,0x1ff5,0x1ffa, /* 1016 0.992188 : 44.78 */ + 0x2000 /* 1024 1.000000 : 45.00 */ +}; + +UINT16 DCNVrand(UINT16 max); +void DCNVinitRand(UINT16 seed); +void DCNVshuffleDim(int cnt, UINT16 *tbl); +void DCNVshuffleMain(int cnt, UINT16 *tbl); +SINT32 MOTsin(ANGLE ang); +SINT32 MOTcos(ANGLE ang); +SINT16 MOTatan(SINT32 posX,SINT32 posY); + +static SINT16 MOTatanSub(SINT32 posX, SINT32 posY); + +UINT16 DCNVrand(UINT16 max) +{ + DCNVnext = DCNVnext * 1103515245UL + 12345UL; + + if(max){ + return ((UINT16)(DCNVnext / 65536) % max); + }else{ + return 0; + } +} + +void DCNVinitRand(UINT16 seed) +{ + DCNVnext = (UINT32)seed; +} + +void DCNVshuffleDim(int cnt, UINT16 *tbl) +{ + int i; + + for(i = 0; i < cnt; i++){ + tbl[i] = i; + } + + DCNVshuffleMain(cnt, tbl); +} + +void DCNVshuffleMain(int cnt, UINT16 *tbl) +{ + int i; + int seed; + int tmp; + + for(i = cnt - 1; i > 0; i--) + { + seed = DCNVrand((UINT16)(i - 1)); + tmp = tbl[i]; + tbl[i] = tbl[seed]; + tbl[seed] = tmp; + } +} + +SINT32 MOTsin(ANGLE ang) +{ + UINT16 deg; + + deg = ang; + deg += 8; + deg >>= 4; + + switch(deg & 0x0c00){ + case 0x0000 : + return ((SINT32)(SinTable[deg])); + case 0x0400 : + if((deg = 2048 - deg) < 1024){ + return ((SINT32)(SinTable[deg])); + }else{ + return (0x10000L); + } + case 0x0800 : + return (0 - (SINT32)(SinTable[deg - 2048])); + case 0x0c00 : + if((deg = 4096 - deg) < 1024){ + return (0 - (SINT32)(SinTable[deg])); + }else{ + return (0 - 0x10000L); + } + } + + return -1; +} + +SINT32 MOTcos(ANGLE ang) +{ + UINT16 deg; + + deg = ang; + deg += 8; + deg >>= 4; + + switch(deg & 0x0c00){ + case 0x0000 : + if(deg){ + return ((SINT32)(SinTable[1024 - deg])); + }else{ + return (0x10000L); + } + case 0x0400 : + return (0 - (SINT32)(SinTable[deg - 1024])); + case 0x0800 : + if((deg = 3072 - deg) < 1024){ + return (0 - (SINT32)(SinTable[deg])); + }else{ + return (0 - 0x10000L); + } + case 0x0c00 : + return ((SINT32)(SinTable[deg - 3072])); + } + + return -1; +} + +SINT16 MOTatan(SINT32 posX,SINT32 posY) +{ + if(posX >= 0){ + if(posY < 0){ + return (0x0000 + MOTatanSub(posX,posY)); + }else{ + return (0x8000 - MOTatanSub(posX,posY)); + } + }else{ + if(posY >= 0){ + return (0x8000 + MOTatanSub(posX,posY)); + }else{ + return (0x0000 - MOTatanSub(posX,posY)); + } + } +} + +SINT16 MOTatanSub(SINT32 posX, SINT32 posY) +{ + SINT32 absX; + SINT32 absY; + + if(abs(posX) < 256){ + return (0x0000); + } + + if(!posY){ + return (0x4000); + } + + absX = (posX < 0) ? -(posX) : posX; + absY = (posY < 0) ? -(posY) : posY; + + if(absX > absY){ + return (0x4000 - AtanTable[(absY * 4)/(absX / 256)]); + }else{ + return (0x0000 + AtanTable[(absX * 4)/(absY / 256)]); + } +} diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.o new file mode 100644 index 00000000..129302a8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/dconv.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/define.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/define.h new file mode 100644 index 00000000..463597ee --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/define.h @@ -0,0 +1,98 @@ +#include "gp2x.h" + +#ifndef __DEFINE +#define __DEFINE + +#define WP 65536 +#define WWP (WP*2) + +#define true 1 +#define false 0 + +//設定ファイルの内容 +#define CONFIGFILE_NAME "debug.txt" + +#define DISPLY_WIDTH (320) +#define DISPLY_HEIGHT (240) +#define DISPLY_WIDTH_WP (320*WP) +#define DISPLY_HEIGHT_WP (240*WP) + +#define BMPBUFF_MAX (128) + +#define GP2X_BUTTON_UP (0) +#define GP2X_BUTTON_DOWN (4) +#define GP2X_BUTTON_LEFT (2) +#define GP2X_BUTTON_RIGHT (6) +#define GP2X_BUTTON_UPLEFT (1) +#define GP2X_BUTTON_UPRIGHT (7) +#define GP2X_BUTTON_DOWNLEFT (3) +#define GP2X_BUTTON_DOWNRIGHT (5) +#define GP2X_BUTTON_CLICK (18) +#define GP2X_BUTTON_A (12) +#define GP2X_BUTTON_B (13) +#define GP2X_BUTTON_Y (14) +#define GP2X_BUTTON_X (15) +#define GP2X_BUTTON_L (10) +#define GP2X_BUTTON_R (11) +#define GP2X_BUTTON_START (8) +#define GP2X_BUTTON_SELECT (9) +#define GP2X_BUTTON_VOLUP (16) +#define GP2X_BUTTON_VOLDOWN (17) +#define GP2X_BUTTON_EXIT (19) +#define GP2X_BUTTON_MAX (20) + + +#define VOL_MAX (128) + +enum +{ + EN_SN_EXIT = 0, + EN_SN_TITLE, + EN_SN_ACT, + EN_SN_OPTION, + EN_SN_ENDING, + EN_SN_LOGO, + EN_SN_STAGESELECT, + EN_SN_DEMO, +} DISP_SCENE; + +enum { + EN_BGM_GAME01 = 0, + EN_BGM_GAME02, + EN_BGM_GAME03, + EN_BGM_GAME04, + EN_BGM_GAME05, + EN_BGM_GAME06, + EN_BGM_GAME07, + + EN_BGM_END , +}; +enum { + EN_SE_ATK1 = 0, + EN_SE_DAMEGE , + EN_SE_L1 , + EN_SE_LANDING, + EN_SE_MSG , + EN_SE_SELECT , + EN_SE_SW , + EN_SE_JUMP , + EN_SE_PAWA , + EN_SE_CL1 , + EN_SE_CL2 , + EN_SE_CL3 , + EN_SE_CL4 , + EN_SE_CL5 , + EN_SE_CL21 , + EN_SE_CL22 , + EN_SE_CL23 , + EN_SE_CL24 , + EN_SE_CL25 , + + EN_SE_END , +}; + + + +#endif + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.c new file mode 100644 index 00000000..af9239bd --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.c @@ -0,0 +1,191 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "demo.h" + + +// 関数プロトタイプ +void demo_main( void ); +void demo_init( void ); +void demo_relese( void ); +void demo_keys( void ); +void demo_drow( void ); + + +// 変数宣言 +static int scene_exit; + + +static char string[1024]; +//---------------------------------------------------------------------- +// メイン関数 +void demo_main( void ) +{ + int exit_code; + + exit_code = 0; + + demo_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + demo_keys( ); // キー処理 + demo_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + demo_relese( ); // 終了 +} + +void demo_init( void ) +{ + scene_exit = 1; + + sprintf(string,"image/demo%d/demo%d.bmp", ( int )gameflag[131] , ( int )1 ); + LoadBitmap(string,1,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/demo%d/demo%d.bmp", ( int )gameflag[131] , ( int )2 ); + LoadBitmap(string,2,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/demo%d/demo%d.bmp", ( int )gameflag[131] , ( int )3 ); + LoadBitmap(string,3,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/demo%d/demo%d.bmp", ( int )gameflag[131] , ( int )4 ); + LoadBitmap(string,4,true); //プレーンナンバー2にシステム用BMPを読み込む + sprintf(string,"image/demo%d/demo%d.bmp", ( int )gameflag[131] , ( int )5 ); + LoadBitmap(string,5,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/bak/1_256.bmp",11,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/2_256.bmp",12,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/3_256.bmp",13,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/4_256.bmp",14,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/5_256.bmp",15,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/demo0/mesh.bmp",20,true); //プレーンナンバー2にシステム用BMPを読み込む + + if ( gameflag[70] == 0 ) + { + if ( ( gameflag[120] > 0 ) && ( gameflag[120] <= 10 ) ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + if ( ( gameflag[120] > 10 ) && ( gameflag[120] <= 20 ) ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + if ( ( gameflag[120] > 20 ) && ( gameflag[120] <= 30 ) ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + if ( ( gameflag[120] > 30 ) && ( gameflag[120] <= 40 ) ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + if ( ( gameflag[120] > 40 ) && ( gameflag[120] <= 50 ) ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + } +// soundPlayBgm( EN_BGM_GAME01 ); + +} + +void demo_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } + soundStopBgm(EN_BGM_GAME01); + +} + + +void demo_keys( void ) +{ + if ( IsPushKey( gameflag[0] ) ) + { +// soundPlaySe( EN_SE_SELECT ); + } + else if ( IsPushKey( gameflag[1] ) ) + { +// soundPlaySe( EN_SE_SELECT ); + } + if ( IsPushKey( gameflag[2] ) ) + { + } + + // 決定キーを押した + if ( IsPushOKKey( ) ) + { + g_scene = EN_SN_ACT; + scene_exit=0; + } + // キャンセルキーを押した + if ( IsPushCancelKey( ) ) + { + g_scene = EN_SN_ACT; + scene_exit=0; + } +} + +void demo_drow( void ) +{ + //------------------------------------------------------------- + //変数宣言 + //------------------------------------------------------------- + + //背景クリア + ClearSecondary(); + + if ( ( gameflag[120] > 0 ) && ( gameflag[120] <= 10 ) ) + { + Blt( 11, 0, 0 ); + Blt( 20, 0, 0 ); + Blt( 1, 0, 0 ); + } + if ( ( gameflag[120] > 10 ) && ( gameflag[120] <= 20 ) ) + { + Blt( 12, 0, 0 ); + Blt( 20, 0, 0 ); + Blt( 2, 0, 0 ); + } + if ( ( gameflag[120] > 20 ) && ( gameflag[120] <= 30 ) ) + { + Blt( 13, 0, 0 ); + Blt( 20, 0, 0 ); + Blt( 3, 0, 0 ); + } + if ( ( gameflag[120] > 30 ) && ( gameflag[120] <= 40 ) ) + { + Blt( 14, 0, 0 ); + Blt( 20, 0, 0 ); + Blt( 4, 0, 0 ); + } + if ( ( gameflag[120] > 40 ) && ( gameflag[120] <= 50 ) ) + { + Blt( 15, 0, 0 ); + Blt( 20, 0, 0 ); + Blt( 5, 0, 0 ); + } + + //キー入力検査 + KeyInput(); + +} + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.h new file mode 100644 index 00000000..95ddc71c --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.h @@ -0,0 +1,6 @@ +#ifndef __DEMO +#define __DEMO + +extern void demo_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.o new file mode 100644 index 00000000..6e4335c1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/demo.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.c new file mode 100644 index 00000000..394cb919 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.c @@ -0,0 +1,275 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "ending.h" + + +// 関数プロトタイプ +void ending_main( void ); +void ending_init( void ); +void ending_relese( void ); +void ending_keys( void ); +void ending_drow( void ); +void ending_init_save_data( void ); + + +// 変数宣言 +static int scene_exit; +static int demo[10]; +static int end_type; +static long target_save[1024]; + +static char string[1024]; + +//---------------------------------------------------------------------- +// メイン関数 +void ending_main( void ) +{ + int exit_code; + + exit_code = 0; + + ending_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + ending_keys( ); // キー処理 + ending_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + ending_relese( ); // 終了 +} + +void ending_init( void ) +{ + int stage_hosei; + int x; + int y; + int stage_no; + int tergetnam; + //----------------------------------------------------------------------------------- + tergetnam = 0; + stage_hosei = 0; + end_type = 0; + + if ( gameflag[126] == 1 ) + { + stage_hosei = 50; + } + scene_exit = 1; + memset( target_save, 0, sizeof( target_save ) ); + memset( demo, 0, sizeof( demo ) ); + + LoadBitmap("image/bak/1_256.bmp",1,false); //プレーンナンバー1にタイトル画面背景を読み込む + sprintf(string, "image/end%d/%d.bmp", ( int )gameflag[131] , ( int )1 ); + LoadBitmap(string,2,true); //プレーンナンバー1にタイトル画面背景を読み込む + sprintf(string, "image/end%d/%d.bmp", ( int )gameflag[131] , ( int )2 ); + LoadBitmap(string,3,true); //プレーンナンバー1にタイトル画面背景を読み込む + sprintf(string, "image/end%d/%d.bmp", ( int )gameflag[131] , ( int )3 ); + LoadBitmap(string,4,true); //プレーンナンバー1にタイトル画面背景を読み込む + sprintf(string, "image/end%d/%d.bmp", ( int )gameflag[131] , ( int )4 ); + LoadBitmap(string,5,true); //プレーンナンバー1にタイトル画面背景を読み込む + sprintf(string, "image/end%d/%d.bmp", ( int )gameflag[131] , ( int )5 ); + LoadBitmap(string,6,true); //プレーンナンバー1にタイトル画面背景を読み込む + + LoadBitmap("image/end0/end1.bmp",10,true); //プレーンナンバー1にタイトル画面背景を読み込む + LoadBitmap("image/end0/end2.bmp",11,true); //プレーンナンバー1にタイトル画面背景を読み込む + + LoadBitmap("image/sys/waku.bmp",109,true); //プレーンナンバー2にシステム用BMPを読み込む + soundPlayBgm( EN_BGM_GAME07 ); + + LoadFile( "save/target", &target_save[0], sizeof( target_save ) ); + tergetnam = 0; + for ( x = 0; x < 5; x++ ) + { + for ( y = 0; y < 10; y++ ) + { + stage_no = ( ( x ) * 10 ) + ( y + 1 ); + //トロフィーの表示 + //タイム + if ( target_save[200 + stage_no + stage_hosei] >= gameflag[200 + stage_no + stage_hosei] ) + { +// tergetnam++; + } + //回転 + if ( target_save[300 + stage_no + stage_hosei] >= gameflag[300 + stage_no + stage_hosei] ) + { +// tergetnam++; + } + //隠し + if ( gameflag[400 + stage_no + stage_hosei] != 0 ) + { + tergetnam++; + } + } + } + if ( tergetnam == 50 ) + { + end_type = 1; + } + gameflag[100] = 0; + + +} + +void ending_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } + soundStopBgm(EN_BGM_GAME01); + +} + + +void ending_keys( void ) +{ + // 上下キーに応じて移動 + if (IsPushKey(gameflag[0])) + { + } + if (IsPushKey(gameflag[1])) + { + } + if (IsPushKey(gameflag[2])) + { + } + if (IsPushKey(gameflag[3])) + { + } + + // スペースキーが押される + if ( + ( ( IsPushKey(gameflag[4]) ) || ( IsPushKey(gameflag[5]) ) ) + && ( gameflag[100] == 1 ) + ) + { + gameflag[40] = 0; /* タイトル */ + g_scene = EN_SN_TITLE; + scene_exit=0; + return; + } + if ( + ( ( IsPushKey(gameflag[4]) ) || ( IsPushKey(gameflag[5]) ) ) + && ( gameflag[100] == 0 ) + ) + { + demo[0] = 0; + demo[1]++; + } + + +} + +void ending_drow( void ) +{ + + demo[0]++; + if ( end_type == 0 ) + { + //エンディング1 + switch( demo[1] ) + { + case 0: + Blt( 10 , 0, 0 ); + Blt( 2 , 0, 0 ); + if ( demo[0] > ( ( 60 * 12 ) + 40 ) ) + { + demo[0] = 0; + demo[1]++; + } + break; + case 1: + Blt( 10 , 0, 0 ); + Blt( 5 , 0, 0 ); + if ( demo[0] > ( ( 60 * 12 ) + 30 ) ) + { + demo[0] = 0; + demo[1]++; + } + break; + case 2: + Blt( 10 , 0, 0 ); + Blt( 6 , 0, 0 ); + demo[0] = 0; + demo[1] = 2; + gameflag[100] = 1; + break; + default: + demo[1] = 2; + gameflag[100] = 1; + break; + } + } + else + { + //エンディング2 + switch( demo[1] ) + { + case 0: + Blt( 11 , 0, 0 ); + Blt( 3 , 0, 0 ); + if ( demo[0] > ( ( 60 * 12 ) + 40 ) ) + { + demo[0] = 0; + demo[1]++; + } + break; + case 1: + Blt( 11 , 0, 0 ); + Blt( 4 , 0, 0 ); + if ( demo[0] > ( ( 60 * 12 ) + 30 ) ) + { + demo[0] = 0; + demo[1]++; + } + break; + case 2: + Blt( 11 , 0, 0 ); + Blt( 5 , 0, 0 ); + if ( demo[0] > ( ( 60 * 12 ) + 30 ) ) + { + demo[0] = 0; + demo[1]++; + } + break; + case 3: + Blt( 11 , 0, 0 ); + Blt( 6 , 0, 0 ); + demo[0] = 0; + demo[1] = 3; + gameflag[100] = 1; + break; + default: + demo[1] = 3; + gameflag[100] = 1; + break; + } + } + + //キー入力検査 + KeyInput(); + +} + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.h new file mode 100644 index 00000000..92937dc9 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.h @@ -0,0 +1,6 @@ +#ifndef __ENDING +#define __ENDING + +extern void ending_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.o new file mode 100644 index 00000000..49c71a4c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ending.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/err.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/err.txt new file mode 100644 index 00000000..a7f83063 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/err.txt @@ -0,0 +1,143 @@ +[act.c:1076]: (style) Expression is always false because 'else if' condition matches previous condition at line 1029. +[act.c:4282] -> [act.c:4297]: (performance) Variable 'by' is reassigned a value before the old one has been used. +[act.c:5832] -> [act.c:5833]: (performance) Variable 'rg' is reassigned a value before the old one has been used. +[act.c:328]: (style) The scope of the variable 'exit_code' can be reduced. +[act.c:358]: (style) The scope of the variable 'wk' can be reduced. +[act.c:794]: (style) The scope of the variable 'old_x' can be reduced. +[act.c:1623]: (style) The scope of the variable 'bx' can be reduced. +[act.c:1692]: (style) The scope of the variable 'bx' can be reduced. +[act.c:3715]: (style) The scope of the variable 'wk' can be reduced. +[act.c:4175]: (style) The scope of the variable 'k' can be reduced. +[act.c:4177]: (style) The scope of the variable 'rg' can be reduced. +[act.c:6517]: (style) The scope of the variable 'k' can be reduced. +[act.c:6586]: (style) The scope of the variable 'f' can be reduced. +[act.c:6587]: (style) The scope of the variable 'b' can be reduced. +[act.c:1102]: (style) Variable 'houkou' is assigned a value that is never used. +[act.c:1338]: (style) Variable 'py2' is assigned a value that is never used. +[act.c:1386]: (style) Variable 'px' is assigned a value that is never used. +[act.c:1660]: (style) Variable 'bx' is assigned a value that is never used. +[act.c:1726]: (style) Variable 'bx' is assigned a value that is never used. +[act.c:1967]: (style) Variable 'arm_muki' is assigned a value that is never used. +[act.c:2202]: (style) Variable 'x' is assigned a value that is never used. +[act.c:2203]: (style) Variable 'y' is assigned a value that is never used. +[act.c:2204]: (style) Variable 'b_x' is assigned a value that is never used. +[act.c:2205]: (style) Variable 'b_y' is assigned a value that is never used. +[act.c:2206]: (style) Variable 'i' is assigned a value that is never used. +[act.c:2287]: (style) Variable 'i' is assigned a value that is never used. +[act.c:2333]: (style) Variable 'i' is assigned a value that is never used. +[act.c:3318]: (style) Variable 'px' is assigned a value that is never used. +[act.c:3319]: (style) Variable 'py' is assigned a value that is never used. +[act.c:3324]: (style) Variable 'x' is assigned a value that is never used. +[act.c:3321]: (style) Variable 'dx' is assigned a value that is never used. +[act.c:3322]: (style) Variable 'dy' is assigned a value that is never used. +[act.c:3350]: (style) Variable 'width' is assigned a value that is never used. +[act.c:4281]: (style) Variable 'bx' is assigned a value that is never used. +[act.c:4388]: (style) Variable 'wbx' is assigned a value that is never used. +[act.c:4907]: (style) Variable 'py2' is assigned a value that is never used. +[act.c:5360]: (style) Variable 'all' is assigned a value that is never used. +[act.c:5343]: (style) Variable 'is_tukami' is assigned a value that is never used. +[act.c:6004]: (style) Variable 'py2' is assigned a value that is never used. +[act.c:6275]: (style) Variable 'py2' is assigned a value that is never used. +[act.c:6594]: (style) Variable 'f' is assigned a value that is never used. +[act.c:6595]: (style) Variable 'b' is assigned a value that is never used. +[act.c:6736]: (style) Variable 'input_keys' is assigned a value that is never used. +[act.c:6745]: (style) Variable 'd_num' is assigned a value that is never used. +[act.c:6754]: (style) Variable 'd_num' is assigned a value that is never used. +[act.c:6772]: (style) Variable 'd_num' is assigned a value that is never used. +[act.c:461]: (error) Array 'map_data[20]' accessed at index 20, which is out of bounds. +[act.c:2524]: (error) Array 'map_data[20]' accessed at index 20, which is out of bounds. +[act.c:2713]: (error) Array 'map_data[20]' accessed at index 20, which is out of bounds. +[act.c:2885]: (error) Array 'map_data[20]' accessed at index 20, which is out of bounds. +[act.c:413]: (error) Array 'item_wk[500]' accessed at index 500, which is out of bounds. +[dconv.c:313]: (style) The scope of the variable 'seed' can be reduced. +[dconv.c:314]: (style) The scope of the variable 'tmp' can be reduced. +[demo.c:30]: (style) The scope of the variable 'exit_code' can be reduced. +[ending.c:34]: (style) The scope of the variable 'exit_code' can be reduced. +[function.c:269]: (style) Assignment of function parameter has no effect outside the function. +[function.c:311]: (style) Assignment of function parameter has no effect outside the function. +[function.c:354] -> [function.c:356]: (performance) Variable 'sp' is reassigned a value before the old one has been used. +[function.c:129]: (style) The scope of the variable 'size' can be reduced. +[function.c:160]: (style) The scope of the variable 'size' can be reduced. +[function.c:199]: (style) The scope of the variable 'size' can be reduced. +[function.c:224]: (style) The scope of the variable 'size' can be reduced. +[function.c:324]: (style) The scope of the variable 'sp' can be reduced. +[function.c:326]: (style) The scope of the variable 's2' can be reduced. +[function.c:560]: (style) The scope of the variable 'pal' can be reduced. +[function.c:577]: (style) The scope of the variable 'pal' can be reduced. +[function.c:1286]: (style) The scope of the variable 'blt_num' can be reduced. +[function.c:1339]: (style) The scope of the variable 'blt_num' can be reduced. +[function.c:147]: (style) Variable 'size' is assigned a value that is never used. +[function.c:182]: (style) Variable 'size' is assigned a value that is never used. +[function.c:211]: (style) Variable 'size' is assigned a value that is never used. +[function.c:236]: (style) Variable 'size' is assigned a value that is never used. +[function.c:410]: (error) Resource leak: fp +[function.c:380]: (error) Resource leak: fp +[function.c:285]: (style) The scope of the variable 'temp' can be reduced. +[gfx/SDL_rotozoom.c:391] -> [gfx/SDL_rotozoom.c:392]: (performance) Variable 'sp' is reassigned a value before the old one has been used. +[gfx/SDL_rotozoom.c:30]: (style) The scope of the variable 'ex' can be reduced. +[gfx/SDL_rotozoom.c:30]: (style) The scope of the variable 'ey' can be reduced. +[gfx/SDL_rotozoom.c:30]: (style) The scope of the variable 't1' can be reduced. +[gfx/SDL_rotozoom.c:30]: (style) The scope of the variable 't2' can be reduced. +[gfx/SDL_rotozoom.c:31]: (style) The scope of the variable 'c00' can be reduced. +[gfx/SDL_rotozoom.c:31]: (style) The scope of the variable 'c01' can be reduced. +[gfx/SDL_rotozoom.c:31]: (style) The scope of the variable 'c11' can be reduced. +[gfx/SDL_rotozoom.c:337]: (style) The scope of the variable 't1' can be reduced. +[gfx/SDL_rotozoom.c:337]: (style) The scope of the variable 't2' can be reduced. +[gfx/SDL_rotozoom.c:337]: (style) The scope of the variable 'ex' can be reduced. +[gfx/SDL_rotozoom.c:337]: (style) The scope of the variable 'ey' can be reduced. +[gfx/SDL_rotozoom.c:494]: (style) The scope of the variable 'dy' can be reduced. +[gfx/SDL_rotozoom.c:494]: (style) The scope of the variable 'sdx' can be reduced. +[gfx/SDL_rotozoom.c:494]: (style) The scope of the variable 'sdy' can be reduced. +[gfx/SDL_rotozoom.c:614]: (style) The scope of the variable 'sanglezoominv' can be reduced. +[gfx/SDL_rotozoom.c:614]: (style) The scope of the variable 'canglezoominv' can be reduced. +[gfx/SDL_rotozoom.c:615]: (style) The scope of the variable 'dstwidthhalf' can be reduced. +[gfx/SDL_rotozoom.c:615]: (style) The scope of the variable 'dstheighthalf' can be reduced. +[gfx/SDL_rotozoom.c:869]: (style) The scope of the variable 'i' can be reduced. +[gfx/SDL_rotozoom.c:505]: (style) Variable 'sw' is assigned a value that is never used. +[gfx/SDL_rotozoom.c:506]: (style) Variable 'sh' is assigned a value that is never used. +[init.c:253]: (style) The scope of the variable 'i' can be reduced. +[init.c:77]: (style) Unused variable: char_work +[init.c:78]: (style) Unused variable: strlen +[init.c:78]: (style) The scope of the variable 'strlen' can be reduced. +[init.c:114]: (error) Buffer overrun possible for long command line arguments. +[init.c:130] -> [init.c:142]: (performance) Variable 'flags' is reassigned a value before the old one has been used. +[logo.c:31]: (style) The scope of the variable 'exit_code' can be reduced. +[option.c:44]: (style) The scope of the variable 'exit_code' can be reduced. +[option.c:452]: (style) The scope of the variable 'i' can be reduced. +[option.c:352]: (style) Variable 'load_rc' is assigned a value that is never used. +[stageselect.c:38]: (style) The scope of the variable 'exit_code' can be reduced. +[stageselect.c:242]: (style) The scope of the variable 'wk' can be reduced. +[title.c:54]: (style) The scope of the variable 'exit_code' can be reduced. +[title.c:473]: (style) The scope of the variable 'wk' can be reduced. +[dconv.c:294]: (style) The function 'DCNVinitRand' is never used. +[dconv.c:299]: (style) The function 'DCNVshuffleDim' is never used. +[act.c:6791]: (style) The function 'GetKyori' is never used. +[function.c:382]: (style) The function 'LogFileWrite' is never used. +[function.c:590]: (style) The function 'SaveBmp' is never used. +[function.c:508]: (style) The function 'SetColorKeyPos' is never used. +[act.c:3599]: (style) The function 'bgm_midi' is never used. +[act.c:5783]: (style) The function 'boss_dead' is never used. +[act.c:1754]: (style) The function 'cleaer_ankr' is never used. +[act.c:5301]: (style) The function 'e_hp' is never used. +[act.c:5809]: (style) The function 'e_shot_set' is never used. +[act.c:5232]: (style) The function 'enm_set2' is never used. +[act.c:5907]: (style) The function 'enmjmp' is never used. +[act.c:5114]: (style) The function 'item_event' is never used. +[act.c:4347]: (style) The function 'item_sonzai' is never used. +[act.c:6160]: (style) The function 'kane_set' is never used. +[act.c:6500]: (style) The function 'labs' is never used. +[act.c:3336]: (style) The function 'minimap_disp' is never used. +[act.c:6514]: (style) The function 'p_mgc_set' is never used. +[act.c:4002]: (style) The function 'p_shot_set' is never used. +[gfx/SDL_rotozoom.c:593]: (style) The function 'rotozoomSurfaceSize' is never used. +[gfx/SDL_rotozoom.c:584]: (style) The function 'rotozoomSurfaceSizeXY' is never used. +[util_snd.c:168]: (style) The function 'soundIsPlayBgm' is never used. +[util_snd.c:345]: (style) The function 'soundIsPlaySe' is never used. +[util_snd.c:119]: (style) The function 'soundLoadBuffer2' is never used. +[util_snd.c:214]: (style) The function 'soundLoadPlayBgm' is never used. +[util_snd.c:225]: (style) The function 'soundPlayFadeFlag' is never used. +[util_snd.c:281]: (style) The function 'soundSetVolumeMaster' is never used. +[util_snd.c:153]: (style) The function 'soundStopBgmPlaying' is never used. +[act.c:2804]: (style) The function 'wait_scl3' is never used. +[gfx/SDL_rotozoom.c:863]: (style) The function 'zoomSurface' is never used. +(information) Cppcheck cannot find all the include files (use --check-config for details) diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/extern.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/extern.h new file mode 100644 index 00000000..37cb0f5f --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/extern.h @@ -0,0 +1,11 @@ +extern SDL_Surface *g_screen; +extern int g_scene; +extern long g_DebugDisp; +extern long g_DebugStageProduction; + +extern long gameflag[1024]; +extern long gameflag2[1024]; + + + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.c new file mode 100644 index 00000000..00b55100 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.c @@ -0,0 +1,1401 @@ +#include +#include +#include +#include + +#include +#include +#include "define.h" +#include "function.h" +#include "extern.h" +#include "util_snd.h" +#include "include/general.h" +#include "include/dconv.h" +#include "gfx/SDL_rotozoom.h" + +#ifdef HOME_PATH +extern char home_path[256]; +#endif + +void FunctionInit( void ); +void ResetGameFlag( void ); +void ResetGameFlag2( void ); +int LoadGameFlag( char *fn ); +int SaveGameFlag( char *fn ); +int LoadGameFlag2( char *fn ); +int SaveGameFlag2( char *fn ); +int SaveFile( char *fn, long *buff, long size ); +int LoadFile( char *fn, long *buff, long size ); +long GetConfig( char* fn, char* cParam ); +long LogFileWrite( char* fn, char* cParam ); + +long LoadBitmap( char *fname , int bmpindex, int flag ); +void ReleaseBitmap( int bmpindex ); +void BltRect(int bmpindex, int srcX, int srcY, int dstX, int dstY, int width, int height); +void Blt( int bmpindex, int dstX, int dstY ); +void SetColorKey(int bmpindex, int flag ); +void SetColorKeyPos(int bank, Uint32 color); +void ClearSecondary( void ); +void BltNumericImage( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ); +void BltNumericImage2( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ); +long get2keta( long val, long st ); +void SetGscreenPalette( SDL_Surface *surface ); +void SetPalette(int getbmpindex, int setbmpindex); +void BltRectRotZoom( int bmpindex, int dstX, int dstY, int srcX, int srcY, int width, int height, double angle, double zoom, int smooth); +void CreateSurface( int bmpindex, int size_x, int size_y ); +void SwapToSecondary( int bmpindex ); +void SaveBmp( int bmpindex, char *fn ); +void drawGRPline(f32 x1, f32 y1, f32 x2, f32 y2, Uint32 color); +void pointSDLsurface( f32 px, f32 py, Uint32 color); +inline void putSDLpixel(SDL_Surface *surface, int x, int y, Uint32 pixel); + +int IsPushKey( int keycode ); +int IsPressKey( int keycode ); +void KeyInit( void ); +void KeyInput( void ); +int initPAD(void); +void closePAD(void); +int getPAD(void); +int IsPushOKKey( void ); +int IsPushCancelKey( void ); + +void FPSWait( void ); +int system_keys( void ); +int Set_Volume( int vol ); + +void soundInitBuffer(void); +void soundRelease(void); +void soundLoadBuffer(Sint32 num, Uint8 *fname, int loop); + +long funcSin( long rdo ); +long funcCos( long rdo ); +long funcTan2( long posX, long posY ); + +// キー取得用 +static int key_eventPress[GP2X_BUTTON_MAX]; +static int key_eventPress_old[GP2X_BUTTON_MAX]; +static int key_eventPush[GP2X_BUTTON_MAX]; +int pads; +int trgs; +int reps; + +SDL_Joystick *joys; +Uint8 *keys; + +//static int pads_old; +static int rep_cnt; +// 画像表示用 +static SDL_Surface* bitmap[BMPBUFF_MAX]; +static SDL_Surface* g_surface_bakup; +// 定時処理用 +static long prvTickCount; +static long nowTick; +//static int frame; +#ifdef GP2X +//static const int INTERVAL_BASE = 8; +static const int INTERVAL_BASE = 16; +#else +static const int INTERVAL_BASE = 16; +#endif +SDL_Event event; + +// 音楽再生 +static long sound_vol; + +void FunctionInit( void ) +{ + int i; + + prvTickCount = 0; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + bitmap[i] = NULL; + } + KeyInit( ); + soundInitBuffer(); + +} + +void ResetGameFlag( void ) +{ + memset( &gameflag[0], 0, sizeof( gameflag ) ); +} +int LoadGameFlag( char *fn ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + int size; + +#ifdef HOME_PATH + char temp[256], temp2[256]; + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + if ( ( fp = fopen( fn, "rb" ) ) == NULL ) + { + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fread( &gameflag[0], 1, sizeof( gameflag ), fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} +int SaveGameFlag( char *fn ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + int size; + + +#ifdef HOME_PATH + char temp[256], temp2[256]; + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( fn, "wb" ) ) == NULL ) + { +// printf("file open error!!\n"); + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fwrite( &gameflag[0], 1, sizeof( gameflag ), fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} +void ResetGameFlag2( void ) +{ + memset( &gameflag2[0], 0, sizeof( gameflag ) ); +} +int LoadGameFlag2( char *fn ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + int size; + + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( fn, "rb" ) ) == NULL ) + { +// printf("file open error!!\n"); + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fread( &gameflag2[0], 1, sizeof( gameflag ), fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} +int SaveGameFlag2( char *fn ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + int size; + + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( fn, "wb" ) ) == NULL ) + { +// printf("file open error!!\n"); + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fwrite( &gameflag2[0], 1, sizeof( gameflag ), fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} +int SaveFile( char *fn, long *buff, long size ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + +#ifdef HOME_PATH + char temp[256], temp2[256]; + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( temp2, "wb" ) ) == NULL ) + { +// printf("file open error!!\n"); + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fwrite( buff, 1, size, fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} + +int LoadFile( char *fn, long *buff, long size ) +{ + int rc = 0; + FILE *fp; /* (1)ファイルポインタの宣言 */ + +#ifdef HOME_PATH + char temp[256], temp2[256]; + /* Use root directory to load maps instead of the home directory */ + if (strstr(fn, ".map")) + { + snprintf(temp2, sizeof(temp2), "%s", fn); + } + else + { + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); + } +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( temp2, "rb" ) ) == NULL ) + { +// printf("file open error!!\n"); + rc = -1; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + size = fread( buff, 1, size, fp ); /* 5000バイト分読み込む */ + fclose( fp ); /* (5)ファイルのクローズ */ +#ifdef GP2X + sync( ); +#endif + } + + return ( rc ); +} + +long GetConfig( char* fn, char* cParam ) +{ + FILE *fp; /* (1)ファイルポインタの宣言 */ + char *sp; + char s[256]; + char s2[256]; + memset( s, '\0', sizeof( s ) ); + long rc; + +#ifdef HOME_PATH + char temp[256], temp2[256]; + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + rc = 0; + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( temp2, "r" ) ) == NULL ) + { + rc = 0; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + /* (4)ファイルの読み(書き)*/ + while ( fgets( s, 256, fp ) != NULL) + { + /* ここではfgets()により1行単位で読み出し */ + if ( strstr( s, cParam ) != NULL ) + { + sp = NULL; + //文字列が存在する + sp = strstr( s, "=" ); + if ( sp != NULL ) + { + sp++; + memset( s2, '\0', sizeof( s ) ); + if ( ! ( ( *sp >= '0' && *sp <= '9' ) || ( *sp =='-' ) ) ) + { + return 0; // だめびゃん... + } + while ( *sp >= '0' && *sp <= '9' ) + { + rc = rc * 10 + ( *sp - '0' ); + sp++; + } + } + break; + } + memset( s, '\0', sizeof( s ) ); + } +#ifdef GP2X + sync( ); +#endif + } + + + return( rc ); +} + +long LogFileWrite( char* fn, char* cParam ) +{ + FILE *fp; /* (1)ファイルポインタの宣言 */ + long rc; + +#ifdef HOME_PATH + char temp[256], temp2[256]; + snprintf(temp, sizeof(temp), "%s", fn); + snprintf(temp2, sizeof(temp2), "%s%s%s", home_path, getenv("HOME"), temp); +#else + char temp2[256]; + snprintf(temp2, sizeof(temp2), "%s", fn); +#endif + + rc = 0; + /* (2)ファイルのオープン */ + /* ここで、ファイルポインタを取得する */ + if ( ( fp = fopen( temp2, "w" ) ) == NULL ) + { + rc = 0; /* (3)エラーの場合は通常、異常終了する */ + } + else + { + fputs( cParam, fp); +#ifdef GP2X + sync( ); +#endif + } + + return( rc ); +} + +long LoadBitmap( char *fname , int bmpindex, int flag ) +{ + long rc; + SDL_Surface* tmp; + + rc = 0; + + ReleaseBitmap( bmpindex ); + + + tmp = SDL_LoadBMP( fname ); + if(tmp) + { + if(flag != 0) + { + // パレット0番が透過色 + SDL_SetColorKey(tmp, SDL_SRCCOLORKEY, SDL_MapRGBA(g_screen->format,0,0,0,0) ); + } + bitmap[bmpindex] = SDL_DisplayFormat(tmp); +// bitmap[bmpindex] = tmp; + SDL_FreeSurface(tmp); + } + else + { + rc = -1; + } + +// bitmap[bmpindex] = SDL_LoadBMP( fname ); + if(bitmap[bmpindex]) + { + if(flag != 0) + { + SDL_Surface *surface; + Uint8 bpp; + SDL_Palette *pal; + Uint8 r; + Uint8 g; + Uint8 b; + + surface = bitmap[bmpindex]; + if(surface){ + bpp = surface->format->BytesPerPixel; + if(bpp <= 1){ + pal = surface->format->palette; + if(pal){ + r = pal->colors->r; + g = pal->colors->g; + b = pal->colors->b; + // パレット0番が透過色 + SDL_SetColorKey(bitmap[bmpindex], SDL_SRCCOLORKEY, SDL_MapRGBA(g_screen->format,r,g,b,0) ); + } + } + } + } + } + else + { + rc = -1; + } + + + return ( rc ); +} +void SetColorKey(int bmpindex, int flag ) +{ + if(flag != 0) + { + SDL_Surface *surface; + Uint8 bpp; + SDL_Palette *pal; + Uint8 r; + Uint8 g; + Uint8 b; + + surface = bitmap[bmpindex]; + if(surface){ + bpp = surface->format->BytesPerPixel; + if(bpp <= 1){ + pal = surface->format->palette; + if(pal){ + r = pal->colors->r; + g = pal->colors->g; + b = pal->colors->b; + // パレット0番が透過色 + SDL_SetColorKey(bitmap[bmpindex], SDL_SRCCOLORKEY, SDL_MapRGBA(g_screen->format,r,g,b,0) ); + } + } + } + } + else + { + SDL_SetColorKey(bitmap[bmpindex], 0, SDL_MapRGBA(g_screen->format,0,0,0,0) ); + } +} +// 未使用 +void SetColorKeyPos(int bmpindex, Uint32 color) +{ +// SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a); + SDL_SetColorKey(bitmap[bmpindex], SDL_SRCCOLORKEY, color); +} +// BMPの開放 +void ReleaseBitmap( int bmpindex ) +{ + if ( bitmap[bmpindex] != NULL ) + { + SDL_FreeSurface(bitmap[bmpindex]); + bitmap[bmpindex] = NULL; + } +} +// BMP範囲指定表示 +void BltRect( int bmpindex, int dstX, int dstY, int srcX, int srcY, int width, int height) +{ + SDL_Rect srcRect; + srcRect.x = srcX; + srcRect.y = srcY; + srcRect.w = width; + srcRect.h = height; + + SDL_Rect dstRect; + dstRect.x = dstX; + dstRect.y = dstY; + dstRect.w = width; + dstRect.h = height; + + if(bitmap[bmpindex]) + { + SDL_BlitSurface(bitmap[bmpindex], &srcRect, g_screen, &dstRect); + } +} +// BMP範囲指定表示 +void Blt( int bmpindex, int dstX, int dstY ) +{ + SDL_Rect dstRect; + dstRect.x = dstX; + dstRect.y = dstY; + dstRect.w = 0; + dstRect.h = 0; + + if(bitmap[bmpindex]) + { + SDL_BlitSurface(bitmap[bmpindex], NULL, g_screen, &dstRect); + } +} +void SetGscreenPalette( SDL_Surface *surface ) +{ +// SDL_Surface *surface; + Uint8 bpp; + SDL_Palette *pal; + +// surface = bitmap[bmpindex]; + if(surface){ + bpp = surface->format->BytesPerPixel; + if(bpp <= 1){ + pal = surface->format->palette; + if(pal){ + SDL_SetPalette(g_screen, SDL_LOGPAL|SDL_PHYSPAL, pal->colors, 0, 256); + } + } + } +} +void SetPalette(int getbmpindex, int setbmpindex) +{ + SDL_Surface *surface; + Uint8 bpp; + SDL_Palette *pal; + + surface = bitmap[getbmpindex]; + if(surface){ + bpp = surface->format->BytesPerPixel; + if(bpp <= 8){ + pal = surface->format->palette; + if(pal){ + SDL_SetPalette(bitmap[setbmpindex], SDL_LOGPAL|SDL_PHYSPAL, pal->colors, 0, 256); + } + } + } +} +void SaveBmp( int bmpindex, char *fn ) +{ + if ( bmpindex >= 0 ) + { + SDL_SaveBMP(bitmap[bmpindex], fn); + } + else + { + SDL_SaveBMP(g_screen, fn); + } +} +void CreateSurface( int bmpindex, int size_x, int size_y ) +{ + SDL_Surface* tmp; + Uint32 rmask, gmask, bmask, amask; +#if SDL_BYTEORDER == SDL_BIG_ENDIAN + rmask = 0xff000000; + gmask = 0x00ff0000; + bmask = 0x0000ff00; + amask = 0x000000ff; +#else + rmask = 0x000000ff; + gmask = 0x0000ff00; + bmask = 0x00ff0000; + amask = 0xff000000; +#endif + + ReleaseBitmap( bmpindex ); + tmp = SDL_CreateRGBSurface( SDL_SWSURFACE, size_x, size_y, 0, rmask, gmask, bmask, amask ); + if(tmp) + { + bitmap[bmpindex] = SDL_DisplayFormat(tmp); + SDL_FreeSurface(tmp); + } +} + +void SwapToSecondary( int bmpindex ) +{ + if ( g_surface_bakup != NULL ) + { + g_screen = g_surface_bakup; + g_surface_bakup = NULL; + } + else + { + g_surface_bakup = g_screen; + g_screen = bitmap[bmpindex]; + } +} +// BMP範囲指定表示 +void BltRectRotZoom( int bmpindex, int dstX, int dstY, int srcX, int srcY, int width, int height, double angle, double zoom, int smooth) +{ + + SDL_Surface *temp_Surface; + + temp_Surface = rotozoomSurface(bitmap[bmpindex], angle, zoom, smooth); + SDL_Surface *surface; + Uint8 bpp; + SDL_Palette *pal; + Uint8 r; + Uint8 g; + Uint8 b; + + surface = bitmap[bmpindex]; + if(surface){ + bpp = surface->format->BytesPerPixel; + if(bpp <= 8){ + pal = surface->format->palette; + if(pal){ + SDL_SetPalette(temp_Surface, SDL_LOGPAL|SDL_PHYSPAL, pal->colors, 0, 256); + r = pal->colors->r; + g = pal->colors->g; + b = pal->colors->b; + // パレット0番が透過色 + SDL_SetColorKey(temp_Surface, SDL_SRCCOLORKEY, SDL_MapRGBA(g_screen->format,r,g,b,0) ); + } + } + } + +// SDL_SaveBMP(SDL_DisplayFormat(temp_Surface), "tempbmp.bmp"); + + + SDL_Rect srcRect; + srcRect.x = 0; + srcRect.y = 0; + srcRect.w = temp_Surface->w; + srcRect.h = temp_Surface->h; + + SDL_Rect dstRect; + dstRect.x = dstX - ( temp_Surface->w / 2 ); + dstRect.y = dstY - ( temp_Surface->h / 2 ); + dstRect.w = temp_Surface->w; + dstRect.h = temp_Surface->h; + + SDL_BlitSurface( temp_Surface , &srcRect, g_screen, &dstRect); + SDL_FreeSurface(temp_Surface); +} + + +// 背景のクリア +void ClearSecondary( void ) +{ + SDL_Rect rect; + + rect.x = 0; + rect.y = 0; + rect.w = DISPLY_WIDTH; + rect.h = DISPLY_HEIGHT; + + + SDL_FillRect(g_screen, &rect, SDL_MapRGBA(g_screen->format,0,0,0,255)); +} + +// ラインの描画 +void drawGRPline(f32 x1, f32 y1, f32 x2, f32 y2, Uint32 color) +{ +#ifndef PSPUMODE + f32 x, y, dx, dy, s, step; + int i, j; + + dx = abs((x2 >> 16) - (x1 >> 16)) * WP; + dy = abs((y2 >> 16) - (y1 >> 16)) * WP; + + x = x1; + y = y1; +/* + if(x >= DISPLY_WIDTH_WP) x -= DISPLY_WIDTH_WP; + if(x < 0) x += DISPLY_WIDTH_WP; + if(y >= DISPLY_HEIGHT_WP) y -= DISPLY_HEIGHT_WP; + if(y < 0) y += DISPLY_HEIGHT_WP; +*/ + if(dx > dy){ + if(x1 > x2){ + step = (y1 > y2) ? +1 * WP : -1 * WP; + s = x1; + x1 = x2; + x2 = s; + y1 = y2; + }else{ + step = (y1 < y2) ? +1 * WP : -1 * WP; + } + pointSDLsurface( x, y, color); + s = dx / 2 * WP; + i = x1 >> 16; + j = x2 >> 16; + while(++i <= j){ + x1 += 1 * WP; +// if(x1 >= DISPLY_WIDTH_WP) x1 -= DISPLY_WIDTH_WP; +// if(x1 < 0) x1 += DISPLY_WIDTH_WP; + s -= dy; + if(s < 0){ + s += dx; + y1 += step; + } +// if(y1 >= DISPLY_HEIGHT_WP) y1 -= DISPLY_HEIGHT_WP; +// if(y1 < 0) y1 += DISPLY_HEIGHT_WP; + pointSDLsurface( x1 + WP, y1, color); + pointSDLsurface( x1 + WP, y1 + WP, color); + pointSDLsurface( x1 + WP, y1 - WP, color); + + pointSDLsurface( x1, y1, color); + pointSDLsurface( x1, y1 + WP, color); + pointSDLsurface( x1, y1 - WP, color); + + pointSDLsurface( x1 - WP, y1, color); + pointSDLsurface( x1 - WP, y1 + WP, color); + pointSDLsurface( x1 - WP, y1 - WP, color); + } + }else{ + if(y1 > y2){ + step = (x1 > x2) ? +1 * WP : -1 * WP; + s = y1; + y1 = y2; + y2 = s; + x1 = x2; + }else{ + step = (x1 < x2)? +1 * WP : -1 * WP; + } + pointSDLsurface( x, y, color); + s = dy / 2 * WP; + i = y1 >> 16; + j = y2 >> 16; + while(++i <= j){ + y1 += 1 * WP; +// if(y1 >= DISPLY_HEIGHT_WP) y1 -= DISPLY_HEIGHT_WP; +// if(y1 < 0) y1 += DISPLY_HEIGHT_WP; + s -= dx; + if(s < 0){ + s += dy; + x1 += step; + } +// if(x1 >= DISPLY_WIDTH_WP) x1 -= DISPLY_WIDTH_WP; +// if(x1 < 0) x1 += DISPLY_WIDTH_WP; + pointSDLsurface( x1 + WP, y1, color); + pointSDLsurface( x1 + WP, y1 + WP, color); + pointSDLsurface( x1 + WP, y1 - WP, color); + + pointSDLsurface( x1, y1, color); + pointSDLsurface( x1, y1 + WP, color); + pointSDLsurface( x1, y1 - WP, color); + + pointSDLsurface( x1 - WP, y1, color); + pointSDLsurface( x1 - WP, y1 + WP, color); + pointSDLsurface( x1 - WP, y1 - WP, color); + } + } +#endif +} +void pointSDLsurface( f32 px, f32 py, Uint32 color) +{ + if ( px < 0 || px >= ( DISPLY_WIDTH_WP ) || py < 0 || py >= ( DISPLY_HEIGHT_WP ) ){ + return; + } + + putSDLpixel(g_screen, px, py, color); +} + +inline void putSDLpixel(SDL_Surface *surface, int x, int y, Uint32 pixel) +{ + int bpp = surface->format->BytesPerPixel; + Uint8 *p = (Uint8 *)surface->pixels + (y >> 16) * surface->pitch + (x >> 16) * bpp; + + switch(bpp){ + case 1: + *p = pixel; + break; + case 2: + *(Uint16 *)p = pixel; + break; + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN){ + p[0] = (pixel >> 16) & 0xff; + p[1] = (pixel >> 8) & 0xff; + p[2] = pixel & 0xff; + }else{ + p[0] = pixel & 0xff; + p[1] = (pixel >> 8) & 0xff; + p[2] = (pixel >> 16) & 0xff; + } + break; + case 4: + *(Uint32 *)p = pixel; + break; + } +} + +void KeyInit( void ) +{ + int i; + + /* initialize */ +/* + SDL_Init(SDL_INIT_JOYSTICK|SDL_INIT_VIDEO); + SDL_JoystickOpen(0); +*/ + sound_vol = 128; + + for ( i = 0; i < GP2X_BUTTON_MAX; i++ ) + { + key_eventPress[i] = 0; + key_eventPress_old[i] = 0; + key_eventPush[i] = 0; + } + + initPAD( ); +} +int initPAD(void) +{ + if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0){ + return 0; + } + + if(SDL_NumJoysticks() > 0){ + joys = SDL_JoystickOpen(0); + SDL_JoystickEventState(SDL_ENABLE); + }else{ + joys = NULL; + } + + trgs = 0; + reps = 0; + + rep_cnt = 0; + + return 1; +} +void closePAD(void) +{ + if(SDL_JoystickOpened(0)){ + SDL_JoystickClose(joys); + } +} + +void KeyInput( void ) +{ + int i; +//#ifdef GP2X +#ifdef PSPUMODE + int pad = 0; + + keys = SDL_GetKeyState(NULL); + + if(joys){ + int x = 0, y = 0; + x = SDL_JoystickGetAxis(joys, 0); + y = SDL_JoystickGetAxis(joys, 1); + + if(SDL_JoystickGetButton(joys, sdljbUp) || y < -JOYSTICK_AXIS) pad |= PAD_UP; + if(SDL_JoystickGetButton(joys, sdljbLeft) || x < -JOYSTICK_AXIS) pad |= PAD_LEFT; + if(SDL_JoystickGetButton(joys, sdljbDown) || y > JOYSTICK_AXIS) pad |= PAD_DOWN; + if(SDL_JoystickGetButton(joys, sdljbRight) || x > JOYSTICK_AXIS) pad |= PAD_RIGHT; + //if(SDL_JoystickGetButton(joys, sdljbUp)) pad |= PAD_UP; + //if(SDL_JoystickGetButton(joys, sdljbLeft)) pad |= PAD_LEFT; + //if(SDL_JoystickGetButton(joys, sdljbDown)) pad |= PAD_DOWN; + //if(SDL_JoystickGetButton(joys, sdljbRight)) pad |= PAD_RIGHT; + if(SDL_JoystickGetButton(joys, sdljbCross)) pad |= PAD_BUTTON1; + if(SDL_JoystickGetButton(joys, sdljbCircle)) pad |= PAD_BUTTON2; + if(SDL_JoystickGetButton(joys, sdljbTriangle)) pad |= PAD_BUTTON3; + } +#else + int x = 0, y = 0; + int pad = 0; + + keys = SDL_GetKeyState(NULL); + + if(joys) + { + x = SDL_JoystickGetAxis(joys, 0); + y = SDL_JoystickGetAxis(joys, 1); + } + + if(keys[SDLK_RIGHT] == SDL_PRESSED){ + pad |= PAD_RIGHT; + } + else if(keys[SDLK_LEFT] == SDL_PRESSED){ + pad |= PAD_LEFT; + } + if(keys[SDLK_DOWN] == SDL_PRESSED){ + pad |= PAD_DOWN; + } + else if(keys[SDLK_UP] == SDL_PRESSED){ + pad |= PAD_UP; + } + + int btn1 = 0, btn2 = 0, btn3 = 0; + + if(joys) + { + btn1 = SDL_JoystickGetButton(joys, 0); + btn2 = SDL_JoystickGetButton(joys, 1); + btn3 = SDL_JoystickGetButton(joys, 2); + } + + if(keys[SDLK_LCTRL] == SDL_PRESSED || btn1){ + pad |= PAD_BUTTON1; + } + if(keys[SDLK_LALT] == SDL_PRESSED || btn2){ + pad |= PAD_BUTTON2; + } + if(keys[SDLK_LSHIFT] == SDL_PRESSED || btn3){ + pad |= PAD_BUTTON3; + } + + +#endif + + for ( i = 0; i < GP2X_BUTTON_MAX; i++ ) + { + key_eventPress[i] = 0; + } + + if ( pad & PAD_UP ) + { + key_eventPress[GP2X_BUTTON_UP] = 1; + } + if ( pad & PAD_DOWN ) + { + key_eventPress[GP2X_BUTTON_DOWN] = 1; + } + if ( pad & PAD_LEFT ) + { + key_eventPress[GP2X_BUTTON_LEFT] = 1; + } + if ( pad & PAD_RIGHT ) + { + key_eventPress[GP2X_BUTTON_RIGHT] = 1; + } + if ( pad & PAD_BUTTON1 ) + { + key_eventPress[GP2X_BUTTON_A] = 1; + } + if ( pad & PAD_BUTTON2 ) + { + key_eventPress[GP2X_BUTTON_X] = 1; + } + if ( pad & PAD_BUTTON3 ) + { + key_eventPress[GP2X_BUTTON_Y] = 1; + } + if ( pad & PAD_BUTTON4 ) + { + key_eventPress[GP2X_BUTTON_B] = 1; + } + if ( pad & PAD_BUTTON5 ) + { + key_eventPress[GP2X_BUTTON_R] = 1; + } + if ( pad & PAD_BUTTON6 ) + { + key_eventPress[GP2X_BUTTON_L] = 1; + } + if ( pad & PAD_BUTTON7 ) + { + key_eventPress[GP2X_BUTTON_VOLDOWN] = 1; + } + if ( pad & PAD_BUTTON8 ) + { + key_eventPress[GP2X_BUTTON_VOLUP] = 1; + } + if ( pad & PAD_BUTTON9 ) + { + key_eventPress[GP2X_BUTTON_SELECT] = 1; + } + if ( pad & PAD_BUTTONA ) + { + key_eventPress[GP2X_BUTTON_START] = 1; + } + if ( pad & PAD_BUTTONB ) + { + key_eventPress[GP2X_BUTTON_CLICK] = 1; + } +#ifndef GP2X + if ( keys[SDLK_ESCAPE] ) // 終了 + { + key_eventPress[GP2X_BUTTON_EXIT] = 1; + } +#endif + for ( i = 0; i < GP2X_BUTTON_MAX; i++ ) + { + if ( ( key_eventPress_old[i] == 0 ) && ( key_eventPress[i] != 0 ) ) + { + key_eventPush[i] = 1; + } + else + { + key_eventPush[i] = 0; + } + key_eventPress_old[i] = key_eventPress[i]; + + } +} + +int IsPushKey( int keycode ) +{ + int rc = 0; + + if ( key_eventPush[keycode] == 1 ) + { + rc = 1; + } + + return( rc ); +} + +int IsPressKey( int keycode ) +{ + int rc = 0; + + if ( key_eventPress[keycode] == 1 ) + { + rc = 1; + } + + return( rc ); +} + +int IsPushOKKey( void ) +{ + int rc = 0; +#ifdef GP2X + if ( key_eventPush[GP2X_BUTTON_B] == 1 ) +#else + if ( key_eventPush[GP2X_BUTTON_A] == 1 ) +#endif + { + rc = 1; + } + + return( rc ); +} +int IsPushCancelKey( void ) +{ + int rc = 0; + +#ifdef GP2X + if ( key_eventPush[GP2X_BUTTON_X] == 1 ) +#else + if ( key_eventPush[GP2X_BUTTON_X] == 1 ) +#endif + { + rc = 1; + } + + return( rc ); +} + +void FPSWait( void ) +{ + int interval = INTERVAL_BASE; + Uint32 leftTick; + + //サウンドの制御 + soundPlayCtrl( ); + + SDL_PollEvent(&event); +/* + nowTick = SDL_GetTicks(); + frame = (nowTick - prvTickCount) / interval; + if(frame <= 0){ +#ifdef GP2X + wait(prvTickCount + interval - nowTick); +#else + SDL_Delay(prvTickCount + interval - nowTick); +#endif + } + prvTickCount = SDL_GetTicks(); +*/ + + if(prvTickCount == 0) prvTickCount = SDL_GetTicks(); + + while (true) + { + nowTick = SDL_GetTicks(); + leftTick = prvTickCount + interval - nowTick; + if(leftTick < 1 || leftTick > 9999) + { + break; + } +#ifdef GP2X + wait(1); +#else + SDL_Delay(1); +#endif + } + prvTickCount = nowTick; + + gameflag[107] = gameflag[107] + 1; + if ( gameflag[107] >= 60 ) + { + gameflag[107] = 0; + gameflag[108] = gameflag[108] + 1; + if ( gameflag[108] >= 60 ) + { + gameflag[108] = 0; + gameflag[109] = gameflag[109] + 1; + if ( gameflag[109] >= 60 ) + { + gameflag[109] = 0; + gameflag[110] = gameflag[110] + 1; + if ( gameflag[110] >= 999 ) + { + gameflag[110] = 999; + } + } + } + } + +} + +int system_keys( void ) +{ + int rc; + + rc = 1; +#ifdef GP2X + // 終了 +// if ( ( IsPressKey( GP2X_BUTTON_START ) ) && ( IsPressKey( GP2X_BUTTON_SELECT ) ) ) + if ( ( IsPressKey( GP2X_BUTTON_START ) ) && ( IsPressKey( GP2X_BUTTON_L ) ) && ( IsPressKey( GP2X_BUTTON_R ) ) ) +#else + if ( ( event.type == SDL_QUIT ) || ( IsPressKey( GP2X_BUTTON_EXIT ) ) ) +#endif + { + rc = 0; + g_scene = EN_SN_EXIT; + } + // 音量調整 + if ( IsPushKey( GP2X_BUTTON_VOLUP ) ) + { + gameflag[60] = gameflag[60] + 10; + if ( gameflag[60] > VOL_MAX ) + { + gameflag[60] = VOL_MAX; + } + Set_Volume( gameflag[60] ); + } + if ( IsPushKey( GP2X_BUTTON_VOLDOWN ) ) + { + gameflag[60] = gameflag[60] - 10; + if ( gameflag[60] < 0 ) + { + gameflag[60] = 0; + } + Set_Volume( gameflag[60] ); + } + + return( rc ); +} +int Set_Volume( int vol ) +{ + int rc = 0; + + soundSetVolumeBgm( vol, 0 ); + soundSetVolumeAll( vol ); + + return( rc ); +} + +/*[ BltNumericImage ]************************************************/ +/* 数値画像表示関数 */ +/*-[引数]-----------------------------------------------------------*/ +/* value (i ) 画像表示する数値 */ +/* length (i ) 表示する桁数(桁数以上は表示されない) */ +/* x (i ) 画像を表示する位置x座標 */ +/* y (i ) 画像を表示する位置y座標 */ +/* plane (i ) 数値画像が読み込まれているプレーン番号 */ +/* num_stpos_x (i ) プレーン内での数値画像の開始位置x座標 */ +/* num_stpos_y (i ) プレーン内での数値画像の開始位置y座標 */ +/* num_width (i ) 数値画像1文字の幅(ドット数) */ +/* num_height (i ) 数値画像1文字の高さ(ドット数) */ +/*-[戻り値]---------------------------------------------------------*/ +/* 無し */ +/********************************************************************/ +void BltNumericImage( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ) +{ + long blt_num; // 1桁の数値を格納する + long i; // 桁数分のforループで使用 + long dv; // 割り算で使用する値 + + // value が負の値の場合、正の値に置き換える + if ( value < 0 ) + { + value = value * -1; + } + + // 最初の割り算で使用する値を求める + dv = 1; + for( i = 1; i < length; i++ ) + { + dv = dv * 10; + } + + // 指定された桁数分の数字画像を転送する + for( i = 0; i < length; i++ ) + { + // 表示する数字を求める + blt_num = value / dv; + value = value - blt_num * dv; + if ( blt_num > 9 ) + { // 表示したい1桁の数値にならなければ、1桁にする。 + blt_num = blt_num % 10; + } + // 数字画像転送 + BltRect( plane, x + (num_width * i), y, num_stpos_x + (num_width * blt_num), num_stpos_y, num_width, num_height ); + // 割り算で使用する値を10で割る + dv = dv / 10; + } + + return; +} + +/*[ BltNumericImage2 ]************************************************/ +/* 数値画像表示関数(右詰め) */ +/*-[引数]-----------------------------------------------------------*/ +/* value (i ) 画像表示する数値 */ +/* length (i ) 表示する桁数(桁数以上は表示されない) */ +/* x (i ) 画像を表示する位置x座標 */ +/* y (i ) 画像を表示する位置y座標 */ +/* plane (i ) 数値画像が読み込まれているプレーン番号 */ +/* num_stpos_x (i ) プレーン内での数値画像の開始位置x座標 */ +/* num_stpos_y (i ) プレーン内での数値画像の開始位置y座標 */ +/* num_width (i ) 数値画像1文字の幅(ドット数) */ +/* num_height (i ) 数値画像1文字の高さ(ドット数) */ +/*-[戻り値]---------------------------------------------------------*/ +/* 無し */ +/********************************************************************/ +void BltNumericImage2( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ) +{ + long blt_num; // 1桁の数値を格納する + long i; // 桁数分のforループで使用 + long dv; // 割り算で使用する値 + long x_hosei; //右詰め補正値 + + // value が負の値の場合、正の値に置き換える + if ( value < 0 ) + { + value = value * -1; + } + + /* 2002.10.21 D.K start */ + int buf = value; + int t = 1; + while(true) + { + t++; + buf = buf / 10; + if ( 0 <= buf ) + { + break; + } + } + x_hosei = t; +// scanf(string[0],"%d",value); +// x_hosei = StrLen( string[0] ); + if ( x_hosei == 0 ) + { + x_hosei = 1; + } + x_hosei = length - x_hosei; + x_hosei = x_hosei * num_width; +// length = StrLen( string[0] ); + x = x + x_hosei; + /* 2002.10.21 D.K end */ + + // 最初の割り算で使用する値を求める + dv = 1; + for( i = 1; i < length; i++ ) + { + dv = dv * 10; + } + + // 指定された桁数分の数字画像を転送する + for( i = 0; i < length; i++ ) + { + // 表示する数字を求める + blt_num = value / dv; + value = value - blt_num * dv; + if ( blt_num > 9 ) + { // 表示したい1桁の数値にならなければ、1桁にする。 + blt_num = blt_num % 10; + } + // 数字画像転送 + BltRect( plane, x + (num_width * i), y, num_stpos_x + (num_width * blt_num), num_stpos_y, num_width, num_height ); + // 割り算で使用する値を10で割る + dv = dv / 10; + } + + return; +} + +long funcSin( long rdo ) +{ + long ang = 0; + long rc = 0; + + if ( ( rdo >= 0 ) && ( rdo < 180 ) ) + { + ang = ( ( 65535 * rdo ) / 360 ); + rc = MOTsin( ang ); + } + if ( ( rdo >= 180 ) && ( rdo < 360 ) ) + { + rdo = rdo - 180; + ang = ( ( 65535 * rdo ) / 360 ); + rc = MOTsin( ang ); + rc = rc * -1; + } + + return( rc ); +} +long funcCos( long rdo ) +{ + long ang = 0; + long rc = 0; + + if ( ( rdo >= 0 ) && ( rdo < 180 ) ) + { + ang = ( ( 65535 * rdo ) / 360 ); + rc = MOTcos( ang ); + } + if ( ( rdo >= 180 ) && ( rdo < 360 ) ) + { + rdo = rdo - 180; + ang = ( ( 65535 * rdo ) / 360 ); + rc = MOTcos( ang ); + rc = rc * -1; + } + + return( rc ); +} + + +long funcTan2( long posX, long posY ) +{ + long rc = 0; + + rc = MOTatan( ( posX ) * 256, ( posY * -1 ) * 256 ); + + return( rc ); +} + +long get2keta( long val, long st ) +{ + long rc = 0; + + val = val / st; + rc = val % 100; + + return( rc ); +} + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.h new file mode 100644 index 00000000..e3563b4f --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.h @@ -0,0 +1,54 @@ +#ifndef __FUNCTION +#define __FUNCTION + +#include "include/general.h" + +enum { sdljbTriangle = 0, sdljbCircle, sdljbCross, sdljbSquare, sdljbLTrig, sdljbRTrig, sdljbDown, sdljbLeft, sdljbUp, sdljbRight, sdljbSelect, sdljbStart, sdljbHome } SDLJoyBtn; + +extern void ResetGameFlag( void ); +extern void ResetGameFlag2( void ); +extern int LoadGameFlag( char *fn ); +extern int SaveGameFlag( char *fn ); +extern int LoadGameFlag2( char *fn ); +extern int SaveGameFlag2( char *fn ); +extern int SaveFile( char *fn, long *buff, long size ); +extern int LoadFile( char *fn, long *buff, long size ); +extern long GetConfig( char* fn, char* cParam ); +extern long LogFileWrite( char* fn, char* cParam ); + +extern void SetColorKey(int bmpindex, int flag ); +extern long LoadBitmap( char *fname, int bmpindex, int flag ); +extern void ReleaseBitmap( int bmpindex ); +extern void Blt( int bmpindex, int dstX, int dstY ); +extern void BltRect(int bmpindex, int srcX, int srcY, int dstX, int dstY, int width, int height); +extern void ClearSecondary( void ); +extern void BltNumericImage( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ); +extern void BltNumericImage2( long value, long length, long x, long y, long plane, long num_stpos_x, long num_stpos_y, long num_width, long num_height ); +extern void SetGscreenPalette( SDL_Surface *surface ); +extern void SetPalette(int getbmpindex, int setbmpindex); +extern void BltRectRotZoom( int bmpindex, int dstX, int dstY, int srcX, int srcY, int width, int height, double angle, double zoom, int smooth); +extern void CreateSurface( int bmpindex, int size_x, int size_y ); +extern void SwapToSecondary( int bmpindex ); +extern void SaveBmp( int bmpindex, char *fn ); +extern void drawGRPline(f32 x1, f32 y1, f32 x2, f32 y2, Uint32 color); + +extern int IsPushKey( int keycode ); +extern int IsPressKey( int keycode ); +extern void KeyInput( void ); +extern int initPAD(void); +extern void closePAD(void); +extern int getPAD(void); +extern int IsPushOKKey( void ); +extern int IsPushCancelKey( void ); + +extern void FunctionInit( void ); +extern void FPSWait( void ); +extern int system_keys( void ); +extern int Set_Volume( int vol ); + +extern long funcSin( long rdo ); +extern long funcCos( long rdo ); +extern long funcTan2( long posX, long posY ); +extern long get2keta( long val, long st ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.o new file mode 100644 index 00000000..7801cfff Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/function.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.c new file mode 100644 index 00000000..7af56808 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.c @@ -0,0 +1,972 @@ +/* + + SDL_rotozoom.c - rotozoomer for 32bit or 8bit surfaces + + LGPL (c) A. Schiffler + +*/ + +#ifdef WIN32 +#include +#endif + +#include +#include + +#include "SDL_rotozoom.h" + +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) + +/* + + 32bit Zoomer with optional anti-aliasing by bilinear interpolation. + + Zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface. + +*/ + +int zoomSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy, int smooth) +{ + int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy, ex, ey, t1, t2, sstep; + tColorRGBA *c00, *c01, *c10, *c11; + tColorRGBA *sp, *csp, *dp; + int dgap; + + /* + * Variable setup + */ + if (smooth) { + /* + * For interpolation: assume source dimension is one pixel + */ + /* + * smaller to avoid overflow on right and bottom edge. + */ + sx = (int) (65536.0 * (float) (src->w - 1) / (float) dst->w); + sy = (int) (65536.0 * (float) (src->h - 1) / (float) dst->h); + } else { + sx = (int) (65536.0 * (float) src->w / (float) dst->w); + sy = (int) (65536.0 * (float) src->h / (float) dst->h); + } + + /* + * Allocate memory for row increments + */ + if ((sax = (int *) malloc((dst->w + 1) * sizeof(Uint32))) == NULL) { + return (-1); + } + if ((say = (int *) malloc((dst->h + 1) * sizeof(Uint32))) == NULL) { + free(sax); + return (-1); + } + + /* + * Precalculate row increments + */ + sp = csp = (tColorRGBA *) src->pixels; + dp = (tColorRGBA *) dst->pixels; + + if (flipx) csp += (src->w-1); + if (flipy) csp = (tColorRGBA*)( (Uint8*)csp + src->pitch*(src->h-1) ); + + csx = 0; + csax = sax; + for (x = 0; x <= dst->w; x++) { + *csax = csx; + csax++; + csx &= 0xffff; + csx += sx; + } + csy = 0; + csay = say; + for (y = 0; y <= dst->h; y++) { + *csay = csy; + csay++; + csy &= 0xffff; + csy += sy; + } + + dgap = dst->pitch - dst->w * 4; + + /* + * Switch between interpolating and non-interpolating code + */ + if (smooth) { + + /* + * Interpolating Zoom + */ + + /* + * Scan destination + */ + csay = say; + for (y = 0; y < dst->h; y++) { + /* + * Setup color source pointers + */ + c00 = csp; + c01 = csp; + c01++; + c10 = (tColorRGBA *) ((Uint8 *) csp + src->pitch); + c11 = c10; + c11++; + csax = sax; + for (x = 0; x < dst->w; x++) { + + /* + * Interpolate colors + */ + ex = (*csax & 0xffff); + ey = (*csay & 0xffff); + t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff; + t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff; + dp->r = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff; + t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff; + dp->g = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff; + t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff; + dp->b = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff; + t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff; + dp->a = (((t2 - t1) * ey) >> 16) + t1; + + /* + * Advance source pointers + */ + csax++; + sstep = (*csax >> 16); + c00 += sstep; + c01 += sstep; + c10 += sstep; + c11 += sstep; + /* + * Advance destination pointer + */ + dp++; + } + /* + * Advance source pointer + */ + csay++; + csp = (tColorRGBA *) ((Uint8 *) csp + (*csay >> 16) * src->pitch); + /* + * Advance destination pointers + */ + dp = (tColorRGBA *) ((Uint8 *) dp + dgap); + } + + } else { + + /* + * Non-Interpolating Zoom + */ + + csay = say; + for (y = 0; y < dst->h; y++) { + sp = csp; + csax = sax; + for (x = 0; x < dst->w; x++) { + /* + * Draw + */ + *dp = *sp; + /* + * Advance source pointers + */ + csax++; + sstep = (*csax >> 16); + if (flipx) sstep = -sstep; + sp += sstep; + /* + * Advance destination pointer + */ + dp++; + } + /* + * Advance source pointer + */ + csay++; + sstep = (*csay >> 16) * src->pitch; + if (flipy) sstep = -sstep; + csp = (tColorRGBA *) ((Uint8 *) csp + sstep); + + /* + * Advance destination pointers + */ + dp = (tColorRGBA *) ((Uint8 *) dp + dgap); + } + + } + + /* + * Remove temp arrays + */ + free(sax); + free(say); + + return (0); +} + +/* + + 8bit Zoomer without smoothing. + + Zoomes 8bit palette/Y 'src' surface to 'dst' surface. + +*/ + +int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy) +{ + Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy; + Uint8 *sp, *dp, *csp; + int dgap; + + /* + * Variable setup + */ + sx = (Uint32) (65536.0 * (float) src->w / (float) dst->w); + sy = (Uint32) (65536.0 * (float) src->h / (float) dst->h); + + /* + * Allocate memory for row increments + */ + if ((sax = (Uint32 *) malloc(dst->w * sizeof(Uint32))) == NULL) { + return (-1); + } + if ((say = (Uint32 *) malloc(dst->h * sizeof(Uint32))) == NULL) { + if (sax != NULL) { + free(sax); + } + return (-1); + } + + /* + * Precalculate row increments + */ + csx = 0; + csax = sax; + for (x = 0; x < dst->w; x++) { + csx += sx; + *csax = (csx >> 16); + csx &= 0xffff; + csax++; + } + csy = 0; + csay = say; + for (y = 0; y < dst->h; y++) { + csy += sy; + *csay = (csy >> 16); + csy &= 0xffff; + csay++; + } + + csx = 0; + csax = sax; + for (x = 0; x < dst->w; x++) { + csx += (*csax); + csax++; + } + csy = 0; + csay = say; + for (y = 0; y < dst->h; y++) { + csy += (*csay); + csay++; + } + + /* + * Pointer setup + */ + sp = csp = (Uint8 *) src->pixels; + dp = (Uint8 *) dst->pixels; + dgap = dst->pitch - dst->w; + + /* + * Draw + */ + csay = say; + for (y = 0; y < dst->h; y++) { + csax = sax; + sp = csp; + for (x = 0; x < dst->w; x++) { + /* + * Draw + */ + *dp = *sp; + /* + * Advance source pointers + */ + sp += (*csax); + csax++; + /* + * Advance destination pointer + */ + dp++; + } + /* + * Advance source pointer (for row) + */ + csp += ((*csay) * src->pitch); + csay++; + /* + * Advance destination pointers + */ + dp += dgap; + } + + /* + * Remove temp arrays + */ + free(sax); + free(say); + + return (0); +} + +/* + + 32bit Rotozoomer with optional anti-aliasing by bilinear interpolation. + + Rotates and zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface. + +*/ + +void transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth) +{ + int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh; + tColorRGBA c00, c01, c10, c11; + tColorRGBA *pc, *sp; + int gap; + + /* + * Variable setup + */ + xd = ((src->w - dst->w) << 15); + yd = ((src->h - dst->h) << 15); + ax = (cx << 16) - (icos * cx); + ay = (cy << 16) - (isin * cx); + sw = src->w - 1; + sh = src->h - 1; + pc = dst->pixels; + gap = dst->pitch - dst->w * 4; + + /* + * Switch between interpolating and non-interpolating code + */ + if (smooth) { + for (y = 0; y < dst->h; y++) { + dy = cy - y; + sdx = (ax + (isin * dy)) + xd; + sdy = (ay - (icos * dy)) + yd; + for (x = 0; x < dst->w; x++) { + dx = (sdx >> 16); + dy = (sdy >> 16); + if ((dx >= -1) && (dy >= -1) && (dx < src->w) && (dy < src->h)) { + if ((dx >= 0) && (dy >= 0) && (dx < sw) && (dy < sh)) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + sp += dx; + c00 = *sp; + sp += 1; + c01 = *sp; + sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); + sp -= 1; + c10 = *sp; + sp += 1; + c11 = *sp; + } else if ((dx == sw) && (dy == sh)) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + sp += dx; + c00 = *sp; + c01 = *sp; + c10 = *sp; + c11 = *sp; + } else if ((dx == -1) && (dy == -1)) { + sp = (tColorRGBA *) (src->pixels); + c00 = *sp; + c01 = *sp; + c10 = *sp; + c11 = *sp; + } else if ((dx == -1) && (dy == sh)) { + sp = (tColorRGBA *) (src->pixels); + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + c00 = *sp; + c01 = *sp; + c10 = *sp; + c11 = *sp; + } else if ((dx == sw) && (dy == -1)) { + sp = (tColorRGBA *) (src->pixels); + sp += dx; + c00 = *sp; + c01 = *sp; + c10 = *sp; + c11 = *sp; + } else if (dx == -1) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + c00 = *sp; + c01 = *sp; + c10 = *sp; + sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); + c11 = *sp; + } else if (dy == -1) { + sp = (tColorRGBA *) (src->pixels); + sp += dx; + c00 = *sp; + c01 = *sp; + c10 = *sp; + sp += 1; + c11 = *sp; + } else if (dx == sw) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + sp += dx; + c00 = *sp; + c01 = *sp; + sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); + c10 = *sp; + c11 = *sp; + } else if (dy == sh) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + sp += dx; + c00 = *sp; + sp += 1; + c01 = *sp; + c10 = *sp; + c11 = *sp; + } + /* + * Interpolate colors + */ + ex = (sdx & 0xffff); + ey = (sdy & 0xffff); + t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff; + t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff; + pc->r = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff; + t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff; + pc->g = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff; + t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff; + pc->b = (((t2 - t1) * ey) >> 16) + t1; + t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff; + t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff; + pc->a = (((t2 - t1) * ey) >> 16) + t1; + } + sdx += icos; + sdy += isin; + pc++; + } + pc = (tColorRGBA *) ((Uint8 *) pc + gap); + } + } else { + for (y = 0; y < dst->h; y++) { + dy = cy - y; + sdx = (ax + (isin * dy)) + xd; + sdy = (ay - (icos * dy)) + yd; + for (x = 0; x < dst->w; x++) { + dx = (short) (sdx >> 16); + dy = (short) (sdy >> 16); + if (flipx) dx = (src->w-1)-dx; + if (flipy) dy = (src->h-1)-dy; + if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { + sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); + sp += dx; + *pc = *sp; + } + sdx += icos; + sdy += isin; + pc++; + } + pc = (tColorRGBA *) ((Uint8 *) pc + gap); + } + } +} + +/* + + 8bit Rotozoomer without smoothing + + Rotates and zoomes 8bit palette/Y 'src' surface to 'dst' surface. + +*/ + +void transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos) +{ + int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay, sw, sh; + tColorY *pc, *sp; + int gap; + + /* + * Variable setup + */ + xd = ((src->w - dst->w) << 15); + yd = ((src->h - dst->h) << 15); + ax = (cx << 16) - (icos * cx); + ay = (cy << 16) - (isin * cx); + sw = src->w - 1; + sh = src->h - 1; + pc = dst->pixels; + gap = dst->pitch - dst->w; + /* + * Clear surface to colorkey + */ + memset(pc, (unsigned char) (src->format->colorkey & 0xff), dst->pitch * dst->h); + /* + * Iterate through destination surface + */ + for (y = 0; y < dst->h; y++) { + dy = cy - y; + sdx = (ax + (isin * dy)) + xd; + sdy = (ay - (icos * dy)) + yd; + for (x = 0; x < dst->w; x++) { + dx = (short) (sdx >> 16); + dy = (short) (sdy >> 16); + if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { + sp = (tColorY *) (src->pixels); + sp += (src->pitch * dy + dx); + *pc = *sp; + } + sdx += icos; + sdy += isin; + pc++; + } + pc += gap; + } +} + +/* + + rotozoomSurface() + + Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + +*/ + +#define VALUE_LIMIT 0.001 + + +/* Local rotozoom-size function with trig result return */ + +void rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, + double *canglezoom, double *sanglezoom) +{ + double x, y, cx, cy, sx, sy; + double radangle; + int dstwidthhalf, dstheighthalf; + + /* + * Determine destination width and height by rotating a centered source box + */ + radangle = angle * (M_PI / 180.0); + *sanglezoom = sin(radangle); + *canglezoom = cos(radangle); + *sanglezoom *= zoomx; + *canglezoom *= zoomx; + x = width / 2; + y = height / 2; + cx = *canglezoom * x; + cy = *canglezoom * y; + sx = *sanglezoom * x; + sy = *sanglezoom * y; + dstwidthhalf = MAX((int) + ceil(MAX(MAX(MAX(fabs(cx + sy), fabs(cx - sy)), fabs(-cx + sy)), fabs(-cx - sy))), 1); + dstheighthalf = MAX((int) + ceil(MAX(MAX(MAX(fabs(sx + cy), fabs(sx - cy)), fabs(-sx + cy)), fabs(-sx - cy))), 1); + *dstwidth = 2 * dstwidthhalf; + *dstheight = 2 * dstheighthalf; +} + + +/* Publically available rotozoom-size function */ + +void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight) +{ + double dummy_sanglezoom, dummy_canglezoom; + + rotozoomSurfaceSizeTrig(width, height, angle, zoomx, zoomy, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom); +} + +/* Publically available rotozoom-size function */ + +void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight) +{ + double dummy_sanglezoom, dummy_canglezoom; + + rotozoomSurfaceSizeTrig(width, height, angle, zoom, zoom, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom); +} + +/* Publically available rotozoom function */ + +SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth) +{ + return rotozoomSurfaceXY(src, angle, zoom, zoom, smooth); +} + +/* Publically available rotozoom function */ + +SDL_Surface *rotozoomSurfaceXY(SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth) +{ + SDL_Surface *rz_src; + SDL_Surface *rz_dst; + double zoominv; + double sanglezoom, canglezoom, sanglezoominv, canglezoominv; + int dstwidthhalf, dstwidth, dstheighthalf, dstheight; + int is32bit; + int i, src_converted; + int flipx,flipy; + + /* + * Sanity check + */ + if (src == NULL) + return (NULL); + + /* + * Determine if source surface is 32bit or 8bit + */ + is32bit = (src->format->BitsPerPixel == 32); + if ((is32bit) || (src->format->BitsPerPixel == 8)) { + /* + * Use source surface 'as is' + */ + rz_src = src; + src_converted = 0; + } else { + /* + * New source surface is 32bit with a defined RGBA ordering + */ + rz_src = + SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); + SDL_BlitSurface(src, NULL, rz_src, NULL); + src_converted = 1; + is32bit = 1; + } + + /* + * Sanity check zoom factor + */ + flipx = (zoomx<0); + if (flipx) zoomx=-zoomx; + flipy = (zoomy<0); + if (flipy) zoomy=-zoomy; + if (zoomx < VALUE_LIMIT) zoomx = VALUE_LIMIT; + if (zoomy < VALUE_LIMIT) zoomy = VALUE_LIMIT; + zoominv = 65536.0 / (zoomx * zoomx); + + /* + * Check if we have a rotozoom or just a zoom + */ + if (fabs(angle) > VALUE_LIMIT) { + + /* + * Angle!=0: full rotozoom + */ + /* + * ----------------------- + */ + + /* Determine target size */ + rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, zoomx, zoomy, &dstwidth, &dstheight, &canglezoom, &sanglezoom); + + /* + * Calculate target factors from sin/cos and zoom + */ + sanglezoominv = sanglezoom; + canglezoominv = canglezoom; + sanglezoominv *= zoominv; + canglezoominv *= zoominv; + + /* Calculate half size */ + dstwidthhalf = dstwidth / 2; + dstheighthalf = dstheight / 2; + + /* + * Alloc space to completely contain the rotated surface + */ + rz_dst = NULL; + if (is32bit) { + /* + * Target surface is 32bit with source RGBA/ABGR ordering + */ + rz_dst = + SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 32, + rz_src->format->Rmask, rz_src->format->Gmask, + rz_src->format->Bmask, rz_src->format->Amask); + } else { + /* + * Target surface is 8bit + */ + rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); + } + + /* + * Lock source surface + */ + SDL_LockSurface(rz_src); + /* + * Check which kind of surface we have + */ + if (is32bit) { + /* + * Call the 32bit transformation routine to do the rotation (using alpha) + */ + transformSurfaceRGBA(rz_src, rz_dst, dstwidthhalf, dstheighthalf, + (int) (sanglezoominv), (int) (canglezoominv), + flipx, flipy, + smooth); + /* + * Turn on source-alpha support + */ + /*SDL_SetAlpha(rz_dst, SDL_SRCALPHA, 255);*/ + } else { + /* + * Copy palette and colorkey info + */ + for (i = 0; i < rz_src->format->palette->ncolors; i++) { + rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; + } + rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; + /* + * Call the 8bit transformation routine to do the rotation + */ + transformSurfaceY(rz_src, rz_dst, dstwidthhalf, dstheighthalf, + (int) (sanglezoominv), (int) (canglezoominv)); + SDL_SetColorKey(rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL, rz_src->format->colorkey); + } + /* + * Unlock source surface + */ + SDL_UnlockSurface(rz_src); + + } else { + + /* + * Angle=0: Just a zoom + */ + /* + * -------------------- + */ + + /* + * Calculate target size + */ + zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight); + + /* + * Alloc space to completely contain the zoomed surface + */ + rz_dst = NULL; + if (is32bit) { + /* + * Target surface is 32bit with source RGBA/ABGR ordering + */ + rz_dst = + SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 32, + rz_src->format->Rmask, rz_src->format->Gmask, + rz_src->format->Bmask, rz_src->format->Amask); + } else { + /* + * Target surface is 8bit + */ + rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); + } + + /* + * Lock source surface + */ + SDL_LockSurface(rz_src); + /* + * Check which kind of surface we have + */ + if (is32bit) { + /* + * Call the 32bit transformation routine to do the zooming (using alpha) + */ + zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth); + /* + * Turn on source-alpha support + */ + /*SDL_SetAlpha(rz_dst, SDL_SRCALPHA, 255);*/ + } else { + /* + * Copy palette and colorkey info + */ + for (i = 0; i < rz_src->format->palette->ncolors; i++) { + rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; + } + rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; + /* + * Call the 8bit transformation routine to do the zooming + */ + zoomSurfaceY(rz_src, rz_dst, flipx, flipy); + SDL_SetColorKey(rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL, rz_src->format->colorkey); + } + /* + * Unlock source surface + */ + SDL_UnlockSurface(rz_src); + } + + /* + * Cleanup temp surface + */ + if (src_converted) { + SDL_FreeSurface(rz_src); + } + + /* + * Return destination surface + */ + return (rz_dst); +} + +/* + + zoomSurface() + + Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + +*/ + +#define VALUE_LIMIT 0.001 + +void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight) +{ + /* + * Sanity check zoom factors + */ + if (zoomx < VALUE_LIMIT) { + zoomx = VALUE_LIMIT; + } + if (zoomy < VALUE_LIMIT) { + zoomy = VALUE_LIMIT; + } + + /* + * Calculate target size + */ + *dstwidth = (int) ((double) width * zoomx); + *dstheight = (int) ((double) height * zoomy); + if (*dstwidth < 1) { + *dstwidth = 1; + } + if (*dstheight < 1) { + *dstheight = 1; + } +} + +SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth) +{ + SDL_Surface *rz_src; + SDL_Surface *rz_dst; + int dstwidth, dstheight; + int is32bit; + int i, src_converted; + int flipx, flipy; + + /* + * Sanity check + */ + if (src == NULL) + return (NULL); + + /* + * Determine if source surface is 32bit or 8bit + */ + is32bit = (src->format->BitsPerPixel == 32); + if ((is32bit) || (src->format->BitsPerPixel == 8)) { + /* + * Use source surface 'as is' + */ + rz_src = src; + src_converted = 0; + } else { + /* + * New source surface is 32bit with a defined RGBA ordering + */ + rz_src = + SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); + SDL_BlitSurface(src, NULL, rz_src, NULL); + src_converted = 1; + is32bit = 1; + } + + flipx = (zoomx<0); + if (flipx) zoomx = -zoomx; + flipy = (zoomy<0); + if (flipy) zoomy = -zoomy; + + /* Get size if target */ + zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight); + + /* + * Alloc space to completely contain the zoomed surface + */ + rz_dst = NULL; + if (is32bit) { + /* + * Target surface is 32bit with source RGBA/ABGR ordering + */ + rz_dst = + SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 32, + rz_src->format->Rmask, rz_src->format->Gmask, + rz_src->format->Bmask, rz_src->format->Amask); + } else { + /* + * Target surface is 8bit + */ + rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); + } + + /* + * Lock source surface + */ + SDL_LockSurface(rz_src); + /* + * Check which kind of surface we have + */ + if (is32bit) { + /* + * Call the 32bit transformation routine to do the zooming (using alpha) + */ + zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth); + /* + * Turn on source-alpha support + */ + /*SDL_SetAlpha(rz_dst, SDL_SRCALPHA, 255);*/ + } else { + /* + * Copy palette and colorkey info + */ + for (i = 0; i < rz_src->format->palette->ncolors; i++) { + rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; + } + rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; + /* + * Call the 8bit transformation routine to do the zooming + */ + zoomSurfaceY(rz_src, rz_dst, flipx, flipy); + SDL_SetColorKey(rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL, rz_src->format->colorkey); + } + /* + * Unlock source surface + */ + SDL_UnlockSurface(rz_src); + + /* + * Cleanup temp surface + */ + if (src_converted) { + SDL_FreeSurface(rz_src); + } + + /* + * Return destination surface + */ + return (rz_dst); +} diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.h new file mode 100644 index 00000000..b98bdb9b --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.h @@ -0,0 +1,103 @@ + +/* + + SDL_rotozoom - rotozoomer + + LGPL (c) A. Schiffler + +*/ + +#ifndef _SDL_rotozoom_h +#define _SDL_rotozoom_h + +#include +#include "SDL.h" + +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef M_PI +#define M_PI 3.141592654 +#endif + +/* ---- Defines */ + +#define SMOOTHING_OFF 0 +#define SMOOTHING_ON 1 + +/* ---- Structures */ + + typedef struct tColorRGBA { + Uint8 r; + Uint8 g; + Uint8 b; + Uint8 a; + } tColorRGBA; + + typedef struct tColorY { + Uint8 y; + } tColorY; + + +/* ---- Prototypes */ + +#ifdef WIN32 +#ifdef BUILD_DLL +#define __declspec(dllexport) +#else +#define __declspec(dllimport) +#endif +#else +#endif + +/* + + rotozoomSurface() + + Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + +*/ + + SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth); + + SDL_Surface *rotozoomSurfaceXY + (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth); + +/* Returns the size of the target surface for a rotozoomSurface() call */ + + void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, + int *dstheight); + + void rotozoomSurfaceSizeXY + (int width, int height, double angle, double zoomx, double zoomy, + int *dstwidth, int *dstheight); + +/* + + zoomSurface() + + Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + +*/ + + SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth); + +/* Returns the size of the target surface for a zoomSurface() call */ + + void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif + +#endif /* _SDL_rotozoom_h */ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.o new file mode 100644 index 00000000..ed70cc8c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gfx/SDL_rotozoom.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gp2x.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gp2x.h new file mode 100644 index 00000000..c971b556 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/gp2x.h @@ -0,0 +1,10 @@ +#ifndef __GP2X +#define __GP2X + + + +//#define GP2X + + + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.bmp new file mode 100644 index 00000000..73900c70 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.png b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.png new file mode 100644 index 00000000..e598b500 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ico.png differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/a_logo.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/a_logo.bmp new file mode 100644 index 00000000..e832212c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/a_logo.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/al_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/al_256.bmp new file mode 100644 index 00000000..06e5e74a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/al_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/0.bmp new file mode 100644 index 00000000..3ec54c26 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/1_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/1_256.bmp new file mode 100644 index 00000000..8373dd69 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/1_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/2_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/2_256.bmp new file mode 100644 index 00000000..7b59c3cd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/2_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/3_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/3_256.bmp new file mode 100644 index 00000000..5b2d2005 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/3_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/4_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/4_256.bmp new file mode 100644 index 00000000..4a3e146f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/4_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/5_256.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/5_256.bmp new file mode 100644 index 00000000..9dc02d87 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/bak/5_256.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.ACT b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.ACT new file mode 100644 index 00000000..ad2a1399 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.ACT differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.bmp new file mode 100644 index 00000000..44b12a7c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/color.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo1.bmp new file mode 100644 index 00000000..3991602f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo2.bmp new file mode 100644 index 00000000..363115a9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo3.bmp new file mode 100644 index 00000000..e63b6189 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo4.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo4.bmp new file mode 100644 index 00000000..ee9f194c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo4.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo5.bmp new file mode 100644 index 00000000..bb33a1c0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/demo5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/mesh.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/mesh.bmp new file mode 100644 index 00000000..47a817a8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo0/mesh.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo1.bmp new file mode 100644 index 00000000..b4ac8aee Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo2.bmp new file mode 100644 index 00000000..4771fad8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo3.bmp new file mode 100644 index 00000000..94adac2a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo4.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo4.bmp new file mode 100644 index 00000000..286b21b6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo4.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo5.bmp new file mode 100644 index 00000000..04b05dc9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/demo5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/mesh.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/mesh.bmp new file mode 100644 index 00000000..47a817a8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/demo1/mesh.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/1.bmp new file mode 100644 index 00000000..f5064328 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/2.bmp new file mode 100644 index 00000000..bf4ed8e9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/3.bmp new file mode 100644 index 00000000..8cc0e412 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/4.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/4.bmp new file mode 100644 index 00000000..17c75906 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/4.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/5.bmp new file mode 100644 index 00000000..52d2f48a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end1.bmp new file mode 100644 index 00000000..0dd64347 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end2.bmp new file mode 100644 index 00000000..a6089d2d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end0/end2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/1.bmp new file mode 100644 index 00000000..0f81e294 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/2.bmp new file mode 100644 index 00000000..3ffc3092 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/3.bmp new file mode 100644 index 00000000..7fb69e46 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/4.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/4.bmp new file mode 100644 index 00000000..b9b03462 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/4.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/5.bmp new file mode 100644 index 00000000..1c0e39f1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end1.bmp new file mode 100644 index 00000000..0dd64347 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end2.bmp new file mode 100644 index 00000000..a6089d2d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/end1/end2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e32.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e32.bmp new file mode 100644 index 00000000..6a4d0f54 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e32.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e48.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e48.bmp new file mode 100644 index 00000000..e8ad7030 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e48.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e64.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e64.bmp new file mode 100644 index 00000000..44950569 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/enm/e64.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/ico.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/ico.bmp new file mode 100644 index 00000000..73900c70 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/ico.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/e32.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/e32.bmp new file mode 100644 index 00000000..27c45de7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/e32.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item0.bmp new file mode 100644 index 00000000..a85ba4cd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item1.bmp new file mode 100644 index 00000000..a85ba4cd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/item1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_1.bmp new file mode 100644 index 00000000..bd1e1fbb Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_2.bmp new file mode 100644 index 00000000..e94caf19 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map0_2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_1.bmp new file mode 100644 index 00000000..bd1e1fbb Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_2.bmp new file mode 100644 index 00000000..ab608985 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/map/map1_2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/0.bmp new file mode 100644 index 00000000..ad9197e6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/1.bmp new file mode 100644 index 00000000..9b7e5723 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/10.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/10.bmp new file mode 100644 index 00000000..5b2d2005 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/10.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/11.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/11.bmp new file mode 100644 index 00000000..4a3e146f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/11.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/12.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/12.bmp new file mode 100644 index 00000000..9dc02d87 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/12.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/13.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/13.bmp new file mode 100644 index 00000000..078547cc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/13.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/14.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/14.bmp new file mode 100644 index 00000000..7c16be5d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/14.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/15.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/15.bmp new file mode 100644 index 00000000..0dd64347 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/15.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/16.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/16.bmp new file mode 100644 index 00000000..a6089d2d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/16.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/17.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/17.bmp new file mode 100644 index 00000000..5fc719b4 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/17.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/18.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/18.bmp new file mode 100644 index 00000000..dd0f4051 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/18.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/19.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/19.bmp new file mode 100644 index 00000000..dec3d790 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/19.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/2.bmp new file mode 100644 index 00000000..c376ec09 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/20.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/20.bmp new file mode 100644 index 00000000..b9cc8c47 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/20.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/21.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/21.bmp new file mode 100644 index 00000000..da3f5dbf Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/21.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/22.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/22.bmp new file mode 100644 index 00000000..18a2c553 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/22.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/23.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/23.bmp new file mode 100644 index 00000000..3e6a1744 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/23.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/24.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/24.bmp new file mode 100644 index 00000000..06e5e74a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/24.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/3.bmp new file mode 100644 index 00000000..b3e79a4b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/4.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/4.bmp new file mode 100644 index 00000000..9728ad76 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/4.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/5.bmp new file mode 100644 index 00000000..4d7110bc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/6.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/6.bmp new file mode 100644 index 00000000..a9f1509c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/6.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/7.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/7.bmp new file mode 100644 index 00000000..ae40219e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/7.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/8.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/8.bmp new file mode 100644 index 00000000..8373dd69 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/8.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/9.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/9.bmp new file mode 100644 index 00000000..7b59c3cd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/9.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/option.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/option.txt new file mode 100644 index 00000000..9ac3e3ff --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/option/option.txt @@ -0,0 +1 @@ +ギャラリーのフォルダ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm.bmp new file mode 100644 index 00000000..1bed25e1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm2.bmp new file mode 100644 index 00000000..1a6990b7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/arm2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atk2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atk2.bmp new file mode 100644 index 00000000..2b505094 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atk2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atkf.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atkf.bmp new file mode 100644 index 00000000..f38ed9a6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/atkf.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/cutin.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/cutin.bmp new file mode 100644 index 00000000..9fac2ada Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/cutin.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/ri0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/ri0.bmp new file mode 100644 index 00000000..7f5cb280 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/player/ri0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/end.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/end.bmp new file mode 100644 index 00000000..845db20e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/end.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts.bmp new file mode 100644 index 00000000..579a9751 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts2.bmp new file mode 100644 index 00000000..73652d9b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/fonts2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/houkou.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/houkou.bmp new file mode 100644 index 00000000..2ae3dda4 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/houkou.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/input.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/input.bmp new file mode 100644 index 00000000..6a888787 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/input.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f0.bmp new file mode 100644 index 00000000..8a3393cd Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f1.bmp new file mode 100644 index 00000000..ab788af6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f2.bmp new file mode 100644 index 00000000..8836878e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f3.bmp new file mode 100644 index 00000000..845db20e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/map_f3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/menu.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/menu.bmp new file mode 100644 index 00000000..e3d0206c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/menu.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/mini_map.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/mini_map.bmp new file mode 100644 index 00000000..b9187022 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/mini_map.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/msg0.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/msg0.bmp new file mode 100644 index 00000000..652a981f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/msg0.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new.bmp new file mode 100644 index 00000000..fb8d4055 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new2.bmp new file mode 100644 index 00000000..2d440fa0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new3.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new3.bmp new file mode 100644 index 00000000..698d8e96 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/new3.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/over.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/over.bmp new file mode 100644 index 00000000..d382d36c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/over.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/pause.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/pause.bmp new file mode 100644 index 00000000..7b6d2c36 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/pause.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/scor.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/scor.bmp new file mode 100644 index 00000000..6416849b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/scor.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/stagestart.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/stagestart.bmp new file mode 100644 index 00000000..6f24ab4b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/stagestart.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/sys_font.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/sys_font.bmp new file mode 100644 index 00000000..3af2abf8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/sys_font.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/waku.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/waku.bmp new file mode 100644 index 00000000..4ab4c2b7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/waku.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/yn.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/yn.bmp new file mode 100644 index 00000000..465543ab Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/sys/yn.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/_title_pipi.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/_title_pipi.bmp new file mode 100644 index 00000000..9635d454 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/_title_pipi.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/none.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/none.bmp new file mode 100644 index 00000000..8fadeeab Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/none.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/on_off.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/on_off.bmp new file mode 100644 index 00000000..94991609 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/on_off.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option1.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option1.bmp new file mode 100644 index 00000000..34614cba Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option1.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option2.bmp new file mode 100644 index 00000000..ad9ae19a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/option2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/potion_bak.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/potion_bak.bmp new file mode 100644 index 00000000..bbd8b466 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/potion_bak.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/scl.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/scl.bmp new file mode 100644 index 00000000..3064ed9e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/scl.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/stageselect.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/stageselect.bmp new file mode 100644 index 00000000..f5cf6c33 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/stageselect.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2.bmp new file mode 100644 index 00000000..91f87338 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2_2.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2_2.bmp new file mode 100644 index 00000000..c9542b11 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title2_2.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5.bmp new file mode 100644 index 00000000..2c73a9b7 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5_ura.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5_ura.bmp new file mode 100644 index 00000000..8bb97587 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title5_ura.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title_pipi.bmp b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title_pipi.bmp new file mode 100644 index 00000000..08651ce4 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/image/title/title_pipi.bmp differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/dconv.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/dconv.h new file mode 100644 index 00000000..8d0e0c5f --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/dconv.h @@ -0,0 +1,47 @@ +/*========================================================================== + * + * Copyright (C) 1998 Jumpei Isshiki. All Rights Reserved. + * + * File :dconv.h + * Content :データ変換定義 + * Program :T.Sato / J.Issiki + * Date :1998/5/13 + * UpDate :2002/11/14 + * + ==========================================================================*/ + +#ifndef _DCONV_INCLUDED_ +#define _DCONV_INCLUDED_ + +#include "general.h" + +/*----------------------------------------------------------------------*/ +/* 定数の定義 */ +/*----------------------------------------------------------------------*/ + + +/*----------------------------------------------------------------------*/ +/* 構造体の宣言 */ +/*----------------------------------------------------------------------*/ + + +/*----------------------------------------------------------------------*/ +/* 外部参照変数の宣言 */ +/*----------------------------------------------------------------------*/ + + +/*----------------------------------------------------------------------*/ +/* 外部参照関数の宣言 */ +/*----------------------------------------------------------------------*/ +extern UINT16 DCNVrand( UINT16 ); /* 指定範囲の乱数を取得する */ +extern void DCNVinitRand( UINT16 ); /* 乱数の発生系列初期化 */ +extern void DCNVshuffleDim( int,UINT16 * ); /* テーブルシャッフル */ +extern void DCNVshuffleMain( int,UINT16 * ); /* テーブルシャッフル本体 */ +extern SINT32 MOTsin( ANGLE ); /* sin(a)を計算する */ +extern SINT32 MOTcos( ANGLE ); /* cos(a)を計算する */ +extern SINT16 MOTatan( SINT32,SINT32 ); /* (posX,posY)への角度を計算する */ + + +/*----------------------------------------------------------------------*/ +#endif /* end of Dconv.h */ +/*----------------------------------------------------------------------*/ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/general.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/general.h new file mode 100644 index 00000000..70859d7e --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/general.h @@ -0,0 +1,72 @@ +#ifndef _GENERAL_ +#define _GENERAL_ + +typedef int BOOL; +typedef unsigned int UINT; +typedef signed int SINT; +typedef unsigned char UINT8; +typedef signed char SINT8; +typedef unsigned short UINT16; +typedef signed short SINT16; +typedef signed int SINT32; +typedef unsigned int UINT32; +typedef signed long SLONG; +typedef unsigned long ULONG; +typedef signed short ANGLE; +typedef SINT32 f32; + +enum{ + X,Y,Z,XYZ,XYZS,XY = Z,S = XYZ,SX = Z,SY = S +}; + +enum{ + PAD_DOWN = 0x01, + PAD_LEFT = 0x02, + PAD_RIGHT = 0x04, + PAD_UP = 0x08, + PAD_BUTTON1 = 0x10, + PAD_BUTTON2 = 0x20, + PAD_BUTTON3 = 0x40, + PAD_BUTTON4 = 0x80, + PAD_BUTTON5 = 0x100, + PAD_BUTTON6 = 0x200, + PAD_BUTTON7 = 0x400, + PAD_BUTTON8 = 0x800, + PAD_BUTTON9 = 0x1000, + PAD_BUTTONA = 0x2000, + PAD_BUTTONB = 0x4000, + + PAD_DIR = PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT, + PAD_BUTTON = PAD_BUTTON1 | PAD_BUTTON2 | PAD_BUTTON3 | PAD_BUTTON4 | PAD_BUTTON5 | PAD_BUTTON6 | PAD_BUTTON7 | PAD_BUTTON8 | PAD_BUTTON9 | PAD_BUTTONA | PAD_BUTTONB, + PAD_ALL = PAD_DIR | PAD_BUTTON, + + JOYSTICK_AXIS = 16384, + + REP_MIN = 2, + REP_MAX = 30 +}; + +#ifndef NULL +#define NULL 0 +#endif + +#define FALSE 0 +#define TRUE 1 +#define NONE 0 +#define ABS(a) ((a) < 0 ? -(a) : (a)) + +typedef union REG32{ + struct{ + UINT16 low; + UINT16 high; + }half; + UINT32 full; +}REG32; + +#include +#include +#include +//#include +#include + +#endif /* _GENERAL_ */ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/util_snd.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/util_snd.h new file mode 100644 index 00000000..c6f63d22 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/include/util_snd.h @@ -0,0 +1,47 @@ +#ifndef _UTIL_SND_ +#define _UTIL_SND_ + +enum{ + SOUND_MUSBANK = 32, + SOUND_CHUNKBANK = 32, + SOUND_MIXBANK = 8 +}; + +enum { + BGM_GAME01 = 0, + + SE_SEL = 0, + SE_COLLECT, + SE_SHOT, + SE_SHIPBRK, + SE_CHIP, + SE_DMG, + SE_ENEEXP, + SE_ENEBRK, + SE_EXTEND, + SE_ALERT, +}; + +void soundInitBuffer(void); +void soundRelease(void); +void soundLoadBuffer(int num, UINT8 *fname, int loop); +void soundLoadBuffer2(int num, UINT8 *fname1, UINT8 *fname2); +void soundLoadBufferSE(int num, UINT8 *fname); +void soundStopBgm(int num); +void soundStopBgmPlaying(void); +int soundIsPlayBgm(void); +void soundPlayBgm(int num); +void soundPlayFadeFlag(int flag, int time); +void soundPlayCtrl(void); +void soundSetVolumeMaster(int vol); +void soundSetVolumeBgm(int vol, int num); +void soundSetVolumeAll(int vol); +void soundSetVolumeMasterBgm(int vol); +void soundStopSe(int num); +void soundPlaySe(int num); +int soundIsPlaySe(int num); +void soundStopSeAll(void); + +extern SINT sound_buff[]; + +#endif /* _UTIL_SND_ */ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.c new file mode 100644 index 00000000..05dcddff --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.c @@ -0,0 +1,343 @@ +#include +#include +#include +#include +#include + +#include "define.h" +#include "extern.h" +#include "function.h" +#include "util_snd.h" + +#include "scene.h" + +#ifdef GP2X +#include +#endif + +#ifdef PSPUMODE +#include +#endif +//#define MacOS + +#ifdef HOME_PATH +char home_path[256]; +#endif + +void main_init( void ); +void main_init_config( void ); +void ExitProgram(void); +int main(int argc, char *argv[]); + +///---------------------------------------------------------------------------- +/// PSP Related Stuff +///---------------------------------------------------------------------------- +#ifdef PSPUMODE +PSP_MODULE_INFO("Champyonshipp Kaiten Patissier", 0, 1, 1); +PSP_HEAP_SIZE_KB(21*1024); +int iDoRun; + +// PSP things +/* +int psp_exit_callback(int arg1, int arg2, void *common) +{ + iDoRun = 0; + //sceDisplayWaitVblankStart(); + //sceKernelExitGame(); + return 0; +} + +int psp_callback_thread(SceSize args, void *argp) +{ + int cbid; + cbid = sceKernelCreateCallback("Exit Callback", psp_exit_callback, NULL); + sceKernelRegisterExitCallback(cbid); + sceKernelSleepThreadCB(); + return 0; +} + +int psp_setup_callbacks(void) +{ + int thid = 0; + thid = sceKernelCreateThread("update_thread", psp_callback_thread, 0x11, 0xFA0, 0, 0); + if(thid >= 0) + sceKernelStartThread(thid, 0, 0); + return thid; +} +*/ +#endif + +int main(int argc, char *argv[]) +{ + SDL_Rect rect; + Uint32 flags; + SDL_Surface* tmp; + char AppPath[1024]; + char AppPathw[1024]; + char *char_work; + int strlen; +#ifdef PSPUMODE + // PSP things + //psp_setup_callbacks(); + scePowerSetClockFrequency(333, 333, 166); +#endif + +#ifdef HOME_PATH + char save_path[256]; + char replay_path[256]; + char replay_fold_path[3][256]; + snprintf(home_path, sizeof(home_path), "%s/.kaiten", getenv("HOME")); + snprintf(save_path, sizeof(save_path), "%s/save", home_path); + snprintf(replay_path, sizeof(replay_path), "%s/replay", home_path); + snprintf(replay_fold_path[0], 256, "%s/replay/0", home_path); + snprintf(replay_fold_path[1], 256, "%s/replay/1", home_path); + snprintf(replay_fold_path[2], 256, "%s/replay/2", home_path); + mkdir(home_path, 0755); + mkdir(save_path, 0755); + mkdir(replay_path, 0755); + mkdir(replay_fold_path[0], 0755); + mkdir(replay_fold_path[1], 0755); + mkdir(replay_fold_path[2], 0755); +#endif + + /* 初期化 */ + memset( &AppPath[0], '\0', sizeof( AppPath ) ); + memset( &AppPathw[0], '\0', sizeof( AppPath ) ); + if (SDL_Init(SDL_INIT_VIDEO) < 0) + return 1; + +#ifdef GP2X +#else + #ifdef MacOS + if ( argc > 0 ) // 起動に引数がある場合 + { + snprintf( &AppPath[0], sizeof(AppPath), "%s", argv[0]); + // strcat( &AppPath[0], "/Contents/Recources/" ); + char_work = strrchr( &AppPath[0], '/' ); +// char_work = strrchr( &AppPath[0], '\\' ); + strlen = char_work - &AppPath[0]; + + strncpy( &AppPathw[0], &AppPath[0], strlen ); + chdir( &AppPathw[0] ); +// LogFileWrite( "testlog.txt", &AppPathw[0] ); + } + #else + #endif +#endif + + /* 初期化画面サイズ */ +#ifdef PSPUMODE + flags = SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF | SDL_HWPALETTE; +#else + if ( argc > 1 ) // 起動に引数がある場合 + { + flags = SDL_FULLSCREEN | SDL_SWSURFACE; + } + else + { + flags = SDL_SWSURFACE; + } +#endif +#ifdef PSPUMODE + flags = SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF | SDL_HWPALETTE; +#endif + +// g_screen = SDL_SetVideoMode(DISPLY_WIDTH, DISPLY_HEIGHT, 16, SDL_SWSURFACE); + g_screen = SDL_SetVideoMode(DISPLY_WIDTH, DISPLY_HEIGHT, 8, flags); + rect.x = 0; + rect.y = 0; + rect.w = DISPLY_WIDTH; + rect.h = DISPLY_HEIGHT; +// SDL_SetClipRect( g_screen, &rect ); + + tmp = SDL_LoadBMP("image/color.bmp"); //プレーンナンバー1にタイトル画面背景を読み込む + SetGscreenPalette( tmp ); + SDL_FreeSurface(tmp); + + printf("FUCK YEAH!!\n"); + + if (!g_screen) + { + fprintf(stderr, "Couldn't set video mode: %s\n", SDL_GetError()); + return 1; + } + SDL_WM_SetCaption("RotateGear", ""); + + SDL_ShowCursor(SDL_DISABLE); + FunctionInit( ); +// soundInitBuffer(); + /* グローバル変数の初期化 */ + main_init( ); + + + + scenemanager( ); + + ExitProgram( ); + return 0; +} + + +void main_init( void ) +{ + g_scene = EN_SN_LOGO; + + printf("FUCK NNN!!\n"); + + main_init_config( ); // 環境ファイルの読み込み + + printf("I SUCK VANGINAS\n"); + + // ゲーム中の使用する音の読み込み + soundLoadBuffer(EN_BGM_GAME01, (Uint8 *)"sound/bgm/01.ogg", -1); + soundLoadBuffer(EN_BGM_GAME02, (Uint8 *)"sound/bgm/02.ogg", -1); + soundLoadBuffer(EN_BGM_GAME03, (Uint8 *)"sound/bgm/03.ogg", -1); + soundLoadBuffer(EN_BGM_GAME04, (Uint8 *)"sound/bgm/04.ogg", -1); + soundLoadBuffer(EN_BGM_GAME05, (Uint8 *)"sound/bgm/05.ogg", -1); + soundLoadBuffer(EN_BGM_GAME06, (Uint8 *)"sound/bgm/06.ogg", -1); + soundLoadBuffer(EN_BGM_GAME07, (Uint8 *)"sound/bgm/07.ogg", 0); + + soundLoadBufferSE(EN_SE_ATK1 , (Uint8 *)"sound/se/atk1.wav" ); + soundLoadBufferSE(EN_SE_DAMEGE , (Uint8 *)"sound/se/damage.wav" ); + soundLoadBufferSE(EN_SE_L1 , (Uint8 *)"sound/se/l1.wav" ); + soundLoadBufferSE(EN_SE_LANDING, (Uint8 *)"sound/se/landing.wav" ); + soundLoadBufferSE(EN_SE_MSG , (Uint8 *)"sound/se/msg.wav" ); + soundLoadBufferSE(EN_SE_SELECT , (Uint8 *)"sound/se/select.wav" ); + soundLoadBufferSE(EN_SE_SW , (Uint8 *)"sound/se/sw.wav" ); + soundLoadBufferSE(EN_SE_JUMP , (Uint8 *)"sound/se/jump.wav" ); + soundLoadBufferSE(EN_SE_PAWA , (Uint8 *)"sound/se/puwa.wav" ); + soundLoadBufferSE(EN_SE_CL1 , (Uint8 *)"sound/se/se01.wav" ); + soundLoadBufferSE(EN_SE_CL2 , (Uint8 *)"sound/se/se02.wav" ); + soundLoadBufferSE(EN_SE_CL3 , (Uint8 *)"sound/se/se03.wav" ); + soundLoadBufferSE(EN_SE_CL4 , (Uint8 *)"sound/se/se04.wav" ); + soundLoadBufferSE(EN_SE_CL5 , (Uint8 *)"sound/se/se05.wav" ); + soundLoadBufferSE(EN_SE_CL21 , (Uint8 *)"sound/se/se06.wav" ); + soundLoadBufferSE(EN_SE_CL22 , (Uint8 *)"sound/se/se07.wav" ); + soundLoadBufferSE(EN_SE_CL23 , (Uint8 *)"sound/se/se08.wav" ); + soundLoadBufferSE(EN_SE_CL24 , (Uint8 *)"sound/se/se09.wav" ); + soundLoadBufferSE(EN_SE_CL25 , (Uint8 *)"sound/se/se10.wav" ); + + Set_Volume( gameflag[60] ); + + printf("FUCK YESS YES!!\n"); + +} + + +void ExitProgram(void) +{ + + soundStopBgm(0); + soundStopSeAll(); + soundRelease(); + + SaveGameFlag("save/config"); + + closePAD(); +// closeSDL(); + SDL_Quit(); + +#ifdef GP2X + chdir("/usr/gp2x"); + execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); +#endif +#ifdef PSPUMODE + sceDisplayWaitVblankStart(); + sceKernelExitGame(); +#endif +} + + +void main_init_config( void ) +{ + int i; + i = 0; + + gameflag[0]=GP2X_BUTTON_UP; //上 Up + gameflag[1]=GP2X_BUTTON_DOWN; //下 Down + gameflag[2]=GP2X_BUTTON_LEFT; //左 Left + gameflag[3]=GP2X_BUTTON_RIGHT; //右 Right + gameflag[4]=GP2X_BUTTON_A; //A Z + gameflag[5]=GP2X_BUTTON_X; //B X + gameflag[6]=GP2X_BUTTON_Y; //C C + gameflag[7]=GP2X_BUTTON_B; //D S + gameflag[8]=GP2X_BUTTON_L; //D S + gameflag[9]=GP2X_BUTTON_R; //D S + gameflag[10]=GP2X_BUTTON_START; //D S + gameflag[11]=GP2X_BUTTON_SELECT; //D S + + if ( ! ( LoadGameFlag("save/config") == 0 ) ) + { + /* ファイルが存在しない場合の初期値設定 */ + ResetGameFlag(); + + gameflag[60] = 128; //音量 + + gameflag[70] = 1; //タイトル画面から来た + gameflag[71] = 1; //リトライを選択した + + + gameflag[100] = 0; //クリアフラグ + + gameflag[107] = 0; //play time s + gameflag[108] = 0; //play time s + gameflag[109] = 0; //play time m + gameflag[110] = 0; //play time h + gameflag[111] = 59; //CLEAR time s + gameflag[112] = 59; //CLEAR time m + gameflag[113] = 99; //CLEAR time h + + + gameflag[120] = 1; //ステージセレクト + gameflag[121] = 1; //到達ステージ + gameflag[122] = 0; //キャラセレクト + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[124] = 0; //リプレイALL、ONE + gameflag[125] = 0; //リプレイjamp + gameflag[126] = 0; //裏面 + gameflag[127] = 0; //トータルアタック + gameflag[128] = 0; //マップビュー + gameflag[129] = 0; //ステージセレクトから開始 + + gameflag[131] = 0; //言語 + gameflag[132] = 0; //リプレイ + gameflag[133] = 1; //up key use + gameflag[134] = 0; //開始演出の有無 + + gameflag[135] = 0; //トータルアタック 時間 [130]>[135] + gameflag[136] = 0; //トータルアタック ミス [131]>[136] + gameflag[137] = 1595959; //トータルアタック クリア時間 [132]>[137] + gameflag[138] = 999; //トータルアタック クリアミス [133]>[138] + + for ( i = 0; i <= 99; i++ ) + { + gameflag[200 + i] = 1105959; + } + for ( i = 0; i <= 99; i++ ) + { + gameflag[300 + i] = 99; + } + for ( i = 0; i <= 99; i++ ) + { + gameflag[400 + i] = 0; + } + } + +// for debug start +/* + for ( i = 0; i <= 99; i++ ) + { + gameflag[400 + i] = 1; + } +*/ +// for debug end +//gameflag[121] = 50; //到達ステージ +// gameflag[100] = 1; //到達ステージ + + g_DebugDisp = GetConfig( CONFIGFILE_NAME , "DebugDisp" ); + g_DebugStageProduction = GetConfig( CONFIGFILE_NAME , "DebugStageProduction" ); +} + + + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.o new file mode 100644 index 00000000..3ad263e3 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/init.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libSDL-1.2.so.0 b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libSDL-1.2.so.0 new file mode 100644 index 00000000..79544b2e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libSDL-1.2.so.0 differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbis.so.0 b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbis.so.0 new file mode 100644 index 00000000..5586dd47 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbis.so.0 differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbisfile.so.3 b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbisfile.so.3 new file mode 100644 index 00000000..a0975ec8 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/libvorbisfile.so.3 differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.c new file mode 100644 index 00000000..910c4141 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.c @@ -0,0 +1,151 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "logo.h" + + +// 関数プロトタイプ +void logo_main( void ); +void logo_init( void ); +void logo_relese( void ); +void logo_keys( void ); +void logo_drow( void ); +void logo_init_save_data( void ); + +// 変数宣言 +static int scene_exit; +static int demo; +static int demo2; + + +//---------------------------------------------------------------------- +// メイン関数 +void logo_main( void ) +{ + int exit_code; + + exit_code = 0; + + logo_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + logo_keys( ); // キー処理 + logo_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + logo_relese( ); // 終了 +} + +void logo_init( void ) +{ + scene_exit = 1; + demo = 0; + demo2 = 0; + + LoadBitmap("image/a_logo.bmp",2,true); //プレーンナンバー1にタイトル画面背景を読み込む + LoadBitmap("image/al_256.bmp",3,false); //プレーンナンバー1にタイトル画面背景を読み込む + + soundStopBgm(EN_BGM_GAME01); +} + +void logo_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } + soundStopBgm(EN_BGM_GAME01); + +} + + +void logo_keys( void ) +{ + // 上下キーに応じて移動 + if (IsPushKey(gameflag[0])) + { + } + if (IsPushKey(gameflag[1])) + { + } + if (IsPushKey(gameflag[2])) + { + } + if (IsPushKey(gameflag[3])) + { + } + + // スペースキーが押される + if ( ( IsPushKey(gameflag[4]) ) || ( IsPushKey(gameflag[5]) ) || ( demo2 >= 2 ) ) + { + if ( demo2 >= 2 ) + { + gameflag[40] = 0; /* タイトル */ + g_scene = EN_SN_TITLE; + scene_exit=0; + return; + } + else + { + demo2++; + } + } + +} + +void logo_drow( void ) +{ + //背景クリア + ClearSecondary(); + + demo++; + + switch( demo2 ) + { + case 0: + Blt( 3, 0, 0 ); /* 320 * 240 */ + if ( demo >= ( 60 * 2 ) ) + { + demo = 0; + demo2++; + } + break; + case 1: + Blt( 2, 0, 0 ); /* 320 * 240 */ + if ( demo >= ( 60) ) + { + demo = 0; + demo2 = 2; + } + break; + default: + break; + } + + + //キー入力検査 + KeyInput(); + +} + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.h new file mode 100644 index 00000000..ddd0c86a --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.h @@ -0,0 +1,6 @@ +#ifndef __LOGO +#define __LOGO + +extern void logo_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.o new file mode 100644 index 00000000..7c8e9abe Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/logo.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.c new file mode 100644 index 00000000..821c733e --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.c @@ -0,0 +1,545 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "option.h" + + +// 関数プロトタイプ +void option_main( void ); +void option_init( void ); +void option_relese( void ); +void option_keys( void ); +void option_drow( void ); +void option_init_save_data( void ); +void option_kane_set( int x, int y ); +void option_kane_disp( void ); +void option_k_jmp( int i ); + + +// 変数宣言 +static int scene_exit; + +static int mode; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT +static int ag = 0; +static int selct[15]; +static int bak_scl[64]; +static int bak_count[64]; +static int a[2] = {0,0}; +static int b[2] = {0,0}; +static int tolal_time[5]; +static int tolal_time2[5]; +static int tolal_time3[5]; +static char string[1024]; + +//---------------------------------------------------------------------- +// メイン関数 +void option_main( void ) +{ + int exit_code; + + exit_code = 0; + + option_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + option_keys( ); // キー処理 + option_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + option_relese( ); // 終了 +} + +void option_init( void ) +{ + int i; + int wk; + + scene_exit = 1; + + mode = 0; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT + ag = 0; + memset( selct, 0, sizeof( selct ) ); + memset( bak_scl, 0, sizeof( bak_scl ) ); + memset( bak_count, 0, sizeof( bak_count ) ); + memset( a, 0, sizeof( a ) ); + memset( b, 0, sizeof( b ) ); + memset( tolal_time, 0, sizeof( tolal_time ) ); + memset( tolal_time2, 0, sizeof( tolal_time2 ) ); + memset( tolal_time3, 0, sizeof( tolal_time3 ) ); + memset( string, 0, sizeof( string ) ); + + +// LoadBitmap("image/title/tria1.bmp",1,1); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/title/title2.bmp",2,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/scl.bmp",3,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/title5.bmp",4,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/potion_bak.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む + LoadBitmap("image/sys/fonts2.bmp",6,true); //プレーンナンバー2にシステム用BMPを読み込む + + if ( gameflag[126] == 1 ) + { + LoadBitmap("image/title/option2.bmp",7,1); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + LoadBitmap("image/title/option1.bmp",7,1); //プレーンナンバー2にシステム用BMPを読み込む + } + + LoadBitmap("image/title/lvel.bmp",8,1); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/on_off.bmp",9,1); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/title_mask.bmp",11,1); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/none.bmp",12,1); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/sima.bmp",13,1); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/sys/waku.bmp",109,0); //プレーンナンバー2にシステム用BMPを読み込む + +// bgm_midi( ); + + tolal_time[0] = 0; + tolal_time[1] = 0; + tolal_time[2] = 0; + for ( i = 1; i <= 50; i++ ) + { +// sprintf( string[0],"%d", gameflag[200 + i] ); +// MidStr(string[0],6,2,string[1]); + wk = get2keta( gameflag[200 + i], 1 ); + tolal_time[0] = tolal_time[0] + wk; + if ( tolal_time[0] >= 60 ) + { + tolal_time[0] = tolal_time[0] - 60; + tolal_time[1]++; + } +// sprintf( string[0],"%d", gameflag[200 + i] ); +// MidStr(string[0],4,2,string[1]); + wk = get2keta( gameflag[200 + i], 100 ); + tolal_time[1] = tolal_time[1] + wk; + if ( tolal_time[1] >= 60 ) + { + tolal_time[1] = tolal_time[1] - 60; + tolal_time[2]++; + } + +// sprintf( string[0],"%d", gameflag[200 + i] ); +// MidStr(string[0],2,2,string[1]); + wk = get2keta( gameflag[200 + i], 10000 ); + tolal_time[2] = tolal_time[2] + wk; + if ( tolal_time[2] >= 999 ) + { + tolal_time[2] = 999; + tolal_time[1] = 59; + tolal_time[0] = 59; + } + + /* スコア */ +// sprintf( string[0],"%d", gameflag[250 + i] ); +// MidStr(string[0],6,2,string[1]); + wk = get2keta( gameflag[250 + i], 1 ); + tolal_time2[0] = tolal_time2[0] + wk; + if ( tolal_time2[0] >= 60 ) + { + tolal_time2[0] = tolal_time2[0] - 60; + tolal_time2[1]++; + } +// sprintf( string[0],"%d", gameflag[250 + i] ); +// MidStr(string[0],4,2,string[1]); + wk = get2keta( gameflag[250 + i], 100 ); + tolal_time2[1] = tolal_time2[1] + wk; + if ( tolal_time2[1] >= 60 ) + { + tolal_time2[1] = tolal_time2[1] - 60; + tolal_time2[2]++; + } + +// sprintf( string[0],"%d", gameflag[250 + i] ); +// MidStr(string[0],2,2,string[1]); + wk = get2keta( gameflag[250 + i], 10000 ); + tolal_time2[2] = tolal_time2[2] + wk; + if ( tolal_time2[2] >= 999 ) + { + tolal_time2[2] = 999; + tolal_time2[1] = 59; + tolal_time2[0] = 59; + } + } + + tolal_time[3] = 0; + for ( i = 1; i <= 50; i++ ) + { + tolal_time[3] = tolal_time[3] + gameflag[300 + i]; + tolal_time2[3] = tolal_time2[3] + gameflag[350 + i]; + } + + + + /* スコア */ + tolal_time3[0] = 0; + tolal_time3[1] = 0; + tolal_time3[2] = 0; + tolal_time3[3] = 0; + +// sprintf( string[0],"%d", gameflag[137] ); +// MidStr(string[0],6,2,string[1]); + wk = get2keta( gameflag[137], 1 ); + tolal_time3[0] = wk; +// if ( tolal_time3[0] >= 60 ) +// { +// tolal_time3[0] = tolal_time3[0] - 60; +// tolal_time3[1]++; +// } +// sprintf( string[0],"%d", gameflag[137] ); +// MidStr(string[0],4,2,string[1]); + wk = get2keta( gameflag[137], 100 ); + tolal_time3[1] = wk; +// if ( tolal_time3[1] >= 60 ) +// { +// tolal_time3[1] = tolal_time3[1] - 60; +// tolal_time3[2]++; +// } + +// sprintf( string[0],"%d", gameflag[137] ); +// MidStr(string[0],2,2,string[1]); + wk = get2keta( gameflag[137], 10000 ); + tolal_time3[2] = wk; +// if ( tolal_time3[2] >= 999 ) +// { +// tolal_time3[2] = 999; +// tolal_time3[1] = 59; +// tolal_time3[0] = 59; +// } + + tolal_time3[3] = gameflag[138]; + +// selct[4] = gameflag[67]; //背景アニメーションON0/OFF1 + selct[2] = gameflag[133]; //上キーの使用 + selct[3] = gameflag[134]; //開始演出のスキップ + selct[4] = gameflag[131]; //言語 + +} + +void option_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } + soundStopBgm(EN_BGM_GAME01); + +} + + +void option_keys( void ) +{ + int load_rc = 0; + + if ( ag == 0 ) + { + if ( IsPushKey( gameflag[0] ) ) + { + soundPlaySe( EN_SE_SELECT ); + mode--; + if ( mode == 14 ) + { + mode = 6; + } + if ( mode <= -1 ) + { + mode = 15; + } + } + else if ( IsPushKey( gameflag[1] ) ) + { + soundPlaySe( EN_SE_SELECT ); + mode++; + if ( mode == 7 ) + { + mode = 15; + } + if ( mode >= 16 ) + { + mode = 0; + } + } + } + if ( IsPushKey( gameflag[2] ) ) + { + soundPlaySe( EN_SE_SELECT ); + selct[mode]--; + if ( selct[mode] < 0 ) + { + selct[mode] = 0; + } + if( ( mode == 5 ) && ( ag == 1 ) ) + { +// sprintf(string[0],"image/option/%d.bmp", selct[mode] ); + sprintf(string,"image/option/%d.bmp", selct[mode] ); + LoadBitmap( string, 10 , false ); + } + } + else if ( IsPushKey( gameflag[3] ) ) + { + soundPlaySe( EN_SE_SELECT ); + selct[mode]++; + if ( mode == 0 ) /* BGM */ + { + if ( selct[mode] > ( EN_BGM_END - 1 ) ) + { + selct[mode] = ( EN_BGM_END - 1 ); + } + } + if ( mode == 1 ) /* SE */ + { + if ( selct[mode] > ( EN_SE_END - 1 ) ) + { + selct[mode] = ( EN_SE_END - 1 ); + } + } + if ( mode == 2 ) /* 上ジャンプ */ + { + if ( selct[mode] > 1 ) + { + selct[mode] = 1; + } + } + if ( mode == 3 ) /* 開始演出 */ + { + if ( selct[mode] > 1 ) + { + selct[mode] = 1; + } + } + if ( mode == 4 ) /* 言語 */ + { + if ( selct[mode] > 1 ) + { + selct[mode] = 1; + } + } + if ( ( mode == 5 ) && ( ag == 1 ) ) + { + if ( selct[mode] > 99 ) + { + selct[mode] = 99; + } +// sprintf(string,"image/option/%d.bmp", selct[mode] ); + sprintf(string,"image/option/%d.bmp", selct[mode] ); + load_rc = LoadBitmap( string, 10 , false ); + if ( load_rc != 0 ) + { + //ファイルの読み込みに失敗 + selct[mode]--; + sprintf(string,"image/option/%d.bmp", selct[mode] ); + load_rc = LoadBitmap( string, 10 , false ); + } + } + } + + + // 決定が押される + if ( IsPushOKKey( ) ) + { + if ( mode == 15 ) /* Exit */ + { + gameflag[133] = selct[2]; //上キー + gameflag[134] = selct[3]; //開始演出 + gameflag[131] = selct[4]; //言語 + SaveGameFlag("config/config.fig"); + + gameflag[40] = 1; /* モードによって変える */ + g_scene = EN_SN_TITLE; + scene_exit=0; + } + else if ( mode == 6 ) + { + if ( gameflag[100] == 1 ) + { + gameflag[133] = selct[2]; //上キー + gameflag[134] = selct[3]; //開始演出 + gameflag[131] = selct[4]; //言語 + + gameflag[40] = 5; /* モードによって変える */ + g_scene = EN_SN_ENDING; + scene_exit=0; + } + else + { + soundPlaySe( EN_SE_MSG ); + } + } + else if ( mode == 5 ) + { + ag = 1; +// sprintf(string,"image/option/%d.bmp", selct[mode] ); + sprintf(string,"image/option/%d.bmp", selct[mode] ); + LoadBitmap( string, 10 , false ); + } + else if ( mode == 1 ) /* se test */ + { + soundPlaySe( selct[mode] ); + } + else if ( mode == 0 ) /* bgm test */ + { + soundStopBgm(EN_BGM_GAME01); + soundPlayBgm( selct[mode] ); + } + } + + // キャンセルが押される + if ( IsPushCancelKey( ) ) + { + if ( mode == 13 ) /* Exit */ + { + } + else if ( mode == 6 ) + { + } + else if ( mode == 5 ) + { + ag = 0; + } + else if ( mode == 4 ) + { + selct[mode] = 0; + } + else if ( mode == 3 ) + { + selct[mode] = 0; + } + else if ( mode == 2 ) + { + selct[mode] = 0; + } + else if ( mode == 1 ) /* se test */ + { + soundStopSeAll(); /* wavファイルの全開放 */ + } + else if ( mode == 0 ) /* bgm test */ + { + soundStopBgm(0); + } + if ( ag == 1 ) + { + ag = 0; + } + } + +} + +void option_drow( void ) +{ + //------------------------------------------------------------- + //変数宣言 + int i; + int x, y; + //------------------------------------------------------------- + + //背景クリア + ClearSecondary(); + + + //タイトル画面の転送 + //----------------------------------------------------------------------------------- + a[0]++; + if ( a[0] > 100 ) + { + a[0] = 0; + } + a[1]++; + if ( a[1] >= 40 ) + { + a[1] = 0; + } + for ( x = 0; x < 5; x++ ) + { + for ( y = 0; y < 4; y++ ) + { + Blt( 5, ( x * 100 )- a[0], ( y * 100 ) - a[0] ); + } + } + /* ロゴ */ +// Blt( 4, 0, 0 ); + + Blt( 1, 10, 90 ); + + //----------------------------------------------------------------------------------- + if ( ag == 0 ) + { + + + Blt( 0, 0, 0 ); + + + Blt( 7, 0, 0 ); + BltRect( 3, 40, 52 + ( mode * 8 ) , 0 + ( a[1] / 10 ) * 16 , 0, 16, 16 ); + + for ( i = 0; i < 2 ; i++ ) + { + //数値の項目 + BltNumericImage( selct[i], 2, 200, 56 + ( i * 8 ), 6, 0, 0, 10, 8 ); /* */ + } + BltRect( 9 , 200, 56 + ( 2 * 8 ), 0, ( selct[2] ) * 8 , 200, 8 ); /* on off */ + BltRect( 9 , 200, 56 + ( 3 * 8 ), 0, ( selct[3] ) * 8 , 200, 8 ); /* on off */ + BltRect( 9 , 200, 56 + ( 4 * 8 ), 0, ( ( selct[4] ) * 8 ) + 16, 200, 8 ); /* langage */ + + BltNumericImage2( gameflag[110], 3, 180, 64 + ( 7 * 8 ), 6, 0, 0, 10, 8 ); /* プレイタイム */ + BltNumericImage( gameflag[109], 2, 200 + 20 + 10, 64 + ( 7 * 8 ), 6, 0, 0, 10, 8 ); /* プレイタイム */ + BltNumericImage( gameflag[108], 2, 200 + 40 + 20, 64 + ( 7 * 8 ), 6, 0, 0, 10, 8 ); /* プレイタイム */ + + BltNumericImage2( tolal_time[2], 3, 180, 64 + ( 8 * 8 ), 6, 0, 0, 10, 8 ); /* クリアタイム */ + BltNumericImage( tolal_time[1], 2, 200 + 20 + 10, 64 + ( 8 * 8 ), 6, 0, 0, 10, 8 ); /* クリアタイム */ + BltNumericImage( tolal_time[0], 2, 200 + 40 + 20, 64 + ( 8 * 8 ), 6, 0, 0, 10, 8 ); /* クリアタイム */ + + BltNumericImage2( tolal_time[3], 4, 170, 64 + ( 9 * 8 ), 6, 0, 0, 10, 8 ); /* 回転回数 */ + +// BltNumericImage2( tolal_time3[2], 3, 180, 64 + ( 9 * 8 ), 6, 0, 0, 10, 8 ); /* */ +// BltNumericImage( tolal_time3[1], 2, 200 + 20 + 10, 64 + ( 9 * 8 ), 6, 0, 0, 10, 8 ); /* */ +// BltNumericImage( tolal_time3[0], 2, 200 + 40 + 20, 64 + ( 9 * 8 ), 6, 0, 0, 10, 8 ); /* */ + +// BltNumericImage2( tolal_time3[3], 4, 170, 64 + ( 10 * 8 ), 6, 0, 0, 10, 8 ); /* */ + + if ( gameflag[126] == 1 ) + { + BltNumericImage2( tolal_time2[2], 3, 180, 64 + ( 12 * 8 ), 6, 0, 0, 10, 8 ); /* 資金 */ + BltNumericImage( tolal_time2[1], 2, 200 + 20 + 10, 64 + ( 12 * 8 ), 6, 0, 0, 10, 8 ); /* 資金 */ + BltNumericImage( tolal_time2[0], 2, 200 + 40 + 20, 64 + ( 12 * 8 ), 6, 0, 0, 10, 8 ); /* 資金 */ + + BltNumericImage2( tolal_time2[3], 4, 170, 64 + ( 13 * 8 ), 6, 0, 0, 10, 8 ); /* 資金 */ + } + + } + else + { + /* ギャラリーモード */ + /* ギャラリーモード */ + Blt( 10, 0, 0 ); + + BltNumericImage( selct[mode], 2, 300, 230, 6, 0, 0, 10, 8 ); /* No. */ + + } + + //キー入力検査 + KeyInput(); + +} + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.h new file mode 100644 index 00000000..ae5ba23e --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.h @@ -0,0 +1,6 @@ +#ifndef __OPTION +#define __OPTION + +extern void option_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.o new file mode 100644 index 00000000..b1c455a6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/option.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/pack.sh b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/pack.sh new file mode 100644 index 00000000..f155e7e3 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/pack.sh @@ -0,0 +1 @@ +mksquashfs ./opk kaiten.opk -all-root -noappend -no-exports -no-xattrs diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.c new file mode 100644 index 00000000..680fc1b3 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.c @@ -0,0 +1,18 @@ +#ifndef CACA +#define CACA +#include +#include + +#include +#include "define.h" + +SDL_Surface *g_screen; +int g_scene; +long gameflag[1024]; +long gameflag2[1024]; + +long g_DebugDisp; +long g_DebugStageProduction; + + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.o new file mode 100644 index 00000000..79fdfe9d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/ram.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay.txt new file mode 100644 index 00000000..6ed20eee --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay.txt @@ -0,0 +1 @@ +リプレイ用フォルダ \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_1.dat b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_1.dat new file mode 100644 index 00000000..4f24ab67 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_1.dat differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_w_1.dat b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_w_1.dat new file mode 100644 index 00000000..4f24ab67 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/0/replay_data_w_1.dat differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/1/replay.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/1/replay.txt new file mode 100644 index 00000000..6ed20eee --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/1/replay.txt @@ -0,0 +1 @@ +リプレイ用フォルダ \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/2/replay.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/2/replay.txt new file mode 100644 index 00000000..6ed20eee --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/replay/2/replay.txt @@ -0,0 +1 @@ +リプレイ用フォルダ \ No newline at end of file diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/config b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/config new file mode 100644 index 00000000..033a837e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/config differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/item_wk.sav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/item_wk.sav new file mode 100644 index 00000000..08e7df17 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/item_wk.sav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/save.txt b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/save.txt new file mode 100644 index 00000000..e69de29b diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/target b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/target new file mode 100644 index 00000000..45a53669 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/target differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/work.sav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/work.sav new file mode 100644 index 00000000..975d19bc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/save/work.sav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.c new file mode 100644 index 00000000..b49887d6 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.c @@ -0,0 +1,58 @@ +#include +#include + +#include +#include "define.h" +#include "extern.h" +#include "scene.h" + +#include "title.h" +#include "act.h" +#include "option.h" +#include "ending.h" +#include "logo.h" +#include "stageselect.h" +#include "demo.h" + +void scenemanager( void ); + +void scenemanager( void ) +{ + int exit; + + exit = true; + while( exit ) + { + printf("g_scene %d\n", g_scene); + switch( g_scene ) + { + case EN_SN_TITLE: + title_main( ); + break; + case EN_SN_ACT: + act_main( ); + break; + case EN_SN_OPTION: + option_main( ); + break; + case EN_SN_ENDING: + ending_main( ); + break; + case EN_SN_LOGO: + logo_main( ); + break; + case EN_SN_STAGESELECT: + stageselect_main( ); + break; + case EN_SN_DEMO: + demo_main( ); + break; + default: + exit = false; + break; + } + } + +} + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.h new file mode 100644 index 00000000..11273f22 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.h @@ -0,0 +1,6 @@ +#ifndef __SCENEMANAGER +#define __SCENEMANAGER + +extern void scenemanager( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.o new file mode 100644 index 00000000..3f0b4456 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/scene.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/screenshot.png b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/screenshot.png new file mode 100644 index 00000000..b2a8f796 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/screenshot.png differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/01.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/01.ogg new file mode 100644 index 00000000..333b58f3 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/01.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/02.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/02.ogg new file mode 100644 index 00000000..0613611c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/02.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/03.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/03.ogg new file mode 100644 index 00000000..33f4fbb2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/03.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/04.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/04.ogg new file mode 100644 index 00000000..2129b1bc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/04.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/05.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/05.ogg new file mode 100644 index 00000000..dc0fe620 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/05.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/06.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/06.ogg new file mode 100644 index 00000000..9790bc29 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/06.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/07.ogg b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/07.ogg new file mode 100644 index 00000000..97cb347a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/bgm/07.ogg differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atk1.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atk1.wav new file mode 100644 index 00000000..76549e6b Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atk1.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atohitoru.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atohitoru.wav new file mode 100644 index 00000000..16486741 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/atohitoru.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/damage.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/damage.wav new file mode 100644 index 00000000..8ddbad3c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/damage.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/jump.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/jump.wav new file mode 100644 index 00000000..228cc6bc Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/jump.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/l1.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/l1.wav new file mode 100644 index 00000000..c885c69f Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/l1.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/landing.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/landing.wav new file mode 100644 index 00000000..4c9c0aff Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/landing.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/msg.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/msg.wav new file mode 100644 index 00000000..2ed47f2a Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/msg.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/puwa.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/puwa.wav new file mode 100644 index 00000000..99d9fce0 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/puwa.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se01.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se01.wav new file mode 100644 index 00000000..bae8d465 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se01.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se02.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se02.wav new file mode 100644 index 00000000..c9a5e9c5 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se02.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se03.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se03.wav new file mode 100644 index 00000000..8ed3f50d Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se03.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se04.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se04.wav new file mode 100644 index 00000000..e37672a6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se04.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se05.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se05.wav new file mode 100644 index 00000000..93f6bf04 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se05.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se06.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se06.wav new file mode 100644 index 00000000..a4acdd06 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se06.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se07.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se07.wav new file mode 100644 index 00000000..7a2bc701 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se07.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se08.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se08.wav new file mode 100644 index 00000000..e81b94b1 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se08.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se09.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se09.wav new file mode 100644 index 00000000..a7bbfbe9 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se09.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se10.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se10.wav new file mode 100644 index 00000000..c60472c5 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/se10.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/select.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/select.wav new file mode 100644 index 00000000..d0d1378e Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/select.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/sw.wav b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/sw.wav new file mode 100644 index 00000000..17fe0e2c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/sound/se/sw.wav differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.c new file mode 100644 index 00000000..4370eb4a --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.c @@ -0,0 +1,443 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "stageselect.h" + + +// 関数プロトタイプ +void stageselect_main( void ); +void stageselect_init( void ); +void stageselect_relese( void ); +void stageselect_keys( void ); +void stageselect_drow( void ); +void stageselect_init_save_data( void ); + +// BMP用定数 + +// 変数宣言 +static int scene_exit; + +static int mode; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT +static int a[2] = {0,0}; +static int csl[2] = {0,0}; + +//static char string[1024]; + +static long target_save[1024]; + +//---------------------------------------------------------------------- +// メイン関数 +void stageselect_main( void ) +{ + int exit_code; + + exit_code = 0; + + stageselect_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + stageselect_keys( ); // キー処理 + stageselect_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + stageselect_relese( ); // 終了 +} + +void stageselect_init( void ) +{ + scene_exit = 1; + + mode = 0; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT + memset( a, 0, sizeof( a ) ); + memset( csl, 0, sizeof( csl ) ); + memset( target_save, 0, sizeof( target_save ) ); + + csl[1] = ( gameflag[120] / 10 ); + csl[0] = ( gameflag[120] % 10 ) - 1; + if ( ( gameflag[120] % 10 ) == 0 ) + { + csl[1] = csl[1] - 1; + csl[0] = 9 ; + } + + LoadBitmap("image/title/title_natuki.bmp",1,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/title/stageselect.bmp",2,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/scl.bmp",3,true); //プレーンナンバー2にシステム用BMPを読み込む +// LoadBitmap("image/bak/1_256.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む +// LoadBitmap("image/bak/1.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む + LoadBitmap("image/title/potion_bak.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む + LoadBitmap("image/player/cutin.bmp",6,true); //プレーンナンバー2にシステム用BMPを読み込む + + if ( gameflag[126] == 0 ) + { + LoadBitmap("image/title/title5.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + LoadBitmap("image/title/title5_ura.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + + LoadBitmap("image/title/title3.bmp",10,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/fonts2.bmp",18,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/waku.bmp",109,true); //プレーンナンバー2にシステム用BMPを読み込む + + + LoadFile( "save/target", &target_save[0], sizeof( target_save ) ); + + if ( gameflag[70] == 0 ) + { + soundPlayBgm( EN_BGM_GAME01 ); + } + gameflag[70] = 0; +} + +void stageselect_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } + soundStopBgm(EN_BGM_GAME01); + +} + + +void stageselect_keys( void ) +{ + if ( IsPushKey( gameflag[0] ) ) + { + soundPlaySe( EN_SE_SELECT ); + csl[0]--; + if ( csl[0] < 0 ) + { + csl[0] = 10; + } + } + else if ( IsPushKey( gameflag[1] ) ) + { + soundPlaySe( EN_SE_SELECT ); + csl[0]++; + if ( csl[0] >= 11 ) + { + csl[0] = 0; + } + } + + if ( IsPushKey( gameflag[2] ) ) + { + soundPlaySe( EN_SE_SELECT ); + csl[1]--; + if ( csl[1] < 0 ) + { + csl[1] = 4; + } + } + else if ( IsPushKey( gameflag[3] ) ) + { + soundPlaySe( EN_SE_SELECT ); + csl[1]++; + if ( csl[1] >= 5 ) + { + csl[1] = 0; + } + } + + // 決定キーを押した + if ( IsPushOKKey( ) ) + { + if ( csl[0] == 10 ) + { + //exit + g_scene = EN_SN_TITLE; + scene_exit=0; + } + else + { + ResetGameFlag2( ); + + stageselect_init_save_data( ); + + gameflag[127] = 0; //トータルアタック + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[132] = 0; //リプレイ + gameflag[70] = 1; + gameflag[128] = 0; //マップビュー + gameflag[129] = 1; //ステージセレクトから開始 + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + return; + } + } + // キャンセルキーを押した + if ( IsPushCancelKey( ) ) + { + g_scene = EN_SN_TITLE; + scene_exit=0; + } + /* 12ボタン か Cが押された */ +/* + if ( IsPushKey( gameflag[6] ) ) // スキンチェンジ + { + gameflag[122]++; + if ( gameflag[100] == 1 ) + { + if ( gameflag[122] > 4 ) + { + gameflag[122] = 0; + } + } + else + { + if ( gameflag[122] > 2 ) + { + gameflag[122] = 0; + } + } + } +*/ +} + +void stageselect_drow( void ) +{ + //------------------------------------------------------------- + //変数宣言 + //------------------------------------------------------------- + + //背景クリア + ClearSecondary(); + + + //タイトル画面の転送 + //----------------------------------------------------------------------------------- + int stage_hosei; + int x; + int y; + int wk; + int stage_no; + int tergetnam; + //----------------------------------------------------------------------------------- + tergetnam = 0; + stage_hosei = 0; + + if ( gameflag[126] == 1 ) + { + stage_hosei = 50; + } + +// Blt( 5, 0, 0 ); + a[0]++; + if ( a[0] > 100 ) + { + a[0] = 0; + } + a[1]++; + if ( a[1] >= 40 ) + { + a[1] = 0; + } + for ( x = 0; x < 5; x++ ) + { + for ( y = 0; y < 4; y++ ) + { + Blt( 5, ( x * 100 )- a[0], ( y * 100 ) - a[0] ); + } + } + + //いろつけ + tergetnam = 0; + for ( x = 0; x < 5; x++ ) + { + for ( y = 0; y < 10; y++ ) + { + stage_no = ( ( x ) * 10 ) + ( y + 1 ); + //トロフィーの表示 + //タイム + tergetnam = 0; + if ( target_save[200 + stage_no + stage_hosei] >= gameflag[200 + stage_no + stage_hosei] ) + { + tergetnam++; + } + //回転 + if ( target_save[300 + stage_no + stage_hosei] >= gameflag[300 + stage_no + stage_hosei] ) + { + tergetnam++; + } + //隠し + if ( gameflag[400 + stage_no + stage_hosei] != 0 ) + { + tergetnam++; + } + BltRect( 3, 15 + ( x * 64 ) , 32 + ( y * 8 ), 0, 96 + ( tergetnam * 7 ) , 41 , 7 ); /* 達成度 */ + } + } + + Blt( 2, 0, 0 ); + if ( csl[0] == 10 ) + { + // exit + BltRect( 3, 0 + ( 2 * 64 ) , 32 + ( 10 * 8 ), ( a[1] / 10 ) * 16, 0 , 16 , 16 ); /* カーソル */ + } + else + { + BltNumericImage( csl[1] + 1, 1, 174, 135, 18, 0, 0, 10, 8 ); /* */ + BltNumericImage( csl[0] + 1 + ( csl[1] * 10 ), 2, 192, 135, 18, 0, 0, 10, 8 ); /* */ + + BltRect( 3, 0 + ( csl[1] * 64 ) , 28 + ( csl[0] * 8 ), ( a[1] / 10 ) * 16, 0 , 16 , 16 ); /* カーソル */ + + stage_no = ( ( csl[1] ) * 10 ) + ( csl[0] + 1 ); + + wk = get2keta( gameflag[200 + stage_no + stage_hosei], 1 ); + BltNumericImage( wk, 2, 250, 148, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( gameflag[200 + stage_no + stage_hosei], 100 ); + BltNumericImage( wk, 2, 220, 148, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( gameflag[200 + stage_no + stage_hosei], 10000 ); + BltNumericImage( wk, 2, 190, 148, 18, 0, 0, 10, 8 ); /* */ + BltNumericImage2( gameflag[300 + stage_no + stage_hosei], 2, 190, 178, 18, 0, 0, 10, 8 ); /* Jump_counts */ + if ( gameflag[300 + stage_no + stage_hosei] != 99 ) + { + BltRect( 6, 250, 180, 0 + ( ( ( stage_no - 1 ) % 10 ) * 32 ), 160 + ( ( ( stage_no - 1 ) / 10 ) * 32 ), 32, 32 ); /* */ + } + + + wk = get2keta( target_save[200 + stage_no + stage_hosei], 1 ); + BltNumericImage( wk, 2, 250, 156, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( target_save[200 + stage_no + stage_hosei], 100 ); + BltNumericImage( wk, 2, 220, 156, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( target_save[200 + stage_no + stage_hosei], 10000 ); + BltNumericImage( wk, 2, 190, 156, 18, 0, 0, 10, 8 ); /* */ + BltNumericImage2( target_save[300 + stage_no + stage_hosei], 2, 190, 186, 18, 0, 0, 10, 8 ); /* Jump_counts */ + + //トロフィーの表示 + //タイム + if ( target_save[200 + stage_no + stage_hosei] >= gameflag[200 + stage_no + stage_hosei] ) + { + BltRect( 3, 0, 138, 0, 64, 32, 32 ); /* タイム */ + BltRect( 3, 0 + 5, 138 + 4, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + BltRect( 3, 0 + 20, 138 + 14, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + } + else + { + BltRect( 3, 0, 138, 0, 32, 32, 32 ); /* 土台 */ + } + //回転 + if ( target_save[300 + stage_no + stage_hosei] >= gameflag[300 + stage_no + stage_hosei] ) + { + BltRect( 3, 0, 170, 32, 64, 32, 32 ); /* タイム */ + BltRect( 3, 0 + 5, 170 + 4, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + BltRect( 3, 0 + 20, 170 + 14, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + } + else + { + BltRect( 3, 0, 170, 0, 32, 32, 32 ); /* 土台 */ + } + //隠し + if ( gameflag[400 + stage_no + stage_hosei] != 0 ) + { + BltRect( 18, 190, 214, 0, 176, 200, 8 ); /* タイム */ + BltRect( 3, 0, 202, 64, 64, 32, 32 ); /* タイム */ + BltRect( 3, 0 + 5, 202 + 4, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + BltRect( 3, 0 + 20, 202 + 14, 32 + ( ( ( a[0] / 10 ) % 2 ) * 5 ), 37 , 5 , 7 ); /* カーソル */ + } + else + { + BltRect( 18, 190, 214, 0, 168, 200, 8 ); /* タイム */ + BltRect( 3, 0, 202, 0, 32, 32, 32 ); /* 土台 */ + } + + } + + if ( gameflag[61] == 0 ) + { + Blt( 109 , -160, -120 ); + } + + //キー入力検査 + KeyInput(); + +} + + +/***************************************************************************/ +// NAME = init_save_data +// FUNCTION = セーブファイルの初期値を設定 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = なし +// RETURN = なし +/***************************************************************************/ +void stageselect_init_save_data( void ) +{ + gameflag2[0] = 8 * 32; /* X */ + gameflag2[1] = ( 2 * 32 ) - 16; /* Y */ + if ( gameflag[126] == 1 ) + { + gameflag2[2] = 2; /* ステージ */ + } + else + { + gameflag2[2] = 1; /* ステージ */ + } + gameflag[120] = ( ( csl[1] ) * 10 ) + ( csl[0] + 1 ); + gameflag2[3] = gameflag[120]; /* 画面No */ + gameflag2[4] = 0; /* 向き */ + gameflag2[5] = 3; /* 現在HP */ + gameflag2[6] = 3; /* 最大HP */ + gameflag2[7] = 0; /* ハートのかけら所持個数 */ + gameflag2[8] = 0; /* 現在設定スキル */ + gameflag2[9] = 0; /* テレポータ使用不可、スクロール不可フラグ */ + gameflag2[10] = 0; /* テレポータ使用不可フラグ */ + + gameflag2[20] = 0; /* 時 */ + gameflag2[21] = 0; /* 分 */ + gameflag2[22] = 0; /* 秒 */ + + gameflag2[30] = 0; /* テレポーター使用 */ + gameflag2[31] = 0; /* テレポーターステージ */ + gameflag2[32] = 0; /* テレポーター画面No */ + gameflag2[33] = 0; /* テレポーターX */ + gameflag2[34] = 0; /* テレポーターY */ + + gameflag2[40] = 0; /* 取得スキル1 */ + gameflag2[41] = 0; /* 取得スキル2 */ + gameflag2[42] = 0; /* 取得スキル3 */ + gameflag2[43] = 0; /* 取得スキル4 */ + + + /* イニシャライズが必要な場合はここに記述する */ +// gameflag2[100] = ; /* イベントフラグ[100]〜[199] */ + + /* 100〜399イベント用フラグ */ + +} + + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.h new file mode 100644 index 00000000..5c76367d --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.h @@ -0,0 +1,6 @@ +#ifndef __STAGESELECT +#define __STAGESELECT + +extern void stageselect_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.o new file mode 100644 index 00000000..2ebec12c Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/stageselect.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.c new file mode 100644 index 00000000..839d08e0 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.c @@ -0,0 +1,802 @@ +#include +#include +#include + +#include +#include "define.h" +#include "function.h" +#include "util_snd.h" +#include "extern.h" +#include "title.h" + + +// 関数プロトタイプ +void title_main( void ); +void title_init( void ); +void title_relese( void ); +void title_keys( void ); +void title_drow( void ); +void title_init_save_data( void ); +void title_kane_set( int x, int y ); +void title_kane_disp( void ); +void title_k_jmp( int i ); +int replay_file_find( void ); +int replay_file_find2( void ); + +// BMP用定数 +enum +{ + EN_TITLE_NONE = 0, + EN_TITLE_image1, + EN_TITLE_image2, + EN_TITLE_image3, + EN_TITLE_image4, + EN_TITLE_image5, + EN_TITLE_image6, +}; + +// 変数宣言 +static int scene_exit; + +static int mode; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT +static int a[2] = {0,0}; +static int b[2] = {0,0}; +static int caslanm ; +static int kane[200]; /* アイテム用バッファ */ +static int uracount = 0; + +static int title_no = 0; +static char string[1024]; +//---------------------------------------------------------------------- +// メイン関数 +void title_main( void ) +{ + int exit_code; + + exit_code = 0; + + title_init( ); // 初期化 + + while( scene_exit ) + { +// KeyInput( ); // キー入力 + + title_keys( ); // キー処理 + title_drow( ); // 描画 + + SDL_Flip( g_screen ); // 描画 + FPSWait( ); // 待ち + + exit_code = system_keys( ); // + if ( exit_code == 0 ) + { + scene_exit = 0; + } + } + + title_relese( ); // 終了 +} + +void title_init( void ) +{ + scene_exit = 1; + + title_no = 0; + mode = 0; //現在選択されている項目 0:GAMESTART 1:OPTION 2:EXIT + memset( kane, 0, sizeof( kane ) ); + uracount = 0; + title_no = 0; + caslanm = 0; + + LoadBitmap("image/title/title_pipi.bmp",1,true); //プレーンナンバー2にシステム用BMPを読み込む + + LoadBitmap("image/title/title2.bmp",2,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/title/scl.bmp",3,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/bak/1_256.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む +// LoadBitmap("image/bak/1.bmp",5, false ); //プレーンナンバー1にタイトル画面背景を読み込む + + if ( gameflag[126] == 0 ) + { + LoadBitmap("image/title/title5.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + LoadBitmap("image/title/title5_ura.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + + LoadBitmap("image/title/title3.bmp",10,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/fonts2.bmp",18,true); //プレーンナンバー2にシステム用BMPを読み込む + LoadBitmap("image/sys/waku.bmp",109,true); //プレーンナンバー2にシステム用BMPを読み込む + + a[0] = 100; + a[1] = 200; + title_kane_set( 0, 300 ); + + if ( gameflag[123] != -1 ) + { + gameflag[120] = gameflag[123]; + } + + gameflag[120] = 1; + + if ( gameflag[120] > 50 ) + { + gameflag[120] = 50; + } +/* + for ( i = 0; i < 32 ; i++ ) + { + bak_scl[i] = Rand( 320 ); + } +*/ + + soundPlayBgm( EN_BGM_GAME01 ); + +} + +void title_relese( void ) +{ + int i; + + for ( i = 0; i < BMPBUFF_MAX; i++ ) + { + ReleaseBitmap( i ); + } +// soundStopBgm(EN_BGM_GAME01); + +} + + +void title_keys( void ) +{ + if ( IsPushKey( GP2X_BUTTON_UP ) ) + { + soundPlaySe( EN_SE_SELECT ); + mode--; + if ( mode == -1 ) + { + mode = 6; + } + } + else if ( IsPushKey( GP2X_BUTTON_DOWN ) ) + { + soundPlaySe( EN_SE_SELECT ); + mode++; + if ( mode == 7 ) + { + mode = 0; + } + } + if ( IsPushKey( gameflag[2] ) ) + { + if ( ( mode == 0 ) || ( mode == 1 ) ) + { + soundPlaySe( EN_SE_SELECT ); + gameflag[120]--; + if ( gameflag[120] < 1 ) + { + gameflag[120] = gameflag[121]; + if ( gameflag[120] > 50 ) + { + gameflag[120] = 50; + } + } + } + if ( mode == 2 ) + { + + soundPlaySe( EN_SE_SELECT ); + gameflag[124]--; + if ( gameflag[124] < 0 ) + { + gameflag[124] = 1; + } + } + } + else if ( IsPushKey( gameflag[3] ) ) + { + if ( ( mode == 0 ) || ( mode == 1 ) ) + { + soundPlaySe( EN_SE_SELECT ); + gameflag[120]++; + if ( ( gameflag[120] > gameflag[121] ) || ( gameflag[120] > 50 ) ) + { + gameflag[120] = 1; + } + } + if ( mode == 2 ) + { + + soundPlaySe( EN_SE_SELECT ); + gameflag[124]++; + if ( gameflag[124] > 1 ) + { + gameflag[124] = 0; + } + } + } + if ( IsPressKey( gameflag[2] ) ) + { + b[0]++; + if ( ( mode == 0 ) || ( mode == 1 ) ) + { + if ( b[0] >= 12 ) + { + b[0] = 0; + soundPlaySe( EN_SE_SELECT ); + gameflag[120]--; + if ( gameflag[120] < 1 ) + { + gameflag[120] = gameflag[121]; + if ( gameflag[120] > 50 ) + { + gameflag[120] = 50; + } + } + } + } + } + else if ( IsPressKey( gameflag[3] ) ) + { + b[0]++; + if ( ( mode == 0 ) || ( mode == 1 ) ) + { + if ( b[0] >= 12 ) + { + b[0] = 0; + soundPlaySe( EN_SE_SELECT ); + gameflag[120]++; + if ( ( gameflag[120] > gameflag[121] ) || ( gameflag[120] > 50 ) ) + { + gameflag[120] = 1; + } + } + } + } + else + { + b[0] = 0; + } + + // 決定キーを押した + if ( IsPushOKKey( ) ) + { + if ( mode == 6 ) /* Exit */ + { + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[40] = 10; /* モードによって変える */ + g_scene = EN_SN_EXIT; + scene_exit=0; + } + else if ( mode == 5 ) /* option */ + { + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[40] = 3; + g_scene = EN_SN_OPTION; + scene_exit=0; + } + else if ( mode == 4 ) /* demo */ + { + ResetGameFlag2( ); + + title_init_save_data( ); + + gameflag[125] = 0; /* replay nomal */ + gameflag[123] = gameflag[120]; //リプレイ選択時のステージ + gameflag[132] = 1; //リプレイ + gameflag2[3] = 1; /* 画面No */ + gameflag2[2] = 0; /* ステージ */ + gameflag[70] = 1; + gameflag[128] = 0; //マップビュー + gameflag[129] = 0; //ステージセレクトから開始 + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + } + else if ( mode == 3 ) /* stage select */ + { + gameflag[70] = 1; + g_scene = EN_SN_STAGESELECT; + scene_exit=0; + } + else if ( mode == 2 ) /* replay */ + { + if ( replay_file_find( ) == 1 ) + { + ResetGameFlag2( ); + + title_init_save_data( ); + + gameflag[127] = 0; //トータルアタック + gameflag[125] = 0; /* replay nomal */ + gameflag[123] = gameflag[120]; //リプレイ選択時のステージ + gameflag[132] = 1; //リプレイ + gameflag[70] = 1; + gameflag[128] = 0; //マップビュー + gameflag[129] = 0; //ステージセレクトから開始 + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + return; + } + else + { + soundPlaySe( EN_SE_MSG ); + } + } + else if ( mode == 1 ) /* map viwe */ + { + ResetGameFlag2( ); + + title_init_save_data( ); + + gameflag[127] = 0; //トータルアタック + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[132] = 0; //リプレイ + gameflag[70] = 1; + gameflag[128] = 1; //マップビュー + gameflag[129] = 0; //ステージセレクトから開始 + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + return; + } + else if ( mode == 0 ) /* new */ + { + ResetGameFlag2( ); + + title_init_save_data( ); + + gameflag[127] = 0; //トータルアタック + gameflag[123] = -1; //リプレイ選択時のステージ + gameflag[132] = 0; //リプレイ + gameflag[70] = 1; + gameflag[128] = 0; //マップビュー + gameflag[129] = 0; //ステージセレクトから開始 + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + if ( + ( gameflag[120] == 1 ) + || ( gameflag[120] == 11 ) + || ( gameflag[120] == 21 ) + || ( gameflag[120] == 31 ) + || ( gameflag[120] == 41 ) + ) + { + g_scene = EN_SN_DEMO; + } + return; + } + } + // キャンセルキーを押した + if ( IsPushCancelKey( ) ) + { + if ( mode == 0 ) /* 裏面 */ + { +/* + if ( gameflag[100] == 1 ) + { + uracount++; + if ( uracount >= 16 ) + { + if ( gameflag[126] == 0 ) + { + gameflag[126] = 1; + LoadBitmap("image/title/title5_ura.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + else + { + gameflag[126] = 0; + LoadBitmap("image/title/title5.bmp",7,true); //プレーンナンバー2にシステム用BMPを読み込む + } + uracount = 0; + } + } +*/ + } + if ( mode == 2 ) /* replay jamp */ + { + if ( replay_file_find2( ) == 1 ) + { + ResetGameFlag2( ); + + title_init_save_data( ); + + gameflag[127] = 0; //トータルアタック + gameflag[125] = 1; /* replay jamp */ + gameflag[123] = gameflag[120]; //リプレイ選択時のステージ + gameflag[132] = 1; //リプレイ + gameflag[129] = 0; //ステージセレクトから開始 + gameflag[70] = 1; + SaveGameFlag2( "save/work.sav"); + + ResetGameFlag2( ); + SaveGameFlag2( "save/item_wk.sav"); + + gameflag[40] = 4; + g_scene = EN_SN_ACT; + scene_exit=0; + } + else + { + soundPlaySe( EN_SE_MSG ); + } + } + } + /* 12ボタン か Cが押された */ +/* + if ( IsPushKey( gameflag[6] ) ) // スキンチェンジ + { + gameflag[122]++; + if ( gameflag[100] == 1 ) + { + if ( gameflag[122] > 4 ) + { + gameflag[122] = 0; + } + } + else + { + if ( gameflag[122] > 2 ) + { + gameflag[122] = 0; + } + } + } +*/ +} + +void title_drow( void ) +{ + //------------------------------------------------------------- + //変数宣言 + int stage_hosei; + int wk; + //------------------------------------------------------------- + + stage_hosei = 0; + if ( gameflag[126] == 1 ) + { + stage_hosei = 50; + } + + //背景クリア + ClearSecondary(); + + + //タイトル画面の転送 + //----------------------------------------------------------------------------------- + //----------------------------------------------------------------------------------- + + if ( title_no == 0 ) + { + Blt( 5, 0, 0 ); + + Blt( 1, 110 - a[0], 0 + a[1] ); + + a[0] = a[0] - 10; + if ( a[0] < 0 ) + { + a[0] = 0; + } + a[1] = a[1] - 20; + if ( a[1] < 0 ) + { + a[1] = 0; + } + + Blt( 2, 0 - 80, 0 ); +// Blt( 7, 0, 0 ); +// BltRect( 7, 0, 0 - ( c[0] * c[0] * c[0] ), 0, 64, 192, 96 ); + title_kane_disp( ); + + caslanm++; + if ( caslanm >= 40 ) + { + caslanm = 0; + } + BltRect( 3, 96 - 80, 112 + ( mode * 16 ), ( caslanm / 10 ) * 16, 0 , 16 , 16 ); /* カーソル */ + BltNumericImage2( gameflag[120], 2, 262 - 80 - 32, 136 - 16, 18, 0, 0, 10, 8 ); /* ステージ */ + BltRect( 18, 262 - 80 - 32, 168 - 16, 0, 56 + ( gameflag[124] * 8 ), 100, 8 ); /* リプレイタイプ */ + + BltRect( 18, 5, 230 , 0, 24, 100, 8 ); /* */ + BltRect( 18, 50, 230 , 0, 8, 100, 8 ); /* */ + + wk = get2keta( gameflag[200 + gameflag[120] + stage_hosei], 1 ); + BltNumericImage( wk, 2, 110, 230, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( gameflag[200 + gameflag[120] + stage_hosei], 100 ); + BltNumericImage( wk, 2, 80, 230, 18, 0, 0, 10, 8 ); /* */ + wk = get2keta( gameflag[200 + gameflag[120] + stage_hosei], 10000 ); + BltNumericImage( wk, 2, 50, 230, 18, 0, 0, 10, 8 ); /* */ + + BltRect( 18, 150, 230, 0, 80, 100, 8 ); /* */ + BltNumericImage2( gameflag[300 + gameflag[120] + stage_hosei], 2, 240, 230, 18, 0, 0, 10, 8 ); /* Jump_counts */ + +// BltRect( 18, 90, 230, 0, 8, 100, 8 ); /* */ +// BltRect( 18, 5, 230, 0, 48, 100, 8 ); /* */ +// BltNumericImage( gameflag[108], 2, 150, 230, 18, 0, 0, 10, 8 ); /* 時間 */ +// BltNumericImage( gameflag[109], 2, 120, 230, 18, 0, 0, 10, 8 ); /* 時間 */ +// BltNumericImage( gameflag[110], 2, 90, 230, 18, 0, 0, 10, 8 ); /* 時間 */ + + } + + if ( gameflag[61] == 0 ) + { + Blt( 109 , -160, -120 ); + } + + //キー入力検査 + KeyInput(); + +} + + +/***************************************************************************/ +// NAME = init_save_data +// FUNCTION = セーブファイルの初期値を設定 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = なし +// RETURN = なし +/***************************************************************************/ +void title_init_save_data( void ) +{ + gameflag2[0] = 8 * 32; /* X */ + gameflag2[1] = ( 2 * 32 ) - 16; /* Y */ + if ( gameflag[126] == 1 ) + { + gameflag2[2] = 2; /* ステージ */ + } + else + { + gameflag2[2] = 1; /* ステージ */ + } + gameflag2[3] = gameflag[120]; /* 画面No */ + gameflag2[4] = 0; /* 向き */ + gameflag2[5] = 3; /* 現在HP */ + gameflag2[6] = 3; /* 最大HP */ + gameflag2[7] = 0; /* ハートのかけら所持個数 */ + gameflag2[8] = 0; /* 現在設定スキル */ + gameflag2[9] = 0; /* テレポータ使用不可、スクロール不可フラグ */ + gameflag2[10] = 0; /* テレポータ使用不可フラグ */ + + gameflag2[20] = 0; /* 時 */ + gameflag2[21] = 0; /* 分 */ + gameflag2[22] = 0; /* 秒 */ + + gameflag2[30] = 0; /* テレポーター使用 */ + gameflag2[31] = 0; /* テレポーターステージ */ + gameflag2[32] = 0; /* テレポーター画面No */ + gameflag2[33] = 0; /* テレポーターX */ + gameflag2[34] = 0; /* テレポーターY */ + + gameflag2[40] = 0; /* 取得スキル1 */ + gameflag2[41] = 0; /* 取得スキル2 */ + gameflag2[42] = 0; /* 取得スキル3 */ + gameflag2[43] = 0; /* 取得スキル4 */ + + + /* イニシャライズが必要な場合はここに記述する */ +// gameflag2[100] = ; /* イベントフラグ[100]〜[199] */ + + /* 100〜399イベント用フラグ */ + +} + +/***************************************************************************/ +// NAME = kane_set +// FUNCTION = タイトル文字の生成 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = x:初期位置 +// y:初期位置 +// RETURN = なし +/***************************************************************************/ +void title_kane_set( int x, int y ) +{ + int i; + + for ( i = 0; i < 20; i++ ) + { + if ( kane[0 + ( i * 10 )] == 0 ) + { + kane[0 + ( i * 10 )] = 1; + kane[1 + ( i * 10 )] = x; + kane[2 + ( i * 10 )] = y; + kane[4 + ( i * 10 )] = 0; + kane[3 + ( i * 10 )] = 0; + kane[5 + ( i * 10 )] = 0; + kane[6 + ( i * 10 )] = 0; + kane[7 + ( i * 10 )] = 0; + kane[8 + ( i * 10 )] = 0; + kane[9 + ( i * 10 )] = 6; + break; + } + } +} + + +/***************************************************************************/ +// NAME = kane_disp +// FUNCTION = タイトル文字の表示 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = なし +// RETURN = なし +/***************************************************************************/ +void title_kane_disp( void ) +{ + int i; + + for ( i = 0; i < 20; i++ ) + { + if ( kane[0 + ( i * 10 )] == 1 ) + { + BltRect( 7, kane[1 + ( i * 10 )], ( 0 - kane[2 + ( i * 10 )] ) + 240 - 96, 0, 64, 300, 96 ); + + title_k_jmp( i ); + } + } +} + + +/***************************************************************************/ +// NAME = k_jmp +// FUNCTION = タイトル文字のY表示位置計算 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = i:バッファ番号 +// RETURN = なし +/***************************************************************************/ +void title_k_jmp( int i ) +{ + int y1; + + + + if ( kane[6 + ( i * 10 )] == 10 ) + { + if ( kane[9 + ( i * 10 )] > 0 ) + { + kane[6 + ( i * 10 )] = kane[9 + ( i * 10 )]; + kane[9 + ( i * 10 )] = kane[9 + ( i * 10 )] - 1; + } + return; + } + + kane[5 + ( i * 10 )]++; + if ( kane[5 + ( i * 10 )] >= 10 ) + { + kane[5 + ( i * 10 )] = 0; + } + + if ( kane[5 + ( i * 10 )] == 0 ) + { + kane[6 + ( i * 10 )] = kane[6 + ( i * 10 )] - 3; + if ( ( kane[6 + ( i * 10 )] <= 2 ) && ( kane[6 + ( i * 10 )] > -2 ) ) + { + kane[6 + ( i * 10 )] = -3; + } + if ( kane[6 + ( i * 10 )] < -8 ) + { + kane[6 + ( i * 10 )] = -8; + } + /* 地面判定 */ + } + + /* 今回の位置 */ + y1 = ( ( 0 - kane[6 + ( i * 10 )] ) * ( 0 - kane[6 + ( i * 10 )] ) * ( 0 - kane[6 + ( i * 10 )] ) ); + kane[2 + ( i * 10 )] = kane[2 + ( i * 10 )] - ( y1 / 25 ); + + if ( kane[2 + ( i * 10 )] < 140 ) + { + kane[6 + ( i * 10 )] = 10; + } +} + + + +/***************************************************************************/ +// NAME = replay_file_find +// FUNCTION = リプレイファイルの検索 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = なし +// RETURN = ファイルの有無 +/***************************************************************************/ +int replay_file_find( void ) +{ + long i; + int file_j; + int stage; + + stage = 1; + if ( gameflag[126] == 1 ) + { + stage = 2; /* 裏ステージ */ + } + else + { + } + + file_j = 1; + + sprintf( string, "replay/%d/replay_data_%d.dat", ( int )stage, ( int )gameflag[120] ); + if ( LoadFile( string, &i, 1 ) ) + { + file_j = 0; + } + + return( file_j ); +} + + +/***************************************************************************/ +// NAME = replay_file_find2 +// FUNCTION = 最短ジャンプリプレイファイルの検索 +// NOTES = +// DATE = +// AUTHER = koizumi +// HISTORY = +// PARAMETER = なし +// RETURN = ファイルの有無 +/***************************************************************************/ +int replay_file_find2( void ) +{ + long i; + int file_j; + int stage; + + stage = 1; + if ( gameflag[126] == 1 ) + { + stage = 2; /* 裏ステージ */ + } + else + { + } + + file_j = 1; + sprintf( string, "replay/%d/replay_data_j%d.dat", ( int )stage, ( int )gameflag[120] ); + if ( LoadFile( string, &i, 1 ) ) + { + file_j = 0; + } + + return( file_j ); +} + + + + diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.h new file mode 100644 index 00000000..e2116d89 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.h @@ -0,0 +1,6 @@ +#ifndef __TITLE +#define __TITLE + +extern void title_main( void ); + +#endif diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.o new file mode 100644 index 00000000..69d53be2 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/title.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.c b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.c new file mode 100644 index 00000000..31d03bf3 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.c @@ -0,0 +1,366 @@ + +#include +#include +#include "include/general.h" +#include "include/util_snd.h" +#include "define.h" + +#ifdef GP2X +enum{ + SND_RATE = 44100, + SND_CHANNEL = 2, + SND_BUFFER = 128 +}; +#else +enum{ + SND_RATE = 44100, + SND_CHANNEL = 2, + SND_BUFFER = 4096 +}; +#endif + + + +static int play_bgmvol; +static int play_sevol; +static int fade_ctrl; +static int fade_vol; +static int fade_time; +static int fade_rate; +static int master_vol; + +static BOOL sound_use = FALSE; +static Mix_Chunk *chunk[SOUND_CHUNKBANK]; +static int chunkChannel[SOUND_MIXBANK]; +static Mix_Music *music[SOUND_MUSBANK]; +static Mix_Music *music_loop[SOUND_MUSBANK]; +static int musicIntor[SOUND_MUSBANK]; +static int musicLoop[SOUND_MUSBANK]; +static int musicPlayNum; +static int musicIsLoop; + +void soundInitBuffer(void) +{ + int i; + int audio_rate; + UINT16 audio_format; + int audio_channels; + int audio_buffers; + + master_vol = 100; + play_bgmvol = MIX_MAX_VOLUME; + play_sevol = MIX_MAX_VOLUME; + soundSetVolumeAll(play_bgmvol); + + if(SDL_InitSubSystem(SDL_INIT_AUDIO) < 0){ + return; + } + + audio_rate = SND_RATE; + audio_format = AUDIO_S16; + audio_channels = SND_CHANNEL; + audio_buffers = SND_BUFFER; + if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) < 0){ + sound_use = FALSE; + }else{ + sound_use = TRUE; + } + Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); + + fade_vol = 0; + fade_ctrl = 0; + musicPlayNum = -1; + musicIsLoop = 0; + + for(i = 0; i < SOUND_MUSBANK; i++){ + music[i] = NULL; + music_loop[i] = NULL; + musicIntor[i] = 0; + musicLoop[i] = 0; + } + + for(i = 0; i < SOUND_CHUNKBANK; i++){ + chunk[i] = NULL; + } + + for(i = 0; i < SOUND_MIXBANK; i++){ + chunkChannel[i] = -1; + } +} + +void soundRelease(void) +{ + int i; + + for(i = 0; i < SOUND_MUSBANK; i++){ + if(music[i]) Mix_FreeMusic(music[i]); + if(music_loop[i]) Mix_FreeMusic(music_loop[i]); + music[i] = NULL; + music_loop[i] = NULL; + } + + for(i = 0; i < SOUND_CHUNKBANK; i++){ + if(chunk[i]) Mix_FreeChunk(chunk[i]); + chunk[i] = NULL; + } + + Mix_CloseAudio(); +} + +void soundLoadBuffer(int num, UINT8 *fname, int loop) +{ + if(!music[num]){ + music[num] = Mix_LoadMUS((char *)fname); + musicIntor[num] = 0; + musicLoop[num] = loop; + } +} + +void soundLoadBuffer2(int num, UINT8 *fname1, UINT8 *fname2) +{ + if(!music[num]){ + music[num] = Mix_LoadMUS((char *)fname1); + musicIntor[num] = 1; + } + if(!music_loop[num]){ + music_loop[num] = Mix_LoadMUS((char *)fname2); + } +} + +void soundLoadBufferSE(int num, UINT8 *fname) +{ + chunk[num] = Mix_LoadWAV((char *)fname); + if(!chunk[num]){ + sound_use = FALSE; + } +} + +void soundStopBgm(int num) +{ + if(!sound_use){ + return; + } + + if(music[num]){ + fade_vol = 0; + fade_ctrl = 0; + musicPlayNum = -1; + musicIsLoop = 0; + Mix_HaltMusic(); + } +} + +void soundStopBgmPlaying(void) +{ + if(!sound_use){ + return; + } + + if(musicPlayNum != -1){ + fade_vol = 0; + fade_ctrl = 0; + musicPlayNum = -1; + musicIsLoop = 0; + Mix_HaltMusic(); + } +} + +int soundIsPlayBgm(void) +{ + if(!sound_use){ + return 0; + } + + if(Mix_PlayingMusic() == SDL_TRUE) return 1; + + return 0; +} + +void soundPlayBgm(int num) +{ + if(num < 0 || !music[num]){ + return; + } + + if(!sound_use){ + return; + } + + fade_ctrl = 0; + musicPlayNum = num; + if(musicIntor[num] == 0){ + Mix_PlayMusic(music[num], musicLoop[num]); + musicIsLoop = 0; + }else{ + Mix_PlayMusic(music[num], 1); + musicIsLoop = 2; + } + Mix_VolumeMusic(play_bgmvol * master_vol / 100); +} + +void soundPlayBgm2(int num) +{ + if(num < 0 || !music_loop[num]){ + return; + } + + if(!sound_use){ + return; + } + + Mix_PlayMusic(music_loop[num], -1); +} + +void soundLoadPlayBgm(UINT8 *fname, int loop) +{ +// soundStopBgmPlaying(); +// if(music[BGM_TEST]){ +// Mix_FreeMusic(music[BGM_TEST]); +// music[BGM_TEST] = NULL; +// } +// soundLoadBuffer(BGM_TEST, fname, -1); +// soundPlayBgm(BGM_TEST); +} + +void soundPlayFadeFlag(int flag, int time) +{ + fade_ctrl = flag; + fade_time = time; +} + +void soundPlayCtrl(void) +{ + int i; + + for(i = 0; i < SOUND_MIXBANK; i++){ + if(chunkChannel[i] != -1){ + if(Mix_Playing(i) == 0) chunkChannel[i] = -1; + } + } + + if(musicPlayNum == -1){ + return; + } + + if(musicIsLoop){ + if(musicIsLoop == 2){ + if(Mix_PlayingMusic() == SDL_TRUE) musicIsLoop--; + }else{ + if(Mix_PlayingMusic() == SDL_FALSE){ + musicIsLoop = 0; + soundPlayBgm2(musicPlayNum); + } + } + } + + if(!fade_ctrl){ + return; + } + + if(fade_ctrl == 1){ + fade_ctrl = 2; + fade_vol = play_bgmvol; + fade_rate = fade_vol / fade_time; + } + + if(fade_ctrl == 2){ + fade_time--; + if(fade_time){ + fade_vol -= fade_rate; + Mix_VolumeMusic(fade_vol * master_vol / 100); + }else{ + fade_vol = 0; + fade_ctrl = 0; + musicPlayNum = -1; + musicIsLoop = 0; + Mix_VolumeMusic(fade_vol); + } + } +} + +void soundSetVolumeMaster(int vol) +{ + master_vol = vol; +} + +void soundSetVolumeBgm(int vol, int num) +{ + play_bgmvol = vol; +} + +void soundSetVolumeAll(int vol) +{ + int i; + + vol = vol * master_vol / 100; + play_sevol = vol; + + for(i = 0; i < SOUND_CHUNKBANK; i++){ + if(chunk[i]){ + Mix_VolumeChunk(chunk[i], vol); + } + } + Mix_VolumeMusic(vol); +} +void soundSetVolumeMasterBgm(int vol) +{ + vol = play_bgmvol * vol / 100; + + Mix_VolumeMusic(vol); +} + +void soundStopSe(int num) +{ + int i; + + for(i = 0; i < SOUND_MIXBANK; i++){ + if(chunkChannel[i] == num){ + Mix_HaltChannel(i); + chunkChannel[i] = -1; + } + } +} + +void soundPlaySe(int num) +{ + int i; + int vol = play_sevol * master_vol / 100; + + if(!sound_use){ + return; + } + + soundStopSe(num); + + for(i = 0; i < SOUND_MIXBANK; i++){ + if(chunkChannel[i] == -1){ + Mix_PlayChannel(i, chunk[num], 0); + Mix_VolumeChunk(chunk[i], vol); + chunkChannel[i] = num; + return; + } + } +} + +int soundIsPlaySe(int num) +{ + int i; + + for(i = 0; i < SOUND_MIXBANK; i++){ + if(chunkChannel[i] == num){ + if(Mix_Playing(i) != 0) return 1; + } + } + + return 0; +} + +void soundStopSeAll(void) +{ + int i; + + for(i = 0; i < SOUND_MIXBANK; i++){ + chunkChannel[i] = -1; + } + Mix_HaltChannel(-1); +} diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.h b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.h new file mode 100644 index 00000000..63268248 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.h @@ -0,0 +1,33 @@ +#ifndef _UTIL_SND_ +#define _UTIL_SND_ + +enum{ + SOUND_MUSBANK = 32, + SOUND_CHUNKBANK = 32, + SOUND_MIXBANK = 8 +// SOUND_MIXBANK = 32 +}; + +extern void soundInitBuffer(void); +extern void soundRelease(void); +extern void soundLoadBuffer(Sint32 num, Uint8 *fname, int loop); +extern void soundLoadBuffer2(Sint32 num, Uint8 *fname1, Uint8 *fname2); +extern void soundLoadBufferSE(Sint32 num, Uint8 *fname); +extern void soundStopBgm(Sint32 num); +extern void soundStopBgmPlaying(void); +extern int soundIsPlayBgm(void); +extern void soundPlayBgm(Sint32 num); +extern void soundPlayFadeFlag(Sint32 flag, Sint32 time); +extern void soundPlayCtrl(void); +extern void soundSetVolumeMaster(Sint32 vol); +extern void soundSetVolumeBgm(Sint32 vol, Sint32 num); +extern void soundSetVolumeAll(Sint32 vol); +extern void soundSetVolumeMasterBgm(int vol); +extern void soundStopSe(Sint32 num); +extern void soundPlaySe(Sint32 num); +extern int soundIsPlaySe(Sint32 num); +extern void soundStopSeAll(void); + +extern Sint32 sound_buff[]; + +#endif /* _UTIL_SND_ */ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.o b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.o new file mode 100644 index 00000000..56a051d6 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Games/Champ Kaiten Patissier/util_snd.o differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Imgs/Champ Kaiten Patissier.png b/Champ Kaiten Patissier/Roms/PORTS/Imgs/Champ Kaiten Patissier.png new file mode 100644 index 00000000..ad9b4c68 Binary files /dev/null and b/Champ Kaiten Patissier/Roms/PORTS/Imgs/Champ Kaiten Patissier.png differ diff --git a/Champ Kaiten Patissier/Roms/PORTS/Shortcuts/Platform/Champ Kaiten Patissier.notfound b/Champ Kaiten Patissier/Roms/PORTS/Shortcuts/Platform/Champ Kaiten Patissier.notfound new file mode 100644 index 00000000..c0e10064 --- /dev/null +++ b/Champ Kaiten Patissier/Roms/PORTS/Shortcuts/Platform/Champ Kaiten Patissier.notfound @@ -0,0 +1,19 @@ +#!/bin/sh +# Standalone Ports Script Template + +# main configuration : +GameName="Champ Kaiten Patissier (Port)" +GameDir="Champ Kaiten Patissier" +GameExecutable="RotateGear" +GameDataFile="" + +# additional configuration +KillAudioserver=0 +PerformanceMode=0 + +# specific to this port : +Arguments="" + +# running command line : +export LD_LIBRARY_PATH="/mnt/SDCARD/Roms/PORTS/Games/Champ Kaiten Patissier/../Champ Kaiten Patissier:$LD_LIBRARY_PATH" +"/mnt/SDCARD/Emu/PORTS/launch_standalone.sh" "$GameName" "$GameDir" "$GameExecutable" "$Arguments" "$GameDataFile" "$KillAudioserver" "$PerformanceMode"