git-svn-id: https://svn.eduke32.com/eduke32@644 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-03-15 21:04:35 +00:00
parent 47763f8cce
commit cee3078bd5
6 changed files with 28 additions and 16 deletions

View file

@ -495,12 +495,21 @@ CANCEL:
if (keystatus[0x15] != 0) if (keystatus[0x15] != 0)
{ {
char *f;
keystatus[0x15] = 0; keystatus[0x15] = 0;
fixspritesectors(); fixspritesectors();
updatesector(startposx,startposy,&startsectnum); updatesector(startposx,startposy,&startsectnum);
ExtPreSaveMap(); ExtPreSaveMap();
saveboard(boardfilename,&startposx,&startposy,&startposz,&startang,&startsectnum); if (pathsearchmode) f = boardfilename;
ExtSaveMap(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; break;
} }
} }
@ -4959,7 +4968,7 @@ void overheadeditor(void)
{ {
wall[i].point2 += (suckwall-numwalls); 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].shade = wall[suckwall+j].shade;
wall[i].yrepeat = wall[suckwall+j].yrepeat; wall[i].yrepeat = wall[suckwall+j].yrepeat;
fixrepeats((short)i); fixrepeats((short)i);

View file

@ -10976,6 +10976,7 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
{ {
col = 4; col = 4;
if ((wal->cstat&1) != 0) col = 5; 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 ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
if (totalclock & 16) col += (2<<2); if (totalclock & 16) col += (2<<2);
} }

View file

@ -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; } 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) if (!origname)
return destname; return destname;
@ -8649,17 +8649,17 @@ char *makename(char *destname, char *OGGname, char *origname)
return destname; return destname;
} }
int AL_DefineSound(int ID,char *name) static int AL_DefineSound(int ID,char *name)
{ {
if (ID>=MAXSOUNDS) if (ID>=MAXSOUNDS)
return 1; return 1;
g_sounds[ID].filename1=makename(g_sounds[ID].filename1,name,g_sounds[ID].filename); 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); // loadsound(ID);
return 0; return 0;
} }
int AL_DefineMusic(char *ID,char *name) static int AL_DefineMusic(char *ID,char *name)
{ {
int lev,ep,sel;char b1,b2; 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); map[sel].musicfn1=makename(map[sel].musicfn1,name,ID);
initprintf("%-15s | ",ID); // initprintf("%-15s | ",ID);
initprintf("%3d %2d %2d | %s\n",sel,ep,lev,map[sel].musicfn1); // initprintf("%3d %2d %2d | %s\n",sel,ep,lev,map[sel].musicfn1);
// playmusicMAP(ID,sel); // playmusicMAP(ID,sel);
return 0; return 0;
} }

View file

@ -138,8 +138,4 @@ int FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length )
void FX_StopRecord( void ); void FX_StopRecord( void );
void FX_Update(void); void FX_Update(void);
int AL_DefineMusic(char *ID,char *name);
int AL_DefineSound(int ID,char *name);
#endif #endif

View file

@ -2434,10 +2434,16 @@ int MV_PlayLoopedOGG(char *ptr, int loopstart, int loopend, int pitchoffset, int
return(MV_Error); return(MV_Error);
} }
while ((uint64)(vorbisInfo->rate)/(1<<voice->downsample)*PITCH_GetScale(pitchoffset)/0x1000000/0x100) while ((ogg_int64_t)(vorbisInfo->rate)/(1<<voice->downsample)*PITCH_GetScale(pitchoffset)/0x1000000/0x100)
voice->downsample++; voice->downsample++;
length=ov_pcm_total(&voice->OGGstream.oggStream,0); 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; loopend=length=length>>voice->downsample;
voice->wavetype = OGG; voice->wavetype = OGG;

View file

@ -265,7 +265,7 @@ int AL_Init()
Bmemset(&music,0,sizeof(music)); // "music.def.size=0" means music not playing Bmemset(&music,0,sizeof(music)); // "music.def.size=0" means music not playing
if (loadaldriver()) 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; openal_disabled = 1;
return 1; return 1;