noisiv 1
noisiv
Manwe Work 1
Manwe Work
Bvural41 1
Bvural41
mavzermete 1
mavzermete
kaptanmikro1 1
kaptanmikro1
Reklam vermek için turkmmo@gmail.com

Empire Bug Fix

  • Konuyu başlatan Konuyu başlatan sareman56
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 20
  • Görüntüleme Görüntüleme 3K
.../game/src/empire_text_convert.cpp

Kod:
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    if (dwEmpireID < 1 || dwEmpireID > 3 || len == 0)
        return;


    const STextConvertTable& rkTextConvTable = g_aTextConvTable[dwEmpireID - 1];


    for (BYTE* pbText = reinterpret_cast<BYTE*>(szText) ; len > 0 && *pbText != '\0' ; --len, ++pbText)
    {
        if (number(1,100) > iPct)
        {
            if (*pbText & 0x80)
            {
                if (g_iUseLocale)
                {
                    static char s_cChinaTable[][3] = {"&#711;&#328;","&#321;&#321;","&#321;¤","&#711;&#367;","&#711;&#273;" };
                    int n = number(0, 4);
                    pbText[0] = s_cChinaTable[n][0];
                    pbText[1] = s_cChinaTable[n][1];
                }
                else
                {
                    if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE)
                    {
                        UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1);
                        pbText[0] = rkTextConvTable.aacHan[uHanPos][0];
                        pbText[1] = rkTextConvTable.aacHan[uHanPos][1];
                    }
                    else if ( pbText[0] == 0xA4 )
                    {
                        if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE )
                        {
                            pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0];
                            pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1];
                        }
                        else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 )
                        {
                            pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0];
                            pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1];
                        }
                    }
                }


                ++pbText;
                --len;
            }
            else
            {
                if (*pbText >= 'a' && *pbText <= 'z')
                {
                    *pbText = rkTextConvTable.acLower[*pbText - 'a'];
                }
                else if (*pbText >= 'A' && *pbText <= 'Z')
                {
                    *pbText = rkTextConvTable.acUpper[*pbText - 'A'];
                }
            }
        }
        else
        {
            if (*pbText & 0x80)
            {
                ++pbText;
                --len;
            }
        }
    }
}

değiştir

Kod:
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    szText;
}

Alıntıdır.
 
.../game/src/empire_text_convert.cpp

Kod:
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    if (dwEmpireID < 1 || dwEmpireID > 3 || len == 0)
        return;


    const STextConvertTable& rkTextConvTable = g_aTextConvTable[dwEmpireID - 1];


    for (BYTE* pbText = reinterpret_cast<BYTE*>(szText) ; len > 0 && *pbText != '\0' ; --len, ++pbText)
    {
        if (number(1,100) > iPct)
        {
            if (*pbText & 0x80)
            {
                if (g_iUseLocale)
                {
                    static char s_cChinaTable[][3] = {"ˇň","ŁŁ","٤","ˇů","ˇđ" };
                    int n = number(0, 4);
                    pbText[0] = s_cChinaTable[n][0];
                    pbText[1] = s_cChinaTable[n][1];
                }
                else
                {
                    if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE)
                    {
                        UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1);
                        pbText[0] = rkTextConvTable.aacHan[uHanPos][0];
                        pbText[1] = rkTextConvTable.aacHan[uHanPos][1];
                    }
                    else if ( pbText[0] == 0xA4 )
                    {
                        if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE )
                        {
                            pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0];
                            pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1];
                        }
                        else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 )
                        {
                            pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0];
                            pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1];
                        }
                    }
                }


                ++pbText;
                --len;
            }
            else
            {
                if (*pbText >= 'a' && *pbText <= 'z')
                {
                    *pbText = rkTextConvTable.acLower[*pbText - 'a'];
                }
                else if (*pbText >= 'A' && *pbText <= 'Z')
                {
                    *pbText = rkTextConvTable.acUpper[*pbText - 'A'];
                }
            }
        }
        else
        {
            if (*pbText & 0x80)
            {
                ++pbText;
                --len;
            }
        }
    }
}

değiştir

Kod:
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    szText;
}

Alıntıdır.


Bugu biraz anlatsaydın be kardeş :)
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst