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

Method DrawCinematic

client/src/main/java/jake2/client/SCR.java:1768–1791  ·  view source on GitHub ↗

DrawCinematic Returns true if a cinematic is active, meaning the view rendering should be skipped.

()

Source from the content-addressed store, hash-verified

1766 * be skipped.
1767 */
1768 private static boolean DrawCinematic() {
1769 if (ClientGlobals.cl.cinematictime <= 0) {
1770 return false;
1771 }
1772
1773 if (cls.key_dest == key_menu) {
1774 // blank screen and pause if menu is up
1775 ClientGlobals.re.CinematicSetPalette(null);
1776 ClientGlobals.cl.cinematicpalette_active = false;
1777 return true;
1778 }
1779
1780 if (!ClientGlobals.cl.cinematicpalette_active) {
1781 ClientGlobals.re.CinematicSetPalette(ClientGlobals.cl.cinematicpalette);
1782 ClientGlobals.cl.cinematicpalette_active = true;
1783 }
1784
1785 if (cin.pic == null)
1786 return true;
1787
1788 ClientGlobals.re.DrawStretchRaw(0, 0, ClientGlobals.viddef.getWidth(), ClientGlobals.viddef.getHeight(), cin.width, cin.height, cin.pic);
1789
1790 return true;
1791 }
1792
1793 /**
1794 * PlayCinematic

Callers 1

UpdateScreen2Method · 0.95

Calls 4

getWidthMethod · 0.80
getHeightMethod · 0.80
CinematicSetPaletteMethod · 0.65
DrawStretchRawMethod · 0.65

Tested by

no test coverage detected