diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 59a80ad45..a3bb15352 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -55,10 +55,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // increase by 3, because atomic GRP adds 1, and Shareware adds 2 #ifdef LUNATIC // Lunatic -# define BYTEVERSION_JF 300 +# define BYTEVERSION_JF 303 #else // Non-Lua build -# define BYTEVERSION_JF 300 +# define BYTEVERSION_JF 303 #endif //#define BYTEVERSION_13 27 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 399bffb09..404914f7c 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -3020,13 +3020,13 @@ static inline void G_MoveClouds(void) cloudtotalclock = totalclock+6; + cloudx += sintable[(g_player[screenpeek].ps->ang+512)&2047]>>9; + cloudy += sintable[g_player[screenpeek].ps->ang&2047]>>9; + for (i=g_numClouds-1; i>=0; i--) { - cloudx[i] += (sintable[(g_player[screenpeek].ps->ang+512)&2047]>>9); - cloudy[i] += (sintable[g_player[screenpeek].ps->ang&2047]>>9); - - sector[clouds[i]].ceilingxpanning = cloudx[i]>>6; - sector[clouds[i]].ceilingypanning = cloudy[i]>>6; + sector[clouds[i]].ceilingxpanning = cloudx>>6; + sector[clouds[i]].ceilingypanning = cloudy>>6; } } diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ba261f70a..a0c4b7408 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -5643,8 +5643,8 @@ void G_SaveMapState(void) Bmemcpy(&save->show2dsector[0],&show2dsector[0],sizeof(show2dsector)); Bmemcpy(&save->g_numClouds,&g_numClouds,sizeof(g_numClouds)); Bmemcpy(&save->clouds[0],&clouds[0],sizeof(clouds)); - Bmemcpy(&save->cloudx[0],&cloudx[0],sizeof(cloudx)); - Bmemcpy(&save->cloudy[0],&cloudy[0],sizeof(cloudy)); + Bmemcpy(&save->cloudx,&cloudx,sizeof(cloudx)); + Bmemcpy(&save->cloudy,&cloudy,sizeof(cloudy)); Bmemcpy(&save->pskyidx,&g_pskyidx,sizeof(g_pskyidx)); Bmemcpy(&save->animategoal[0],&animategoal[0],sizeof(animategoal)); Bmemcpy(&save->animatevel[0],&animatevel[0],sizeof(animatevel)); @@ -5767,8 +5767,8 @@ void G_RestoreMapState(void) Bmemcpy(&show2dsector[0],&save->show2dsector[0],sizeof(show2dsector)); Bmemcpy(&g_numClouds,&save->g_numClouds,sizeof(g_numClouds)); Bmemcpy(&clouds[0],&save->clouds[0],sizeof(clouds)); - Bmemcpy(&cloudx[0],&save->cloudx[0],sizeof(cloudx)); - Bmemcpy(&cloudy[0],&save->cloudy[0],sizeof(cloudy)); + Bmemcpy(&cloudx,&save->cloudx,sizeof(cloudx)); + Bmemcpy(&cloudy,&save->cloudy,sizeof(cloudy)); Bmemcpy(&g_pskyidx,&save->pskyidx,sizeof(g_pskyidx)); Bmemcpy(&animategoal[0],&save->animategoal[0],sizeof(animategoal)); Bmemcpy(&animatevel[0],&save->animatevel[0],sizeof(animatevel)); diff --git a/polymer/eduke32/source/global.h b/polymer/eduke32/source/global.h index d1967b781..07f27d45c 100644 --- a/polymer/eduke32/source/global.h +++ b/polymer/eduke32/source/global.h @@ -83,7 +83,7 @@ G_EXTERN int16_t cyclers[MAXCYCLERS][6],g_numCyclers; G_EXTERN int16_t g_globalRandom; G_EXTERN int16_t g_mirrorWall[64],g_mirrorSector[64],g_mirrorCount; G_EXTERN int16_t g_numAnimWalls; -G_EXTERN int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128]; +G_EXTERN int16_t g_numClouds,clouds[256],cloudx,cloudy; G_EXTERN int16_t myang,omyang,mycursectnum,myjumpingcounter; G_EXTERN int16_t myhoriz,omyhoriz,myhorizoff,omyhorizoff; G_EXTERN int32_t *animateptr[MAXANIMATES]; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index f02977f9a..6bf548072 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1043,6 +1043,8 @@ static void prelevel(char g) VM_OnEvent(EVENT_PRELEVEL, -1, -1); + int missedCloudSectors = 0; + for (i=0; ione_parallax_sectnum == -1) g_player[0].ps->one_parallax_sectnum = i; @@ -1086,6 +1093,9 @@ static void prelevel(char g) } } + if (missedCloudSectors > 0) + OSD_Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors); + // NOTE: must be safe loop because callbacks could delete sprites. for (SPRITES_OF_STAT_SAFE(STAT_DEFAULT, i, nexti)) { diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 44da42f12..cde32d79b 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -1128,8 +1128,8 @@ static const dataspec_t svgm_anmisc[] = { 0, &show2dsector[0], sizeof(uint8_t), MAXSECTORS>>3 }, { DS_NOCHK, &g_numClouds, sizeof(g_numClouds), 1 }, { 0, &clouds[0], sizeof(clouds), 1 }, - { 0, &cloudx[0], sizeof(cloudx), 1 }, - { 0, &cloudy[0], sizeof(cloudy), 1 }, + { 0, &cloudx, sizeof(cloudx), 1 }, + { 0, &cloudy, sizeof(cloudy), 1 }, { 0, &g_pskyidx, sizeof(g_pskyidx), 1 }, // DS_NOCHK? { 0, &g_earthquakeTime, sizeof(g_earthquakeTime), 1 }, diff --git a/polymer/eduke32/source/sector.h b/polymer/eduke32/source/sector.h index 9871d1bdf..3ce541615 100644 --- a/polymer/eduke32/source/sector.h +++ b/polymer/eduke32/source/sector.h @@ -57,7 +57,7 @@ typedef struct { int16_t cyclers[MAXCYCLERS][6]; int16_t g_mirrorWall[64], g_mirrorSector[64], g_mirrorCount; int16_t g_numAnimWalls; - int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128]; + int16_t g_numClouds,clouds[256],cloudx,cloudy; int16_t g_numCyclers; int32_t numsprites;