From a9cf09aa34a6be79ea6509a39076f3164993f76c Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Mon, 30 Jul 2001 00:05:20 +0000 Subject: More compiling. --- src/avp/player.c | 4 +++- src/avp/psnd.c | 32 +++++++++++++++++++------------- src/stubs.c | 18 ------------------ src/win95/awbmpld.cpp | 9 +++------ src/win95/awiffld.cpp | 10 +++++----- src/win95/awpnmld.cpp | 21 +++++++++++---------- src/win95/awtexld.h | 2 ++ 7 files changed, 43 insertions(+), 53 deletions(-) (limited to 'src') diff --git a/src/avp/player.c b/src/avp/player.c index 32240f4..9a3791f 100644 --- a/src/avp/player.c +++ b/src/avp/player.c @@ -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**************************************************************************************** diff --git a/src/avp/psnd.c b/src/avp/psnd.c index 5ec5550..6a6f44d 100644 --- a/src/avp/psnd.c +++ b/src/avp/psnd.c @@ -4,6 +4,8 @@ #define DB_LEVEL 1 +#include + #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); } } diff --git a/src/stubs.c b/src/stubs.c index 5d56a4e..4469610 100644 --- a/src/stubs.c +++ b/src/stubs.c @@ -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() diff --git a/src/win95/awbmpld.cpp b/src/win95/awbmpld.cpp index e47b156..c6cfdcf 100644 --- a/src/win95/awbmpld.cpp +++ b/src/win95/awbmpld.cpp @@ -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) diff --git a/src/win95/awiffld.cpp b/src/win95/awiffld.cpp index 0493d64..e281079 100644 --- a/src/win95/awiffld.cpp +++ b/src/win95/awiffld.cpp @@ -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; } } } diff --git a/src/win95/awpnmld.cpp b/src/win95/awpnmld.cpp index 4e54f2e..30315b9 100644 --- a/src/win95/awpnmld.cpp +++ b/src/win95/awpnmld.cpp @@ -1,10 +1,16 @@ -#include "advwin32.h" +#include +#include +#include +#include + +#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) diff --git a/src/win95/awtexld.h b/src/win95/awtexld.h index 5f03df1..5815eff 100644 --- a/src/win95/awtexld.h +++ b/src/win95/awtexld.h @@ -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, ...); -- cgit v1.3