diff options
| author | oy <Tom_Adams@web.de> | 2010-10-06 23:07:35 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-10-06 23:07:35 +0200 |
| commit | 3a98f7a048c044ce0d870320fc0b1def0db4f7fb (patch) | |
| tree | 7dfa1826e537355b37d00e77558ca623a915bac2 /src/engine/client/graphics.cpp | |
| parent | a62a7413d1ff25c8e07657b96a485f001004619a (diff) | |
| download | zcatch-3a98f7a048c044ce0d870320fc0b1def0db4f7fb.tar.gz zcatch-3a98f7a048c044ce0d870320fc0b1def0db4f7fb.zip | |
added mod system. Closes #34
Diffstat (limited to 'src/engine/client/graphics.cpp')
| -rw-r--r-- | src/engine/client/graphics.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp index 14a88394..665f9ce7 100644 --- a/src/engine/client/graphics.cpp +++ b/src/engine/client/graphics.cpp @@ -354,7 +354,7 @@ int CGraphics_OpenGL::LoadTextureRaw(int Width, int Height, int Format, const vo } // simple uncompressed RGBA loaders -int CGraphics_OpenGL::LoadTexture(const char *pFilename, int StoreFormat, int Flags) +int CGraphics_OpenGL::LoadTexture(const char *pFilename, int StorageType, int StoreFormat, int Flags) { int l = str_length(pFilename); int Id; @@ -362,7 +362,7 @@ int CGraphics_OpenGL::LoadTexture(const char *pFilename, int StoreFormat, int Fl if(l < 3) return -1; - if(LoadPNG(&Img, pFilename)) + if(LoadPNG(&Img, pFilename, StorageType)) { if (StoreFormat == CImageInfo::FORMAT_AUTO) StoreFormat = Img.m_Format; @@ -375,7 +375,7 @@ int CGraphics_OpenGL::LoadTexture(const char *pFilename, int StoreFormat, int Fl return m_InvalidTexture; } -int CGraphics_OpenGL::LoadPNG(CImageInfo *pImg, const char *pFilename) +int CGraphics_OpenGL::LoadPNG(CImageInfo *pImg, const char *pFilename, int StorageType) { char aCompleteFilename[512]; unsigned char *pBuffer; @@ -384,7 +384,7 @@ int CGraphics_OpenGL::LoadPNG(CImageInfo *pImg, const char *pFilename) // open file for reading png_init(0,0); // ignore_convention - IOHANDLE File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, aCompleteFilename, sizeof(aCompleteFilename)); + IOHANDLE File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, StorageType, aCompleteFilename, sizeof(aCompleteFilename)); if(File) io_close(File); else @@ -450,7 +450,7 @@ void CGraphics_OpenGL::ScreenshotDirect(const char *pFilename) char aWholePath[1024]; png_t Png; // ignore_convention - IOHANDLE File = m_pStorage->OpenFile(pFilename, IOFLAG_WRITE, aWholePath, sizeof(aWholePath)); + IOHANDLE File = m_pStorage->OpenFile(pFilename, IOFLAG_WRITE, IStorage::TYPE_SAVE, aWholePath, sizeof(aWholePath)); if(File) io_close(File); @@ -898,7 +898,7 @@ void CGraphics_SDL::Swap() { IOHANDLE io; str_format(aFilename, sizeof(aFilename), "screenshots/screenshot%s-%05d.png", aDate, Index); - io = m_pStorage->OpenFile(aFilename, IOFLAG_READ); + io = m_pStorage->OpenFile(aFilename, IOFLAG_READ, IStorage::TYPE_SAVE); if(io) io_close(io); else |