diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index ae26b4d8c..7fa44f07a 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -495,12 +495,21 @@ CANCEL: if (keystatus[0x15] != 0) { + char *f; keystatus[0x15] = 0; fixspritesectors(); updatesector(startposx,startposy,&startsectnum); ExtPreSaveMap(); - saveboard(boardfilename,&startposx,&startposy,&startposz,&startang,&startsectnum); - ExtSaveMap(boardfilename); + if (pathsearchmode) f = boardfilename; + else + { + // virtual filesystem mode can't save to directories so drop the file into + // the current directory + f = strrchr(boardfilename, '/'); + if (!f) f = boardfilename; else f++; + } + saveboard(f,&startposx,&startposy,&startposz,&startang,&startsectnum); + ExtSaveMap(f); break; } } @@ -4959,7 +4968,7 @@ void overheadeditor(void) { wall[i].point2 += (suckwall-numwalls); - wall[i].cstat = wall[suckwall+j].cstat; + wall[i].cstat = wall[suckwall+j].cstat&~(1+16+32+64); wall[i].shade = wall[suckwall+j].shade; wall[i].yrepeat = wall[suckwall+j].yrepeat; fixrepeats((short)i); diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index f5f253e03..dbaa54f10 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -10976,6 +10976,7 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride) { col = 4; if ((wal->cstat&1) != 0) col = 5; + if (wal->nextwall!=-1&&((wal->cstat^wall[wal->nextwall].cstat)&1)) col = 2; if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall))) if (totalclock & 16) col += (2<<2); } diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7b59c8070..b183e8b5e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8621,7 +8621,7 @@ static void autoloadgrps(const char *fn) while (findfiles) { Bsprintf(tempbuf,"autoload/%s/%s",fn,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } } -char *makename(char *destname, char *OGGname, char *origname) +static char *makename(char *destname, char *OGGname, char *origname) { if (!origname) return destname; @@ -8649,17 +8649,17 @@ char *makename(char *destname, char *OGGname, char *origname) return destname; } -int AL_DefineSound(int ID,char *name) +static int AL_DefineSound(int ID,char *name) { if (ID>=MAXSOUNDS) return 1; g_sounds[ID].filename1=makename(g_sounds[ID].filename1,name,g_sounds[ID].filename); - initprintf("(%s)(%s)(%s)\n",g_sounds[ID].filename1,name,g_sounds[ID].filename); +// initprintf("(%s)(%s)(%s)\n",g_sounds[ID].filename1,name,g_sounds[ID].filename); // loadsound(ID); return 0; } -int AL_DefineMusic(char *ID,char *name) +static int AL_DefineMusic(char *ID,char *name) { int lev,ep,sel;char b1,b2; @@ -8691,8 +8691,8 @@ int AL_DefineMusic(char *ID,char *name) } map[sel].musicfn1=makename(map[sel].musicfn1,name,ID); - initprintf("%-15s | ",ID); - initprintf("%3d %2d %2d | %s\n",sel,ep,lev,map[sel].musicfn1); +// initprintf("%-15s | ",ID); +// initprintf("%3d %2d %2d | %s\n",sel,ep,lev,map[sel].musicfn1); // playmusicMAP(ID,sel); return 0; } diff --git a/polymer/eduke32/source/jaudiolib/fx_man.h b/polymer/eduke32/source/jaudiolib/fx_man.h index d817b6dea..7bedce90c 100644 --- a/polymer/eduke32/source/jaudiolib/fx_man.h +++ b/polymer/eduke32/source/jaudiolib/fx_man.h @@ -138,8 +138,4 @@ int FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) void FX_StopRecord( void ); void FX_Update(void); - -int AL_DefineMusic(char *ID,char *name); -int AL_DefineSound(int ID,char *name); - #endif diff --git a/polymer/eduke32/source/jaudiolib/multivoc.c b/polymer/eduke32/source/jaudiolib/multivoc.c index c9257f30c..90a147da3 100644 --- a/polymer/eduke32/source/jaudiolib/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/multivoc.c @@ -2434,10 +2434,16 @@ int MV_PlayLoopedOGG(char *ptr, int loopstart, int loopend, int pitchoffset, int return(MV_Error); } - while ((uint64)(vorbisInfo->rate)/(1<downsample)*PITCH_GetScale(pitchoffset)/0x1000000/0x100) + while ((ogg_int64_t)(vorbisInfo->rate)/(1<downsample)*PITCH_GetScale(pitchoffset)/0x1000000/0x100) voice->downsample++; length=ov_pcm_total(&voice->OGGstream.oggStream,0); - if (!length)length=0xffffff; +// if (!length)length=0xffffff; + if (length == OV_EINVAL) + { + MV_SetErrorCode(MV_InvalidOGGFile); + return(MV_Error); + } + loopend=length=length>>voice->downsample; voice->wavetype = OGG; diff --git a/polymer/eduke32/source/jaudiolib/openal.c b/polymer/eduke32/source/jaudiolib/openal.c index fa262a422..c7f3ad035 100644 --- a/polymer/eduke32/source/jaudiolib/openal.c +++ b/polymer/eduke32/source/jaudiolib/openal.c @@ -265,7 +265,7 @@ int AL_Init() Bmemset(&music,0,sizeof(music)); // "music.def.size=0" means music not playing if (loadaldriver()) { - initprintf("Failed loading OpenAL driver.\nDownload OpenAL 1.1 or greater from http://www.openal.org/downloads.html."); + initprintf("Failed loading OpenAL driver.\nDownload OpenAL 1.1 or greater from http://www.openal.org/downloads.html\n"); openal_disabled = 1; return 1;