Documented -DREGULAR_EDITION

Disabled the sound printfs for now.
This commit is contained in:
Steven Fuller 2001-10-21 18:36:28 +00:00 committed by Patryk Obara
parent 47dfa780d5
commit ea23e5a1bb
5 changed files with 37 additions and 27 deletions

3
README
View file

@ -43,6 +43,9 @@ can just use unzip to extract the files from the .exe), add -DALIEN_DEMO to
CFLAGS (the one that's uncommented). Rename all game files lowercase.
Be sure to install the latest OpenAL (http://www.openal.org) CVS.
If you have the regular edition, add -DREGULAR_EDITION to CFLAGS.
relnev:~/avp/AvP Demo 3 - Alien$ ls
aenglish.txt alienavp_huds/ alienfastfile/ avp_rifs/
relnev:~/avp/Gold Edition$ ls

View file

@ -511,8 +511,10 @@ void Sound_Play(SOUNDINDEX soundNumber, char *format, ...)
if(loop) ActiveSounds[newIndex].loop = 1;
else ActiveSounds[newIndex].loop = 0;
/*
printf("Play: new = %d. num = %d, p = %d, v = %d, pi = %d, l = %d, mi = %d, rev = %d\n", newIndex, soundNumber, priority, volume, pitch, loop, marine_ignore, reverb_off);
printf("Play: %d %d %s l:%d\n", newIndex, soundNumber, GameSounds[soundNumber].wavName, loop);
*/
if(worldPosn)
{
@ -588,9 +590,9 @@ void Sound_Stop(int activeSoundNumber)
/* stop the sound: it may have already stopped, of course, but never mind */
PlatStopSound(activeSoundNumber);
/*
printf("Stop: %d %d %s\n", activeSoundNumber, soundNo, GameSounds[soundNo].wavName);
*/
/* release the active sound slot */
buf = ActiveSounds[activeSoundNumber].ds3DBufferP;
ActiveSounds[activeSoundNumber] = BlankActiveSound;

View file

@ -574,7 +574,7 @@ void InitNPCs(RIFFHANDLE h)
#endif
/* i believe this was added for the gold edition */
#if !(PREDATOR_DEMO||MARINE_DEMO||ALIEN_DEMO)//||REGULAR_EDITION /* TODO */
#if !(PREDATOR_DEMO||MARINE_DEMO||ALIEN_DEMO||REGULAR_EDITION)
if(AvP.PlayerType==I_Marine || Load_HNPC[HNPC_Marine])
{
//need to load the mdisk hierarchy

View file

@ -413,11 +413,15 @@ int PlatPlaySound(int activeIndex)
alSourcePlay (ActiveSounds[activeIndex].ds3DBufferP);
if (ActiveSounds[activeIndex].loop) {
/*
printf("Playing sound %i %s looping in slot %i\n",
si, GameSounds[si].wavName, activeIndex);
*/
} else {
/*
printf("Playing sound %i %s once in slot %i\n",
si, GameSounds[si].wavName, activeIndex);
*/
}
}
@ -426,7 +430,7 @@ int PlatPlaySound(int activeIndex)
void PlatStopSound(int activeIndex)
{
printf("PlatStopSound(%d)\n", activeIndex);
/* printf("PlatStopSound(%d)\n", activeIndex); */
// if (ActiveSounds[activeIndex].paused)
// alSourcePause (ActiveSounds[activeIndex].ds3DBufferP);
@ -490,18 +494,18 @@ int PlatChangeSoundPitch(int activeIndex, int pitch)
}
ActiveSounds[activeIndex].pitch = pitch;
/*
printf("NEWFREQ PlatChangeSoundPitch(%d, %d) = %f\n", activeIndex, pitch, (double)frequency / (double)GameSounds[ActiveSounds[activeIndex].soundIndex].dsFrequency);
*/
return 1;
}
int PlatSoundHasStopped(int activeIndex)
{
ALint val;
/*
printf("PlatSoundHasStopped(%d)\n", activeIndex);
*/
alGetSourceiv (ActiveSounds[activeIndex].ds3DBufferP,
AL_SOURCE_STATE, &val);
@ -577,9 +581,9 @@ int PlatDo3dSound(int activeIndex)
newVolume = VOLUME_MAX;
if (newVolume < VOLUME_MIN)
newVolume = VOLUME_MIN;
/*
printf("PlatDo3dSound: idx = %d, volume = %d, distance = %d\n", activeIndex, newVolume, distance);
*/
if (PlatChangeSoundVolume (activeIndex, newVolume) == SOUND_PLATFORMERROR) {
return SOUND_PLATFORMERROR;
}
@ -595,8 +599,9 @@ int PlatDo3dSound(int activeIndex)
ActiveSounds[activeIndex].PropSetP_pos[2] = (ALfloat)relativePosn.vz / (ALfloat)distance;
alSourcefv (ActiveSounds[activeIndex].ds3DBufferP, AL_POSITION, ActiveSounds[activeIndex].PropSetP_pos);
/*
printf("Sound : (%f, %f, %f) [%d] [%d,%d]\n", ActiveSounds[activeIndex].PropSetP_pos[0], ActiveSounds[activeIndex].PropSetP_pos[1], ActiveSounds[activeIndex].PropSetP_pos[2], activeIndex, ActiveSounds[activeIndex].threedeedata.inner_range, ActiveSounds[activeIndex].threedeedata.outer_range);
*/
ActiveSounds[activeIndex].PropSetP_vel[0] =
ActiveSounds[activeIndex].threedeedata.velocity.vx;
ActiveSounds[activeIndex].PropSetP_vel[1] =
@ -652,9 +657,9 @@ void PlatUpdatePlayer()
pos[1] = Global_VDB_Ptr->VDB_World.vy; // 10000.0;
pos[2] = Global_VDB_Ptr->VDB_World.vz; // 10000.0;
/*
printf("Player: (%f, %f, %f) (%f, %f, %f %f, %f, %f)\n", pos[0], pos[1], pos[2], or[0], or[1], or[2], or[3], or[4], or[5]);
*/
// fixme: add reverb check
alListenerfv (AL_ORIENTATION, or);
// alListenerfv (AL_VELOCITY, vel);
@ -728,7 +733,7 @@ void UpdateSoundFrequencies()
extern int TimeScale;
int i;
printf("FREQ UpdateSoundFreqncies()\n");
/* printf("FREQ UpdateSoundFreqncies()\n"); */
if (!SoundSwitchedOn)
return;
@ -738,10 +743,10 @@ void UpdateSoundFrequencies()
if (gameIndex == SID_NOSOUND)
continue;
/*
if (TimeScale != ONE_FIXED)
printf("NEWFREQ UpdateSoundFreqncies %d, f = %d\n", i, MUL_FIXED(GameSounds[gameIndex].dsFrequency,TimeScale));
*/
/* TODO: huh? */
if (ActiveSounds[i].pitch != GameSounds[gameIndex].pitch)
PlatChangeSoundPitch(i,ActiveSounds[i].pitch);
@ -758,9 +763,9 @@ int LoadWavFile(int soundNum, char * wavFileName)
ALsizei size, freq, bits;
ALenum format;
ALvoid *data;
/*
printf("LoadWavFile(%d, %s) - sound\n", soundNum, wavFileName);
*/
alutLoadWAV (wavFileName, &data, &format, &size, &bits, &freq);
alGenBuffers (1, &(GameSounds[soundNum].dsBufferP));
alBufferData (GameSounds[soundNum].dsBufferP, format, data, size, freq);
@ -797,15 +802,15 @@ unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr)
ALuint rsize;
int slen;
printf("ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr);
/* printf("ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr); */
slen = strlen (bufferPtr) + 1;
GameSounds[soundIndex].wavName = (char *)AllocateMem (slen);
strcpy (GameSounds[soundIndex].wavName, bufferPtr);
bufferPtr += slen;
/*
printf("Loaded %s\n", GameSounds[soundIndex].wavName);
*/
#if 1 /* TODO: replace with own routine later */
if (acLoadWAV (bufferPtr, &rsize, &udata, &rfmt,
&rchan, &rfreq) == NULL) {
@ -866,7 +871,7 @@ int LoadWavFromFastFile(int soundNum, char * wavFileName)
unsigned char *buf;
unsigned int len = 0;
printf("LoadWavFromFastFile(%d, %s)\n", soundNum, wavFileName);
/* printf("LoadWavFromFastFile(%d, %s)\n", soundNum, wavFileName); */
if ((fp = ffopen (wavFileName, "rb")) != NULL) {
ffseek (fp, 0, SEEK_END);

View file

@ -296,20 +296,20 @@ void RenderSmallFontString_Wrapped(char *textPtr,RECT* area,int alpha,int* outpu
void RenderKeyConfigRectangle(int alpha)
{
/*
void Hardware_RenderKeyConfigRectangle(int alpha);
Hardware_RenderKeyConfigRectangle(alpha);
*/
/*
fprintf(stderr, "RenderKeyConfigRectangle(%d)\n", alpha);
*/
}
void RenderHighlightRectangle(int x1,int y1,int x2,int y2, int r, int g, int b)
{
/*
void Hardware_RenderHighlightRectangle(int x1,int y1,int x2,int y2,int r, int g, int b);
Hardware_RenderHighlightRectangle(x1, y1, x2, y2, r, g, b);
*/
fprintf(stderr, "RenderHighlightRectangle(%d, %d, %d, %d, %d, %d, %d)\n", x1, y1, x2, y2, r, g, b);
/*
fprintf(stderr, "RenderHighlightRectangle(%d, %d, %d, %d, %d, %d, %d)\n", x1, y1, x2, y2, r, g, b);
*/
}
int LengthOfMenuText(char *textPtr)