/// /// 开始动画 ///@param[in] iX, iY 座标 ///@return void void CWndAnimate::BeginAnimate(int iX, int iY, int iWidth, int iHeight, int nRound, int iFlip,bool IsLoop) { if (GetIsPlaying()) { return; } if (NULL == m_pParent) { return; } if (m_nFrameCount<=0) { return; } m_nPos = 0; m_nTime = 0; m_nTotalRound = nRound; m_iX = iX; m_iY = iY; m_iWidth = iWidth; m_iHeight = iHeight; if (iFlip != 100) { for (int i=0; i<m_nFrameCount; i++) { m_iFlip[i] = iFlip; } } m_IsLoop = IsLoop; if (0 == m_iWidth) { m_iWidth = m_FrameList[0].GetWidth(); } if (0 == m_iHeight) { m_iHeight = m_FrameList[0].GetHeight(); } CPoint ptDst(m_iX, m_iY); m_pParent->ClientToScreen(&ptDst); MoveWindow(ptDst.x, ptDst.y, m_iWidth, m_iHeight); m_bPlaying = true; SetTimer(TIME_FRAME, m_iFlip[0], NULL); SetTimer(TIME_RENDER, 5, NULL); SetWindowPos(m_pParent,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); }
bool WrapperDLL::Sound_GetIsPlaying(void* self,int32_t id){ auto self_ = (Sound*)self; auto arg0 = id; auto ret = self_->GetIsPlaying(arg0); return ret; };