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

Method PrepRefresh

client/src/main/java/jake2/client/CL_view.java:47–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 * =================
46 */
47 static void PrepRefresh() {
48 String mapname;
49 int i;
50 String name;
51 float rotate;
52 float[] axis = new float[3];
53
54 if ((i = ClientGlobals.cl.configstrings[Defines.CS_MODELS + 1].length()) == 0)
55 return; // no map loaded
56
57 SCR.AddDirtyPoint(0, 0);
58 SCR.AddDirtyPoint(ClientGlobals.viddef.getWidth() - 1, ClientGlobals.viddef.getHeight() - 1);
59
60 // let the render dll load the map
61 mapname = ClientGlobals.cl.configstrings[Defines.CS_MODELS + 1].substring(5,
62 i - 4); // skip "maps/"
63 // cut off ".bsp"
64
65 // register models, pics, and skins
66 Com.Printf("Map: " + mapname + "\r");
67 SCR.UpdateScreen();
68 ClientGlobals.re.BeginRegistration(mapname);
69 Com.Printf(" \r");
70
71 // precache status bar pics
72 Com.Printf("pics\r");
73 SCR.UpdateScreen();
74 SCR.TouchPics();
75 Com.Printf(" \r");
76
77 CL_tent.RegisterTEntModels();
78
79 num_cl_weaponmodels = 1;
80 cl_weaponmodels[0] = "weapon.md2";
81
82 for (i = 1; i < Defines.MAX_MODELS
83 && ClientGlobals.cl.configstrings[Defines.CS_MODELS + i].length() != 0; i++) {
84 name = new String(ClientGlobals.cl.configstrings[Defines.CS_MODELS + i]);
85 if (name.length() > 37)
86 name = name.substring(0, 36);
87
88 if (name.charAt(0) != '*')
89 Com.Printf(name + "\r");
90
91 SCR.UpdateScreen();
92 CL.SendKeyEvents(); // pump message loop
93 if (name.charAt(0) == '#') {
94 // special player weapon model
95 if (num_cl_weaponmodels < Defines.MAX_CLIENTWEAPONMODELS) {
96 cl_weaponmodels[num_cl_weaponmodels] = ClientGlobals.cl.configstrings[Defines.CS_MODELS
97 + i].substring(1);
98 num_cl_weaponmodels++;
99 }
100 } else {
101 ClientGlobals.cl.model_draw[i] = ClientGlobals.re
102 .RegisterModel(ClientGlobals.cl.configstrings[Defines.CS_MODELS
103 + i]);
104 if (name.charAt(0) == '*')

Callers 3

CLClass · 0.95
RequestNextDownloadMethod · 0.95
FrameMethod · 0.95

Calls 15

AddDirtyPointMethod · 0.95
PrintfMethod · 0.95
UpdateScreenMethod · 0.95
TouchPicsMethod · 0.95
RegisterTEntModelsMethod · 0.95
SendKeyEventsMethod · 0.95
ParseClientinfoMethod · 0.95
LoadClientinfoMethod · 0.95
ClearNotifyMethod · 0.95
PlayMethod · 0.95
atoiMethod · 0.95
getWidthMethod · 0.80

Tested by

no test coverage detected