| 1 | #ifndef _GIT_H |
| 2 | #define _GIT_H |
| 3 | |
| 4 | #include "mednafen-types.h" |
| 5 | #include "state.h" |
| 6 | #include "video.h" |
| 7 | |
| 8 | enum |
| 9 | { |
| 10 | MDFN_ROTATE0 = 0, |
| 11 | MDFN_ROTATE90, |
| 12 | MDFN_ROTATE180, |
| 13 | MDFN_ROTATE270 |
| 14 | }; |
| 15 | |
| 16 | struct MemoryPatch; |
| 17 | |
| 18 | struct CheatFormatStruct |
| 19 | { |
| 20 | const char *FullName; //"Game Genie", "GameShark", "Pro Action Catplay", etc. |
| 21 | const char *Description; // Whatever? |
| 22 | }; |
| 23 | |
| 24 | struct CheatFormatInfoStruct |
| 25 | { |
| 26 | unsigned NumFormats; |
| 27 | |
| 28 | struct CheatFormatStruct *Formats; |
| 29 | }; |
| 30 | |
| 31 | // Miscellaneous system/simple commands(power, reset, dip switch toggles, coin insert, etc.) |
| 32 | // (for DoSimpleCommand() ) |
| 33 | enum |
| 34 | { |
| 35 | MDFN_MSC_RESET = 0x01, |
| 36 | MDFN_MSC_POWER = 0x02, |
| 37 | |
| 38 | MDFN_MSC__LAST = 0x3F // WARNING: Increasing(or having the enum'd value of a command greater than this :b) this will necessitate a change to the netplay protocol. |
| 39 | }; |
| 40 | |
| 41 | typedef struct |
| 42 | { |
| 43 | // Pitch(32-bit) must be equal to width and >= the "fb_width" specified in the MDFNGI struct for the emulated system. |
| 44 | // Height must be >= to the "fb_height" specified in the MDFNGI struct for the emulated system. |
| 45 | // The framebuffer pointed to by surface->pixels is written to by the system emulation code. |
| 46 | MDFN_Surface *surface; |
| 47 | |
| 48 | // Set by the system emulation code every frame, to denote the horizontal and vertical offsets of the image, and the size |
| 49 | // of the image. If the emulated system sets the elements of LineWidths, then the horizontal offset(x) and width(w) of this structure |
| 50 | // are ignored while drawing the image. |
| 51 | MDFN_Rect DisplayRect; |
| 52 | |
| 53 | // Skip rendering this frame if true. Set by the driver code. |
| 54 | int skip; |
| 55 | |
| 56 | // Number of frames currently in internal sound buffer. Set by the system emulation code, to be read by the driver code. |
| 57 | int32 SoundBufSize; |
| 58 | } EmulateSpecStruct; |
| 59 | |
| 60 | #ifdef __cplusplus |
| 61 | extern "C" { |
| 62 | #endif |
| 63 | int StateAction(StateMem *sm, int load, int data_only); |
| 64 | #ifdef __cplusplus |
| 65 | } |
| 66 | #endif |
| 67 | |
| 68 | #endif |