diff --git a/Makefile b/Makefile index 0aaeee9..9339c72 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ LDLIBS += -L/usr/X11R6/lib -lX11 -lXext -lGL `sdl-config --libs` AFLAGS = -g -Iinclude/ -w+macro-params -w+orphan-labels -w+number-overflow -ROOT = main.c mathline.c math.asm net.c render.c opengl.c winapi.c stubs.c stubs2.cpp afont.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.c version.c +ROOT = main.c mathline.c math.asm net.c render.c opengl.c openal.c winapi.c stubs.c stubs2.cpp afont.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.c version.c AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cconvars.cpp cdtrackselection.cpp cheatmodes.c comp_map.c comp_shp.c consolelog.cpp davehook.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c game_statistics.c gamecmds.cpp gameflow.c gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c maps.c mempool.c messagehistory.c missions.cpp movement.c paintball.c particle.c pfarlocs.c pheromon.c player.c pmove.c psnd.c psndproj.c pvisible.c savegame.c scream.cpp secstats.c sfx.c stratdef.c targeting.c track.c triggers.c weapons.c SHAPES = cube.c SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp diff --git a/src/openal.c b/src/openal.c new file mode 100644 index 0000000..ab668c0 --- /dev/null +++ b/src/openal.c @@ -0,0 +1,127 @@ +#include +#include +#include + +#include "fixer.h" + +#include "3dc.h" +#include "platform.h" +#include "psndplat.h" + + /* psndplat.cpp */ +ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE]; +ACTIVESOUNDSAMPLE BlankActiveSound = {SID_NOSOUND,ASP_Minimum,0,0,NULL,0,0,0,0,0, { {0,0,0},{0,0,0},0,0 }, NULL, NULL, NULL}; +SOUNDSAMPLEDATA BlankGameSound = {0,0,0,0,NULL,0,0,NULL,0}; +SOUNDSAMPLEDATA GameSounds[SID_MAXIMUM]; + +int PlatStartSoundSys() +{ + fprintf(stderr, "PlatStartSoundSys()\n"); + + return 0; +} + +void PlatEndSoundSys() +{ + fprintf(stderr, "PlatEndSoundSys()\n"); +} + +int PlatChangeGlobalVolume(int volume) +{ + fprintf(stderr, "PlatChangeGlobalVolume(%d)\n", volume); + + return 1; +} + +int PlatPlaySound(int activeIndex) +{ + fprintf(stderr, "PlatPlaySound(%d)\n", activeIndex); + + return 1; +} + +void PlatStopSound(int activeIndex) +{ + fprintf(stderr, "PlatStopSound(%d)\n", activeIndex); +} + +int PlatChangeSoundVolume(int activeIndex, int volume) +{ + fprintf(stderr, "PlatChangeSoundVolume(%d, %d)\n", activeIndex, volume); + + return 1; +} + +int PlatChangeSoundPitch(int activeIndex, int pitch) +{ + fprintf(stderr, "PlatChangeSoundPitch(%d, %d)\n", activeIndex, pitch); + + return 1; +} + +int PlatSoundHasStopped(int activeIndex) +{ + fprintf(stderr, "PlatSoundHasStopped(%d)\n", activeIndex); + + return 1; +} + +int PlatDo3dSound(int activeIndex) +{ + fprintf(stderr, "PlatDo3dSound(%d)\n", activeIndex); + + return 1; +} + +void PlatEndGameSound(SOUNDINDEX index) +{ + fprintf(stderr, "PlatEndGameSound(%d)\n", index); +} + +unsigned int PlatMaxHWSounds() +{ + fprintf(stderr, "PlatMaxHWSounds()\n"); + + return 256; +} + +void InitialiseBaseFrequency(SOUNDINDEX soundNum) +{ + fprintf(stderr, "InitialiseBaseFrequency(%d)\n", soundNum); +} + +int LoadWavFile(int soundNum, char * wavFileName) +{ + fprintf(stderr, "LoadWavFile(%d, %s)\n", soundNum, wavFileName); + + return 0; +} + +unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr) +{ + fprintf(stderr, "ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr); + + return 0; +} + +int LoadWavFromFastFile(int soundNum, char * wavFileName) +{ + fprintf(stderr, "LoadWavFromFastFile(%d, %s)\n", soundNum, wavFileName); + + return 0; +} + +void PlatUpdatePlayer() +{ + fprintf(stderr, "PlatUpdatePlayer()\n"); +} + +void PlatSetEnviroment(unsigned int env_index, float reverb_mix) +{ + fprintf(stderr, "PlatSetEnvironment(%d, %f)\n", env_index, reverb_mix); +} + +void UpdateSoundFrequencies() +{ + fprintf(stderr, "UpdateSoundFreqncies()\n"); +} diff --git a/src/stubs.c b/src/stubs.c index ba36e93..28033be 100644 --- a/src/stubs.c +++ b/src/stubs.c @@ -118,126 +118,6 @@ void UpdateAllFMVTextures() } - -/* psndplat.cpp */ -ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE]; -ACTIVESOUNDSAMPLE BlankActiveSound = {SID_NOSOUND,ASP_Minimum,0,0,NULL,0,0,0,0,0, { {0,0,0},{0,0,0},0,0 }, NULL, NULL, NULL}; -SOUNDSAMPLEDATA BlankGameSound = {0,0,0,0,NULL,0,0,NULL,0}; -SOUNDSAMPLEDATA GameSounds[SID_MAXIMUM]; - -int PlatStartSoundSys() -{ - fprintf(stderr, "PlatStartSoundSys()\n"); - - return 0; -} - -void PlatEndSoundSys() -{ - fprintf(stderr, "PlatEndSoundSys()\n"); -} - -int PlatChangeGlobalVolume(int volume) -{ - fprintf(stderr, "PlatChangeGlobalVolume(%d)\n", volume); - - return 1; -} - -int PlatPlaySound(int activeIndex) -{ - fprintf(stderr, "PlatPlaySound(%d)\n", activeIndex); - - return 1; -} - -void PlatStopSound(int activeIndex) -{ - fprintf(stderr, "PlatStopSound(%d)\n", activeIndex); -} - -int PlatChangeSoundVolume(int activeIndex, int volume) -{ - fprintf(stderr, "PlatChangeSoundVolume(%d, %d)\n", activeIndex, volume); - - return 1; -} - -int PlatChangeSoundPitch(int activeIndex, int pitch) -{ - fprintf(stderr, "PlatChangeSoundPitch(%d, %d)\n", activeIndex, pitch); - - return 1; -} - -int PlatSoundHasStopped(int activeIndex) -{ - fprintf(stderr, "PlatSoundHasStopped(%d)\n", activeIndex); - - return 1; -} - -int PlatDo3dSound(int activeIndex) -{ - fprintf(stderr, "PlatDo3dSound(%d)\n", activeIndex); - - return 1; -} - -void PlatEndGameSound(SOUNDINDEX index) -{ - fprintf(stderr, "PlatEndGameSound(%d)\n", index); -} - -unsigned int PlatMaxHWSounds() -{ - fprintf(stderr, "PlatMaxHWSounds()\n"); - - return 256; -} - -void InitialiseBaseFrequency(SOUNDINDEX soundNum) -{ - fprintf(stderr, "InitialiseBaseFrequency(%d)\n", soundNum); -} - -int LoadWavFile(int soundNum, char * wavFileName) -{ - fprintf(stderr, "LoadWavFile(%d, %s)\n", soundNum, wavFileName); - - return 0; -} - -unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr) -{ - fprintf(stderr, "ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr); - - return 0; -} - -int LoadWavFromFastFile(int soundNum, char * wavFileName) -{ - fprintf(stderr, "LoadWavFromFastFile(%d, %s)\n", soundNum, wavFileName); - - return 0; -} - -void PlatUpdatePlayer() -{ - fprintf(stderr, "PlatUpdatePlayer()\n"); -} - -void PlatSetEnviroment(unsigned int env_index, float reverb_mix) -{ - fprintf(stderr, "PlatSetEnvironment(%d, %f)\n", env_index, reverb_mix); -} - -void UpdateSoundFrequencies() -{ - fprintf(stderr, "UpdateSoundFreqncies()\n"); -} - - /* alt_tab.cpp */ void ATIncludeSurface(void * pSurface, void * hBackup) {