MCPcopy Create free account
hub / github.com/doldecomp/mkdd / beginRender

Method beginRender

libs/JSystem/JFramework/JFWDisplay.cpp:255–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253#endif
254
255void JFWDisplay::beginRender() {
256 JUTProcBar::getManager()->wholeLoopEnd();
257 JUTProcBar::getManager()->wholeLoopStart();
258 if (mIsWaiting) {
259 JUTProcBar::getManager()->idleStart();
260 }
261
262 waitForTick(mTickRate, mFrameRate);
263 JUTVideo::getManager()->waitRetraceIfNeed();
264
265 u32 tick = OSGetTick();
266 _30 = tick - _2C; // duration of frame in ticks?
267 _2C = tick;
268#ifdef DEBUG // TODO: cleaner method
269 _34 = _2C - JUTVideo::getVideoLastTick();
270#else
271 _34 = _2C;
272#endif
273
274 if (mIsWaiting) {
275 JUTProcBar::getManager()->idleEnd();
276 }
277
278#ifdef HIO_SCREENSHOT
279 SCREENSHOTService(JUTXfb::getManager()->getDrawnXfb(), &MyAlloc, &MyFree);
280#endif
281
282 if(mIsWaiting) {
283 JUTProcBar::getManager()->gpStart();
284 JUTXfb * xfbMgr = JUTXfb::getManager();
285 switch (xfbMgr->getBufferNum()) {
286 case 1:
287 if (xfbMgr->getSDrawingFlag() != 2) {
288 xfbMgr->setSDrawingFlag(1);
289 clearEfb(mClearColor);
290 }
291 else {
292 xfbMgr->setSDrawingFlag(1);
293 }
294 xfbMgr->setDrawingXfbIndex(_48);
295 break;
296 case 2:
297 exchangeXfb_double();
298 break;
299 case 3:
300 exchangeXfb_triple();
301 break;
302 default:
303 break;
304 }
305 }
306
307 _3C++;
308 bool b = (_3C >= _38);
309 mIsWaiting = b;
310
311 if (b) {
312 _3C = 0;

Callers 1

beginFrameFunction · 0.80

Calls 13

waitForTickFunction · 0.85
SCREENSHOTServiceFunction · 0.85
wholeLoopEndMethod · 0.80
wholeLoopStartMethod · 0.80
idleStartMethod · 0.80
waitRetraceIfNeedMethod · 0.80
idleEndMethod · 0.80
getDrawnXfbMethod · 0.80
gpStartMethod · 0.80
getBufferNumMethod · 0.80
getSDrawingFlagMethod · 0.80
setSDrawingFlagMethod · 0.80

Tested by

no test coverage detected