MSVC fixes + clean out tree

git-svn-id: https://svn.eduke32.com/eduke32@1399 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-06-05 20:09:13 +00:00
parent 2547739ff4
commit af5128bcdd
32 changed files with 100 additions and 100 deletions

View file

@ -14,11 +14,11 @@ EDITORLIB=build.lib
!ifdef DEBUG !ifdef DEBUG
# debugging options # debugging options
flags_cl= /Ot /Zi flags_cl= /Od /Zi
flags_link=/DEBUG flags_link=/DEBUG
!else !else
# release options # release options
flags_cl=/O2 /Ox #/Ob1gity flags_cl=/Ox
flags_link=/RELEASE flags_link=/RELEASE
!endif !endif
@ -31,14 +31,14 @@ ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DUSE_OPENAL /DRANCID_NETWORKING
CC=cl CC=cl
AS=ml AS=ml
LINK=link /opt:nowin98 /nologo /opt:ref LINK=link /nologo /opt:ref
MT=mt MT=mt
CFLAGS= /MD /J /nologo $(flags_cl) \ CFLAGS= /MT /J /nologo $(flags_cl) \
/I$(INC) /I$(EINC)\ /I$(SRC)\jmact /I$(SRC)\jaudiolib /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \ /I$(INC) /I$(EINC)\ /I$(SRC)\jmact /I$(SRC)\jaudiolib /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \
/DNOCOPYPROTECT /D "_CRT_SECURE_NO_DEPRECATE" -W2 $(ENGINEOPTS) \ /DNOCOPYPROTECT /D "_CRT_SECURE_NO_DEPRECATE" -W2 $(ENGINEOPTS) \
/I$(DXROOT)\include" /DRENDERTYPEWIN=1 /I$(DXROOT)\include" /DRENDERTYPEWIN=1
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \ LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
/NODEFAULTLIB:libFLAC.lib /NODEFAULTLIB:glu32.lib /NODEFAULTLIB:LIBCMT.lib /NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib
LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib $(LIBS) LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib $(LIBS)
@ -46,6 +46,9 @@ ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG !ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
LIBS=$(LIBS) /NODEFAULTLIB:libcmt.lib
!else
LIBS=$(LIBS) /NODEFAULTLIB:libcmtd.lib
!endif !endif
JMACTOBJ=$(OBJ)\util_lib.$o \ JMACTOBJ=$(OBJ)\util_lib.$o \
@ -146,15 +149,15 @@ EDITOROBJS=$(OBJ)\astub.$o \
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) # duke3d_w32$(EXESUFFIX); all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) # duke3d_w32$(EXESUFFIX);
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB) eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest $(RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest $(MT) -manifest $@.manifest $(RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB) mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest $(RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest $(MT) -manifest $@.manifest $(RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
!include Makefile.deps !include Makefile.deps

View file

@ -32,20 +32,19 @@ TARGETOPTS=/DNOASM
!ifdef DEBUG !ifdef DEBUG
# debugging options # debugging options
flags_cl=/Ot /Zi flags_cl=/Od /Zi
flags_link=/DEBUG flags_link=/DEBUG
!else !else
# release options # release options
#flags_cl=/Ox flags_cl=/Ox
flags_cl= /O2 /Ox
flags_link=/RELEASE flags_link=/RELEASE
!endif !endif
CC=cl CC=cl
AS=ml AS=ml
RC=rc RC=rc
LINK=link /opt:nowin98 /opt:ref /nologo LINK=link /opt:ref /nologo
CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /I$(DXROOT)\include" # /I$(ENETROOT)\include" CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /I$(DXROOT)\include" # /I$(ENETROOT)\include"
ASFLAGS=/nologo /coff /c ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG !ifdef DEBUG
@ -127,23 +126,23 @@ $(OBJ)\$(EDITORLIB): $(EDITOROBJS)
# the tools # the tools
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib $(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@ $(MT) -manifest $@.manifest -outputresource:$@
# DEPENDENCIES # DEPENDENCIES

View file

@ -62,14 +62,13 @@
# endif # endif
#endif #endif
// 7.18.1 Integer types // 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types // 7.18.1.1 Exact-width integer types
typedef __int8 int8_t; typedef signed __int8 int8_t;
typedef __int16 int16_t; typedef signed __int16 int16_t;
typedef __int32 int32_t; typedef signed __int32 int32_t;
typedef __int64 int64_t; typedef signed __int64 int64_t;
typedef unsigned __int8 uint8_t; typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint32_t;

View file

@ -10,7 +10,7 @@
struct sdlappicon { struct sdlappicon {
int32_t width,height; int32_t width,height;
uint32_t *pixels; uint32_t *pixels;
unsigned char *mask; uint8_t *mask;
}; };
#else #else

View file

@ -6,7 +6,7 @@
#define __build_interface_layer__ WIN #define __build_interface_layer__ WIN
extern int32_t backgroundidle; // set to 1 to tell winlayer to go to idle priority when inactive extern int32_t backgroundidle; // set to 1 to tell winlayer to go to idle priority when inactive
extern unsigned maxrefreshfreq; extern uint32_t maxrefreshfreq;
extern int32_t glusecds; extern int32_t glusecds;

View file

@ -111,9 +111,8 @@ CDECLENDSET MACRO numparams:REQ
CDECLEND numparams CDECLEND numparams
ENDM ENDM
CODE SEGMENT PUBLIC USE32 'CODE' code segment 'CODE' PUBLIC USE32
ASSUME cs:CODE,ds:CODE ASSUME cs:CODE,ds:CODE
PUBLIC _dep_begin PUBLIC _dep_begin
_dep_begin: _dep_begin:
@ -2665,5 +2664,5 @@ pentiumpro:
PUBLIC _dep_end PUBLIC _dep_end
_dep_end: _dep_end:
CODE ENDS code ends
END END

View file

@ -62,7 +62,7 @@ void Bfree(void *ptr)
free(ptr); free(ptr);
} }
int32_t Bopen(const char *pathname, int32_t flags, unsigned mode) int32_t Bopen(const char *pathname, int32_t flags, uint32_t mode)
{ {
int32_t n=0,o=0; int32_t n=0,o=0;

View file

@ -16,7 +16,7 @@ static int32_t vesares[13][2] = {{320,200},{360,200},{320,240},{360,240},{320,40
{1024,768},{1280,1024},{1600,1200} {1024,768},{1280,1024},{1600,1200}
}; };
static int32_t readconfig(BFILE *fp, const char *key, char *value, unsigned len) static int32_t readconfig(BFILE *fp, const char *key, char *value, uint32_t len)
{ {
char buf[1000], *k, *v, *eq; char buf[1000], *k, *v, *eq;
int32_t x=0; int32_t x=0;

View file

@ -2136,9 +2136,9 @@ static int32_t mytexo5, *zbit, gmaxx, gmaxy, garea, pow2m1[33];
static voxmodel_t *gvox; static voxmodel_t *gvox;
//pitch must equal xsiz*4 //pitch must equal xsiz*4
unsigned gloadtex(int32_t *picbuf, int32_t xsiz, int32_t ysiz, int32_t is8bit, int32_t dapal) uint32_t gloadtex(int32_t *picbuf, int32_t xsiz, int32_t ysiz, int32_t is8bit, int32_t dapal)
{ {
unsigned rtexid; uint32_t rtexid;
coltype *pic, *pic2; coltype *pic, *pic2;
char *cptr; char *cptr;
int32_t i; int32_t i;

View file

@ -1295,7 +1295,7 @@ void OSD_ShowDisplay(int32_t onf)
void OSD_Draw(void) void OSD_Draw(void)
{ {
unsigned topoffs; uint32_t topoffs;
int32_t row, lines, x, len; int32_t row, lines, x, len;
if (!osdinited) return; if (!osdinited) return;

View file

@ -29,7 +29,7 @@
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1" ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1"
CleanCommandLine="nmake /f Makefile.msvc veryclean" CleanCommandLine="nmake /f Makefile.msvc veryclean"
Output="eduke32.exe" Output="eduke32.exe"
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN" PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;POLYMER;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
IncludeSearchPath="" IncludeSearchPath=""
ForcedIncludes="" ForcedIncludes=""
AssemblySearchPath="" AssemblySearchPath=""

View file

@ -407,6 +407,7 @@ void A_DeleteSprite(int32_t s)
OSD_Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n",s); OSD_Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n",s);
return; return;
} }
if (apScriptGameEvent[EVENT_KILLIT]) if (apScriptGameEvent[EVENT_KILLIT])
{ {
int32_t p, pl=A_FindPlayer(&sprite[s],&p); int32_t p, pl=A_FindPlayer(&sprite[s],&p);
@ -416,6 +417,12 @@ void A_DeleteSprite(int32_t s)
if (aGameVars[g_iReturnVarID].val.lValue) if (aGameVars[g_iReturnVarID].val.lValue)
return; return;
} }
#ifdef POLYMER
if (getrendermode() == 4 && ActorExtra[s].lightId != -1)
polymer_deletelight(ActorExtra[s].lightId);
#endif
deletesprite(s); deletesprite(s);
} }
#define deletesprite A_DeleteSprite #define deletesprite A_DeleteSprite

View file

@ -546,6 +546,10 @@ typedef struct {
char cgg; char cgg;
char filler; char filler;
projectile_t projectile; projectile_t projectile;
#ifdef POLYMER
int16_t lightId;
_prlight *lightptr;
#endif
} ActorData_t; } ActorData_t;
extern ActorData_t ActorExtra[MAXSPRITES]; extern ActorData_t ActorExtra[MAXSPRITES];

View file

@ -4709,6 +4709,9 @@ int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int3
ActorExtra[i].tempang = 0; ActorExtra[i].tempang = 0;
ActorExtra[i].dispicnum = 0; ActorExtra[i].dispicnum = 0;
ActorExtra[i].lightptr = NULL;
ActorExtra[i].lightId = -1;
T1=T3=T4=T6=T7=T8=T9=0; T1=T3=T4=T6=T7=T8=T9=0;
ActorExtra[i].flags = 0; ActorExtra[i].flags = 0;
@ -4793,6 +4796,9 @@ int32_t A_Spawn(int32_t j, int32_t pn)
ActorExtra[i].lastvy = 0; ActorExtra[i].lastvy = 0;
ActorExtra[i].actorstayput = -1; ActorExtra[i].actorstayput = -1;
ActorExtra[i].lightptr = NULL;
ActorExtra[i].lightId = -1;
T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0; T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0;
ActorExtra[i].flags = 0; ActorExtra[i].flags = 0;

View file

@ -114,7 +114,7 @@ typedef struct
char *loopstart; char *loopstart;
int16_t loopcount; int16_t loopcount;
int16_t RunningStatus; int16_t RunningStatus;
unsigned time; uint32_t time;
int32_t FPSecondsPerTick; int32_t FPSecondsPerTick;
int16_t tick; int16_t tick;
int16_t beat; int16_t beat;

View file

@ -113,7 +113,7 @@ typedef struct VoiceNode
char *NextBlock; char *NextBlock;
char *LoopStart; char *LoopStart;
char *LoopEnd; char *LoopEnd;
unsigned LoopCount; uint32_t LoopCount;
uint32_t LoopSize; uint32_t LoopSize;
uint32_t BlockLength; uint32_t BlockLength;
@ -202,7 +202,7 @@ typedef struct
typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ]; typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ];
#if defined(_WIN32) #if defined(_WIN32)
static uint32_t MV_GetBufferSize(unsigned); static uint32_t MV_GetBufferSize(uint32_t);
#endif #endif
static void MV_Mix(VoiceNode *voice, int32_t buffer); static void MV_Mix(VoiceNode *voice, int32_t buffer);
static void MV_PlayVoice(VoiceNode *voice); static void MV_PlayVoice(VoiceNode *voice);
@ -228,24 +228,6 @@ static void MV_CalcPanTable(void);
static void ClearBuffer_DW(void *ptr, int32_t data, int32_t length); static void ClearBuffer_DW(void *ptr, int32_t data, int32_t length);
/*
#define ClearBuffer_DW( ptr, data, length ) \
({ void *__ptr=(ptr); unsigned __data=(data); int32_t __length=(length); \
__asm__ __volatile__ ("rep; stosl" \
: "+c" (__length), "+D" (__ptr) : "a" (__data) : "memory", "cc"); \
0; })
*/
/*
#pragma aux ClearBuffer_DW = \
"cld", \
"push es", \
"push ds", \
"pop es", \
"rep stosd", \
"pop es", \
parm [ edi ] [ eax ] [ ecx ] modify exact [ ecx edi ];
*/
#if defined(__WATCOMC__) #if defined(__WATCOMC__)
#pragma aux MV_Mix8BitMono parm [eax] [edx] [ebx] [ecx] #pragma aux MV_Mix8BitMono parm [eax] [edx] [ebx] [ecx]

View file

@ -123,7 +123,7 @@ static char *OutputType(int32_t a)
} }
} }
int32_t FX_Init(int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, unsigned mixrate) int32_t FX_Init(int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, uint32_t mixrate)
{ {
FSOUND_Close(); FSOUND_Close();

View file

@ -90,7 +90,7 @@ int32_t FX_Init
int32_t numvoices, int32_t numvoices,
int32_t numchannels, int32_t numchannels,
int32_t samplebits, int32_t samplebits,
unsigned mixrate uint32_t mixrate
) )
{ {

View file

@ -171,7 +171,7 @@ static void mixer_callback(int32_t chan, void *stream, int32_t len, void *udata)
} }
//int32_t DSL_BeginBufferedPlayback(char *BufferStart, //int32_t DSL_BeginBufferedPlayback(char *BufferStart,
// int32_t BufferSize, int32_t NumDivisions, unsigned SampleRate, // int32_t BufferSize, int32_t NumDivisions, uint32_t SampleRate,
// int32_t MixMode, void(*CallBackFunc)(void)) // int32_t MixMode, void(*CallBackFunc)(void))
int32_t DSL_BeginBufferedPlayback(char *BufferStart, int32_t(*CallBackFunc)(int32_t), int32_t BufferSize, int32_t NumDivisions) int32_t DSL_BeginBufferedPlayback(char *BufferStart, int32_t(*CallBackFunc)(int32_t), int32_t BufferSize, int32_t NumDivisions)
{ {
@ -255,7 +255,7 @@ void DSL_StopPlayback(void)
mixer_initialized = 0; mixer_initialized = 0;
} }
unsigned DSL_GetPlaybackRate(void) uint32_t DSL_GetPlaybackRate(void)
{ {
return _DSL_SampleRate; return _DSL_SampleRate;
} }

View file

@ -45,7 +45,7 @@ int32_t RestoreInterrupts(int32_t);
int32_t DSL_Init(int32_t soundcard, int32_t mixrate, int32_t numchannels, int32_t samplebits, int32_t buffersize); int32_t DSL_Init(int32_t soundcard, int32_t mixrate, int32_t numchannels, int32_t samplebits, int32_t buffersize);
void DSL_StopPlayback( void ); void DSL_StopPlayback( void );
unsigned DSL_GetPlaybackRate( void ); uint32_t DSL_GetPlaybackRate( void );
int32_t DSL_BeginBufferedPlayback(char *BufferStart, int32_t (*CallBackFunc)(int32_t), int32_t buffersize, int32_t numdivisions); int32_t DSL_BeginBufferedPlayback(char *BufferStart, int32_t (*CallBackFunc)(int32_t), int32_t buffersize, int32_t numdivisions);
void DSL_Shutdown( void ); void DSL_Shutdown( void );

View file

@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "dsound.h" #include <dsound.h>
#include "dsoundout.h" #include "dsoundout.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN

View file

@ -41,7 +41,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
#define FALSE ( !TRUE ) #define FALSE ( !TRUE )
#endif #endif
static unsigned FX_MixRate; static uint32_t FX_MixRate;
static char tempbuf[2048]; static char tempbuf[2048];
extern void initprintf(const char *, ...); extern void initprintf(const char *, ...);
@ -255,7 +255,7 @@ int32_t FX_Init
int32_t numvoices, int32_t numvoices,
int32_t numchannels, int32_t numchannels,
int32_t samplebits, int32_t samplebits,
unsigned mixrate uint32_t mixrate
) )
{ {
@ -895,7 +895,7 @@ int32_t FX_PlayRaw
( (
char *ptr, char *ptr,
uint32_t length, uint32_t length,
unsigned rate, uint32_t rate,
int32_t pitchoffset, int32_t pitchoffset,
int32_t vol, int32_t vol,
int32_t left, int32_t left,
@ -931,7 +931,7 @@ int32_t FX_PlayLoopedRaw
uint32_t length, uint32_t length,
char *loopstart, char *loopstart,
char *loopend, char *loopend,
unsigned rate, uint32_t rate,
int32_t pitchoffset, int32_t pitchoffset,
int32_t vol, int32_t vol,
int32_t left, int32_t left,

View file

@ -83,7 +83,7 @@ char *FX_ErrorString( int32_t ErrorNumber );
//int32_t FX_SetupCard( int32_t SoundCard, fx_device *device ); //int32_t FX_SetupCard( int32_t SoundCard, fx_device *device );
//int32_t FX_GetBlasterSettings( fx_blaster_config *blaster ); //int32_t FX_GetBlasterSettings( fx_blaster_config *blaster );
//int32_t FX_SetupSoundBlaster( fx_blaster_config blaster, int32_t *MaxVoices, int32_t *MaxSampleBits, int32_t *MaxChannels ); //int32_t FX_SetupSoundBlaster( fx_blaster_config blaster, int32_t *MaxVoices, int32_t *MaxSampleBits, int32_t *MaxChannels );
int32_t FX_Init( int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, unsigned mixrate ); int32_t FX_Init( int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, uint32_t mixrate );
int32_t FX_Shutdown( void ); int32_t FX_Shutdown( void );
int32_t FX_SetCallBack( void ( *function )( uint32_t ) ); int32_t FX_SetCallBack( void ( *function )( uint32_t ) );
void FX_SetVolume( int32_t volume ); void FX_SetVolume( int32_t volume );
@ -122,11 +122,11 @@ int32_t FX_PlayVOC3D( char *ptr, int32_t pitchoffset, int32_t angle, int32_t dis
int32_t priority, uint32_t callbackval ); int32_t priority, uint32_t callbackval );
int32_t FX_PlayWAV3D( char *ptr, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t FX_PlayWAV3D( char *ptr, int32_t pitchoffset, int32_t angle, int32_t distance,
int32_t priority, uint32_t callbackval ); int32_t priority, uint32_t callbackval );
int32_t FX_PlayRaw( char *ptr, uint32_t length, unsigned rate, int32_t FX_PlayRaw( char *ptr, uint32_t length, uint32_t rate,
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
uint32_t callbackval ); uint32_t callbackval );
int32_t FX_PlayLoopedRaw( char *ptr, uint32_t length, char *loopstart, int32_t FX_PlayLoopedRaw( char *ptr, uint32_t length, char *loopstart,
char *loopend, unsigned rate, int32_t pitchoffset, int32_t vol, int32_t left, char *loopend, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left,
int32_t right, int32_t priority, uint32_t callbackval ); int32_t right, int32_t priority, uint32_t callbackval );
int32_t FX_Pan3D( int32_t handle, int32_t angle, int32_t distance ); int32_t FX_Pan3D( int32_t handle, int32_t angle, int32_t distance );
int32_t FX_SoundActive( int32_t handle ); int32_t FX_SoundActive( int32_t handle );

View file

@ -40,7 +40,7 @@ enum FX_ERRORS
char *FX_ErrorString( int32_t ErrorNumber ); char *FX_ErrorString( int32_t ErrorNumber );
int32_t FX_Init( int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, unsigned mixrate ); int32_t FX_Init( int32_t SoundCard, int32_t numvoices, int32_t numchannels, int32_t samplebits, uint32_t mixrate );
int32_t FX_Shutdown( void ); int32_t FX_Shutdown( void );
int32_t FX_SetCallBack( void ( *function )( uint32_t ) ); int32_t FX_SetCallBack( void ( *function )( uint32_t ) );
void FX_SetVolume( int32_t volume ); void FX_SetVolume( int32_t volume );

View file

@ -71,12 +71,12 @@ static int32_t _MIDI_Division;
static int32_t _MIDI_Tick = 0; static int32_t _MIDI_Tick = 0;
static int32_t _MIDI_Beat = 1; static int32_t _MIDI_Beat = 1;
static int32_t _MIDI_Measure = 1; static int32_t _MIDI_Measure = 1;
static unsigned _MIDI_Time; static uint32_t _MIDI_Time;
static int32_t _MIDI_BeatsPerMeasure; static int32_t _MIDI_BeatsPerMeasure;
static int32_t _MIDI_TicksPerBeat; static int32_t _MIDI_TicksPerBeat;
static int32_t _MIDI_TimeBase; static int32_t _MIDI_TimeBase;
static int32_t _MIDI_FPSecondsPerTick; static int32_t _MIDI_FPSecondsPerTick;
static unsigned _MIDI_TotalTime; static uint32_t _MIDI_TotalTime;
static int32_t _MIDI_TotalTicks; static int32_t _MIDI_TotalTicks;
static int32_t _MIDI_TotalBeats; static int32_t _MIDI_TotalBeats;
static int32_t _MIDI_TotalMeasures; static int32_t _MIDI_TotalMeasures;

View file

@ -252,9 +252,9 @@ char *MV_ErrorString(int32_t ErrorNumber)
---------------------------------------------------------------------*/ ---------------------------------------------------------------------*/
#if defined(_WIN32) #if defined(_WIN32)
#define BASEBUFSZ (512+128) #define BASEBUFSZ (512+128)
static uint32_t MV_GetBufferSize(unsigned samplerate) static uint32_t MV_GetBufferSize(uint32_t samplerate)
{ {
static unsigned lastsr = 0, lastbufsz = 0; static uint32_t lastsr = 0, lastbufsz = 0;
if (samplerate == lastsr) return lastbufsz; if (samplerate == lastsr) return lastbufsz;
@ -370,7 +370,7 @@ static void MV_Mix(VoiceNode *voice, int32_t buffer)
void MV_PlayVoice(VoiceNode *voice) void MV_PlayVoice(VoiceNode *voice)
{ {
unsigned flags; uint32_t flags;
flags = DisableInterrupts(); flags = DisableInterrupts();
LL_SortedInsertion(&VoiceList, voice, prev, next, VoiceNode, priority); LL_SortedInsertion(&VoiceList, voice, prev, next, VoiceNode, priority);
@ -543,9 +543,9 @@ static playbackstatus MV_GetNextVOCBlock(VoiceNode *voice)
int32_t packtype; int32_t packtype;
int32_t voicemode; int32_t voicemode;
int32_t done; int32_t done;
unsigned BitsPerSample; uint32_t BitsPerSample;
unsigned Channels; uint32_t Channels;
unsigned Format; uint32_t Format;
if (voice->BlockLength > 0) if (voice->BlockLength > 0)
{ {
@ -1007,7 +1007,7 @@ static void MV_ServiceRecord(void)
VoiceNode *MV_GetVoice(int32_t handle) VoiceNode *MV_GetVoice(int32_t handle)
{ {
VoiceNode *voice; VoiceNode *voice;
unsigned flags; uint32_t flags;
flags = DisableInterrupts(); flags = DisableInterrupts();
@ -1092,7 +1092,7 @@ int32_t MV_KillAllVoices(void)
int32_t MV_Kill(int32_t handle) int32_t MV_Kill(int32_t handle)
{ {
VoiceNode *voice; VoiceNode *voice;
unsigned flags; uint32_t flags;
uint32_t callbackval; uint32_t callbackval;
if (!MV_Installed) if (!MV_Installed)
@ -1136,7 +1136,7 @@ int32_t MV_VoicesPlaying(void)
{ {
VoiceNode *voice; VoiceNode *voice;
int32_t NumVoices = 0; int32_t NumVoices = 0;
unsigned flags; uint32_t flags;
if (!MV_Installed) if (!MV_Installed)
{ {
@ -1167,7 +1167,7 @@ VoiceNode *MV_AllocVoice(int32_t priority)
{ {
VoiceNode *voice; VoiceNode *voice;
VoiceNode *node; VoiceNode *node;
unsigned flags; uint32_t flags;
//return(NULL); //return(NULL);
if (MV_Recording) if (MV_Recording)
@ -1235,7 +1235,7 @@ int32_t MV_VoiceAvailable(int32_t priority)
{ {
VoiceNode *voice; VoiceNode *voice;
VoiceNode *node; VoiceNode *node;
unsigned flags; uint32_t flags;
// Check if we have any free voices // Check if we have any free voices
if (!LL_Empty(&VoicePool, next, prev)) if (!LL_Empty(&VoicePool, next, prev))
@ -1370,7 +1370,7 @@ static int16_t *MV_GetVolumeTable(int32_t vol)
static void MV_SetVoiceMixMode(VoiceNode *voice) static void MV_SetVoiceMixMode(VoiceNode *voice)
{ {
unsigned flags; uint32_t flags;
int32_t test; int32_t test;
flags = DisableInterrupts(); flags = DisableInterrupts();
@ -1524,7 +1524,7 @@ void MV_SetVoiceVolume(VoiceNode *voice, int32_t vol, int32_t left, int32_t righ
int32_t MV_EndLooping(int32_t handle) int32_t MV_EndLooping(int32_t handle)
{ {
VoiceNode *voice; VoiceNode *voice;
unsigned flags; uint32_t flags;
if (!MV_Installed) if (!MV_Installed)
{ {
@ -1865,7 +1865,7 @@ void MV_StopPlayback(void)
{ {
VoiceNode *voice; VoiceNode *voice;
VoiceNode *next; VoiceNode *next;
unsigned flags; uint32_t flags;
// Stop sound playback // Stop sound playback
#if defined(_WIN32) #if defined(_WIN32)
@ -2030,7 +2030,7 @@ int32_t MV_StartDemandFeedPlayback(void(*function)(char **ptr, uint32_t *length)
priority. priority.
---------------------------------------------------------------------*/ ---------------------------------------------------------------------*/
int32_t MV_PlayRaw(char *ptr, uint32_t length, unsigned rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval) int32_t MV_PlayRaw(char *ptr, uint32_t length, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
{ {
int32_t status; int32_t status;
@ -2047,7 +2047,7 @@ int32_t MV_PlayRaw(char *ptr, uint32_t length, unsigned rate, int32_t pitchoffse
priority. priority.
---------------------------------------------------------------------*/ ---------------------------------------------------------------------*/
int32_t MV_PlayLoopedRaw(char *ptr, int32_t length, char *loopstart, char *loopend, unsigned rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval) int32_t MV_PlayLoopedRaw(char *ptr, int32_t length, char *loopstart, char *loopend, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
{ {
VoiceNode *voice; VoiceNode *voice;
@ -2732,7 +2732,7 @@ int32_t MV_GetReverseStereo(void)
int32_t MV_TestPlayback(void) int32_t MV_TestPlayback(void)
{ {
unsigned flags; uint32_t flags;
int32_t time; int32_t time;
int32_t start; int32_t start;
int32_t status; int32_t status;
@ -2935,7 +2935,7 @@ int32_t MV_Init(int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numc
int32_t MV_Shutdown(void) int32_t MV_Shutdown(void)
{ {
int32_t buffer; int32_t buffer;
unsigned flags; uint32_t flags;
if (!MV_Installed) if (!MV_Installed)
{ {

View file

@ -91,10 +91,10 @@ int32_t MV_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *
int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
int32_t priority, uint32_t callbackval ); int32_t priority, uint32_t callbackval );
int32_t MV_PlayRaw( char *ptr, uint32_t length, int32_t MV_PlayRaw( char *ptr, uint32_t length,
unsigned rate, int32_t pitchoffset, int32_t vol, int32_t left, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left,
int32_t right, int32_t priority, uint32_t callbackval ); int32_t right, int32_t priority, uint32_t callbackval );
int32_t MV_PlayLoopedRaw( char *ptr, int32_t length, int32_t MV_PlayLoopedRaw( char *ptr, int32_t length,
char *loopstart, char *loopend, unsigned rate, int32_t pitchoffset, char *loopstart, char *loopend, uint32_t rate, int32_t pitchoffset,
int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t vol, int32_t left, int32_t right, int32_t priority,
uint32_t callbackval ); uint32_t callbackval );
int32_t MV_PlayWAV( char *ptr, int32_t pitchoffset, int32_t vol, int32_t left, int32_t MV_PlayWAV( char *ptr, int32_t pitchoffset, int32_t vol, int32_t left,

View file

@ -20,9 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifdef _WIN32
#include "dsound.h"
#endif
#include "baselayer.h" #include "baselayer.h"
#include "compat.h" #include "compat.h"

View file

@ -42,9 +42,9 @@ int32_t openal_disabled;
typedef struct sounddef typedef struct sounddef
{ {
unsigned pos; uint32_t pos;
char *ptrsnd; char *ptrsnd;
unsigned size; uint32_t size;
OggVorbis_File oggStream; OggVorbis_File oggStream;
} sounddef; } sounddef;
#endif #endif

View file

@ -235,7 +235,7 @@ void KB_ClearKeysDown(void)
char *KB_ScanCodeToString(kb_scancode scancode) char *KB_ScanCodeToString(kb_scancode scancode)
{ {
unsigned s; uint32_t s;
for (s=0; s < (sizeof(sctokeylut)/sizeof(sctokeylut[0])); s++) for (s=0; s < (sizeof(sctokeylut)/sizeof(sctokeylut[0])); s++)
if (sctokeylut[s].sc == scancode) return sctokeylut[s].key; if (sctokeylut[s].sc == scancode) return sctokeylut[s].key;
@ -245,7 +245,7 @@ char *KB_ScanCodeToString(kb_scancode scancode)
kb_scancode KB_StringToScanCode(char * string) kb_scancode KB_StringToScanCode(char * string)
{ {
unsigned s; uint32_t s;
for (s=0; s < (sizeof(sctokeylut)/sizeof(sctokeylut[0])); s++) for (s=0; s < (sizeof(sctokeylut)/sizeof(sctokeylut[0])); s++)
if (!Bstrcasecmp(sctokeylut[s].key, string)) return sctokeylut[s].sc; if (!Bstrcasecmp(sctokeylut[s].key, string)) return sctokeylut[s].sc;

View file

@ -3718,7 +3718,7 @@ cheat_for_port_credits:
mgametextpal(40,118+9+9+9+9,"Advanced mouse setup",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2+2),10); mgametextpal(40,118+9+9+9+9,"Advanced mouse setup",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2+2),10);
{ {
int32_t sense = CONTROL_MouseSensitivity * 2; int32_t sense = (int32_t)(CONTROL_MouseSensitivity * 2.0f);
barsm(248,126,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7)); barsm(248,126,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
CONTROL_MouseSensitivity = sense / 2.0f; CONTROL_MouseSensitivity = sense / 2.0f;
} }

View file

@ -79,6 +79,10 @@ extern char TEXCACHEFILE[];
extern int32_t g_noSetup; extern int32_t g_noSetup;
#ifdef INPUT_MOUSE
#undef INPUT_MOUSE
#endif
#define INPUT_KB 0 #define INPUT_KB 0
#define INPUT_MOUSE 1 #define INPUT_MOUSE 1
#define INPUT_JOYSTICK 2 #define INPUT_JOYSTICK 2