Create a new mine with one segment
| 446 | |
| 447 | // Create a new mine with one segment |
| 448 | void CreateNewMine() { |
| 449 | // Get rid of old mine |
| 450 | FreeAllRooms(); |
| 451 | FreeAllObjects(); |
| 452 | |
| 453 | // Create a new room |
| 454 | Curroomp = CreateDefaultRoom(); |
| 455 | ASSERT(Curroomp != NULL); |
| 456 | |
| 457 | // Reset misc. vars |
| 458 | Curface = Curedge = Curvert = 0; |
| 459 | Curportal = -1; |
| 460 | |
| 461 | // Say that this is a new mine |
| 462 | New_mine = 1; |
| 463 | |
| 464 | // Reset the view position, etc. for the wireframe view |
| 465 | ResetWireframeView(); |
| 466 | |
| 467 | // Reintialize the objects |
| 468 | ResetObjectList(); |
| 469 | |
| 470 | // Create the player and put him in the center of the fa |
| 471 | CreatePlayerObject(ROOMNUM(Curroomp)); |
| 472 | |
| 473 | // Initialize editor viewer |
| 474 | Editor_view_mode = VM_MINE; |
| 475 | Editor_viewer_id = -1; |
| 476 | |
| 477 | // Create a camera for this level |
| 478 | SetEditorViewer(); |
| 479 | |
| 480 | // Look for player objects & set player starts |
| 481 | FindPlayerStarts(); |
| 482 | |
| 483 | // Clear the marked room |
| 484 | Markedroomp = NULL; |
| 485 | |
| 486 | // Clear the selected segments |
| 487 | ClearRoomSelectedList(); |
| 488 | |
| 489 | // Clear the placed room & group |
| 490 | Placed_room = -1; |
| 491 | Placed_group = NULL; |
| 492 | |
| 493 | // Reset the triggers |
| 494 | Num_triggers = 0; |
| 495 | Current_trigger = -1; |
| 496 | |
| 497 | // Reset the terrain |
| 498 | ResetTerrain(1); |
| 499 | |
| 500 | // Reset terrain sound |
| 501 | ClearTerrainSound(); |
| 502 | |
| 503 | // Clear game events |
| 504 | ClearAllEvents(); |
| 505 |
no test coverage detected