Mercurial > vba-clojure
view src/common/System.h @ 42:6f145876d887
remove useless shell scripts
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 06 Mar 2012 14:27:20 -0600 |
parents | f9f4f1b99eed |
children | 1ff2c546f5ad |
line wrap: on
line source
1 #ifndef VBA_SYSTEM_H2 #define VBA_SYSTEM_H4 #if _MSC_VER > 10005 #pragma once6 #endif // _MSC_VER > 10008 #include "zlib.h"9 #include "../Port.h"11 // c++ lacks a way to implement Smart Referrences or Delphi-Style Properties12 // in order to maintain consistency, value-copied things should not be modified too often13 struct EmulatedSystem14 {15 // main emulation function16 void (*emuMain)(int);17 // reset emulator18 void (*emuReset)(bool);19 // clean up memory20 void (*emuCleanUp)();21 // load battery file22 bool (*emuReadBattery)(const char *);23 // write battery file24 bool (*emuWriteBattery)(const char *);25 // load battery file from stream26 bool (*emuReadBatteryFromStream)(gzFile);27 // write battery file to stream28 bool (*emuWriteBatteryToStream)(gzFile);29 // load state30 bool (*emuReadState)(const char *);31 // save state32 bool (*emuWriteState)(const char *);33 // load state from stream34 bool (*emuReadStateFromStream)(gzFile);35 // save state to stream36 bool (*emuWriteStateToStream)(gzFile);37 // load memory state (rewind)38 bool (*emuReadMemState)(char *, int);39 // write memory state (rewind)40 bool (*emuWriteMemState)(char *, int);41 // write PNG file42 bool (*emuWritePNG)(const char *);43 // write BMP file44 bool (*emuWriteBMP)(const char *);45 // emulator update CPSR (ARM only)46 void (*emuUpdateCPSR)();47 // emulator has debugger48 bool emuHasDebugger;49 // clock ticks to emulate50 int emuCount;51 };53 // why not convert the value type only when doing I/O?54 struct EmulatedSystemCounters55 {56 int32 frameCount;57 int32 lagCount;58 int32 extraCount;59 bool8 lagged;60 bool8 laggedLast;61 };63 extern struct EmulatedSystem theEmulator;64 extern struct EmulatedSystemCounters systemCounters;66 extern void log(const char *, ...);68 extern void systemGbPrint(u8 *, int, int, int, int);69 extern int systemScreenCapture(int);70 extern void systemRefreshScreen();71 extern void systemRenderFrame();72 extern void systemRedrawScreen();73 extern void systemUpdateListeners();74 // updates the joystick data75 extern void systemSetSensorX(int32);76 extern void systemSetSensorY(int32);77 extern void systemResetSensor();78 extern int32 systemGetSensorX();79 extern int32 systemGetSensorY();80 extern void systemUpdateMotionSensor(int);81 extern int systemGetDefaultJoypad();82 extern void systemSetDefaultJoypad(int);83 extern bool systemReadJoypads();84 // return information about the given joystick, -1 for default joystick... the bool is for if motion sensor should be handled85 // too86 extern u32 systemGetOriginalJoypad(int, bool);87 extern u32 systemGetJoypad(int, bool);88 extern void systemSetJoypad(int, u32);89 extern void systemClearJoypads();90 extern void systemMessage(int, const char *, ...);91 extern void systemScreenMessage(const char *msg, int slot = 0, int duration = 3000, const char *colorList = NULL);92 extern bool systemSoundInit();93 extern void systemSoundShutdown();94 extern void systemSoundPause();95 extern void systemSoundResume();96 extern bool systemSoundIsPaused();97 extern void systemSoundReset();98 extern void systemSoundWriteToBuffer();99 extern void systemSoundClearBuffer();100 extern bool systemSoundCanChangeQuality();101 extern bool systemSoundSetQuality(int quality);102 extern u32 systemGetClock();103 extern void systemSetTitle(const char *);104 extern void systemShowSpeed(int);105 extern void systemIncreaseThrottle();106 extern void systemDecreaseThrottle();107 extern void systemSetThrottle(int);108 extern int systemGetThrottle();109 extern void systemFrame();110 extern int systemFramesToSkip();111 extern bool systemIsEmulating();112 extern void systemGbBorderOn();113 extern bool systemIsRunningGBA();114 extern bool systemIsSpedUp();115 extern bool systemIsPaused();116 extern void systemSetPause(bool pause);117 extern bool systemPauseOnFrame();119 extern int systemCartridgeType;120 extern int systemSpeed;121 extern bool systemSoundOn;122 extern u16 systemColorMap16[0x10000];123 extern u32 systemColorMap32[0x10000];124 extern u16 systemGbPalette[24];125 extern int systemRedShift;126 extern int systemGreenShift;127 extern int systemBlueShift;128 extern int systemColorDepth;129 extern int systemDebug;130 extern int systemVerbose;131 extern int systemFrameSkip;132 extern int systemSaveUpdateCounter;134 #define SYSTEM_SAVE_UPDATED 30135 #define SYSTEM_SAVE_NOT_UPDATED 0137 #endif // VBA_SYSTEM_H