diff -u yaroid-orig/Makefile yaroid-0.2/Makefile --- yaroid-orig/Makefile Sat Dec 26 19:14:25 1998 +++ yaroid-0.2/Makefile Sat May 13 11:02:04 2000 @@ -1,5 +1,5 @@ CC = /proj/yaroze/bin/psx-gcc -CFLAGS = -O1 -g +CFLAGS = -O1 -g -DIMAGEGRAB LINKER = -Xlinker -Ttext -Xlinker 80100000 RM = rm diff -u yaroid-orig/asteroid.c yaroid-0.2/asteroid.c --- yaroid-orig/asteroid.c Sat Dec 26 19:14:25 1998 +++ yaroid-0.2/asteroid.c Sat May 13 11:02:00 2000 @@ -8,6 +8,8 @@ #define IRANDOM(x) (rand()%x) +#define IMAGEDUMP 0x80090000 + /* Global Variables */ GsOT WorldOT[2]; GsOT_TAG OTTags[2][1 << OT_LENGTH]; @@ -41,6 +43,10 @@ {37,89},{79,79},{129,53}}; signed short init_asteroids[MAX_LEVEL]={6,7,8}; +#ifdef IMAGEGRAB +RECT imageGrab; +#endif + void YInitialize(); int YTitleScreen(); u_long YReadControl(int num); @@ -215,6 +221,17 @@ while ((!YStartPress(pad)) && (!YSelectPress(pad))) { pad = YReadControl(0); +#ifdef IMAGEGRAB + if (YL1Press(pad)) + { + imageGrab.x = 0; + imageGrab.y = activeBuff ? 240 : 0; + imageGrab.w = 320; + imageGrab.h = 240; + StoreImage(&imageGrab, (u_long *)IMAGEDUMP); + DrawSync(0); + } +#endif } if (YSelectPress(pad)) { @@ -413,6 +430,17 @@ shots[i].range[1]=shot_range[player.spinfo.picnum][1]; } } +#ifdef IMAGEGRAB + if (YL1Press(padd)) + { + imageGrab.x = 0; + imageGrab.y = activeBuff ? 240 : 0; + imageGrab.w = 320; + imageGrab.h = 240; + StoreImage(&imageGrab, (u_long *)IMAGEDUMP); + DrawSync(0); + } +#endif } void dead_player() diff -u yaroid-orig/pad.h yaroid-0.2/pad.h --- yaroid-orig/pad.h Sat Dec 26 19:14:26 1998 +++ yaroid-0.2/pad.h Sat May 13 11:02:00 2000 @@ -11,19 +11,19 @@ #define YXHeld(x) (x & (1 << 6)) #define YSquareHeld(x) (x & (1 << 7)) #define YCircleHeld(x) (x & (1 << 5)) -#define YTriaglePress(x) ((x & (1 << 4)) && (!(x & (1 << 20)))) +#define YTrianglePress(x) ((x & (1 << 4)) && (!(x & (1 << 20)))) #define YXPress(x) ((x & (1 << 6)) && (!(x & (1 << 22)))) #define YSquarePress(x) ((x & (1 << 7)) && (!(x & (1 << 23)))) #define YCirclePress(x) ((x & (1 << 5)) && (!(x & (1 << 21)))) -#define YL1Held(x) (x & (1 << 1)) +#define YL1Held(x) (x & (1 << 2)) #define YL2Held(x) (x & (1 << 0)) #define YR1Held(x) (x & (1 << 3)) -#define YR2Held(x) (x & (1 << 2)) -#define YL1Press(x) ((x & (1 << 1)) && (!(x & (1 << 17)))) +#define YR2Held(x) (x & (1 << 1)) +#define YL1Press(x) ((x & (1 << 2)) && (!(x & (1 << 18)))) #define YL2Press(x) ((x & (1 << 0)) && (!(x & (1 << 16)))) #define YR1Press(x) ((x & (1 << 3)) && (!(x & (1 << 19)))) -#define YR2Press(x) ((x & (1 << 2)) && (!(x & (1 << 18)))) +#define YR2Press(x) ((x & (1 << 1)) && (!(x & (1 << 17)))) #define YSelectHeld(x) (x & (1 << 8)) #define YStartHeld(x) (x & (1 << 11))