diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 692d43e8f..2931665db 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -896,7 +896,7 @@ void resizeglcheck() if ((glox1 != windowx1) || (gloy1 != windowy1) || (glox2 != windowx2) || (gloy2 != windowy2)) { - double ratio = 1.05; + double ratio = 1.025; if (glwidescreen == 1) ratio = 1.2f; @@ -4171,7 +4171,7 @@ void polymost_drawrooms() short hitsect, hitwall, hitsprite; int vx, vy, vz, hitx, hity, hitz; int cz, fz; - double ratio = 1.05; + double ratio = 1.025; if (glwidescreen == 1) ratio = 1.2f; diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 35d8fa79e..4da155708 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -3337,7 +3337,7 @@ static int SetupOpenGL(int width, int height, int bitspp) if (err) { - OSD_Printf("Unsupported OpenGL driver. GL modes will be unavailable.\n"); + OSD_Printf("Blacklisted OpenGL driver detected. GL modes will be unavailable.\n"); ReleaseOpenGL(); unloadgldriver(); nogl = 1; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 7af4f8a2d..2898dea03 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20081019" +#define BUILDDATE " 20081024" #define VERSION " 1.2.0devel" static int floor_over_floor; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c78934af5..aeb11346e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -391,7 +391,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i if (small&4) { - rotatesprite(textsc(x< 4) { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16+128); j += textsc(8); } - else if (k > 2) { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+128); j += textsc(k<<1); } - else { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+32+128); j += textsc(k<<1); } + if (k > 4) { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16); j += textsc(8); } + else if (k > 2) { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1); j += textsc(k<<1); } + else { mpgametext(j,user_quote[i],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+32); j += textsc(k<<1); } } else { - if (k > 4) { mpgametext(j,user_quote[i],0,2+8+16+128); j += textsc(8); } - else if (k > 2) { mpgametext(j,user_quote[i],0,2+8+16+1+128); j += textsc(k<<1); } - else { mpgametext(j,user_quote[i],0,2+8+16+1+32+128); j += textsc(k<<1); } + if (k > 4) { mpgametext(j,user_quote[i],0,2+8+16); j += textsc(8); } + else if (k > 2) { mpgametext(j,user_quote[i],0,2+8+16+1); j += textsc(k<<1); } + else { mpgametext(j,user_quote[i],0,2+8+16+1+32); j += textsc(k<<1); } } l = gametextlen(USERQUOTE_LEFTOFFSET,stripcolorcodes(tempbuf,user_quote[i])); while (l > (ud.config.ScreenWidth - USERQUOTE_RIGHTOFFSET)) @@ -2802,9 +2802,9 @@ static void operatefta(void) else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1+32); return; } - if (j > 4) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16+128); - else if (j > 2) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+128); - else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+32+128); + if (j > 4) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16); + else if (j > 2) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1); + else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>11),2+8+16+1+32); } void FTA(int q, player_struct *p) @@ -2952,8 +2952,9 @@ void gameexit(const char *t) //printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); if (!(t[0] == ' ' && t[1] == 0)) { - Bsprintf(tempbuf,HEAD2 " %s",s_builddate); - wm_msgbox(tempbuf, (char *)t); + char titlebuf[256]; + Bsprintf(titlebuf,HEAD2 " %s",s_builddate); + wm_msgbox(titlebuf, (char *)t); } } @@ -4104,7 +4105,7 @@ void drawbackground(void) { for (y=y1;y 0 && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS) { + spriteext[tsprite[j].owner].tspr = (spritetype *)&tsprite[j]; OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1); -// spriteext[tsprite[j].owner].tspr = NULL; } } while (j--); @@ -7599,8 +7600,8 @@ PALONLY: if (display_mirror) tsprite[j].statnum = TSPR_MIRROR; if (tsprite[j].owner > 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS) { + spriteext[tsprite[j].owner].tspr = (spritetype *)&tsprite[j]; OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1); -// spriteext[tsprite[j].owner].tspr = NULL; } } #ifdef _MSC_VER @@ -10198,11 +10199,11 @@ void Shutdown(void) SoundShutdown(); MusicShutdown(); uninittimer(); - uninitengine(); CONTROL_Shutdown(); CONFIG_WriteSetup(); KB_Shutdown(); freeconmem(); + uninitengine(); } /* diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 10b275848..77f4cbccc 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1797,6 +1797,9 @@ static int transnum(int type) { ReportError(ERROR_PARAMUNDEFINED); error++; + bitptr[(scriptptr-script)>>3] &= ~(1<<((scriptptr-script)&7)); + *scriptptr = 0; + scriptptr++; textptr+=l; return -1; // error! } diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 8153b902f..60320e88a 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //------------------------------------------------------------------------- #include "duke3d.h" -char *s_builddate = "20081019"; +char *s_builddate = "20081024"; char *MusicPtr = NULL; int Musicsize; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 06c880bdb..b1e51291e 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1709,6 +1709,7 @@ int enterlevel(int g) { char *p; + strcpy(levname, boardfilename); p = Bstrrchr(levname,'.'); if (!p) strcat(levname,".mhk"); @@ -1720,6 +1721,48 @@ int enterlevel(int g) p[4]=0; } if (!loadmaphack(levname)) initprintf("Loaded map hack file '%s'\n",levname); + + // usermap music based on map filename + Bcorrectfilename(levname,0); + p = Bstrrchr(levname,'.'); + if (p) + { + int fil; + + p[1]='o'; + p[2]='g'; + p[3]='g'; + p[4]=0; + fil = kopen4loadfrommod(levname,0); + if (fil > -1) + { + kclose(fil); + if (map[ud.m_level_number].musicfn1 == NULL) + map[ud.m_level_number].musicfn1 = Bcalloc(Bstrlen(levname)+1,sizeof(char)); + else if ((Bstrlen(levname)+1) > sizeof(map[ud.m_level_number].musicfn1)) + map[ud.m_level_number].musicfn1 = Brealloc(map[ud.m_level_number].musicfn1,(Bstrlen(levname)+1)); + Bstrcpy(map[ud.m_level_number].musicfn1,levname); + } + else if (map[ud.m_level_number].musicfn1 != NULL) + { + Bfree(map[ud.m_level_number].musicfn1); + map[ud.m_level_number].musicfn1 = NULL; + } + p[1]='m'; + p[2]='i'; + p[3]='d'; + p[4]=0; + fil = kopen4loadfrommod(levname,0); + if (fil == -1) + Bsprintf(levname,"dethtoll.mid"); + else kclose(fil); + + if (map[ud.m_level_number].musicfn == NULL) + map[ud.m_level_number].musicfn = Bcalloc(Bstrlen(levname)+1,sizeof(char)); + else if ((Bstrlen(levname)+1) > sizeof(map[ud.m_level_number].musicfn)) + map[ud.m_level_number].musicfn = Brealloc(map[ud.m_level_number].musicfn,(Bstrlen(levname)+1)); + Bstrcpy(map[ud.m_level_number].musicfn,levname); + } } } else if (loadboard(map[(ud.volume_number*MAXLEVELS)+ud.level_number].filename,0,&g_player[0].ps->posx, &g_player[0].ps->posy, &g_player[0].ps->posz, &g_player[0].ps->ang,&g_player[0].ps->cursectnum) == -1)