annotate OSAPI.cpp @ 1952:4ed7d18abe93

pActorBuffs[8] to pActorBuffs[ACTOR_BUFF_SOMETHING_THAT_HALVES_AC]
author Grumpy7
date Fri, 25 Oct 2013 11:14:32 -0700
parents 3eb0c4f3d899
children f9698295c0bd
rev   line source
0
Ritor1
parents:
diff changeset
1 #include "OSAPI.h"
Ritor1
parents:
diff changeset
2 #include "OSInfo.h"
Ritor1
parents:
diff changeset
3 #include "Log.h"
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6 OSVersion *pVersion = nullptr;
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8
1926
3eb0c4f3d899 Woops, debug stuff.
Nomad
parents: 1924
diff changeset
9
1038
39f42990698f Cleanings
Nomad
parents: 28
diff changeset
10
0
Ritor1
parents:
diff changeset
11 //----- (00462C94) --------------------------------------------------------
Ritor1
parents:
diff changeset
12 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
Ritor1
parents:
diff changeset
13 {
Ritor1
parents:
diff changeset
14 Log::Initialize();
Ritor1
parents:
diff changeset
15
Ritor1
parents:
diff changeset
16 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
Ritor1
parents:
diff changeset
17 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
Ritor1
parents:
diff changeset
18 {
Ritor1
parents:
diff changeset
19 if (IsIconic(hMM7Window))
Ritor1
parents:
diff changeset
20 ShowWindow(hMM7Window, SW_RESTORE);
Ritor1
parents:
diff changeset
21 SetForegroundWindow(GetLastActivePopup(hMM7Window));
Ritor1
parents:
diff changeset
22 return 0;
Ritor1
parents:
diff changeset
23 }
Ritor1
parents:
diff changeset
24 HWND hPrevWindow = GetActiveWindow();
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26 pVersion = new OSVersion;
Ritor1
parents:
diff changeset
27 {
Ritor1
parents:
diff changeset
28 Log::Warning(L"OS init: ok");
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30 extern bool MM_Main(const wchar_t *pCmdLine);
Ritor1
parents:
diff changeset
31 MM_Main(lpCmdLine);
Ritor1
parents:
diff changeset
32 }
Ritor1
parents:
diff changeset
33 delete pVersion;
Ritor1
parents:
diff changeset
34 pVersion = nullptr;
Ritor1
parents:
diff changeset
35
Ritor1
parents:
diff changeset
36 if (hPrevWindow)
Ritor1
parents:
diff changeset
37 SetActiveWindow(hPrevWindow);
Ritor1
parents:
diff changeset
38
28
739d8f3b50f9 ReleaseSoundData fix
zipi@zipi-PC
parents: 0
diff changeset
39 //__debugbreak();
0
Ritor1
parents:
diff changeset
40 return 0;
Ritor1
parents:
diff changeset
41 }
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
42
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
43
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
44
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
45
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
46 void MsgBox(const wchar_t *msg, const wchar_t *title)
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
47 {
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
48 MessageBoxW(nullptr, msg, title, 0);
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
49 }