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!
Çok teşekkür ederim
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.
konuya dahil edildi.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.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 2
- Görüntüleme
- 636
- Cevaplar
- 4
- Görüntüleme
- 543
- Cevaplar
- 11
- Görüntüleme
- 739
- Cevaplar
- 3
- Görüntüleme
- 415
- Cevaplar
- 18
- Görüntüleme
- 2K
