X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fuiq3%2FEngine.h;fp=platform%2Fuiq3%2FEngine.h;h=0000000000000000000000000000000000000000;hb=fb7a7fea8735400818773dd47f1e6913bd1ceecf;hp=e0a3afe751555fddacc97c070875658d3abc4ff4;hpb=1b85bf1c2307c548a637f988eb69f615864f1685;p=picodrive.git diff --git a/platform/uiq3/Engine.h b/platform/uiq3/Engine.h deleted file mode 100644 index e0a3afe..0000000 --- a/platform/uiq3/Engine.h +++ /dev/null @@ -1,143 +0,0 @@ -/******************************************************************* - * - * File: Engine.h - * - * Author: Peter van Sebille (peter@yipton.net) - * - * Modified/adapted for picodriveN by notaz, 2006 - * - * (c) Copyright 2006, notaz - * (c) Copyright 2002, Peter van Sebille - * All Rights Reserved - * - *******************************************************************/ - -#ifndef __ENGINE_H -#define __ENGINE_H - -#include - -class RReadStream; -class RWriteStream; - - -// engine states -enum TPicoGameState { - PGS_Running = 1, - PGS_Paused, - PGS_Quit, - PGS_KeyConfig, - PGS_ReloadRom, - PGS_Reset, -}; - -enum TPicoServRqst { - PicoMsgLoadState, - PicoMsgSaveState, - PicoMsgLoadROM, - PicoMsgResume, - PicoMsgReset, - PicoMsgKeys, - PicoMsgPause, - PicoMsgQuit, - PicoMsgConfigChange, - PicoMsgSetAppView, - kDefaultMessageSlots // this is how many messages we need :) -}; - -enum TPicoGenErrors { // generic errors - PicoErrNoErr = 0, // OK - PicoErrRomOpenFailed, - PicoErrOutOfMem, - PicoErrOutOfMemSnd, - PicoErrGenSnd, // generic sound system error - PicoErrEmuThread -}; - - -// needed for creating server thread. -const TUint KPicoMaxHeapSize=0x00800000; - -// key config entry (touchpad areas) -struct TPicoAreaConfigEntry { - TRect rect; - //unsigned long actions; -}; - -struct TPicoKeyConfigEntry -{ - unsigned short keyCode; - unsigned char scanCode; - unsigned char flags; // lsb->msb: key_down, pulse_only, ?, ?, ?, ?, not_configurable, disabled - TInt32 handle1; // for CancelCaptureKeyUpAndDowns() - TInt32 handle2; // for CancelCaptureKey() - char *name; -}; - - -// configuration data -class TPicoConfig -{ -public: -// void SetDefaults(); -// void InternalizeL(RReadStream &aStream); -// void ExternalizeL(RWriteStream &aStream) const; - - enum TPicoScreenRotation { - PRot0, - PRot90, - PRot180, - PRot270 - }; - enum TPicoScreenMode { - PMCenter, - PMFit, - PMFit2 - }; - enum TPicoFrameSkip { - PFSkipAuto = -1, - PFSkip0 - }; - -public: - TFileName iLastROMFile; // used as tmp only -}; - - -class CThreadWatcher : public CActive -{ -public: - static CThreadWatcher* NewL(const TThreadId& aTid); - ~CThreadWatcher(); - - TThreadId iTid; // thread id - -protected: - CThreadWatcher(const TThreadId& aTid); - void ConstructL(); - - virtual void RunL(); - virtual void DoCancel(); -}; - - -class CPicoGameSession -{ -public: - static TInt Do(const TPicoServRqst what, TAny *param=0); - static void freeResources(); - - static TBool iEmuRunning; - static TBuf<150> iRomInternalName; - -private: - // services available - static TInt StartEmuThread(); - static TInt ChangeRunState(TPicoGameState newstate, TPicoGameState newstate_next=(TPicoGameState)0); - static TInt loadROM(TPtrC16 *pptr); - static TInt changeConfig(TPicoConfig *aConfig); - - static CThreadWatcher *iThreadWatcher; -}; - -#endif