MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CloseSmallView

Function CloseSmallView

Descent3/SmallViews.cpp:540–562  ·  view source on GitHub ↗

Parameters: window - the window to get rid of

Source from the content-addressed store, hash-verified

538
539// Parameters: window - the window to get rid of
540void CloseSmallView(int window) {
541 // Mark the window as inactive
542 if (Small_views[window].objhandle == Guided_missile_objhandle) {
543 // mark guided missile small view as inactive.
544 Guided_missile_objhandle = OBJECT_HANDLE_NONE;
545 Guided_missile_smallview = false;
546 }
547
548 Small_views[window].objhandle = OBJECT_HANDLE_NONE;
549
550 // Restore old view if there was one
551 if (Small_views_save[window].objhandle != OBJECT_HANDLE_NONE) {
552 Small_views[window] = Small_views_save[window];
553 Small_views_save[window].objhandle = OBJECT_HANDLE_NONE;
554 } else {
555 Clear_screen = 4; // force background redraw
556
557 if (window == SVW_LEFT)
558 Disable_primary_monitor = 0;
559 else if (window == SVW_RIGHT)
560 Disable_secondary_monitor = 0;
561 }
562}
563
564// Get rid of a small view if it's a popup window
565// Parameters: window - the window to get rid of

Callers 3

SelectNextCameraViewFunction · 0.85
DrawSmallViewsFunction · 0.85
ClosePopupViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected