| 727 | char Editor_quickplay_levelname[_MAX_PATH]; |
| 728 | |
| 729 | void EditorToGame() { |
| 730 | Disable_editor_rendering = true; |
| 731 | |
| 732 | // Hide Dallas (if it's running) so it doesn't get any keypresses |
| 733 | if (theApp.m_DallasModelessDlgPtr != NULL) |
| 734 | theApp.m_DallasModelessDlgPtr->ShowWindow(SW_HIDE); |
| 735 | |
| 736 | /* Create a new window and display it. Initialize a new GameOS Object and use this |
| 737 | for our game |
| 738 | */ |
| 739 | tLnxAppInfo app_info; |
| 740 | bool paged = true; |
| 741 | char subsystem[8]; |
| 742 | ddio_init_info io_info; |
| 743 | |
| 744 | // Save the sky in case it gets changed |
| 745 | int dome_bm = GetTextureBitmap(Terrain_sky.dome_texture, 0); |
| 746 | if (bm_w(dome_bm, 0) == 256) { |
| 747 | Save_sky_data = (uint16_t *)mem_malloc(256 * 256 * 2); |
| 748 | ASSERT(Save_sky_data); |
| 749 | |
| 750 | uint16_t *src_data = bm_data(dome_bm, 0); |
| 751 | memcpy(Save_sky_data, src_data, 256 * 256 * 2); |
| 752 | } |
| 753 | |
| 754 | /* We have to reinitialize the DDGR system for full screen mode. |
| 755 | This will annihilate all previous DDGR settings. |
| 756 | */ |
| 757 | |
| 758 | // theApp.main_frame->ShowWindow(SW_SHOWMINNOACTIVE); |
| 759 | |
| 760 | // set game working directory |
| 761 | bool set_size = false; |
| 762 | ddio_GetWorkingDir(Editor_dir, sizeof(Editor_dir)); |
| 763 | ddio_SetWorkingDir(Base_directory); |
| 764 | |
| 765 | Osiris_ResetAllTimers(); |
| 766 | |
| 767 | // continue |
| 768 | SlewStop(Viewer_object); |
| 769 | |
| 770 | // Save the player positions |
| 771 | FindPlayerStarts(); |
| 772 | |
| 773 | // Save the level to restore when go back to editor |
| 774 | mprintf(0, "Make temp copy of level..."); |
| 775 | SaveLevel("GameSave.D3L"); |
| 776 | mprintf(0, "done\n"); |
| 777 | Temp_level_saved = 1; // say that we have a level saved |
| 778 | |
| 779 | // Save the viewer position for the game to use |
| 780 | editor_player_pos = Viewer_object->pos; |
| 781 | editor_player_orient = Viewer_object->orient; |
| 782 | editor_player_roomnum = Viewer_object->roomnum; |
| 783 | |
| 784 | // Set up the player |
| 785 | SetObjectControlType(Player_object, CT_FLYING); // don't think we really need this |
| 786 | Viewer_object = Player_object; |
no test coverage detected