Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 749 vs 768 for /trunk/Source Code/engineMain.h

Diff revisions: vs.
  @@ -32,12 +32,35 @@
32 32 #ifndef _ENGINE_MAIN_HEADER_
33 33 #define _ENGINE_MAIN_HEADER_
34 34
35 - namespace Divide {
35 + #if defined(_WIN32)
36 36 #pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
37 + #endif
38 +
39 + namespace Divide {
40 +
41 + class Application;
42 + class StreamBuffer;
43 + class Engine {
44 + public:
45 + Engine();
46 + ~Engine();
37 47
38 - extern int engineMain(int argc, char **argv);
39 - extern bool initStaticData();
40 - extern bool destroyStaticData();
48 + // see the ErrorCode enum in Application.h for the returned value
49 + bool init(int argc, char **argv);
50 + void shutdown();
51 + bool step();
52 +
53 + int errorCode() const;
54 +
55 + private:
56 + Engine(const Engine&) = delete;
57 + Engine& operator=(const Engine&) = delete;
58 +
59 + private:
60 + Application& _app;
61 + int _errorCode;
62 + StreamBuffer* _outputStreams[2];
63 + };
41 64
42 65 };
43 66