mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Revision 1337: fixes the crash on exit with polymer on win32
that's pretty l33t, right? git-svn-id: https://svn.eduke32.com/eduke32@1337 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dba312e61b
commit
3449ba8bef
5 changed files with 15 additions and 5 deletions
|
@ -5719,6 +5719,7 @@ void uninitengine(void)
|
|||
//if (lookupsalloctype == 1) suckcache(lookups); //Cache already gone
|
||||
lookups = NULL;
|
||||
}
|
||||
|
||||
for (i=0; i<MAXPALOOKUPS; i++)
|
||||
if (palookup[i] != NULL) { kkfree(palookup[i]); palookup[i] = NULL; }
|
||||
|
||||
|
|
|
@ -676,6 +676,11 @@ void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t da
|
|||
float ang, tiltang;
|
||||
float pos[3];
|
||||
|
||||
if (!rendmode) return;
|
||||
|
||||
begindrawing();
|
||||
frameoffset = frameplace + windowy1*bytesperline + windowx1;
|
||||
|
||||
if (pr_verbosity >= 3) OSD_Printf("PR : Drawing rooms...\n");
|
||||
|
||||
// fogcalc needs this
|
||||
|
@ -766,6 +771,7 @@ void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t da
|
|||
i++;
|
||||
}
|
||||
viewangle = daang;
|
||||
enddrawing();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -789,6 +795,7 @@ void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t da
|
|||
gsinang2 = gsinang*((double)viewingrange)/65536.0;
|
||||
|
||||
if (pr_verbosity >= 3) OSD_Printf("PR : Rooms drawn.\n");
|
||||
enddrawing();
|
||||
}
|
||||
|
||||
void polymer_drawmasks(void)
|
||||
|
@ -860,6 +867,8 @@ void polymer_drawsprite(int32_t snum)
|
|||
|
||||
tspr = tspriteptr[snum];
|
||||
|
||||
if (tspr->owner < 0 || tspr->picnum < 0) return;
|
||||
|
||||
fogcalc(tspr->shade,sector[tspr->sectnum].visibility,sector[tspr->sectnum].floorpal);
|
||||
bglFogf(GL_FOG_DENSITY,fogresult);
|
||||
bglFogfv(GL_FOG_COLOR,fogcol);
|
||||
|
|
|
@ -404,7 +404,7 @@ int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
|
|||
MB_OK|MB_ICONINFORMATION);
|
||||
#endif
|
||||
|
||||
atexit(uninitsystem);
|
||||
// atexit(uninitsystem);
|
||||
|
||||
instanceflag = CreateSemaphore(NULL, 1,1, WindowClass);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090416";
|
||||
const char *s_buildDate = "20090423";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
case RPG__STATIC:
|
||||
case MORTER__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, 255+(80<<8),1);
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, 255+(80<<8),1);
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
|
||||
|
@ -390,7 +390,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
if (ProjectileData[atwith].flashcolor)
|
||||
{
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, ProjectileData[atwith].flashcolor,1);
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, ProjectileData[atwith].flashcolor,1);
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
|
||||
|
@ -2185,7 +2185,7 @@ void P_FireWeapon(DukePlayer_t *p)
|
|||
|
||||
#ifdef POLYMER
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(p->ang+512)&2047])>>7), s->y+((sintable[(p->ang)&2047])>>7),
|
||||
s->z-PHEIGHT, 4096, aplWeaponFlashColor[p->curr_weapon][snum],1);
|
||||
s->z-PHEIGHT, 8192, aplWeaponFlashColor[p->curr_weapon][snum],1);
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>4);
|
||||
|
|
Loading…
Reference in a new issue