MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CG_DrawLoadingScreen

Function CG_DrawLoadingScreen

code/cgame/cg_info.cpp:717–786  ·  view source on GitHub ↗

==================== CG_DrawLoadingScreen Load screen displays the map pic, the mission briefing and weapons/force powers ==================== */

Source from the content-addressed store, hash-verified

715====================
716*/
717static void CG_DrawLoadingScreen( qhandle_t levelshot ,const char *mapName)
718{
719 int xPos,yPos,width,height;
720 vec4_t color;
721 qhandle_t background;
722 int weapons=0, forcepowers=0;
723
724 // Get mission briefing for load screen
725 if (cgi_SP_GetStringTextString( va("BRIEFINGS_%s",mapName), NULL, 0 ) == 0)
726 {
727 cgi_Cvar_Set( "ui_missionbriefing", "@BRIEFINGS_NONE" );
728 }
729 else
730 {
731 cgi_Cvar_Set( "ui_missionbriefing", va("@BRIEFINGS_%s",mapName) );
732 }
733
734 // Print background
735 if (cgi_UI_GetMenuItemInfo(
736 "loadScreen",
737 "background",
738 &xPos,
739 &yPos,
740 &width,
741 &height,
742 color,
743 &background))
744 {
745 cgi_R_SetColor( color );
746 CG_DrawPic( xPos, yPos, width, height, background );
747 }
748
749 // Print level pic
750 if (cgi_UI_GetMenuItemInfo(
751 "loadScreen",
752 "mappic",
753 &xPos,
754 &yPos,
755 &width,
756 &height,
757 color,
758 &background))
759 {
760 //if (!levelshot)
761 //{// No level shot so use screenshot.
762 // CG_DrawPic( xPos, yPos, 1, 1, 0); //force the tess to flush
763 // cgi_R_DrawScreenShot( xPos, yPos+height, width, -height );
764 //}
765 //else
766 {
767 cgi_R_SetColor( color );
768 CG_DrawPic( xPos, yPos, width, height, levelshot );
769 }
770 }
771
772 // Get player weapons and force power info
773 CG_GetLoadScreenInfo(&weapons,&forcepowers);
774

Callers 1

CG_DrawInformationFunction · 0.85

Calls 9

cgi_UI_GetMenuItemInfoFunction · 0.85
CG_GetLoadScreenInfoFunction · 0.85
CG_DrawLoadWeaponsFunction · 0.85
CG_DrawLoadForcePowersFunction · 0.85
cgi_Cvar_SetFunction · 0.70
cgi_R_SetColorFunction · 0.70
CG_DrawPicFunction · 0.70
vaFunction · 0.50

Tested by

no test coverage detected