[Release] StrategicPoint Time on bottom

Results 1 to 2 of 2
  1. #1
    Apprentice PhatLA is offline
    MemberRank
    Oct 2020 Join Date
    On EarthLocation
    23Posts

    Support [Release] StrategicPoint Time on bottom

    Hi all,

    In this post i'll show you how i show SP Time on bottom,
    I know it not good but working , hope it can help you





    in SPInfo add new function:

    Code:
     
    RenderSPTimeLimit(UINT m_nHour, UINT m_nMin, UINT m_nSec)
    {
        SIZE bkSize = { g_pD3dApp->GetBackBufferDesc().Width, g_pD3dApp->GetBackBufferDesc().Height };
        char szHour[32] = { 0, }, szMin[32] = { 0, }, szSec[32] = { 0, };
    
        if (m_nHour != 0)
            sprintf(szHour, "%02d", m_nHour);
    
        sprintf(szMin, "%02d", m_nMin);
        sprintf(szSec, "%02d", m_nSec);
    
        int nHourLen = strlen(szHour);
        int nMinLen = strlen(szMin);
        int nSecLen = strlen(szSec);
        int nLength = nHourLen > 0 ? nHourLen + nMinLen + nSecLen + 2 : nHourLen + nMinLen + nSecLen + 1;
        int nWidth, nHeight, nX, i;
        float fScale;
    
        if (!g_pShuttleChild->m_bUnitStop)
        {
            nWidth = m_pColonImage->GetImgSize().x;
    #ifdef _WARRIOR_CLASS_KILL_BAR
            if (!g_pSOption->sShowWarRank)
    #endif 
               nHeight = bkSize.cy - (90);
    #ifdef _WARRIOR_CLASS_KILL_BAR
            else
                nHeight = bkSize.cy - (90 + 16);
    #endif 
           fScale = 1.0f;
        }
        else
        {
            nWidth = m_pColonImage->GetImgSize().x;
    #ifdef _WARRIOR_CLASS_KILL_BAR
            if (!g_pSOption->sShowWarRank)
    #endif
                nHeight = bkSize.cy - (90);
    #ifdef _WARRIOR_CLASS_KILL_BAR
            else
                nHeight = bkSize.cy - (90 + 16);
    #endif
            fScale = 1.0f;
        }
        nX = (bkSize.cx - nWidth * nLength) / 2;
    
        for (int i = 0; i < nHourLen; ++i)
        {
            int nIdx = szHour[i] - 48;
            if (nIdx < 0)
                return;
            m_pTimeNumImage[nIdx]->SetScale(fScale, fScale);
            m_pTimeNumImage[nIdx]->Move(nX, nHeight);
            m_pTimeNumImage[nIdx]->Render();
            nX += nWidth;
        }
    
        if (nHourLen > 0)
        {
            m_pColonImage->SetScale(fScale, fScale);
            m_pColonImage->Move(nX, nHeight);
            m_pColonImage->Render();
            nX += nWidth;
        } 
    
       for (i = 0; i < nMinLen; ++i)
        {
            int nIdx = szMin[i] - 48;
            m_pTimeNumImage[nIdx]->SetScale(fScale, fScale);
            m_pTimeNumImage[nIdx]->Move(nX, nHeight);
            m_pTimeNumImage[nIdx]->Render();
            nX += nWidth;
        }
    
        m_pColonImage->SetScale(fScale, fScale);
        m_pColonImage->Move(nX, nHeight);
        m_pColonImage->Render();
        nX += nWidth;
    
        for (i = 0; i < nSecLen; ++i)
        {
            int nIdx = szSec[i] - 48;
            m_pTimeNumImage[nIdx]->SetScale(fScale, fScale);
            m_pTimeNumImage[nIdx]->Move(nX, nHeight); 
           m_pTimeNumImage[nIdx]->Render();
            nX += nWidth;
        }
    }
    then just need call it:

    Code:
    RenderSPTimeLimit(nHours, nMinutes, nSecond);


  2. #2
    Member fyrjzy is offline
    MemberRank
    May 2012 Join Date
    99Posts

    Re: [Release] StrategicPoint Time on bottom

    need add some code for skill
    Code:
    if (g_pGameMain->m_pQuickSlot->IsSlotOpen() == FALSE)
    XXXX
    else
    xxxxxx



Advertisement