MCPcopy Create free account
hub / github.com/demoth/jake2 / UpdateScreen2

Method UpdateScreen2

client/src/main/java/jake2/client/SCR.java:1160–1268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1158 private static final float[] separation = { 0, 0 };
1159
1160 private static void UpdateScreen2() {
1161 int numframes;
1162 int i;
1163 // if the screen is disabled (loading plaque is up, or vid mode
1164 // changing)
1165 // do nothing at all
1166 if (cls.disable_screen != 0) {
1167 if (Timer.Milliseconds() - cls.disable_screen > 120000) {
1168 cls.disable_screen = 0;
1169 Com.Printf("Loading plaque timed out.\n");
1170 }
1171 return;
1172 }
1173
1174 if (!scr_initialized || !ClientGlobals.con.initialized)
1175 return; // not initialized yet
1176
1177 /*
1178 * * range check cl_camera_separation so we don't inadvertently fry
1179 * someone's * brain
1180 */
1181 if (ClientGlobals.cl_stereo_separation.value > 1.0)
1182 Cvar.getInstance().SetValue("cl_stereo_separation", 1.0f);
1183 else if (ClientGlobals.cl_stereo_separation.value < 0)
1184 Cvar.getInstance().SetValue("cl_stereo_separation", 0.0f);
1185
1186 if (ClientGlobals.cl_stereo.value != 0) {
1187 numframes = 2;
1188 separation[0] = -ClientGlobals.cl_stereo_separation.value / 2;
1189 separation[1] = ClientGlobals.cl_stereo_separation.value / 2;
1190 } else {
1191 separation[0] = 0;
1192 separation[1] = 0;
1193 numframes = 1;
1194 }
1195
1196 for (i = 0; i < numframes; i++) {
1197 ClientGlobals.re.BeginFrame(separation[i]);
1198
1199 if (scr_draw_loading == 2) { // loading plaque over black screen
1200 Dimension dim = new Dimension();
1201
1202 ClientGlobals.re.CinematicSetPalette(null);
1203 scr_draw_loading = 0; // false
1204 ClientGlobals.re.DrawGetPicSize(dim, "loading");
1205 ClientGlobals.re.DrawPic((ClientGlobals.viddef.getWidth() - dim.width) / 2,
1206 (ClientGlobals.viddef.getHeight() - dim.height) / 2, "loading");
1207 }
1208 // if a cinematic is supposed to be running, handle menus
1209 // and console specially
1210 else if (ClientGlobals.cl.cinematictime > 0) {
1211 if (cls.key_dest == key_menu) {
1212 if (ClientGlobals.cl.cinematicpalette_active) {
1213 ClientGlobals.re.CinematicSetPalette(null);
1214 ClientGlobals.cl.cinematicpalette_active = false;
1215 }
1216 Menu.Draw();
1217 } else if (cls.key_dest == key_console) {

Callers 1

SCRClass · 0.95

Calls 15

MillisecondsMethod · 0.95
PrintfMethod · 0.95
getInstanceMethod · 0.95
DrawMethod · 0.95
DrawConsoleMethod · 0.95
DrawCinematicMethod · 0.95
CalcVrectMethod · 0.95
TileClearMethod · 0.95
RenderViewMethod · 0.95
DrawStatsMethod · 0.95
DrawLayoutMethod · 0.95
DrawInventoryMethod · 0.95

Tested by

no test coverage detected