()
| 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 |
no test coverage detected