2375 } |
2374 } |
2376 |
2375 |
2377 width = _screen.width; |
2376 width = _screen.width; |
2378 height = _screen.height; |
2377 height = _screen.height; |
2379 |
2378 |
|
2379 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
|
2380 AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), 0); |
|
2381 |
2380 // XXX: these are not done |
2382 // XXX: these are not done |
2381 switch (_game_mode) { |
2383 switch (_game_mode) { |
2382 case GM_MENU: |
2384 default: NOT_REACHED(); |
2383 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
2385 case GM_MENU: |
2384 AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), 0); |
2386 ShowSelectGameWindow(); |
2385 ShowSelectGameWindow(); |
2387 break; |
2386 break; |
2388 |
2387 case GM_NORMAL: |
2389 case GM_NORMAL: |
2388 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
2390 case GM_EDITOR: |
2389 AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), 0); |
2391 ShowVitalWindows(); |
2390 |
2392 break; |
2391 ShowVitalWindows(); |
|
2392 |
|
2393 /* Bring joining GUI to front till the client is really joined */ |
|
2394 if (_networking && !_network_server) |
|
2395 ShowJoinStatusWindowAfterJoin(); |
|
2396 |
|
2397 break; |
|
2398 case GM_EDITOR: |
|
2399 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
|
2400 AssignWindowViewport(w, 0, 0, width, height, 0, 0); |
|
2401 |
|
2402 ShowVitalWindows(); |
|
2403 break; |
|
2404 default: |
|
2405 NOT_REACHED(); |
|
2406 } |
2393 } |
2407 } |
2394 } |
2408 |
2395 |
2409 void ShowVitalWindows(void) |
2396 void ShowVitalWindows(void) |
2410 { |
2397 { |