renderers (interlace and stuff)
[picodrive.git] / platform / uiq2 / launcher / Engine.h
1 /*******************************************************************\r
2  *\r
3  *      File:           Engine.h\r
4  *\r
5  *      Author:         Peter van Sebille (peter@yipton.net)\r
6  *\r
7  *  Modified/adapted for picodriveN by notaz, 2006\r
8  *\r
9  *  (c) Copyright 2006, notaz\r
10  *      (c) Copyright 2002, Peter van Sebille\r
11  *      All Rights Reserved\r
12  *\r
13  *******************************************************************/\r
14 \r
15 #ifndef __ENGINE_H\r
16 #define __ENGINE_H\r
17 \r
18 #include <e32base.h>\r
19 #include <etel.h>\r
20 \r
21 #include "../ClientServer.h"\r
22 \r
23 class RFs;\r
24 \r
25 #ifdef __DEBUG_PRINT\r
26         #define DEBUGPRINT(x...) RDebug::Print(x)\r
27 #else\r
28         #define DEBUGPRINT(x...)\r
29 #endif\r
30 \r
31 \r
32 class MGameWatcher\r
33 {\r
34 public:\r
35         virtual void NotifyEmuDeath() = 0;\r
36         virtual void NotifyForcedExit() = 0;\r
37 };\r
38 \r
39 \r
40 class CGameRunner : public CActive\r
41 {\r
42 public:\r
43         static CGameRunner* NewL(MGameWatcher& aGameWatcher);\r
44         ~CGameRunner();\r
45 \r
46         void KillAfter(TInt ms);\r
47 \r
48 protected:\r
49         CGameRunner(MGameWatcher& aGameWatcher);\r
50         void ConstructL();\r
51 \r
52         virtual void RunL();\r
53         virtual void DoCancel();\r
54 \r
55         MGameWatcher&           iGameWatcher;\r
56         TProcessId                      iProcessId;\r
57 };\r
58 \r
59 \r
60 class CExitForcer : public CActive\r
61 {\r
62 public:\r
63         static CExitForcer* NewL(MGameWatcher& aGameWatcher, TInt ms);\r
64         ~CExitForcer();\r
65 \r
66 protected:\r
67         CExitForcer(MGameWatcher& aGameWatcher);\r
68         void ConstructL(TInt ms);\r
69 \r
70         virtual void RunL();\r
71         virtual void DoCancel();\r
72 \r
73         MGameWatcher&           iGameWatcher;\r
74         RTimer                          iTimer;\r
75 };\r
76 \r
77 \r
78 class CThreadWatcher : public CActive\r
79 {\r
80 public:\r
81         static CThreadWatcher* NewL(MGameWatcher& aGameWatcher, const TDesC& aName);\r
82         ~CThreadWatcher();\r
83 \r
84 protected:\r
85         CThreadWatcher(MGameWatcher& aGameWatcher, const TDesC& aName);\r
86         void ConstructL();\r
87 \r
88         virtual void RunL();\r
89         virtual void DoCancel();\r
90 \r
91         MGameWatcher&           iGameWatcher;\r
92         const TDesC&            iName; // thread name\r
93 };\r
94 \r
95 \r
96 // configuration emu process doesn't care about\r
97 class TPLauncherConfig {\r
98 public:\r
99         TPLauncherConfig(TPicoConfig &cfg);\r
100         void Load();\r
101         void Save();\r
102 \r
103         TBool                   iPad; // was iPauseOnCall\r
104         TFileName               iLastROMFile;\r
105         TPicoConfig             &iEmuConfig;\r
106 \r
107 private:\r
108         TFileName               iIniFileName;\r
109 };\r
110 \r
111 \r
112 #endif\r