R 1
Roksam
farkmt2official 1
farkmt2official
TuZaKK 1
TuZaKK
sermin 1
sermin
berkmenoo 1
berkmenoo
mannaxxx 1
mannaxxx
Agora Metin2 1
Agora Metin2
[DEV]AB 1
[DEV]AB
kaptanmikro1 1
kaptanmikro1
Hikaye Ekle

Altın Konu MaviAyGames | Su Render Düzenlemesi [C++]

  • Konuyu başlatan Konuyu başlatan MaviAy44
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 29
  • Görüntüleme Görüntüleme 5K

Türkiye'de ilk Mobil & PC Aynı Anda Metin2 Oyna. Triarchonline kalıcı ve uzun ömürlü yapısı ile 24 Temmuz'da açılıyor. | 1-99 Mobil Metin2 Triarch HEMEN TIKLA!






C++:
Arat:
void CMapOutdoor::LoadWaterTexture()
{
    UnloadWaterTexture();
    char buf[256]; // bigger the texture bigger the buffer
    for (int i = 0; i < 30; ++i) // count of the frames
    {
        sprintf(buf, "d:/ymir Work/special/water/%02d.dds", i+1); // Special/etc/ path can be set to a custom path
        m_WaterInstances[i].SetImagePointer((CGraphicImage *) CResourceManager::Instance().GetResourcePointer(buf));
    }
}
void CMapOutdoor::UnloadWaterTexture()
{
    for (int i = 0; i < 30; ++i) // count of the frames
        m_WaterInstances[i].Destroy();
}

Tamamen Değiştir:

void CMapOutdoor::LoadWaterTexture()
{
    UnloadWaterTexture();
    char buf[512];
    for (int i = 0; i < 60; ++i)
    {
        sprintf(buf, "d:/ymir Work/special/water/%02d.dds", i+1);
        m_WaterInstances[i].SetImagePointer((CGraphicImage *)CResourceManager::Instance().GetResourcePointer(buf));
    }
}
void CMapOutdoor::UnloadWaterTexture()
{
    for (int i = 0; i < 60; ++i)
        m_WaterInstances[i].Destroy();
}

MapOutdoor.h
Arat:
CGraphicImageInstance m_WaterInstances[60];

Bu şekilde çok daha sağlıklı olur diye düşünüyorum, kullanacak arkadaşlara max. 60 değerinde kullanmalarını tavsiye ediyorum.
 
Son düzenleme:

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

Geri
Üst