Niotso  git revision 558726a9f13d7c3423a683dd2f4323589b66c310
The New Implementation of The Sims Online
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
System.hpp
Go to the documentation of this file.
1 /*
2  Niotso - The New Implementation of The Sims Online
3  System/System.hpp
4  Copyright (c) 2012 Niotso Project <http://niotso.org/>
5  Author(s): Fatbag <X-Fi6@phppoll.org>
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 namespace System {
22  int Initialize();
23  void Shutdown();
24 
25  extern HINSTANCE hInst;
26  extern LARGE_INTEGER ClockFreq;
27  extern volatile float FramePeriod;
28 
29  struct UserInput_t {
30  bool Keys[256];
31  bool MouseDown;
33  };
34  extern UserInput_t UserInput;
35  extern volatile UserInput_t UserInput_v;
36 
37  extern bool SceneFailed;
38 
39  //Constants
40  enum {
42  };
43 }
44 
45 /****
46 ** Program exit codes
47 ** (Return 0 for success)
48 */
49 
50 #define ERROR_INIT 0x1000
51 #define ERROR_INIT_ANOTHERINSTRUNNING 0x1001
52 
53 //Engine errors
54 //Use: return ERROR_INIT | result;
55 #define ERROR_INIT_WINDOW 0x0100
56  enum {
63  };
64 #define ERROR_INIT_SYSTEM 0x0200
65  enum {
68  };
69 #define ERROR_INIT_GRAPHICS 0x0300
70  enum {
77  };
78 #define ERROR_INIT_AUDIO 0x0400
79  enum {
83  };
84 #define ERROR_INIT_LOGIC 0x0500
85  enum {
87  };