// FSnap 1_0.h // James Rutherford - The Hex Heroes // Web: http://www.netyaroze-europe.com/~mrfrosty/ // http://members.xoom.com/mrfrosty/ // E-Mail: hexheroes@writeme.com // TO BE DISTRIBUTED WITHIN THE NET YAROZE COMMUNITY ONLY! // If you find this useful or have problems / suggestions, mail me. // Started: 12th December 1998 // Latest: 13th December 1998 // This should make taking polaroids of your game a doddle. // The data will be stored in TIM format. // - Use TimUtil to develop them... // How to use the snapshot routines... // Use FSnapshotDISPENV(...) anywhere in your code to snapshot the current // display into your storage address. // - Pointer addresses should be of the form: (u_long *) 0x80090000. // - Absolute addresses should be of the form: (u_long) 0x80090000. // FSnapshotDRAWENV(...) snapshots the state of the specified drawing // environment. // FSnapshotFrameBuffer(...) snaps a specified section of the frame buffer. // After exiting your Playstation program, from SIOCONS type: // [F10][F4] filename.tim address filesize // according to the values given to you. // When choosing [address], take care not to overwrite anything too valuable. // Also remember to keep SIOCONS running when you make your snapshot. // When using FSnapshotFrameBuffer, ensure your area is valid // within [0,0 - 1023,511]. #ifndef _fsnapshot_h #define _fsnapshot_h #define _fsnapshot_1_0 #ifndef _LIBPS_H_ #include #endif // MACROS #define FSnapshotBytes(w,h) ( (w*h*2 + 20) ) // FUNCTION PROTOTYPES // (u_long) return value is the TIM size in bytes. // > Pointer calls u_long FSnapshotDISPENVp(u_long *address); u_long FSnapshotDRAWENVp(u_long *address, DRAWENV *drawenv); u_long FSnapshotFRAMEBUFFERp(u_long *address, u_short x, u_short y, u_short w, u_short h); // > Absolute calls u_long FSnapshotDISPENV(u_long address); u_long FSnapshotDRAWENV(u_long address, DRAWENV *drawenv); u_long FSnapshotFRAMEBUFFER(u_long address, u_short x, u_short y, u_short w, u_short h); #endif