INT_PTR CALLBACK DlgLine( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) { int y; static DWORD HelpArray[]= { ID_LINE_LINE, IDH_LINE, 0, 0 }; Unused(lParam); switch (message) { case WM_HELP: WinHelp((HWND)((LPHELPINFO) lParam)->hItemHandle, "windbg.hlp", HELP_WM_HELP, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_CONTEXTMENU: WinHelp ((HWND) wParam, "windbg.hlp", HELP_CONTEXTMENU, (DWORD_PTR)(LPVOID) HelpArray ); return TRUE; case WM_COMMAND: switch (wParam) { case IDOK: // Retrieve selected item text and compute line nbr y = GetDlgItemInt(hDlg, ID_LINE_LINE, NULL, FALSE); if (y <= 0) { ErrorBox2(hDlg, MB_TASKMODAL, ERR_Goto_Line); SetFocus(GetDlgItem(hDlg, ID_LINE_LINE)); } else { GotoLine(curView, y, FALSE); EndDialog(hDlg, TRUE); } return (TRUE); case IDCANCEL : EndDialog(hDlg, TRUE); return (TRUE); } break; } return (FALSE); } /* DlgLine() */
RodinBTNode::ETickStatus RodinBTNodeLog::Tick(float DeltaTime) { Unused(DeltaTime); PRINTF("BT Log (%.2f): %s (%s)\n", GetTime(), m_Message.CStr(), GetEntity()->GetUniqueName().CStr()); return ETS_Success; }
/*virtual*/ void EldritchFramework::GetInitialWindowIcon( uint& WindowIcon ) { #if BUILD_WINDOWS WindowIcon = IDI_ICON1; #else Unused( WindowIcon ); #endif }
lookupTarget* mapLookupTarget::get_target_for_slot(slotDesc* s, simpleLookup* L) { Unused(L); if ( s->is_map_slot() ) return new objectLookupTarget( s->data); return NULL; }
void MIDI::LogTrack( const uint TrackIndex ) const { const SMIDITrack& Track = m_Tracks[ TrackIndex ]; PRINTF( "Track %d:\n", TrackIndex ); // TODO Unused( Track ); }
void CodeGen::loadArg(fint argNo, Location from, bool isPrimCall) { Unused(isPrimCall); if (argNo == -1) { // weird arg numbering - 0 is 1st arg move(ReceiverReg, from); } else { move(ArgLocation(argNo), from); } }
void Framework3D::CreateSplashWindow(const uint WindowIcon, const char* const Title) { XTRACE_FUNCTION; STATICHASH(Framework); STATICHASH(SplashImage); const char* const pSplashImage = ConfigManager::GetString(sSplashImage, nullptr, sFramework); if (!pSplashImage) { return; } const Surface SplashSurface = Surface(PackStream(pSplashImage), Surface::ESFT_BMP); const int SplashWindowWidth = SplashSurface.GetWidth(); const int SplashWindowHeight = SplashSurface.GetHeight(); ASSERT(!m_SplashWindow); m_SplashWindow = new Window; #if BUILD_WINDOWS_NO_SDL const DWORD WindowStyle = WS_POPUP; const DWORD WindowExStyle = WS_EX_TOOLWINDOW; // Prevents this window appearing in the taskbar const int ScreenWidth = m_Display->m_Fullscreen ? m_Display->m_Width : m_Display->m_ScreenWidth; const int ScreenHeight = m_Display->m_Fullscreen ? m_Display->m_Height : m_Display->m_ScreenHeight; m_SplashWindow->Init(Title, "SplashWindowClass", WindowStyle, WindowExStyle, SplashWindowWidth, SplashWindowHeight, m_hInstance, NULL, WindowIcon, ScreenWidth, ScreenHeight); // The window needs to be shown before we can blit to it. m_SplashWindow->Show(m_CmdShow); #endif #if BUILD_SDL // TODO SDL: Unify interface? const uint Flags = SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS; m_SplashWindow->Init(Title, Flags, SplashWindowWidth, SplashWindowHeight); // Load icon from package file instead of compiled resource. Unused(WindowIcon); STATICHASH(IconImage); const char* const pIconImage = ConfigManager::GetString(sIconImage, nullptr, sFramework); if(pIconImage) { ASSERT(pIconImage); const Surface IconSurface = Surface(PackStream(pIconImage), Surface::ESFT_BMP); SDL_SetWindowIcon(m_SplashWindow->GetSDLWindow(), IconSurface.GetSDLSurface()); } #endif SplashSurface.BlitToWindow(m_SplashWindow); }
bool add_obj_map_match(oop* matching_cell, smi hit_num) { Unused(hit_num); // could be a real match with memOop::map_index, // or could be a unwanted match with Map::my_index oop* obj = matching_cell - (map_offset() + Mem_Tag)/oopSize; assert((*obj)->is_mark(), "should only reference a map in map field"); theEnumeration->add_obj(as_oopsOop(obj)); return theEnumeration->is_ok(); }
void moveInsts(char* from, char* to, int size) { Unused(size); nmethod* n = (nmethod*) from; nmethod* nTo = (nmethod*)to; char* n1 = n->insts(); char* n2 = n->instsEnd(); n->moveTo(to, (char*)n->locsEnd() - (char*)n); if (Universe::code->LRUhand == n) Universe::code->LRUhand = nTo; }
RodinBTNode::ETickStatus RodinBTNodeConditionPE::Tick(float DeltaTime) { Unused(DeltaTime); WBParamEvaluator::SPEContext Context; Context.m_Entity = GetEntity(); m_ValuePE.Evaluate(Context); return m_ValuePE.GetBool() ? ETS_Success : ETS_Fail; }
void NodeGen::loadArg(fint argNo, PReg* from, bool isPrimCall) { Unused(isPrimCall); assert(currentScope()->isCodeScope(), "oops"); SCodeScope* s = (SCodeScope*)currentScope(); fint bci = s->bci(); Location l = argNo == -1 ? ReceiverReg : ArgLocation(argNo); // weird arg numbering - 0 is 1st arg, not receiver // uses aren't right yet (call should have use) -fix this loadArg(from, new ArgSAPReg(s, l, true, false, bci, bci)); }
Node* NodeGen::selfCall(SCodeScope* sc, LookupType l, PReg* self, oop sel, oop del, oop methodHolder, MergeNode* nlrPoint, fint argc, PRegBList* exprStack, SplitSig* sig) { Unused(self); APPEND(new SendNode(l, sel, del, methodHolder, nlrPoint, argc, exprStack, sig)); sc->addSend(exprStack); return current; }
/*virtual*/ void WBCompEldThinkerPatrol::Tick(float DeltaTime) { XTRACE_FUNCTION; Unused(DeltaTime); WBEntity* const pEntity = GetEntity(); DEVASSERT(pEntity); WBCompEldTransform* const pTransform = pEntity->GetTransformComponent<WBCompEldTransform>(); DEVASSERT(pTransform); WBCompRodinKnowledge* const pKnowledge = GET_WBCOMP(pEntity, RodinKnowledge); ASSERT(pKnowledge); WBCompRodinBlackboard* const pBlackboard = GET_WBCOMP(pEntity, RodinBlackboard); ASSERT(pBlackboard); const Vector CurrentLocation = pTransform->GetLocation(); // Select the furthest patrol point that we know about. WBEntity* pFurthestPatrol = nullptr; float FurthestDistSq = -1.0f; const WBCompRodinKnowledge::TKnowledgeMap& KnowledgeMap = pKnowledge->GetKnowledgeMap(); FOR_EACH_MAP(KnowledgeIter, KnowledgeMap, WBEntityRef, WBCompRodinKnowledge::TKnowledge) { WBEntity* pKnowledgeEntity = KnowledgeIter.GetKey().Get(); const WBCompRodinKnowledge::TKnowledge& Knowledge = KnowledgeIter.GetValue(); if (!pKnowledgeEntity) { continue; } // Filter out knowledge entities that aren't patrol markup. STATIC_HASHED_STRING(KnowledgeType); STATIC_HASHED_STRING(Patrol); if (Knowledge.GetHash(sKnowledgeType) != sPatrol) { continue; } WBCompEldTransform* const pKnowledgeTransform = pKnowledgeEntity->GetTransformComponent<WBCompEldTransform>(); ASSERT(pKnowledgeTransform); const float DistSq = (pKnowledgeTransform->GetLocation() - CurrentLocation).LengthSquared(); if (DistSq > FurthestDistSq) { FurthestDistSq = DistSq; pFurthestPatrol = pKnowledgeEntity; } }
LONG WINAPI CustomUnhandledExceptionFilter( EXCEPTION_POINTERS* pExceptionPointers ) { Unused( pExceptionPointers ); ASSERT( gIsEnabled ); // In case the exception was due to game being OOM. Allocator::GetDefault().Enable( false ); PRINTF( "Exception handled:\n" ); EXCEPTION_RECORD* pExceptionRecord = pExceptionPointers->ExceptionRecord; const DWORD FirstExceptionCode = pExceptionRecord ? pExceptionRecord->ExceptionCode : 0; Unused( FirstExceptionCode ); while( pExceptionRecord ) { PRINTF( "\tCode: 0x%08X\n", pExceptionRecord->ExceptionCode ); PRINTF( "\tAddr: 0x%08X\n", pExceptionRecord->ExceptionAddress ); pExceptionRecord = pExceptionRecord->ExceptionRecord; } ExceptionTrace::PrintTrace(); #if UPLOADLOG static const DWORD kBreakpointCode = 0x80000003; if( FirstExceptionCode == kBreakpointCode ) { // Don't upload logs from asserts in dev mode. } else { ExceptionUploadLog::UploadLog(); } #endif #if BUILD_SDL SDL_Quit(); #endif return EXCEPTION_CONTINUE_SEARCH; }
/*virtual*/ void WBCompEldIcicles::HandleEvent( const WBEvent& Event ) { XTRACE_FUNCTION; Super::HandleEvent( Event ); STATIC_HASHED_STRING( OnTouched ); const HashedString EventName = Event.GetEventName(); // TODO Unused( EventName ); }
oop get_swap_space_prim(oop rcvrIgnored, void *FH) { Unused(rcvrIgnored); int totalK, freeK; if (OS::get_swap_space_info(totalK, freeK)) { objVectorOop arr= Memory->objVectorObj->cloneSize(2); arr->obj_at_put(0, as_smiOop(totalK)); arr->obj_at_put(1, as_smiOop(freeK)); return arr; } else { failure(FH, "Couldn't get swap space info"); return 0; } }
/*virtual*/ void D3D9Renderer::SetZEnable(const EZEnable ZEnable) { DEBUGASSERT(m_D3DDevice); DEBUGASSERT(ZEnable > EZE_Unknown); if (ZEnable == m_RenderState.m_ZEnable) { return; } m_RenderState.m_ZEnable = ZEnable; const HRESULT Result = m_D3DDevice->SetRenderState( D3DRS_ZENABLE, (ZEnable == EZE_True) ? TRUE : FALSE); DEBUGASSERT(Result == D3D_OK); Unused(Result); }
void WBCompEldMesh::OnAnimationFinished(class Mesh* pMesh, class Animation* pAnimation, bool Interrupted) { Unused(pMesh); ASSERT(pAnimation); ASSERT(pMesh == m_Mesh); WB_MAKE_EVENT(OnAnimationFinished, GetEntity()); WB_SET_AUTO(OnAnimationFinished, Hash, AnimationName, pAnimation->m_HashedName); WB_SET_AUTO(OnAnimationFinished, Bool, Interrupted, Interrupted); WB_DISPATCH_EVENT(GetEventManager(), OnAnimationFinished, GetEntity()); }
Label* CodeGen::selfCall(RegisterState* s, LookupType lookupType, Location receiver, Location self, oop selector, oop delegatee, fint argc) { // call lookup // mov receiver, ReceiverReg // <rest of inline cache> Unused(self); a.CallB(Memory->code->trapdoors->SendMessage_stub_td()); move(ReceiverReg, receiver, true); Label* l = SendDesc(s, lookupType, selector, delegatee ? oop(delegatee) : oop(badOop)); return l; }
BYTE* SharedArrayBuffer::AllocBuffer(uint32 length, uint32 maxLength) { Unused(maxLength); // WebAssembly only #if ENABLE_FAST_ARRAYBUFFER if (this->IsValidVirtualBufferLength(length)) { return (BYTE*)AsmJsVirtualAllocator(length); } else #endif { return HeapNewNoThrowArray(BYTE, length); } }
lookupTarget* vframeLookupTarget::get_target_for_slot(slotDesc* s, simpleLookup* L) { Unused(L); if (s->name == VMString[LEXICAL_PARENT]) { return new vframeLookupTarget(vf->parent(), receiver); } else if (s->name == VMString[SELF]) { return (new objectLookupTarget(receiver)) -> be_receiver(); } else { assert(s->is_map_slot(), "sorry, can't handle assignable local parents"); oop p = vf->get_slot(s); assert(p != badOop, "sorry, local slot not located"); return new objectLookupTarget(p); } }
/*virtual*/ void D3D9Renderer::SetCullMode(const ECullMode CullMode) { DEBUGASSERT(m_D3DDevice); DEBUGASSERT(CullMode > ECM_Unknown); if (CullMode == m_RenderState.m_CullMode) { return; } m_RenderState.m_CullMode = CullMode; const HRESULT Result = m_D3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCullMode[CullMode]); DEBUGASSERT(Result == D3D_OK); Unused(Result); }
/*virtual*/ void D3D9Renderer::SaveScreenshot(const SimpleString& Filename) { #if BUILD_STEAM Unused(Filename); #else ASSERT(m_CurrentRenderTarget); IDirect3DSurface9* const pRenderTargetSurface = static_cast<IDirect3DSurface9*>( m_CurrentRenderTarget->GetColorRenderTargetHandle()); ASSERT(pRenderTargetSurface); D3DXSaveSurfaceToFile(Filename.CStr(), D3DXIFF_PNG, pRenderTargetSurface, NULL, NULL); #endif }
/*virtual*/ void D3D9Renderer::SetPixelShaderMatrix( const HashedString& Parameter, const float* const pFloats, const uint NumMatrices) { ASSERT(m_PixelShader); uint Register; if (!m_PixelShader->GetRegister(Parameter, Register)) { return; } const HRESULT Result = m_D3DDevice->SetPixelShaderConstantF(Register, pFloats, NumMatrices * 4); DEBUGASSERT(Result == D3D_OK); Unused(Result); }
/*virtual*/ void D3D9Renderer::SetAlphaBlendEnable( const EAlphaBlendEnable AlphaBlendEnable) { DEBUGASSERT(m_D3DDevice); DEBUGASSERT(AlphaBlendEnable > EABE_Unknown); if (AlphaBlendEnable == m_RenderState.m_AlphaBlendEnable) { return; } m_RenderState.m_AlphaBlendEnable = AlphaBlendEnable; const HRESULT Result = m_D3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, (AlphaBlendEnable == EABE_True) ? TRUE : FALSE); DEBUGASSERT(Result == D3D_OK); Unused(Result); }
void SharedArrayBuffer::FreeBuffer(BYTE* buffer, uint32 length, uint32 maxLength) { Unused(maxLength); // WebAssembly only #if ENABLE_FAST_ARRAYBUFFER //AsmJS Virtual Free if (this->IsValidVirtualBufferLength(length)) { FreeMemAlloc(buffer); } else #endif { HeapDeleteArray(length, buffer); } }
RodinBTNode::ETickStatus RodinBTNodeBlackboardWrite::Tick(float DeltaTime) { Unused(DeltaTime); WBEntity* const pEntity = GetEntity(); WBCompRodinBlackboard* const pBlackboard = GET_WBCOMP(pEntity, RodinBlackboard); ASSERT(pBlackboard); WBParamEvaluator::SPEContext Context; Context.m_Entity = pEntity; m_ValuePE.Evaluate(Context); pBlackboard->Set(m_BlackboardKey, m_ValuePE); return ETS_Success; }
/*virtual*/ void D3D9Renderer::SetPixelShader( IPixelShader* const pPixelShader) { DEBUGASSERT(m_D3DDevice); DEBUGASSERT(pPixelShader); if (pPixelShader == m_PixelShader) { return; } m_PixelShader = pPixelShader; IDirect3DPixelShader9* const pD3DPixelShader = static_cast<IDirect3DPixelShader9*>(pPixelShader->GetHandle()); const HRESULT Result = m_D3DDevice->SetPixelShader(pD3DPixelShader); DEBUGASSERT(Result == D3D_OK); Unused(Result); }
RodinBTNode::ETickStatus RodinBTNodeParallel::Tick( float DeltaTime ) { Unused( DeltaTime ); ETickStatus RetVal = ETS_Running; int NumChildrenSucceeded = 0; int NumChildrenFailed = 0; for( uint ChildIndex = 0; ChildIndex < m_Children.Size(); ++ChildIndex ) { ETickStatus& ChildStatus = m_ChildStatuses[ ChildIndex ]; if( ChildStatus == ETS_None ) { // Start child running (first time Tick is called) m_BehaviorTree->Start( m_Children[ ChildIndex ], this ); ChildStatus = ETS_Running; } else if( ChildStatus == ETS_Fail ) { ++NumChildrenFailed; } else if( ChildStatus == ETS_Success ) { ++NumChildrenSucceeded; } } // Give failing higher priority, in keeping with the old system of immediately // returning if one fail was encountered. Not a huge difference, really. if( NumChildrenFailed >= m_NumChildrenToFail ) { RetVal = ETS_Fail; } else if( NumChildrenSucceeded >= m_NumChildrenToSucceed ) { RetVal = ETS_Success; } // Until enough of our children have finished, go back to sleep if( RetVal == ETS_Running ) { m_BehaviorTree->Sleep( this ); } return RetVal; }
/*virtual*/ void WBCompEldWatson::Tick( float DeltaTime ) { Unused( DeltaTime ); if( m_Primed ) { TickPrimed(); } else if( m_Activated ) { TickActivated(); } else { TickUnactivated(); } }