ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSVC/Daodan_Win32.c
(Generate patch)

Comparing Daodan/MSVC/Daodan_Win32.c (file contents):
Revision 567 by gumby, Fri Jun 25 03:52:34 2010 UTC vs.
Revision 569 by gumby, Wed Jul 14 07:35:40 2010 UTC

# Line 6 | Line 6
6   #include "BFW_Utility.h"
7  
8   #include "Oni.h"
9 <
9 > extern HWND onihwnd;
10   short ONICALL DDrPlatform_Initialize(ONtPlatformData *PlatformData)
11   {
12          WNDCLASSEX WndClass;
13          RECT Rect;
14          const int Width = 640, Height = 480;
15 +        HINSTANCE temp_Instance = PlatformData->Instance;
16  
17          PlatformData->Instance = g_Instance;
18  
# Line 21 | Line 22 | short ONICALL DDrPlatform_Initialize(ONt
22          WndClass.cbWndExtra = 0;
23          WndClass.hInstance = PlatformData->Instance;
24          WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
25 <        WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
26 <        WndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
25 >        WndClass.hIcon = LoadIcon(g_Instance, MAKEINTRESOURCE(103) );
26 >        WndClass.hIconSm = LoadIcon(g_Instance, MAKEINTRESOURCE(103));
27          WndClass.hbrBackground = GetStockObject(BLACK_BRUSH);
28          WndClass.lpszMenuName = NULL;
29          WndClass.lpszClassName = "ONI ";
# Line 35 | Line 36 | short ONICALL DDrPlatform_Initialize(ONt
36          Rect.right = Rect.left + Width;
37          Rect.bottom = Rect.top + Height;
38          AdjustWindowRect(&Rect, WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP | WS_TILEDWINDOW , FALSE);
39 <        PlatformData->Window = CreateWindowEx(0, "ONI ", "ONI ", WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP | WS_OVERLAPPED, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, NULL, NULL, PlatformData->Instance, NULL);
40 <        
39 >        PlatformData->Window = CreateWindowEx(0, "ONI ", "ONI ",  WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP | WS_TILEDWINDOW, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, NULL, NULL, PlatformData->Instance, NULL);
40 >        onihwnd = PlatformData->Window;
41          ShowWindow(PlatformData->Window, SW_SHOWNORMAL);
42          UpdateWindow(PlatformData->Window);
43  
# Line 44 | Line 45 | short ONICALL DDrPlatform_Initialize(ONt
45          
46          // I dont know why this is needed but Oni doesn't init without it.
47          ONgPlatformData.Window = PlatformData->Window;
48 <        //ONgPlatformData.Instance = PlatformData->Instance;
48 >        ONgPlatformData.Instance = PlatformData->Instance;
49          
50          return 0;
51   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)