/programs/games/doom/trunk/d_main.c |
---|
1120,8 → 1120,8 |
printf ("D_CheckNetGame: Checking network game status.\n\r"); |
D_CheckNetGame (); |
// printf ("S_Init: Setting up sound.\n\r"); |
// S_Init (snd_SfxVolume /* *8 */, snd_MusicVolume /* *8*/ ); |
printf ("S_Init: Setting up sound.\n\r"); |
S_Init (snd_SfxVolume /* *8 */, snd_MusicVolume /* *8*/ ); |
printf ("HU_Init: Setting up heads up display.\n\r"); |
HU_Init (); |
/programs/games/doom/trunk/h/r_defs.h |
---|
23,7 → 23,7 |
#ifndef __R_DEFS__ |
#define __R_DEFS__ |
#include "doomtype.h" |
// Screenwidth. |
#include "doomdef.h" |
/programs/games/doom/trunk/i_sound.c |
---|
48,6 → 48,8 |
#include "doomdef.h" |
#include "kolibri.h" |
// The number of internal mixing channels, |
// the samples calculated for each mixing step, |
// the size of the 16bit, 2 hardware channel (stereo) |
55,7 → 57,7 |
// Needed for calling the actual sound output. |
#define SAMPLECOUNT 512 |
#define SAMPLECOUNT 8192 |
#define NUM_CHANNELS 16 |
// It is 2 for 16bit, and 2 for two channels. |
#define BUFMUL 4 |
332,8 → 334,8 |
channels[i] = 0; |
} |
// for (i=-128 ; i<128 ; i++) |
// steptablemid[i] = (int)(pow(2.0, (i/64.0))*65536.0); |
for (i=-128 ; i<128 ; i++) |
steptablemid[i] = (int)(pow(2.0, (i/64.0))*65536.0); |
// Generates volume lookup tables |
// which also turn the unsigned samples |
423,6 → 425,10 |
// |
// This function currently supports only 16bit. |
// |
extern DWORD hMixBuff[4]; |
extern int mix_ptr; |
void I_UpdateSound( void ) |
{ |
441,6 → 447,9 |
// Mixing channel index. |
int chan; |
int i; |
int flags; |
flags = 0; |
// Left and right channel |
// are in global mixbuffer, alternating. |
455,7 → 464,7 |
// Mix sounds into the mixing buffer. |
// Loop over step*SAMPLECOUNT, |
// that is 512 values for two channels. |
while (leftout != leftend) |
for (i=0; i < 8192; i++) |
{ |
// Reset left/right value. |
dl = 0; |
469,6 → 478,8 |
// Check channel, if active. |
if (channels[ chan ]) |
{ |
flags=1; |
// Get the raw data from the channel. |
sample = *channels[ chan ]; |
// Add left and right part |
515,7 → 526,10 |
leftout += step; |
rightout += step; |
} |
// I_SubmitSound(mixbuffer); |
if(flags) |
{ WaveOut(hMixBuff[mix_ptr],(char*)&mixbuffer[0],32768); |
mix_ptr= (mix_ptr+1)&3; |
}; |
} |
/programs/games/doom/trunk/i_system.c |
---|
99,7 → 99,7 |
void I_Init (void) |
{ |
I_InitGraphics(); |
// I_InitSound(); |
I_InitSound(); |
} |
// |
/programs/games/doom/trunk/p_map.c |
---|
27,6 → 27,7 |
#include <stdlib.h> |
#include "doomtype.h" |
#include "m_bbox.h" |
#include "m_random.h" |
#include "i_system.h" |
/programs/games/doom/trunk/p_telept.c |
---|
25,7 → 25,7 |
rcsid[] = "$Id: p_telept.c,v 1.3 1997/01/28 22:08:29 b1 Exp $"; |
#include "doomtype.h" |
#include "doomdef.h" |
#include "s_sound.h" |
/programs/games/doom/trunk/r_draw.c |
---|
27,7 → 27,7 |
static const char |
rcsid[] = "$Id: r_draw.c,v 1.4 1997/02/03 16:47:55 b1 Exp $"; |
#include "doomtype.h" |
#include "doomdef.h" |
#include "i_system.h" |
/programs/games/doom/trunk/r_things.c |
---|
29,6 → 29,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include "doomtype.h" |
#include "doomdef.h" |
#include "m_swap.h" |
432,7 → 433,12 |
texturecolumn = frac>>FRACBITS; |
#ifdef RANGECHECK |
if (texturecolumn < 0 || texturecolumn >= SHORT(patch->width)) |
I_Error ("R_DrawSpriteRange: bad texturecolumn"); |
{ |
// I_Error ("R_DrawSpriteRange: bad texturecolumn"); |
printf( "texturecolumn= %d, width= %d\n\r", |
texturecolumn,patch->width); |
texturecolumn=patch->width-1; |
} |
#endif |
column = (column_t *) ((byte *)patch + |
LONG(patch->columnofs[texturecolumn])); |
/programs/games/doom/trunk/s_sound.c |
---|
45,6 → 45,9 |
//#include "qmus2mid.h" |
#include "kolibri.h" |
void WriteDebug(char *); |
// Purpose? |
112,10 → 115,10 |
// These are not used, but should be (menu). |
// Maximum volume of a sound effect. |
// Internal default is max out of 0-15. |
int snd_SfxVolume = 80; |
int snd_SfxVolume = 15; |
// Maximum volume of music. Useless so far. |
int snd_MusicVolume = 80; |
int snd_MusicVolume = 15; |
161,6 → 164,10 |
// Sets channels, SFX and music volume, |
// allocates channel buffer, sets S_sfx lookup. |
// |
DWORD hMixBuff[4]; |
int mix_ptr; |
void S_Init |
( int sfxVolume, |
int musicVolume ) |
169,7 → 176,13 |
printf("S_Init: default sfx volume %d\n", sfxVolume); |
//I_CreateSound(); |
InitSound(); |
hMixBuff[0]= CreateBuffer(15); |
hMixBuff[1]= CreateBuffer(15); |
hMixBuff[2]= CreateBuffer(15); |
hMixBuff[3]= CreateBuffer(15); |
numChannels = NUM_CHANNELS; |
// Whatever these did with DMX, these are rather dummies now. |
/programs/games/doom/trunk/w_wad.c |
---|
152,6 → 152,8 |
reloadlump = numlumps; |
} |
printf("open file %s\n\r",filename); |
if ( (handle = fopen (filename,"rb")) == NULL) |
{ |
printf (" couldn't open %s\n",filename); |