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

Method updateScreen

fullgame/src/test/java/jake2/fullgame/TestMap.java:140–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 int currentState = 0;
139
140 void updateScreen()
141 {
142 re.BeginFrame(0.0f);
143
144 switch (currentState)
145 {
146 case 0 :
147 re.DrawStretchPic(0, 0, viddef.getWidth(), viddef.getHeight(), "conback");
148 re.DrawPic(viddef.getWidth() / 2 - 50, viddef.getHeight() / 2, "loading");
149 currentState = 1;
150 break;
151 case 1 :
152 // register the map
153 re.BeginRegistration("demo1");
154 re.SetSky("space1", 0, new float[]{ 0, 0, 0 });
155 currentState = 2;
156 default :
157 if (framecount % 500 == 0)
158 {
159 long time = System.currentTimeMillis();
160 fps = 500000.0f / (time - start);
161 start = time;
162 }
163 String text = fps + " fps";
164
165 testMap();
166
167 drawString(10, viddef.getHeight() - 16, text);
168 }
169
170 re.EndFrame();
171 framecount++;
172 }
173
174 // ===================================================================
175

Callers 1

runMethod · 0.95

Calls 11

testMapMethod · 0.95
drawStringMethod · 0.95
getWidthMethod · 0.80
getHeightMethod · 0.80
currentTimeMillisMethod · 0.80
BeginFrameMethod · 0.65
DrawStretchPicMethod · 0.65
DrawPicMethod · 0.65
BeginRegistrationMethod · 0.65
SetSkyMethod · 0.65
EndFrameMethod · 0.65

Tested by

no test coverage detected