MCPcopy Create free account
hub / github.com/bwapi/bwapi / DrawHook

Function DrawHook

bwapi/BWAPI/Source/Detours.cpp:385–410  ·  view source on GitHub ↗

----------------------------------------------- DRAW HOOK --------------------------------------------------

Source from the content-addressed store, hash-verified

383
384//----------------------------------------------- DRAW HOOK --------------------------------------------------
385void __stdcall DrawHook(BW::Bitmap *pSurface, BW::bounds *pBounds)
386{
387 static bool wantRefresh = false;
388 if (wantRefresh)
389 {
390 wantRefresh = false;
391 // Calling this function forces a game layer refresh without adding any new offsets
392 // This is done to improve compatibility with Hellinsect's resolution expander hack
393 BW::BWFXN_UpdateScreenPosition();
394 }
395
396 //GameUpdate(pSurface, pBounds);
397 if ( BW::pOldDrawGameProc )
398 BW::pOldDrawGameProc(pSurface, pBounds);
399
400 if ( BW::BWDATA::GameScreenBuffer.isValid() )
401 {
402 //if ( gdwHoliday )
403 //DrawHoliday();
404
405 if (BWAPI::BroodwarImpl.drawShapes())
406 {
407 wantRefresh = true;
408 }
409 }
410}
411//------------------------------------------------- MENU HOOK ------------------------------------------------
412void __stdcall DrawDialogHook(BW::Bitmap *pSurface, BW::bounds *pBounds)
413{

Callers

nothing calls this directly

Calls 2

drawShapesMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected