typename std::enable_if<(I < sizeof...(Types)), bool>::type IterateTupleInit(std::tuple<Types...>& t, logger* log, HMODULE module) { if(InitHook(*std::get<I>(t), log, module)) { return IterateTupleInit<I + 1>(t, log, module); } return false; }
BOOL APIENTRY DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { switch (fdwReason) { case DLL_PROCESS_ATTACH: if (!InitHook()) return FALSE; break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }
void DebugInit( void ) { NestedCallLevel = 0; UpdateFlags = 0; _SwitchOn( SW_ERROR_STARTUP ); _SwitchOn( SW_CHECK_SOURCE_EXISTS ); SET_NIL_ADDR( NilAddr ); TxtBuff = &DbgBuffers[0]; *TxtBuff = '\0'; NameBuff = &DbgBuffers[TXT_LEN+1]; *NameBuff = '\0'; CurrRadix = DefRadix = 10; DbgLevel = MIX; ActiveWindowLevel = MIX; _SwitchOn( SW_BELL ); _SwitchOn( SW_FLIP ); _SwitchOn( SW_RECURSE_CHECK ); _SwitchOff( SW_ADDING_SYMFILE ); _SwitchOff( SW_TASK_RUNNING ); RecordInit(); LogInit(); InitMADInfo(); InitMachState(); PathInit(); InitDbgInfo(); InitTrap( TrapParms ); if( !LangSetInit() ) { FiniTrap(); StartupErr( LIT_ENG( STARTUP_Loading_PRS ) ); } if( !InitCmd() ) { FiniTrap(); StartupErr( LIT_ENG( ERR_NO_MEMORY ) ); } InitScan(); InitLook(); InitBPs(); InitSource(); InitDLLList(); DUIInit(); InitHook(); VarDisplayInit(); }
/// /// MyBltMaskBitMapRastPort() static void MyBltMaskBitMapRastPort(struct BitMap *srcBitMap, LONG xSrc, LONG ySrc, struct RastPort *destRP, LONG xDest, LONG yDest, LONG xSize, LONG ySize, ULONG minterm, APTR bltMask) { ENTER(); if(GetBitMapAttr(srcBitMap, BMA_FLAGS) & BMF_INTERLEAVED) { LONG src_depth = GetBitMapAttr(srcBitMap, BMA_DEPTH); struct Rectangle rect; struct BltHook hook; // Define the destination rectangle in the rastport rect.MinX = xDest; rect.MinY = yDest; rect.MaxX = xDest + xSize - 1; rect.MaxY = yDest + ySize - 1; // Initialize the hook InitHook(&hook.hook, BltMaskHook, NULL); hook.srcBitMap = srcBitMap; hook.srcx = xSrc; hook.srcy = ySrc; hook.destx = xDest; hook.desty = yDest; // Initialize a bitmap where all plane pointers points to the mask InitBitMap(&hook.maskBitMap, src_depth, GetBitMapAttr(srcBitMap, BMA_WIDTH), GetBitMapAttr(srcBitMap, BMA_HEIGHT)); while(src_depth) { hook.maskBitMap.Planes[--src_depth] = bltMask; } // Blit onto the Rastport */ DoHookClipRects(&hook.hook, destRP, &rect); } else { BltMaskBitMapRastPort(srcBitMap, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, bltMask); } LEAVE(); }