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

@ -33,11 +33,13 @@ so player.c is looking a bit bare at the moment. */
#if SupportWindows95
#include "pldnet.h"
#include "pldghost.h"
#include "dp_func.h"
//#include "dp_func.h"
#endif
#include "showcmds.h"
#include "bonusabilities.h"
extern DPID AVPDPNetID;
#define PLAYER_HMODEL 0
/*KJL****************************************************************************************

View file

@ -4,6 +4,8 @@
#define DB_LEVEL 1
#include <stdio.h>
#include "3dc.h"
#include "module.h"
#include "inline.h"
@ -546,11 +548,13 @@ void Sound_Play(SOUNDINDEX soundNumber, char *format, ...)
GameSounds[soundNumber].activeInstances++;
if(externalRef) *externalRef = newIndex;
if(soundStartPosition && ActiveSounds[newIndex].dsBufferP)
{
//sound starts part of the way in
IDirectSoundBuffer_SetCurrentPosition(ActiveSounds[newIndex].dsBufferP,soundStartPosition);
}
// if(soundStartPosition && ActiveSounds[newIndex].dsBufferP)
// {
// //sound starts part of the way in
// IDirectSoundBuffer_SetCurrentPosition(ActiveSounds[newIndex].dsBufferP,soundStartPosition);
// }
if (soundStartPosition)
fprintf(stderr, "Sound_Play: sound starts part of the way in (%d)\n", soundStartPosition);
}
void Sound_Stop(int activeSoundNumber)
@ -829,11 +833,12 @@ void Save_SoundState(int* soundHandle)
block->volume<<=7;
block->volume/=VOLUME_PLAT2DSCALE;
if(sound->dsBufferP)
IDirectSoundBuffer_GetCurrentPosition(sound->dsBufferP,(LPDWORD)&block->position,NULL);
else
// if(sound->dsBufferP)
// IDirectSoundBuffer_GetCurrentPosition(sound->dsBufferP,(LPDWORD)&block->position,NULL);
// else
block->position = 0;
fprintf(stderr, "Save_SoundState: GetCurrentPosition!\n");
strcpy((char*)(block+1),name);
}
@ -918,11 +923,12 @@ void Save_SoundsWithNoReference()
block->volume<<=7;
block->volume/=VOLUME_PLAT2DSCALE;
if(sound->dsBufferP)
IDirectSoundBuffer_GetCurrentPosition(sound->dsBufferP,(LPDWORD)&block->position,NULL);
else
// if(sound->dsBufferP)
// IDirectSoundBuffer_GetCurrentPosition(sound->dsBufferP,(LPDWORD)&block->position,NULL);
// else
block->position = 0;
fprintf(stderr, "Save_SoundsWithNoReference: GetCurrentPosition!\n");
strcpy((char*)(block+1),name);
}
}

View file

@ -19,24 +19,6 @@ extern char * SecondSoundDir;
SecondSoundDir = "./sounds";
}
/* psnd.c */
#include "psnd.h"
void Sound_Play(SOUNDINDEX soundNumber, char* format, ...)
{
fprintf(stderr, "Sound_Play(%d, %s)\n", soundNumber, format);
}
void Sound_Stop(int activeSoundNumber)
{
fprintf(stderr, "Sound_Stop(%d)\n", activeSoundNumber);
}
void Sound_Update3d(int activeSoundNumber, VECTORCH* posn)
{
fprintf(stderr, "Sound_Update3d(%d, %p)\n", activeSoundNumber, posn);
}
/* dd_func.cpp */
void FlipBuffers()

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, ...);