Skip to content
Permalink
Browse files

Updated for Visual C++ 6 build

  • Loading branch information
slouken committed Nov 15, 2004
1 parent d9c4ffd commit 8f4148bab10dbe59782534923b3f4cf221e54c7b
Showing with 6 additions and 20 deletions.
  1. BIN VisualC.zip
  2. +4 −4 effect_position.c
  3. +0 −14 music.c
  4. +2 −2 timidity/playmidi.c
BIN +1 Byte (100%) VisualC.zip
Binary file not shown.
@@ -1179,10 +1179,10 @@ static Mix_EffectFunc_t get_position_effect_func(Uint16 format, int channels)
_Eff_position_u8;
break;
case 4:
_Eff_position_u8_c4;
f = _Eff_position_u8_c4;
break;
case 6:
_Eff_position_u8_c6;
f = _Eff_position_u8_c6;
break;
}
break;
@@ -1195,10 +1195,10 @@ static Mix_EffectFunc_t get_position_effect_func(Uint16 format, int channels)
_Eff_position_s8;
break;
case 4:
_Eff_position_s8_c4;
f = _Eff_position_s8_c4;
break;
case 6:
_Eff_position_s8_c6;
f = _Eff_position_s8_c6;
break;
}
break;
14 music.c
@@ -44,9 +44,6 @@
#undef CMD_MUSIC
#endif

inline static void noop(const char *a, ...) {}
#define debug noop

#ifdef CMD_MUSIC
#include "music_cmd.h"
#endif
@@ -1245,49 +1242,39 @@ BOOL LMM_Seek(struct MREADER *mr,long to,int dir)
{
int at;
LMM_MREADER* lmmmr=(LMM_MREADER*)mr;
debug("LMM_Seek(%p, %ld, %d) = ",mr,to,dir);
if(dir==SEEK_SET)
to+=lmmmr->offset;
at=SDL_RWseek(lmmmr->rw, to, dir);
debug("%d (%d)\n",at-lmmmr->offset, at<lmmmr->offset);
return at<lmmmr->offset;
}
long LMM_Tell(struct MREADER *mr)
{
int at;
LMM_MREADER* lmmmr=(LMM_MREADER*)mr;
debug("LMM_Tell(%p) = ",mr);
at=SDL_RWtell(lmmmr->rw)-lmmmr->offset;
debug("%d\n",at);
return at;
}
BOOL LMM_Read(struct MREADER *mr,void *buf,size_t sz)
{
int got;
LMM_MREADER* lmmmr=(LMM_MREADER*)mr;
debug("LMM_Read(%p,%p,%lu) = ",mr,buf,sz);
got=SDL_RWread(lmmmr->rw, buf, sz, 1);
debug("%d\n",got);
return got;
}
int LMM_Get(struct MREADER *mr)
{
unsigned char c;
int i=EOF;
LMM_MREADER* lmmmr=(LMM_MREADER*)mr;
debug("LMM_Get(%p) = ",mr);
if(SDL_RWread(lmmmr->rw,&c,1,1))
i=c;
debug("%d\n",i);
return i;
}
BOOL LMM_Eof(struct MREADER *mr)
{
int offset;
LMM_MREADER* lmmmr=(LMM_MREADER*)mr;
debug("LMM_Eof(%p) = ",mr);
offset=LMM_Tell(mr);
debug("%d\n", offset>=lmmmr->eof);
return offset>=lmmmr->eof;
}
MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan)
@@ -1308,7 +1295,6 @@ MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan)
lmmmr.eof=SDL_RWtell(rw);
SDL_RWseek(rw,lmmmr.offset,SEEK_SET);
m=Player_LoadGeneric((MREADER*)&lmmmr,maxchan,0);
debug("MikMod_LoadSongRW(%p,%d) = %p\n",rw,maxchan,m);
return m;
}
# endif
@@ -485,7 +485,7 @@ static void kill_others(int i)

static void clone_voice(Instrument *ip, int v, MidiEvent *e, int clone_type, int variationbank)
{
int w, k, played_note, chorus=0, reverb=0, milli;
int w, played_note, chorus=0, reverb=0, milli;
int chan = voice[v].channel;

if (clone_type == STEREO_CLONE) {
@@ -1450,7 +1450,7 @@ static void do_compute_data(uint32 count)
{
if (!voice[i].sample_offset && voice[i].echo_delay_count)
{
if (voice[i].echo_delay_count >= count) voice[i].echo_delay_count -= count;
if ((uint32)voice[i].echo_delay_count >= count) voice[i].echo_delay_count -= count;
else
{
mix_voice(buffer_pointer+voice[i].echo_delay_count, i, count-voice[i].echo_delay_count);

0 comments on commit 8f4148b

Please sign in to comment.