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

Function ShrinkWindow

Descent3/GameLoop.cpp:976–1000  ·  view source on GitHub ↗

Make the 3D window smaller

Source from the content-addressed store, hash-verified

974
975// Make the 3D window smaller
976void ShrinkWindow() {
977 if (GetHUDMode() == HUD_LETTERBOX)
978 return;
979
980 if (Game_window_w > WINDOW_MIN_W) {
981
982 Game_window_w -= WINDOW_W_DELTA;
983 Game_window_h -= WINDOW_H_DELTA;
984
985 if (Game_window_w < WINDOW_MIN_W)
986 Game_window_w = WINDOW_MIN_W;
987
988 if (Game_window_h < WINDOW_MIN_H)
989 Game_window_h = WINDOW_MIN_H;
990
991 Game_window_x = (Max_window_w - Game_window_w) / 2;
992 Game_window_y = (Max_window_h - Game_window_h) / 2;
993
994 Clear_screen = 4;
995
996 ResizeCockpit();
997
998 Current_pilot.set_hud_data(NULL, NULL, NULL, &Game_window_w, &Game_window_h);
999 }
1000}
1001
1002// Data and code for camera views
1003

Callers 1

ProcessNormalKeyFunction · 0.85

Calls 3

GetHUDModeFunction · 0.85
ResizeCockpitFunction · 0.85
set_hud_dataMethod · 0.80

Tested by

no test coverage detected