diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 2d7407030..a80e4f476 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -4953,7 +4953,7 @@ end_point_dragging: yax_getbunches(joinsector[k], &jbn[k][YAX_CEILING], &jbn[k][YAX_FLOOR]); #endif // pressing J into the same sector is the same as saying 'no' - // v----------------v + // v----------------v if (s1to0wall == -1 && i != joinsector[0]) { #ifdef YAX_ENABLE @@ -5013,16 +5013,48 @@ end_point_dragging: if ((uneqbn&2)==0) { - if (whybad&1) - message("Can't make floor bunchnums equal: both floors must be extended"); - else if (whybad&2) - message("Can't make floor bunchnums equal: both floors must be non-sloped"); - else if (whybad&4) - message("Can't make floor bunchnums equal: both floors must have equal height"); - else if (whybad&8) - message("Can't make floor bunchnums equal: INTERNAL ERROR"); - else if (whybad&16) - message("Can't make floor bunchnums equal: lower neighbors must be linked"); + if (whybad==1+8 && jbn[0][cf]>=0 && jbn[1][cf]<0) + { + // 1st join sector extended, 2nd not... let's see + // if the latter is inner to the former one + + m = 1; + for (WALLS_OF_SECTOR(joinsector[1], k)) + if (wall[k].nextsector != joinsector[0]) + { + m = 0; + break; + } + + if (m==1) + { + yax_setbunch(joinsector[1], YAX_FLOOR, jbn[0][cf]); + yax_update(0); + yax_updategrays(pos.z); + asksave = 1; + + printmessage16("Added sector %d's floor to bunch %d", + joinsector[1], jbn[0][cf]); + } + else + { + printmessage16("Can't add sector %d's floor to bunch %d: not inner to sector %d", + joinsector[1], jbn[0][cf], joinsector[0]); + } + } + else + { + if (whybad&1) + message("Can't make floor bunchnums equal: both floors must be extended"); + else if (whybad&2) + message("Can't make floor bunchnums equal: both floors must be non-sloped"); + else if (whybad&4) + message("Can't make floor bunchnums equal: both floors must have equal height"); + else if (whybad&8) + message("Can't make floor bunchnums equal: INTERNAL ERROR"); + else if (whybad&16) + message("Can't make floor bunchnums equal: lower neighbors must be linked"); + } } else { diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 18a20f0a0..07bf3dfb0 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -1999,7 +1999,8 @@ int16_t thewall[MAXWALLSB]; int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB]; -static int16_t smost[MAXYSAVES], smostcnt; +static int32_t smostcnt; +static int16_t smost[MAXYSAVES]; static int16_t smoststart[MAXWALLSB]; static char smostwalltype[MAXWALLSB]; static int32_t smostwall[MAXWALLSB], smostwallcnt = -1L; diff --git a/polymer/eduke32/build/src/engine_priv.h b/polymer/eduke32/build/src/engine_priv.h index 873b91ca9..e952b82ca 100644 --- a/polymer/eduke32/build/src/engine_priv.h +++ b/polymer/eduke32/build/src/engine_priv.h @@ -4,6 +4,7 @@ #define MAXCLIPNUM 1024 #define MAXPERMS 512 #define MAXTILEFILES 256 +// MAXYSAVES is 983040 (!) right now: #define MAXYSAVES ((MAXXDIM*MAXSPRITES)>>7) #define MAXNODESPERLINE 42 //Warning: This depends on MAXYSAVES & MAXYDIM! #define MAXCLIPDIST 1024 diff --git a/polymer/eduke32/source/jmact/animlib.c b/polymer/eduke32/source/jmact/animlib.c index 5bd35d136..599b84ac8 100644 --- a/polymer/eduke32/source/jmact/animlib.c +++ b/polymer/eduke32/source/jmact/animlib.c @@ -40,7 +40,30 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com) need to be in the header because there are no exposed functions that use any of this directly */ -typedef struct lpfileheaderstruct { uint32_t id; /* 4 uint8_tacter ID == "LPF " */ uint16_t maxLps; /* max # largePages allowed. 256 FOR NOW. */ uint16_t nLps; /* # largePages in this file. */ uint32_t nRecords; /* # records in this file. 65534 is current limit + ring */ uint16_t maxRecsPerLp; /* # records permitted in an lp. 256 FOR NOW. */ uint16_t lpfTableOffset; /* Absolute Seek position of lpfTable. 1280 FOR NOW. */ uint32_t contentType; /* 4 character ID == "ANIM" */ uint16_t width; /* Width of screen in pixels. */ uint16_t height; /* Height of screen in pixels. */ uint8_t variant; /* 0==ANIM. */ uint8_t version; /* 0==frame rate in 18/sec, 1= 70/sec */ uint8_t hasLastDelta; /* 1==Last record is a delta from last-to-first frame. */ uint8_t lastDeltaValid; /* 0==Ignore ring frame. */ uint8_t pixelType; /* 0==256 color. */ uint8_t CompressionType; /* 1==(RunSkipDump) Only one used FOR NOW. */ uint8_t otherRecsPerFrm; /* 0 FOR NOW. */ uint8_t bitmaptype; /* 1==320x200, 256-color. Only one implemented so far. */ uint8_t recordTypes[32]; /* Not yet implemented. */ uint32_t nFrames; /* Number of actual frames in the file, includes ring frame. */ uint16_t framesPerSecond; /* Number of frames to play per second. */ uint16_t pad2[29]; /* 58 bytes of filler to round up to 128 bytes total. */ } +typedef struct lpfileheaderstruct +{ + uint32_t id; /* 4 uint8_tacter ID == "LPF " */ + uint16_t maxLps; /* max # largePages allowed. 256 FOR NOW. */ + uint16_t nLps; /* # largePages in this file. */ + uint32_t nRecords; /* # records in this file. 65534 is current limit + ring */ + uint16_t maxRecsPerLp; /* # records permitted in an lp. 256 FOR NOW. */ + uint16_t lpfTableOffset; /* Absolute Seek position of lpfTable. 1280 FOR NOW. */ + uint32_t contentType; /* 4 character ID == "ANIM" */ + uint16_t width; /* Width of screen in pixels. */ + uint16_t height; /* Height of screen in pixels. */ + uint8_t variant; /* 0==ANIM. */ + uint8_t version; /* 0==frame rate in 18/sec, 1= 70/sec */ + uint8_t hasLastDelta; /* 1==Last record is a delta from last-to-first frame. */ + uint8_t lastDeltaValid; /* 0==Ignore ring frame. */ + uint8_t pixelType; /* 0==256 color. */ + uint8_t CompressionType; /* 1==(RunSkipDump) Only one used FOR NOW. */ + uint8_t otherRecsPerFrm; /* 0 FOR NOW. */ + uint8_t bitmaptype; /* 1==320x200, 256-color. Only one implemented so far. */ + uint8_t recordTypes[32]; /* Not yet implemented. */ + uint32_t nFrames; /* Number of actual frames in the file, includes ring frame. */ + uint16_t framesPerSecond; /* Number of frames to play per second. */ + uint16_t pad2[29]; /* 58 bytes of filler to round up to 128 bytes total. */ +} lpfileheader; /* (comments from original source) */ // this is the format of a large page structure