bikral 1
bikral
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Bvural41 1
Bvural41
ShadowFon 1
ShadowFon
mavzermete 1
mavzermete
YazilimMühendisi 1
YazilimMühendisi
Fethi Polat 1
Fethi Polat
InfernoShade 1
InfernoShade
Hikaye Ekle

[C++] Su Render Düzenlemesi

  • Konuyu başlatan Konuyu başlatan Asalet-i Fatih
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 2
  • Görüntüleme Görüntüleme 635
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Kod:
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 < 99; ++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 < 99; ++i)
        m_WaterInstances[i].Destroy();
}

MapOutdoor.h
Arat:
CGraphicImageInstance m_WaterInstances[30];

Kodu kendinize göre düzenleyiniz.

 
Kod:
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 < 99; ++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 < 99; ++i)
        m_WaterInstances[i].Destroy();
}

MapOutdoor.h
Arat:
CGraphicImageInstance m_WaterInstances[30];

Kodu kendinize göre düzenleyiniz.

aynen kardeşim 99 gir değeri ama pack da 30 da bitsin
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

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

Geri
Üst