.../game/src/empire_text_convert.cpp
değiştir
Alıntıdır.
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.
.../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ş

Bugu biraz anlatsaydın be kardeş![]()
anlar gidersin be hakanım takma kafana ben veriyorsam uygula geç bu arada kim olduğumu sorarsan
skype : oquzoffical ayıkıyon dimi xd
Bugu biraz anlatsaydın be kardeş![]()
burada anlatmış xd
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 3
- Görüntüleme
- 641