More compiling.

This commit is contained in:
Steven Fuller 2001-07-30 00:05:20 +00:00 committed by Patryk Obara
parent 4db15e7459
commit a9cf09aa34
9 changed files with 49 additions and 59 deletions

View file

@ -1,9 +1,11 @@
#include "fixer.h"
#ifndef DB_LEVEL
#define DB_LEVEL 4
#endif
#include "db.h"
#include "awTexLd.hpp"
#include "awtexld.hpp"
// BMP Loader
@ -183,9 +185,4 @@ void AwBmpLoader::LoadNextRow(AwTl::PtrUnion pRow)
m_pMedium->MovePos(bmp_filepitchpad);
}
#ifdef _MSC_VER
// VC5.0 tries to compile out code that is in a library
// and it thinks isn't being used
#line 186
#endif
AWTEXLD_IMPLEMENT_DYNCREATE("BM",AwBmpLoader)

View file

@ -245,7 +245,7 @@ void AwIffLoader::LoadHeaderInfo(MediaMedium * pMedium)
if (!m_ifData.Load(pMedium) || !m_ifData.GetContents())
{
// if (NO_ERROR == (awTlLastWinErr = GetLastError()))
// awTlLastErr = AW_TLE_BADFILEDATA;
awTlLastErr = AW_TLE_BADFILEDATA;
// else
// awTlLastErr = AW_TLE_CANTREADFILE;
@ -378,18 +378,18 @@ void AwIffLoader::OnBeginRestoring(unsigned nMaxPaletteSize)
break;
default:
db_log3("AwCreateTexture() [AwIffLoader::OnBeginRestoring] : ERROR: IFF mask field wrong");
// awTlLastErr = AW_TLE_BADFILEDATA;
awTlLastErr = AW_TLE_BADFILEDATA;
}
}
else
{
// awTlLastErr = AW_TLE_CANTPALETTIZE; // no suitable chunk found
awTlLastErr = AW_TLE_CANTPALETTIZE; // no suitable chunk found
db_log3("AwCreateTexture() [AwIffLoader::OnBeginRestoring] : ERROR: No suitable IFF body chunk found");
}
}
else
{
// awTlLastErr = AW_TLE_BADFILEDATA;
awTlLastErr = AW_TLE_BADFILEDATA;
db_log3("AwCreateTexture() [AwIffLoader::OnBeginRestoring] : ERROR: IFF file not loaded or contains no image data");
}
}
@ -465,7 +465,7 @@ void AwIffLoader::ConvertRow(AwTl::PtrUnion pDest, unsigned nDestWidth, AwTl::Pt
break;
default:
db_log3("AwCreateTexture() [AwIffLoader::ConvertRow] : ERROR: IFF mask field wrong");
// awTlLastErr = AW_TLE_BADFILEDATA;
awTlLastErr = AW_TLE_BADFILEDATA;
}
}
}

View file

@ -1,10 +1,16 @@
#include "advwin32.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "fixer.h"
#ifndef DB_LEVEL
#define DB_LEVEL 4
#endif
#include "db.h"
#include "awTexLd.hpp"
#include "awtexld.hpp"
// PNM loaders
@ -87,8 +93,8 @@ void AwPpmLoader::LoadHeaderInfo(MediaMedium * pMedium)
db_logf4(("\tPPM_maxval is %u",pm_maxval));
if (pm_maxval > 255)
{
awTlLastErr = AW_TLE_BADFILEFORMAT;
db_log3("AwCreateTexture(): PPM_maxval too large");
// awTlLastErr = AW_TLE_BADFILEFORMAT;
db_log3("AwCreateTexture() [AwPpmLoader::LoadHeaderInfo] : PPM_maxval too large");
}
m_nPaletteSize = 0;
@ -147,7 +153,7 @@ void AwPgmLoader::LoadHeaderInfo(MediaMedium * pMedium)
if (pm_maxval > 255)
{
awTlLastErr = AW_TLE_BADFILEFORMAT;
db_log3("AwCreateTexture(): PGM_maxval too large");
db_log3("AwCreateTexture() [AwPgmLoader::LoadHeaderInfo] : PGM_maxval too large");
}
m_nPaletteSize = pm_maxval+1;
@ -226,11 +232,6 @@ void AwPbmLoader::LoadNextRow(AwTl::PtrUnion pRow)
}
}
#ifdef _MSC_VER
// VC5.0 tries to compile out code that is in a library
// and it thinks isn't being used
#line 228
#endif
AWTEXLD_IMPLEMENT_DYNCREATE("P6",AwPpmLoader)
AWTEXLD_IMPLEMENT_DYNCREATE("P5",AwPgmLoader)
AWTEXLD_IMPLEMENT_DYNCREATE("P4",AwPbmLoader)

View file

@ -67,6 +67,8 @@ enum
#define ATIncludeSurfaceDb(p, d, s) fprintf(stderr, "ATIncludeSurfaceDb: %s/%d: %s\n", __FILE__, __LINE__, s)
#define ATIncludeTextureDb(p, d, s) fprintf(stderr, "ATIncludeTextureDb: %s/%d: %s\n", __FILE__, __LINE__, s)
extern AW_TL_ERC awTlLastErr;
extern D3DTexture * AwCreateTexture(char const * _argFormatS, ...);
extern DDSurface * AwCreateSurface(char const * _argFormatS, ...);