[JX] Ai Có thể cho mình xin code Represent2 hiển thị tiếng việt cho mình xin thank.
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 2 của 2
  1. #1
    Thành Viên anhhaimientay's Avatar
    Ngày tham gia
    Jul 2014
    Bài viết
    22
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Ai Có thể cho mình xin code Represent2 hiển thị tiếng việt cho mình xin thank.

    Ai Có thể cho mình xin code Represent2 hiển thị tiếng việt cho mình xin thank.
    Khách viếng thăm hãy cùng anhhaimientay xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #2
    Thành Viên
    Ngày tham gia
    Feb 2015
    Bài viết
    8
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Ðề: Ai Có thể cho mình xin code Represent2 hiển thị tiếng việt cho mình xin th

    Trích dẫn Gửi bởi anhhaimientay [Only registered and activated users can see links. ]
    Ai Có thể cho mình xin code Represent2 hiển thị tiếng việt cho mình xin thank.
    PHP Code:
    void KFont2::OutputText(const charpszTextint nCount/*= KF_ZERO_END*/,
                        
    int nX/*=KF_FOLLOW*/int nY/*=KF_FOLLOW*/,
                        
    unsigned int nColor/*=0xff000000*/int nLineWidth/*=0*/)
    {
        if (!
    pszText || !m_bLoaded)
            return;
        
    unsigned char*    lpByte = (unsigned char*) pszText;
        
    int                nLh;
        
    int                nPos 0;
        
    int                nHalfIndex 0;

        if (
    nCount == KRF_ZERO_END)
            
    nCount strlen(pszText);
        if (
    nX == KRF_FOLLOW)
            
    nX m_nLastPosH;
        if (
    nY == KRF_FOLLOW)
            
    nY m_nLastPosV;

        
    0;

        
    KRColor        c;
        
    c.Color_dw nColor;
        
    int            sColor g_RGB(c.Color_b.rc.Color_b.gc.Color_b.b);

        if (
    nLineWidth m_nOutputWidth m_nOutputWidth)
            
    nLineWidth 0;

        while (
    nPos nCount)
        {
           
    /*     nL = lpByte[nPos++];
                DrawCharacter(nX + h, nY, nL, 0, sColor);
                if (nL != 0x0a)
                {
                    h += m_nFontHalfWidth[nHalfIndex];
                    nHalfIndex ^= 1;
                }
                else
                {
                    h = 0;
                    nY += m_nOutputHeight;
                }*/
        // new fix load font tieng viet
            
    nL=lpByte[nPos++];
            
    DrawCharacter(nX hnYnL0sColor);
            if (
    nL != 0x0a)
            {
                
    += m_nFontHalfWidth[nHalfIndex];
                
    nHalfIndex ^= 1;
            }
            else
            {
                
    0;
                
    nY += m_nOutputHeight;
            }
            
    // end 
            
    if (nLineWidth)
            {
                if (
    m_nOutputWidth nLineWidth)
                {
                    if (
    nPos nCount && lpByte[nPos] == 0x0a)
                        
    nPos++;
                    
    0;
                    
    nY += m_nOutputHeight;
                    
    nHalfIndex 0;
                }
                else if (
    && nPos nCount &&
                    
    m_nOutputWidth m_nFontHalfWidth[nHalfIndex] >= nLineWidth)
                {
                    const 
    charpNext TGetSecondVisibleCharacterThisLine((const char*)lpBytenPosnCount);
                    if (
    pNext && TIsCharacterNotAlowAtLineHead(pNext))
                    {
                        
    0;
                        
    nY += m_nOutputHeight;
                        
    nHalfIndex 0;
                    }
                }
            }
        }
        
    m_nLastPosH nX h;
        
    m_nLastPosV nY;
    }
    ---------------------------------------------
    -----------------------------------------------------------------------------------------------------
    //fix load font 
    unsigned char*    KFontData::GetCharacterData(unsigned char cFirstunsigned char cNext) const
    {
        if (
    m_pFontData)
        {
            
    unsigned int    uCharIndex cFirst;
            if (
    uCharIndex m_uCharCount && m_pdwOffs[uCharIndex])
                return (
    m_pFontData m_pdwOffs[uCharIndex]);
        }
        return 
    NULL;
    }
    -------------------------------------------------------------------------------------------------------------
    void KFont3::OutputText(const char *pszTextint nCount/*= KF_ZERO_END*/,
                           
    int nX/*= KF_FOLLOW*/int nY/*= KF_FOLLOW*/,
                        
    unsigned int nColor /*=0xff000000*/int nLineWidth/*= 0*/)
    {
        if (
    pszText == NULL || m_bLoaded == false || ms_pd3dDevice == NULL)
            return;

        
    unsigned int    nNumChars 0;
        
    unsigned char*    lpByte = (unsigned char*) pszText;
        
    int                nLh;
        
    BOOL            bShowChar false;
        
    int                nPos 0;
        
    int                nDx 0;
        
    int                nHalfIndex 0;


        
    unsigned short    nCommitChars[KCS_CHAR_NUM_LIMIT];
        
    KFontVertex    vCharPolys[KCS_CHAR_NUM_LIMIT 6];

        if (
    nCount == KRF_ZERO_END)
            
    nCount strlen(pszText);
        if (
    nX == KRF_FOLLOW)
            
    nX m_nLastPosH;
        if (
    nY == KRF_FOLLOW)
            
    nY m_nLastPosV;

        
    0;
        if (
    nLineWidth m_fFontWidth m_fFontWidth)
            
    nLineWidth 0;
        {
            
    m_pStateBlockSaved->Capture();
            
    m_pStateBlockDrawText->Apply();
            
    ms_pd3dDevice->SetFVF(KF_FONTPOLY);
            
    ms_pd3dDevice->SetTexture(0m_pTexture);
        }

        while (
    nPos nCount)
        {
            
    bShowChar false;
                    
    // fix tieng viet co dau 3D
            
    nL=lpByte[nPos++];
            
    nCommitChars[nNumChars] = nL;
            
    bShowChar true;
            if (
    nL != 0x0a)
            {
                
    nDx m_nFontHalfWidth[nHalfIndex];
                
    nHalfIndex ^= 1;
            }
            else
            {
                
    nDx = -1;
            }
            if (
    bShowChar)
            {
                
    int n nNumChars 6;
                
    KFontVertex *pCharPoly = &vCharPolys[n];
                
    pCharPoly[0].= ((float)(nX h)) - 0.5f;
                
    pCharPoly[0].= ((float)nY) - 0.5f;
                
                
    pCharPoly[4].pCharPoly[1].pCharPoly[0].m_fFontWidth;
                
    pCharPoly[4].pCharPoly[1].pCharPoly[0].y;
            
                
    pCharPoly[3].pCharPoly[2].pCharPoly[0].x;
                
    pCharPoly[3].pCharPoly[2].pCharPoly[0].m_fFontHeight;

                
    pCharPoly[5].pCharPoly[4].x;
                
    pCharPoly[5].pCharPoly[2].y;
                
                
    pCharPoly[0].0.9f;  pCharPoly[0].1.0f;  pCharPoly[0].color nColor;
                
    pCharPoly[1].0.9f;  pCharPoly[1].1.0f;  pCharPoly[1].color nColor;
                
    pCharPoly[2].0.9f;  pCharPoly[2].1.0f;  pCharPoly[2].color nColor;
                
    pCharPoly[3].0.9f;  pCharPoly[3].1.0f;  pCharPoly[3].color nColor;
                
    pCharPoly[4].0.9f;  pCharPoly[4].1.0f;  pCharPoly[4].color nColor;
                
    pCharPoly[5].0.9f;  pCharPoly[5].1.0f;  pCharPoly[5].color nColor;

                
    nNumChars++;

                if (
    nNumChars >= KCS_CHAR_NUM_LIMIT)
                {
                    
    m_Resources.CommitText(nCommitCharsnNumCharsvCharPolys);
                    
    ms_RenderText(vCharPolysnNumChars 2);
                    
    nNumChars 0;
                }
            }

            
    += nDx;

            if (
    nDx == -|| (nLineWidth && m_nOutputWidth nLineWidth))
            {
                if (
    nPos nCount && lpByte[nPos] == 0x0a && nDx != -1)
                    
    nPos++;
                
    0;
                
    nY += m_nOutputHeight;
                
    nHalfIndex 0;
            }
            else if (
    nDx && nLineWidth && nDx m_nOutputWidth m_nFontHalfWidth[nHalfIndex] >= nLineWidth)
            {
                const 
    charpNext TGetSecondVisibleCharacterThisLine((const char*)lpBytenPosnCount);
                if (
    pNext && TIsCharacterNotAlowAtLineHead(pNext))
                {
                    
    0;
                    
    nY += m_nOutputHeight;
                    
    nHalfIndex 0;
                }
            }
        }

        if (
    nNumChars)
        {
            
    m_Resources.CommitText(nCommitCharsnNumCharsvCharPolys);
            
    ms_RenderText(vCharPolysnNumChars 2);
            
    nNumChars 0;
        }
        {
            
    m_pStateBlockSaved->Apply();
        }
        
    m_nLastPosH nX h;
        
    m_nLastPosV nY;

    Lần sửa cuối bởi teemo_Az90, ngày 03-06-15 lúc 06:31 AM.
    Khách viếng thăm hãy cùng teemo_Az90 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. Các thành viên gởi lời cảm ơn đến teemo_Az90 vì bài viết này !

    anhhaimientay (03-06-15)

 

 

Các Chủ đề tương tự

  1. [KT] Tools hỗ trợ viết code LUA [ Code Snippet Function]
    Bởi khoctinhmhs trong diễn đàn Releases
    Trả lời: 6
    Bài viết cuối: 03-12-14, 06:03 PM
  2. [JX] cần xin code auto backup của PTTk bác nào có code autoit đó share giúp thanks
    Bởi Olala trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 0
    Bài viết cuối: 18-10-14, 12:49 AM
  3. [Gunny] Xin Code Web Chuyển xu Game thành Cash Web Với code xóa pet 5 sao với ...
    Bởi vinateam trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 5
    Bài viết cuối: 14-07-14, 01:04 PM
  4. [BÁN] Code nạp thẻ VTC 2013 , fix new bảo hành 1 tháng FULL CODE
    Bởi katterkelly trong diễn đàn CHUYÊN ĐỀ WEB GAMES
    Trả lời: 6
    Bài viết cuối: 12-03-13, 01:23 PM
  5. [KT] Code gift code
    Bởi canh_2009 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 0
    Bài viết cuối: 01-12-12, 10:51 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 04:05 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.