Get MSVC building again, DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@6174 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2017-06-10 08:19:35 +00:00
parent 22a7b3c6f3
commit d0211379e0
6 changed files with 64 additions and 26 deletions

View file

@ -35,6 +35,12 @@ ENET_OBJ=$(obj)\$(ENET)
ENET_INC=$(ENET_ROOT)\include ENET_INC=$(ENET_ROOT)\include
ENET_SRC=$(ENET_ROOT)\src ENET_SRC=$(ENET_ROOT)\src
LIBXMPLITE=libxmp-lite
LIBXMPLITE_ROOT=$(source)\$(LIBXMPLITE)
LIBXMPLITE_OBJ=$(obj)\$(LIBXMPLITE)
LIBXMPLITE_INC=$(LIBXMPLITE_ROOT)\include
LIBXMPLITE_SRC=$(LIBXMPLITE_ROOT)\src
o=obj o=obj
res=res res=res
asm=masm asm=masm
@ -80,7 +86,7 @@ flags_cl=$(flags_cl) /arch:SSE
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386 flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
!endif !endif
ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DSTARTUP_WINDOW /DUSE_LIBPNG /DUSE_LIBVPX /DHAVE_VORBIS /DHAVE_XMP ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DSTARTUP_WINDOW /DUSE_LIBPNG /DUSE_LIBVPX /DHAVE_VORBIS /DHAVE_LIBXMPLITE
!ifdef CPLUSPLUS !ifdef CPLUSPLUS
ENGINEOPTS=$(ENGINEOPTS) /TP ENGINEOPTS=$(ENGINEOPTS) /TP
@ -95,11 +101,12 @@ AS=ml
LINK=link /nologo /opt:ref LINK=link /nologo /opt:ref
MT=mt MT=mt
CFLAGS= /MT /J /nologo $(flags_cl) \ CFLAGS= /MT /J /nologo $(flags_cl) \
/I$(DUKE3D_SRC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(MACT_INC) /I$(AUDIOLIB_INC) /I$(ENET_INC) \ /I$(DUKE3D_SRC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(MACT_INC) /I$(AUDIOLIB_INC) /I$(ENET_INC) /I$(LIBXMPLITE_INC) \
/W2 $(ENGINEOPTS) \ /W2 $(ENGINEOPTS) \
/I$(PLATFORM)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_USEFOLDER /DSDL_TARGET=2 /I$(PLATFORM)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_USEFOLDER /DSDL_TARGET=2
ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC) ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC)
LIBXMPLITE_CFLAGS=/I$(LIBXMPLITE_INC) /I$(LIBXMPLITE_INC)/libxmp-lite /I$(LIBXMPLITE_SRC) -DHAVE_ROUND -DLIBXMP_CORE_PLAYER -DBUILDING_STATIC
AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC) AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC)
LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib version.lib \ LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib version.lib \
@ -185,6 +192,33 @@ ENET_OBJS=$(ENET_OBJ)\callbacks.$o \
$(ENET_OBJ)\win32.$o \ $(ENET_OBJ)\win32.$o \
$(ENET_OBJ)\compress.$o $(ENET_OBJ)\compress.$o
LIBXMPLITE_OBJS=$(LIBXMPLITE_OBJ)\control.$o \
$(LIBXMPLITE_OBJ)\dataio.$o \
$(LIBXMPLITE_OBJ)\effects.$o \
$(LIBXMPLITE_OBJ)\filter.$o \
$(LIBXMPLITE_OBJ)\format.$o \
$(LIBXMPLITE_OBJ)\hio.$o \
$(LIBXMPLITE_OBJ)\lfo.$o \
$(LIBXMPLITE_OBJ)\load.$o \
$(LIBXMPLITE_OBJ)\load_helpers.$o \
$(LIBXMPLITE_OBJ)\memio.$o \
$(LIBXMPLITE_OBJ)\mixer.$o \
$(LIBXMPLITE_OBJ)\mix_all.$o \
$(LIBXMPLITE_OBJ)\period.$o \
$(LIBXMPLITE_OBJ)\player.$o \
$(LIBXMPLITE_OBJ)\read_event.$o \
$(LIBXMPLITE_OBJ)\scan.$o \
$(LIBXMPLITE_OBJ)\smix.$o \
$(LIBXMPLITE_OBJ)\virtual.$o \
$(LIBXMPLITE_OBJ)\common.$o \
$(LIBXMPLITE_OBJ)\itsex.$o \
$(LIBXMPLITE_OBJ)\it_load.$o \
$(LIBXMPLITE_OBJ)\mod_load.$o \
$(LIBXMPLITE_OBJ)\s3m_load.$o \
$(LIBXMPLITE_OBJ)\sample.$o \
$(LIBXMPLITE_OBJ)\xm_load.$o
AUDIOLIB_OBJS=$(AUDIOLIB_OBJ)\drivers.$o \ AUDIOLIB_OBJS=$(AUDIOLIB_OBJ)\drivers.$o \
$(AUDIOLIB_OBJ)\fx_man.$o \ $(AUDIOLIB_OBJ)\fx_man.$o \
$(AUDIOLIB_OBJ)\multivoc.$o \ $(AUDIOLIB_OBJ)\multivoc.$o \
@ -282,7 +316,7 @@ CHECKDIR_DUKE3D=@if not exist "$(DUKE3D_OBJ)" mkdir "$(DUKE3D_OBJ)"
CHECKDIR_ENET=@if not exist "$(ENET_OBJ)" mkdir "$(ENET_OBJ)" CHECKDIR_ENET=@if not exist "$(ENET_OBJ)" mkdir "$(ENET_OBJ)"
CHECKDIR_MACT=@if not exist "$(MACT_OBJ)" mkdir "$(MACT_OBJ)" CHECKDIR_MACT=@if not exist "$(MACT_OBJ)" mkdir "$(MACT_OBJ)"
CHECKDIR_AUDIOLIB=@if not exist "$(AUDIOLIB_OBJ)" mkdir "$(AUDIOLIB_OBJ)" CHECKDIR_AUDIOLIB=@if not exist "$(AUDIOLIB_OBJ)" mkdir "$(AUDIOLIB_OBJ)"
CHECKDIR_LIBXMPLITE=@if not exist "$(LIBXMPLITE_OBJ)" mkdir "$(LIBXMPLITE_OBJ)"
EDUKE32_TARGET=$(root)\eduke32$(EXESUFFIX) EDUKE32_TARGET=$(root)\eduke32$(EXESUFFIX)
MAPSTER32_TARGET=$(root)\mapster32$(EXESUFFIX) MAPSTER32_TARGET=$(root)\mapster32$(EXESUFFIX)
@ -306,6 +340,10 @@ MAPSTER32_TARGET=$(root)\mapster32$(EXESUFFIX)
$(CHECKDIR_ENET) $(CHECKDIR_ENET)
$(CC) /c $(CFLAGS) $(ENET_CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) $(ENET_CFLAGS) /Fo$@ $<
{$(LIBXMPLITE_SRC)}.c{$(LIBXMPLITE_OBJ)}.$o:
$(CHECKDIR_LIBXMPLITE)
$(CC) /c $(CFLAGS) $(LIBXMPLITE_CFLAGS) /Fo$@ $<
{$(AUDIOLIB_SRC)}.cpp{$(AUDIOLIB_OBJ)}.$o: {$(AUDIOLIB_SRC)}.cpp{$(AUDIOLIB_OBJ)}.$o:
$(CHECKDIR_AUDIOLIB) $(CHECKDIR_AUDIOLIB)
$(CC) /c $(CFLAGS) $(AUDIOLIB_CFLAGS) /Fo$@ $< $(CC) /c $(CFLAGS) $(AUDIOLIB_CFLAGS) /Fo$@ $<
@ -332,7 +370,7 @@ MAPSTER32_TARGET=$(root)\mapster32$(EXESUFFIX)
all: $(EDUKE32_TARGET) $(MAPSTER32_TARGET) all: $(EDUKE32_TARGET) $(MAPSTER32_TARGET)
$(EDUKE32_TARGET): $(DUKE3D_OBJS) $(ENGINE_OBJS) $(AUDIOLIB_OBJS) $(MACT_OBJS) $(ENET_OBJS) $(EDUKE32_TARGET): $(DUKE3D_OBJS) $(ENGINE_OBJS) $(AUDIOLIB_OBJS) $(MACT_OBJS) $(ENET_OBJS) $(LIBXMPLITE_OBJS)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS) $(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $(DUKE3D_RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest $(MT) -manifest $(DUKE3D_RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
@ -346,6 +384,6 @@ $(MAPSTER32_TARGET): $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS)
# PHONIES # PHONIES
clean: clean:
-del /Q $(EDUKE32_TARGET) $(MAPSTER32_TARGET) $(DUKE3D_OBJS) $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) $(ENET_OBJS) $(MACT_OBJS) $(AUDIOLIB_OBJS) *.pdb $(root)\*.pdb $(root)\*.map $(root)\*.manifest -del /Q $(EDUKE32_TARGET) $(MAPSTER32_TARGET) $(DUKE3D_OBJS) $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) *.pdb $(root)\*.pdb $(root)\*.map $(root)\*.manifest
-del /Q $(ENET_OBJS) $(LIBXMPLITE_OBJS) $(MACT_OBJS) $(AUDIOLIB_OBJS)
veryclean: clean veryclean: clean

View file

@ -149,8 +149,8 @@
#define VAR_NORM(x) \ #define VAR_NORM(x) \
register int smp_in; \ register int smp_in; \
x *sptr = (x *)vi->sptr; \ x *sptr = (x *)vi->sptr; \
unsigned int pos = vi->pos; \ unsigned int pos = (unsigned int)vi->pos; \
int frac = (1 << SMIX_SHIFT) * (vi->pos - (int)vi->pos) int frac = (int)((1 << SMIX_SHIFT) * (vi->pos - (int)vi->pos))
#define VAR_LINEAR_MONO(x) \ #define VAR_LINEAR_MONO(x) \
VAR_NORM(x); \ VAR_NORM(x); \

View file

@ -316,7 +316,7 @@ void libxmp_mixer_prepare(struct context_data *ctx)
struct mixer_data *s = &ctx->s; struct mixer_data *s = &ctx->s;
int bytelen; int bytelen;
s->ticksize = s->freq * m->time_factor * m->rrate / p->bpm / 1000; s->ticksize = (int)(s->freq * m->time_factor * m->rrate / p->bpm / 1000);
bytelen = s->ticksize * sizeof(int); bytelen = s->ticksize * sizeof(int);
if (~s->format & XMP_FORMAT_MONO) { if (~s->format & XMP_FORMAT_MONO) {
@ -393,7 +393,7 @@ void libxmp_mixer_softmixer(struct context_data *ctx)
continue; continue;
} }
vi->pos0 = vi->pos; vi->pos0 = (int)vi->pos;
buf_pos = s->buf32; buf_pos = s->buf32;
if (vi->pan == PAN_SURROUND) { if (vi->pan == PAN_SURROUND) {
@ -406,7 +406,7 @@ void libxmp_mixer_softmixer(struct context_data *ctx)
if (vi->smp < mod->smp) { if (vi->smp < mod->smp) {
xxs = &mod->xxs[vi->smp]; xxs = &mod->xxs[vi->smp];
c5spd = m->xtra[vi->smp].c5spd; c5spd = (int) m->xtra[vi->smp].c5spd;
} else { } else {
xxs = &ctx->smix.xxs[vi->smp - mod->smp]; xxs = &ctx->smix.xxs[vi->smp - mod->smp];
c5spd = m->c4rate; c5spd = m->c4rate;
@ -465,7 +465,7 @@ void libxmp_mixer_softmixer(struct context_data *ctx)
samples = 0; samples = 0;
usmp = 1; usmp = 1;
} else { } else {
int s = ceil(((double)vi->end - vi->pos) / step); int s = (int) ceil(((double)vi->end - vi->pos) / step);
/* ...inside the tick boundaries */ /* ...inside the tick boundaries */
if (s > size) { if (s > size) {
s = size; s = size;
@ -523,7 +523,7 @@ void libxmp_mixer_softmixer(struct context_data *ctx)
if (mix_fn != NULL) { if (mix_fn != NULL) {
mix_fn(vi, buf_pos, samples, mix_fn(vi, buf_pos, samples,
vol_l >> 8, vol_r >> 8, step * (1 << SMIX_SHIFT), rsize, delta_l, delta_r); vol_l >> 8, vol_r >> 8, (int) step * (1 << SMIX_SHIFT), rsize, delta_l, delta_r);
} }
buf_pos += mix_size; buf_pos += mix_size;

View file

@ -219,7 +219,7 @@ int libxmp_period_to_note(int p)
return 0; return 0;
} }
return round(12.0 * log(PERIOD_BASE / p) / M_LN2) + 1; return (int)round(12.0 * log(PERIOD_BASE / p) / M_LN2) + 1;
} }
/* Get pitchbend from base note and amiga period */ /* Get pitchbend from base note and amiga period */
@ -234,14 +234,14 @@ int libxmp_period_to_bend(struct context_data *ctx, double p, int n, double adj)
switch (m->period_type) { switch (m->period_type) {
case PERIOD_LINEAR: case PERIOD_LINEAR:
return 100 * (8 * (((240 - n) << 4) - p)); return (int) (100 * (8 * (((240 - n) << 4) - p)));
case PERIOD_CSPD: case PERIOD_CSPD:
d = libxmp_note_to_period(ctx, n, 0, adj); d = libxmp_note_to_period(ctx, n, 0, adj);
return round(100.0 * (1536.0 / M_LN2) * log(p / d)); return (int) round(100.0 * (1536.0 / M_LN2) * log(p / d));
default: default:
/* Amiga */ /* Amiga */
d = libxmp_note_to_period(ctx, n, 0, adj); d = libxmp_note_to_period(ctx, n, 0, adj);
return round(100.0 * (1536.0 / M_LN2) * log(d / p)); return (int) round(100.0 * (1536.0 / M_LN2) * log(d / p));
} }
} }

View file

@ -925,12 +925,12 @@ static void process_frequency(struct context_data *ctx, int chn, int act)
/* For xmp_get_frame_info() */ /* For xmp_get_frame_info() */
xc->info_pitchbend = linear_bend >> 7; xc->info_pitchbend = linear_bend >> 7;
xc->info_period = period * 4096; xc->info_period = (int) period * 4096;
if (IS_PERIOD_MODRNG()) { if (IS_PERIOD_MODRNG()) {
CLAMP(xc->info_period, CLAMP(xc->info_period,
libxmp_note_to_period(ctx, MAX_NOTE_MOD, xc->finetune, 0) * 4096, (int) libxmp_note_to_period(ctx, MAX_NOTE_MOD, xc->finetune, 0) * 4096,
libxmp_note_to_period(ctx, MIN_NOTE_MOD, xc->finetune, 0) * 4096); (int) libxmp_note_to_period(ctx, MIN_NOTE_MOD, xc->finetune, 0) * 4096);
} else if (xc->info_period < (1 << 12)) { } else if (xc->info_period < (1 << 12)) {
xc->info_period = (1 << 12); xc->info_period = (1 << 12);
} }
@ -1311,7 +1311,7 @@ static void play_channel(struct context_data *ctx, int chn)
SET_NOTE(NOTE_RELEASE); SET_NOTE(NOTE_RELEASE);
} }
xc->info_position = libxmp_virt_getvoicepos(ctx, chn); xc->info_position = (int) libxmp_virt_getvoicepos(ctx, chn);
} }
/* /*
@ -1847,8 +1847,8 @@ void xmp_get_frame_info(xmp_context opaque, struct xmp_frame_info *info)
info->speed = p->speed; info->speed = p->speed;
info->bpm = p->bpm; info->bpm = p->bpm;
info->total_time = p->scan[p->sequence].time; info->total_time = p->scan[p->sequence].time;
info->frame_time = p->frame_time * 1000; info->frame_time = (int) p->frame_time * 1000;
info->time = p->current_time; info->time = (int) p->current_time;
info->buffer = s->buffer; info->buffer = s->buffer;
info->total_size = XMP_MAX_FRAMESIZE; info->total_size = XMP_MAX_FRAMESIZE;

View file

@ -90,7 +90,7 @@ static int scan_module(struct context_data *ctx, int ep, int chain)
bpm = mod->bpm; bpm = mod->bpm;
speed = mod->spd; speed = mod->spd;
base_time = m->rrate; base_time = (int) m->rrate;
#ifndef LIBXMP_CORE_PLAYER #ifndef LIBXMP_CORE_PLAYER
st26_speed = 0; st26_speed = 0;
#endif #endif
@ -173,7 +173,7 @@ static int scan_module(struct context_data *ctx, int ep, int chain)
info->gvl = gvl; info->gvl = gvl;
info->bpm = bpm; info->bpm = bpm;
info->speed = speed; info->speed = speed;
info->time = time + m->time_factor * frame_count * base_time / bpm; info->time = (int) (time + m->time_factor * frame_count * base_time / bpm);
#ifndef LIBXMP_CORE_PLAYER #ifndef LIBXMP_CORE_PLAYER
info->st26_speed = st26_speed; info->st26_speed = st26_speed;
#endif #endif
@ -485,7 +485,7 @@ end_module:
time -= start_time; time -= start_time;
frame_count += row_count * speed; frame_count += row_count * speed;
return (time + m->time_factor * frame_count * base_time / bpm); return (int) (time + m->time_factor * frame_count * base_time / bpm);
} }
int libxmp_get_sequence(struct context_data *ctx, int ord) int libxmp_get_sequence(struct context_data *ctx, int ord)