-------------------------------------------------------------------------*/
| 526 | } |
| 527 | /*-------------------------------------------------------------------------*/ |
| 528 | void |
| 529 | register_command_window_class() |
| 530 | { |
| 531 | WNDCLASS wcex; |
| 532 | PNHCmdLayout plt; |
| 533 | ZeroMemory(&wcex, sizeof(wcex)); |
| 534 | |
| 535 | /* window class */ |
| 536 | wcex.style = CS_NOCLOSE; |
| 537 | wcex.lpfnWndProc = (WNDPROC) NHCommandWndProc; |
| 538 | wcex.cbClsExtra = 0; |
| 539 | wcex.cbWndExtra = 0; |
| 540 | wcex.hInstance = GetNHApp()->hApp; |
| 541 | wcex.hIcon = NULL; |
| 542 | wcex.hCursor = LoadCursor(NULL, IDC_ARROW); |
| 543 | wcex.hbrBackground = mswin_get_brush(NHW_KEYPAD, MSWIN_COLOR_BG); |
| 544 | wcex.lpszMenuName = NULL; |
| 545 | wcex.lpszClassName = szNHCmdWindowClass; |
| 546 | |
| 547 | if (!RegisterClass(&wcex)) { |
| 548 | panic("cannot register Map window class"); |
| 549 | } |
| 550 | |
| 551 | /* create default command set */ |
| 552 | nhcmdset_current = nhcmdset_default = nhcmdset_create(); |
| 553 | |
| 554 | #ifdef WIN_CE_SMARTPHONE |
| 555 | plt = nhcmdlayout_create("General", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 556 | nhcmdlayout_init(plt, cells_layout_general); |
| 557 | nhcmdset_add(nhcmdset_current, plt); |
| 558 | |
| 559 | plt = nhcmdlayout_create("Movement", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 560 | nhcmdlayout_init(plt, cells_layout_movement); |
| 561 | nhcmdset_add(nhcmdset_current, plt); |
| 562 | |
| 563 | plt = nhcmdlayout_create("Attack", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 564 | nhcmdlayout_init(plt, cells_layout_attack); |
| 565 | nhcmdset_add(nhcmdset_current, plt); |
| 566 | |
| 567 | plt = nhcmdlayout_create("Item Handling", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 568 | nhcmdlayout_init(plt, cells_layout_item_handling); |
| 569 | nhcmdset_add(nhcmdset_current, plt); |
| 570 | |
| 571 | plt = nhcmdlayout_create("Game Controls", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 572 | nhcmdlayout_init(plt, cells_layout_game); |
| 573 | nhcmdset_add(nhcmdset_current, plt); |
| 574 | |
| 575 | plt = nhcmdlayout_create("Advanced Movement", NH_CMDPAD_ROWS, |
| 576 | NH_CMDPAD_COLS); |
| 577 | nhcmdlayout_init(plt, cells_layout_adv_movement); |
| 578 | nhcmdset_add(nhcmdset_current, plt); |
| 579 | |
| 580 | plt = nhcmdlayout_create("Item Lookup", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); |
| 581 | nhcmdlayout_init(plt, cells_layout_lookup); |
| 582 | nhcmdset_add(nhcmdset_current, plt); |
| 583 | |
| 584 | if (wizard) { |
| 585 | plt = |
no test coverage detected