diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9283447f8..55ef1e67b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,35 @@ -August 28, 2009 +August 29, 2009 (Changes by Graf Zahl) +- fixed: WIF_STAFF2_KICKBACK did not work anymore because it depended on conditions + that were changed some time ago. +- fixed: The damage inflictor for a rail attack was the shooter, not the puff. +- Fixed: Floor and ceiling huggers may not change their z-velocity when seeking. +- Fixed: UDMF set the secret sector flag before parsing the sector's properties, + resulting in it always being false. +- Renamed sector's oldspecial variable to secretsector to better reflect its + only use. +- Fixed: A_BrainSpit stored as the SpawnShot's target the intended BossTarget, + not itself contrarily to other projectile spawning functions. + A_SpawnFly then used the target for CopyFriendliness, thinking it'll be the + BossEye when in fact it wasn't. +- Added Gez's submission for a DEHACKED hack introduced by Boom. + (using code pointers of the form 'Pointer 0 (x statenumber)'. +- fixed: Attaching 3DMidtex lines by sector tag did not work because lines + were marked by index in the sector's line list but needed to be marked by + line index in the global array. +- fixed: On Linux ZDoom was creating a directory called "~.zdoom" for + save files because of a missing slash. +- fixed: UDMF was unable to read floating point values in exponential format + because the C Mode scanner was missing a definition for them. +- fixed: The recent changes for removing pointer aliasing got the end sequence + info from an incorrect variable. To make this more robust the sequence index + is now stored as a hexadecimal string to avoid storing binary data in a string. + Also moved end sequence lookup from f_finale.cpp to the calling code so that + the proper end sequences can be retrieved for secret exits, too. + +August 28, 2009 (Changes by Graf Zahl) +- fixed: Switching a weapon did not reset the refire counter. + +August 28, 2009 - Fixed: The first lighting plane added to a light stack had the bOverlaps flag set, causing it to be ignored during rendering. Why this didn't cause more trouble, I don't know. diff --git a/src/am_map.cpp b/src/am_map.cpp index a4948c99e..e2b62e124 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1429,7 +1429,7 @@ static bool AM_CheckSecret(line_t *line) { if (line->frontsector != NULL) { - if (line->frontsector->oldspecial) + if (line->frontsector->secretsector) { if (am_map_secrets!=0 && !(line->frontsector->special&SECRET_MASK)) return true; if (am_map_secrets==2 && !(line->flags & ML_SECRET)) return true; @@ -1437,7 +1437,7 @@ static bool AM_CheckSecret(line_t *line) } if (line->backsector != NULL) { - if (line->backsector->oldspecial) + if (line->backsector->secretsector) { if (am_map_secrets!=0 && !(line->backsector->special&SECRET_MASK)) return true; if (am_map_secrets==2 && !(line->flags & ML_SECRET)) return true; diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index dab1e432e..7879ba605 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -1373,9 +1373,31 @@ static int PatchPointer (int ptrNum) { int result; - if (ptrNum >= 0 && ptrNum < 448) { + // Hack for some Boom dehacked patches that are of the form Pointer 0 (x statenumber) + char * key; + int indexnum; + key=strchr(Line2, '('); + if (key++) key=strchr(key, ' '); else key=NULL; + if ((ptrNum == 0) && key++) + { + *strchr(key, ')') = '\0'; + indexnum = atoi(key); + for (ptrNum = 0; (unsigned int) ptrNum < CodePConv.Size(); ++ptrNum) + { + if (CodePConv[ptrNum] == indexnum) break; + } + DPrintf("Final ptrNum: %i\n", ptrNum); + } + // End of hack. + + // 448 Doom states with codepointers + 74 extra MBF states with codepointers = 522 total + // Better to just use the size of the array rather than a hardcoded value. + if (ptrNum >= 0 && (unsigned int) ptrNum < CodePConv.Size()) + { DPrintf ("Pointer %d\n", ptrNum); - } else { + } + else + { Printf ("Pointer %d out of range.\n", ptrNum); ptrNum = -1; } diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 36003aa98..d7df8abc3 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -191,10 +191,19 @@ void DThinker::SerializeAll(FArchive &arc, bool hubLoad) statcount--; } } - catch (class CDoomError &) + catch (class CDoomError &err) { bSerialOverride = false; - DestroyAllThinkers(); + + // DestroyAllThinkers cannot be called here. It will try to delete the corrupted + // object table left behind by the serializer and crash. + // Trying to continue is not an option here because the garbage collector will + // crash the next time it runs. + // Even making this a fatal error will crash but at least the message can be seen + // before the crash - which is not the case with all other options. + + //DestroyAllThinkers(); + I_FatalError(err.GetMessage()); throw; } bSerialOverride = false; diff --git a/src/f_finale.cpp b/src/f_finale.cpp index b295aefbf..82b8a9e02 100644 --- a/src/f_finale.cpp +++ b/src/f_finale.cpp @@ -88,7 +88,8 @@ void F_AdvanceSlideshow (); // F_StartFinale // void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int cdid, const char *flat, - const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, bool ending) + const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, + bool ending, int endsequence) { bool loopmusic = ending ? !gameinfo.noloopfinalemusic : true; gameaction = ga_nothing; @@ -146,11 +147,12 @@ void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int FinaleEndCount = 70; FadeDir = -1; FinaleEnding = ending; + FinaleSequence = endsequence; + S_StopAllChannels (); if (ending) { - FinaleSequence = level.EndSequence; if (EndSequences[FinaleSequence].EndType == END_Chess) { TEXTSPEED = 3; // Slow the text to its original rate to match the music. @@ -244,7 +246,6 @@ void F_Ticker () // [RH] Don't automatically advance end-of-game messages if (interrupt) { - FinaleSequence = level.EndSequence; if (EndSequences[FinaleSequence].EndType == END_Cast) { F_StartCast (); diff --git a/src/f_finale.h b/src/f_finale.h index 8673e3b2a..7eb2884d0 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -43,7 +43,8 @@ void F_Drawer (); void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int cdid, const char *flat, - const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, bool ending); + const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, + bool ending, int endsequence = 0); void F_StartSlideshow (); diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index e01a9ff26..2fc203e1d 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -141,7 +141,8 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound) { AActor *newmobj; AActor *fog; - AActor *targ; + AActor *eye = self->master; // The eye is the spawnshot's master, not the target! + AActor *targ = self->target; // Unlike other projectiles, the target is the intended destination. int r; // [GZ] Should be more viable than a countdown... @@ -155,9 +156,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound) if (self->reactiontime == 0 || --self->reactiontime != 0) return; // still flying } - - targ = self->target; - + if (spawntype != NULL) { fog = Spawn (spawntype, targ->x, targ->y, targ->z, ALLOW_REPLACE); @@ -174,8 +173,8 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound) drop = self->GetDropItems(); // If not, then default back to its master's list - if (drop == NULL && self->master != NULL) - drop = self->master->GetDropItems(); + if (drop == NULL && eye != NULL) + drop = eye->GetDropItems(); if (drop != NULL) { @@ -192,7 +191,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound) } di = drop; n = pr_spawnfly(n); - while (n > 0) + while (n >= 0) { if (di->Name != NAME_None) { @@ -235,8 +234,6 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound) if (newmobj != NULL) { // Make the new monster hate what the boss eye hates - AActor *eye = self->target; - if (eye != NULL) { newmobj->CopyFriendliness (eye, false); diff --git a/src/g_doom/a_revenant.cpp b/src/g_doom/a_revenant.cpp index 807422ff6..92a3dc13f 100644 --- a/src/g_doom/a_revenant.cpp +++ b/src/g_doom/a_revenant.cpp @@ -98,29 +98,32 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer) exact = self->angle>>ANGLETOFINESHIFT; self->velx = FixedMul (self->Speed, finecosine[exact]); self->vely = FixedMul (self->Speed, finesine[exact]); - - // change slope - dist = P_AproxDistance (dest->x - self->x, - dest->y - self->y); - - dist = dist / self->Speed; - if (dist < 1) - dist = 1; - - if (dest->height >= 56*FRACUNIT) + if (!(self->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))) { - slope = (dest->z+40*FRACUNIT - self->z) / dist; - } - else - { - slope = (dest->z + self->height*2/3 - self->z) / dist; - } + // change slope + dist = P_AproxDistance (dest->x - self->x, + dest->y - self->y); + + dist = dist / self->Speed; - if (slope < self->velz) - self->velz -= FRACUNIT/8; - else - self->velz += FRACUNIT/8; + if (dist < 1) + dist = 1; + + if (dest->height >= 56*FRACUNIT) + { + slope = (dest->z+40*FRACUNIT - self->z) / dist; + } + else + { + slope = (dest->z + self->height*2/3 - self->z) / dist; + } + + if (slope < self->velz) + self->velz -= FRACUNIT/8; + else + self->velz += FRACUNIT/8; + } } diff --git a/src/g_game.cpp b/src/g_game.cpp index 44d8eb5cf..71c1061f4 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1825,7 +1825,7 @@ FString G_BuildSaveName (const char *prefix, int slot) #ifdef unix if (leader.IsEmpty()) { - leader = "~" GAME_DIR; + leader = "~/" GAME_DIR; } #endif } diff --git a/src/g_level.cpp b/src/g_level.cpp index 689bf7e31..bb0b9b48c 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -168,8 +168,7 @@ static void SetEndSequence (char *nextmap, int type) newseq.EndType = type; seqnum = (int)EndSequences.Push (newseq); } - strcpy (nextmap, "enDSeQ"); - *((WORD *)(nextmap + 6)) = (WORD)seqnum; + mysnprintf(nextmap, sizeof(nextmap), "enDSeQ%04x", (WORD)seqnum); } //========================================================================== @@ -712,7 +711,7 @@ void G_DoCompleted (void) { if (strncmp (nextlevel, "enDSeQ", 6) == 0) { - wminfo.next = FString(nextlevel, 8); + wminfo.next = nextlevel; wminfo.LName1 = NULL; } else @@ -1022,7 +1021,7 @@ void G_WorldDone (void) thiscluster->flags & CLUSTER_EXITTEXTINLUMP, thiscluster->flags & CLUSTER_FINALEPIC, thiscluster->flags & CLUSTER_LOOKUPEXITTEXT, - true); + true, strtol(nextlevel.GetChars()+6, NULL, 16)); } else { @@ -1285,10 +1284,10 @@ void G_InitLevelLocals () level.musicorder = info->musicorder; level.LevelName = level.info->LookupLevelName(); - strncpy (level.nextmap, info->nextmap, 8); - level.nextmap[8] = 0; - strncpy (level.secretmap, info->secretmap, 8); - level.secretmap[8] = 0; + strncpy (level.nextmap, info->nextmap, 10); + level.nextmap[10] = 0; + strncpy (level.secretmap, info->secretmap, 10); + level.secretmap[10] = 0; strncpy (level.skypic1, info->skypic1, 8); level.skypic1[8] = 0; if (!level.skypic2[0]) diff --git a/src/g_level.h b/src/g_level.h index cc4b5e9b1..3b0851636 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -240,12 +240,19 @@ typedef TMap FOptData; struct level_info_t { - char mapname[9]; int levelnum; + + char mapname[9]; char pname[9]; - char nextmap[9]; - char secretmap[9]; + char nextmap[11]; // The endsequence string is 10 chars so we need more space here + char secretmap[11]; char skypic1[9]; + char skypic2[9]; + char fadetable[9]; + char f1[9]; + char bordertexture[9]; + char mapbg[9]; + int cluster; int partime; int sucktime; @@ -253,14 +260,11 @@ struct level_info_t DWORD flags2; FString Music; FString LevelName; - char fadetable[9]; SBYTE WallVertLight, WallHorizLight; - char f1[9]; int musicorder; FCompressedMemFile *snapshot; DWORD snapshotVer; struct acsdefered_t *defered; - char skypic2[9]; float skyspeed1; float skyspeed2; DWORD fadeto; @@ -287,8 +291,6 @@ struct level_info_t FString SoundInfo; FString SndSeq; - char bordertexture[9]; - char mapbg[9]; float teamdamage; @@ -355,20 +357,9 @@ struct FLevelLocals int levelnum; int lumpnum; FString LevelName; - union - { - char mapname[256]; // the server name (base1, etc) - // The endsequence is embedded in the name so that it can be - // carried around as a name. The first 6 character ought to - // match the string "enDSeQ". - struct - { - char pad[6]; - WORD EndSequence; - }; - }; - char nextmap[9]; // go here when fraglimit is hit - char secretmap[9]; // map to go to when used secret exit + char mapname[256]; // the lump name (E1M1, MAP01, etc) + char nextmap[11]; // go here when using the regular exit + char secretmap[11]; // map to go to when used secret exit DWORD flags; DWORD flags2; diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index bd61d02ae..68f9079c0 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -901,6 +901,7 @@ void FMapInfoParser::ParseNextMap(char *mapname) else { strncpy (mapname, sc.String, 8); + mapname[8] = 0; } if (useseq) { @@ -915,8 +916,8 @@ void FMapInfoParser::ParseNextMap(char *mapname) { seqnum = (int)EndSequences.Push (newSeq); } - strcpy (mapname, "enDSeQ"); - *((WORD *)(mapname + 6)) = (WORD)seqnum; + // mapname can point to nextmap and secretmap which are both 12 characters long + mysnprintf(mapname, 11, "enDSeQ%04x", (WORD)seqnum); } } } diff --git a/src/g_strife/a_spectral.cpp b/src/g_strife/a_spectral.cpp index 0c54842c5..9506b3412 100644 --- a/src/g_strife/a_spectral.cpp +++ b/src/g_strife/a_spectral.cpp @@ -117,28 +117,31 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer2) self->velx = FixedMul (self->Speed, finecosine[exact]); self->vely = FixedMul (self->Speed, finesine[exact]); - // change slope - dist = P_AproxDistance (dest->x - self->x, dest->y - self->y); - dist /= self->Speed; + if (!(self->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))) + { + // change slope + dist = P_AproxDistance (dest->x - self->x, dest->y - self->y); + dist /= self->Speed; - if (dist < 1) - { - dist = 1; - } - if (dest->height >= 56*FRACUNIT) - { - slope = (dest->z+40*FRACUNIT - self->z) / dist; - } - else - { - slope = (dest->z + self->height*2/3 - self->z) / dist; - } - if (slope < self->velz) - { - self->velz -= FRACUNIT/8; - } - else - { - self->velz += FRACUNIT/8; + if (dist < 1) + { + dist = 1; + } + if (dest->height >= 56*FRACUNIT) + { + slope = (dest->z+40*FRACUNIT - self->z) / dist; + } + else + { + slope = (dest->z + self->height*2/3 - self->z) / dist; + } + if (slope < self->velz) + { + self->velz -= FRACUNIT/8; + } + else + { + self->velz += FRACUNIT/8; + } } } diff --git a/src/p_3dmidtex.cpp b/src/p_3dmidtex.cpp index c6c812562..e408891bf 100644 --- a/src/p_3dmidtex.cpp +++ b/src/p_3dmidtex.cpp @@ -170,7 +170,8 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c // Only consider two-sided lines with the 3DMIDTEX flag continue; } - found_lines[line>>3] |= 1 << (line&7); + int lineno = int(ln-lines); + found_lines[lineno>>3] |= 1 << (lineno&7); } } } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 1a5238e45..c3d38d190 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1063,7 +1063,7 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage thrust *= 4; } ang >>= ANGLETOFINESHIFT; - if (source && source->player && (source == inflictor) + if (source && source->player && (flags & DMG_INFLICTOR_IS_PUFF) && source->player->ReadyWeapon != NULL && (source->player->ReadyWeapon->WeaponFlags & WIF_STAFF2_KICKBACK)) { diff --git a/src/p_map.cpp b/src/p_map.cpp index c7fd8c7ef..e37f9aea7 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3567,6 +3567,11 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color AActor *puffDefaults = puffclass == NULL? NULL : GetDefaultByType (puffclass); FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType; + // used as damage inflictor + AActor *thepuff = NULL; + + if (puffclass != NULL) thepuff = Spawn (puffclass, source->x, source->y, source->z, ALLOW_REPLACE); + for (i = 0; i < RailHits.Size (); i++) { fixed_t x, y, z; @@ -3585,7 +3590,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color P_SpawnBlood (x, y, z, source->angle - ANG180, damage, RailHits[i].HitActor); P_TraceBleed (damage, x, y, z, RailHits[i].HitActor, source->angle, pitch); } - P_DamageMobj (RailHits[i].HitActor, source, source, damage, damagetype); + P_DamageMobj (RailHits[i].HitActor, thepuff? thepuff:source, source, damage, damagetype, DMG_INFLICTOR_IS_PUFF); } // Spawn a decal or puff at the point where the trace ended. @@ -3597,22 +3602,20 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color trace.CrossedWater == NULL && trace.Sector->heightsec == NULL) { - AActor *thepuff = Spawn (puffclass, trace.X, trace.Y, trace.Z, ALLOW_REPLACE); if (thepuff != NULL) { + thepuff->SetOrigin(trace.X, trace.Y, trace.Z); P_HitWater (thepuff, trace.Sector); - thepuff->Destroy (); } } if (trace.CrossedWater) { - AActor *thepuff = Spawn (puffclass, 0, 0, 0, ALLOW_REPLACE); if (thepuff != NULL) { SpawnDeepSplash (source, trace, thepuff, vx, vy, vz, shootz); - thepuff->Destroy (); } } + thepuff->Destroy (); // Draw the slug's trail. end.X = FIXED2FLOAT(trace.X); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 7dc874317..39ae7fdef 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1472,17 +1472,23 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax) angle = actor->angle>>ANGLETOFINESHIFT; actor->velx = FixedMul (actor->Speed, finecosine[angle]); actor->vely = FixedMul (actor->Speed, finesine[angle]); - if (actor->z + actor->height < target->z || - target->z + target->height < actor->z) - { // Need to seek vertically - dist = P_AproxDistance (target->x - actor->x, target->y - actor->y); - dist = dist / actor->Speed; - if (dist < 1) - { - dist = 1; + + if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))) + { + if (actor->z + actor->height < target->z || + target->z + target->height < actor->z) + { // Need to seek vertically + dist = P_AproxDistance (target->x - actor->x, target->y - actor->y); + dist = dist / actor->Speed; + if (dist < 1) + { + dist = 1; + } + actor->velz = ((target->z+target->height/2) - (actor->z+actor->height/2)) / dist; } - actor->velz = ((target->z+target->height/2) - (actor->z+actor->height/2)) / dist; } + + return true; } diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index b846aa68c..33f5ee510 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -335,7 +335,7 @@ void P_SerializeWorld (FArchive &arc) << sec->Flags << sec->FloorSkyBox << sec->CeilingSkyBox << sec->ZoneNumber - << sec->oldspecial + << sec->secretsector << sec->interpolations[0] << sec->interpolations[1] << sec->interpolations[2] diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 95ca52a66..70e88c355 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1323,7 +1323,7 @@ void P_LoadSectors (MapData * map) ss->special = LittleShort(ms->special); else // [RH] Translate to new sector special ss->special = P_TranslateSectorSpecial (LittleShort(ms->special)); - ss->oldspecial = !!(ss->special&SECRET_MASK); + ss->secretsector = !!(ss->special&SECRET_MASK); ss->tag = LittleShort(ms->tag); ss->thinglist = NULL; ss->touching_thinglist = NULL; // phares 3/14/98 diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 5c066f531..298d2db68 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1013,7 +1013,6 @@ struct UDMFParser sec->SetYScale(sector_t::floor, FRACUNIT); sec->SetXScale(sector_t::ceiling, FRACUNIT); sec->SetYScale(sector_t::ceiling, FRACUNIT); - sec->oldspecial = !!(sec->special&SECRET_MASK); sec->thinglist = NULL; sec->touching_thinglist = NULL; // phares 3/14/98 sec->seqType = (level.flags & LEVEL_SNDSEQTOTALCTRL)? 0:-1; @@ -1177,6 +1176,7 @@ struct UDMFParser } } + sec->secretsector = !!(sec->special&SECRET_MASK); sec->floorplane.d = -sec->GetPlaneTexZ(sector_t::floor); sec->floorplane.c = FRACUNIT; sec->floorplane.ic = FRACUNIT; diff --git a/src/r_defs.h b/src/r_defs.h index fe859eef2..3c072803d 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -693,7 +693,7 @@ struct sector_t FExtraLight *ExtraLights; vertex_t *Triangle[3]; // Three points that can define a plane - short oldspecial; //jff 2/16/98 remembers if sector WAS secret (automap) + short secretsector; //jff 2/16/98 remembers if sector WAS secret (automap) int sectornum; // for comparing sector copies extsector_t * e; // This stores data that requires construction/destruction. Such data must not be copied by R_FakeFlat. diff --git a/src/sc_man_scanner.h b/src/sc_man_scanner.h index 0398d3847..e7a36f846 100644 --- a/src/sc_man_scanner.h +++ b/src/sc_man_scanner.h @@ -4121,7 +4121,8 @@ yy627: #line 4122 "src/sc_man_scanner.h" { YYCTYPE yych; - if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + unsigned int yyaccept = 0; + if((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; if(yych <= ':') { if(yych <= '&') { @@ -4169,46 +4170,56 @@ yy627: } } yy631: + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '*') goto yy677; - if(yych == '/') goto yy675; + if(yych == '*') goto yy700; + if(yych == '/') goto yy698; yy632: -#line 258 "src/sc_man_scanner.re" +#line 259 "src/sc_man_scanner.re" { goto normal_token; } -#line 4179 "src/sc_man_scanner.h" +#line 4181 "src/sc_man_scanner.h" yy633: ++YYCURSOR; yych = *YYCURSOR; - goto yy674; + goto yy697; yy634: #line 246 "src/sc_man_scanner.re" { goto std1; } -#line 4187 "src/sc_man_scanner.h" +#line 4189 "src/sc_man_scanner.h" yy635: ++YYCURSOR; #line 247 "src/sc_man_scanner.re" { goto newline; } -#line 4192 "src/sc_man_scanner.h" +#line 4194 "src/sc_man_scanner.h" yy637: ++YYCURSOR; #line 248 "src/sc_man_scanner.re" { goto string; } -#line 4197 "src/sc_man_scanner.h" +#line 4199 "src/sc_man_scanner.h" yy639: ++YYCURSOR; #line 250 "src/sc_man_scanner.re" { goto negative_check; } -#line 4202 "src/sc_man_scanner.h" +#line 4204 "src/sc_man_scanner.h" yy641: ++YYCURSOR; - if((yych = *YYCURSOR) == '.') goto yy671; - if(yych <= '/') goto yy653; - if(yych <= '9') goto yy669; - goto yy653; + if((yych = *YYCURSOR) <= '9') { + if(yych == '.') goto yy679; + if(yych <= '/') goto yy653; + goto yy676; + } else { + if(yych <= 'E') { + if(yych <= 'D') goto yy653; + goto yy678; + } else { + if(yych == 'e') goto yy678; + goto yy653; + } + } yy642: -#line 259 "src/sc_man_scanner.re" +#line 260 "src/sc_man_scanner.re" { goto normal_token; } -#line 4212 "src/sc_man_scanner.h" +#line 4223 "src/sc_man_scanner.h" yy643: yych = *++YYCURSOR; if(yych <= '/') goto yy632; @@ -4270,103 +4281,375 @@ yy653: } yy654: ++YYCURSOR; +#line 258 "src/sc_man_scanner.re" + { goto normal_token; } +#line 4287 "src/sc_man_scanner.h" +yy656: + ++YYCURSOR; #line 257 "src/sc_man_scanner.re" { goto normal_token; } -#line 4276 "src/sc_man_scanner.h" -yy656: +#line 4292 "src/sc_man_scanner.h" +yy658: ++YYCURSOR; #line 256 "src/sc_man_scanner.re" { goto normal_token; } -#line 4281 "src/sc_man_scanner.h" -yy658: +#line 4297 "src/sc_man_scanner.h" +yy660: ++YYCURSOR; #line 255 "src/sc_man_scanner.re" { goto normal_token; } -#line 4286 "src/sc_man_scanner.h" -yy660: +#line 4302 "src/sc_man_scanner.h" +yy662: ++YYCURSOR; #line 254 "src/sc_man_scanner.re" { goto normal_token; } -#line 4291 "src/sc_man_scanner.h" -yy662: +#line 4307 "src/sc_man_scanner.h" +yy664: ++YYCURSOR; #line 253 "src/sc_man_scanner.re" { goto normal_token; } -#line 4296 "src/sc_man_scanner.h" -yy664: - ++YYCURSOR; -#line 252 "src/sc_man_scanner.re" - { goto normal_token; } -#line 4301 "src/sc_man_scanner.h" +#line 4312 "src/sc_man_scanner.h" yy666: - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + yyaccept = 1; + YYMARKER = ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; - if(yych <= '/') goto yy668; - if(yych <= '9') goto yy666; + if(yych <= 'K') { + if(yych <= 'D') { + if(yych <= '/') goto yy668; + if(yych <= '9') goto yy666; + } else { + if(yych <= 'E') goto yy669; + if(yych <= 'F') goto yy671; + } + } else { + if(yych <= 'e') { + if(yych <= 'L') goto yy671; + if(yych >= 'e') goto yy669; + } else { + if(yych <= 'f') goto yy671; + if(yych == 'l') goto yy671; + } + } yy668: #line 251 "src/sc_man_scanner.re" { goto normal_token; } -#line 4311 "src/sc_man_scanner.h" +#line 4338 "src/sc_man_scanner.h" yy669: - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '@') { - if(yych <= '-') { - if(yych == '\'') goto yy652; - goto yy642; + yych = *++YYCURSOR; + if(yych <= ',') { + if(yych == '+') goto yy673; + } else { + if(yych <= '-') goto yy673; + if(yych <= '/') goto yy670; + if(yych <= '9') goto yy674; + } +yy670: + YYCURSOR = YYMARKER; + if(yyaccept <= 1) { + if(yyaccept <= 0) { + goto yy632; } else { - if(yych <= '.') goto yy671; - if(yych <= '/') goto yy642; - if(yych <= '9') goto yy669; - goto yy642; + goto yy668; } } else { - if(yych <= '_') { - if(yych <= 'Z') goto yy652; - if(yych <= '^') goto yy642; - goto yy652; - } else { - if(yych <= '`') goto yy642; - if(yych <= 'z') goto yy652; - if(yych <= '~') goto yy642; - goto yy652; - } + goto yy642; } yy671: ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '/') goto yy668; - if(yych <= '9') goto yy671; - goto yy668; +yy672: +#line 252 "src/sc_man_scanner.re" + { goto normal_token; } +#line 4364 "src/sc_man_scanner.h" yy673: - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych <= '/') goto yy670; + if(yych >= ':') goto yy670; yy674: - if(yych == 0x0A) goto yy634; - if(yych <= ' ') goto yy673; - goto yy634; -yy675: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 0x0A) goto yy679; - goto yy675; -yy677: + if(yych <= 'K') { + if(yych <= '9') { + if(yych <= '/') goto yy672; + goto yy674; + } else { + if(yych == 'F') goto yy671; + goto yy672; + } + } else { + if(yych <= 'f') { + if(yych <= 'L') goto yy671; + if(yych <= 'e') goto yy672; + goto yy671; + } else { + if(yych == 'l') goto yy671; + goto yy672; + } + } +yy676: + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + if(yych <= 'E') { + if(yych <= '.') { + if(yych == '\'') goto yy652; + if(yych <= '-') goto yy642; + goto yy679; + } else { + if(yych <= '9') { + if(yych <= '/') goto yy642; + goto yy676; + } else { + if(yych <= '@') goto yy642; + if(yych <= 'D') goto yy652; + } + } + } else { + if(yych <= '`') { + if(yych <= 'Z') goto yy652; + if(yych == '_') goto yy652; + goto yy642; + } else { + if(yych <= 'e') { + if(yych <= 'd') goto yy652; + } else { + if(yych <= 'z') goto yy652; + if(yych <= '~') goto yy642; + goto yy652; + } + } + } +yy678: + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ',') { + if(yych == '+') goto yy690; + goto yy653; + } else { + if(yych <= '-') goto yy690; + if(yych <= '/') goto yy653; + if(yych <= '9') goto yy691; + goto yy653; + } +yy679: + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy682; + if(yych == 'e') goto yy682; + goto yy681; +yy680: + yyaccept = 1; + YYMARKER = ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; +yy681: + if(yych <= 'K') { + if(yych <= 'D') { + if(yych <= '/') goto yy668; + if(yych <= '9') goto yy680; + goto yy668; + } else { + if(yych <= 'E') goto yy686; + if(yych <= 'F') goto yy671; + goto yy668; + } + } else { + if(yych <= 'e') { + if(yych <= 'L') goto yy671; + if(yych <= 'd') goto yy668; + goto yy686; + } else { + if(yych <= 'f') goto yy671; + if(yych == 'l') goto yy671; + goto yy668; + } + } +yy682: + yych = *++YYCURSOR; + if(yych <= ',') { + if(yych != '+') goto yy670; + } else { + if(yych <= '-') goto yy683; + if(yych <= '/') goto yy670; + if(yych <= '9') goto yy684; + goto yy670; + } +yy683: + yych = *++YYCURSOR; + if(yych <= '/') goto yy670; + if(yych >= ':') goto yy670; +yy684: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= 'K') { + if(yych <= '9') { + if(yych <= '/') goto yy672; + goto yy684; + } else { + if(yych == 'F') goto yy671; + goto yy672; + } + } else { + if(yych <= 'f') { + if(yych <= 'L') goto yy671; + if(yych <= 'e') goto yy672; + goto yy671; + } else { + if(yych == 'l') goto yy671; + goto yy672; + } + } +yy686: + yych = *++YYCURSOR; + if(yych <= ',') { + if(yych != '+') goto yy670; + } else { + if(yych <= '-') goto yy687; + if(yych <= '/') goto yy670; + if(yych <= '9') goto yy688; + goto yy670; + } +yy687: + yych = *++YYCURSOR; + if(yych <= '/') goto yy670; + if(yych >= ':') goto yy670; +yy688: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= 'K') { + if(yych <= '9') { + if(yych <= '/') goto yy672; + goto yy688; + } else { + if(yych == 'F') goto yy671; + goto yy672; + } + } else { + if(yych <= 'f') { + if(yych <= 'L') goto yy671; + if(yych <= 'e') goto yy672; + goto yy671; + } else { + if(yych == 'l') goto yy671; + goto yy672; + } + } +yy690: + yych = *++YYCURSOR; + if(yych <= '/') goto yy670; + if(yych <= '9') goto yy694; + goto yy670; +yy691: + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if(yych <= 'Z') { + if(yych <= '@') { + if(yych <= '\'') { + if(yych <= '&') goto yy672; + goto yy652; + } else { + if(yych <= '/') goto yy672; + if(yych <= '9') goto yy691; + goto yy672; + } + } else { + if(yych <= 'F') { + if(yych <= 'E') goto yy652; + } else { + if(yych != 'L') goto yy652; + } + } + } else { + if(yych <= 'f') { + if(yych <= '_') { + if(yych <= '^') goto yy672; + goto yy652; + } else { + if(yych <= '`') goto yy672; + if(yych <= 'e') goto yy652; + } + } else { + if(yych <= 'l') { + if(yych <= 'k') goto yy652; + } else { + if(yych <= 'z') goto yy652; + if(yych <= '~') goto yy672; + goto yy652; + } + } + } + yych = *++YYCURSOR; + if(yych <= 'Z') { + if(yych <= '/') { + if(yych == '\'') goto yy652; + goto yy672; + } else { + if(yych <= '9') goto yy652; + if(yych <= '@') goto yy672; + goto yy652; + } + } else { + if(yych <= '`') { + if(yych == '_') goto yy652; + goto yy672; + } else { + if(yych <= 'z') goto yy652; + if(yych <= '~') goto yy672; + goto yy652; + } + } +yy694: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= 'K') { + if(yych <= '9') { + if(yych <= '/') goto yy672; + goto yy694; + } else { + if(yych == 'F') goto yy671; + goto yy672; + } + } else { + if(yych <= 'f') { + if(yych <= 'L') goto yy671; + if(yych <= 'e') goto yy672; + goto yy671; + } else { + if(yych == 'l') goto yy671; + goto yy672; + } + } +yy696: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy697: + if(yych == 0x0A) goto yy634; + if(yych <= ' ') goto yy696; + goto yy634; +yy698: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych == 0x0A) goto yy702; + goto yy698; +yy700: ++YYCURSOR; #line 243 "src/sc_man_scanner.re" { goto comment; } -#line 4363 "src/sc_man_scanner.h" -yy679: +#line 4646 "src/sc_man_scanner.h" +yy702: ++YYCURSOR; #line 244 "src/sc_man_scanner.re" { goto newline; } -#line 4368 "src/sc_man_scanner.h" +#line 4651 "src/sc_man_scanner.h" } -#line 262 "src/sc_man_scanner.re" +#line 263 "src/sc_man_scanner.re" } @@ -4394,22 +4677,22 @@ negative_check: comment: -#line 4398 "src/sc_man_scanner.h" +#line 4681 "src/sc_man_scanner.h" { YYCTYPE yych; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - if(yych == 0x0A) goto yy685; - if(yych != '*') goto yy687; + if(yych == 0x0A) goto yy708; + if(yych != '*') goto yy710; ++YYCURSOR; - if((yych = *YYCURSOR) == '/') goto yy688; -yy684: -#line 311 "src/sc_man_scanner.re" + if((yych = *YYCURSOR) == '/') goto yy711; +yy707: +#line 312 "src/sc_man_scanner.re" { goto comment; } -#line 4410 "src/sc_man_scanner.h" -yy685: +#line 4693 "src/sc_man_scanner.h" +yy708: ++YYCURSOR; -#line 300 "src/sc_man_scanner.re" +#line 301 "src/sc_man_scanner.re" { if (YYCURSOR >= YYLIMIT) { @@ -4421,13 +4704,13 @@ yy685: Crossed = true; goto comment; } -#line 4425 "src/sc_man_scanner.h" -yy687: +#line 4708 "src/sc_man_scanner.h" +yy710: yych = *++YYCURSOR; - goto yy684; -yy688: + goto yy707; +yy711: ++YYCURSOR; -#line 290 "src/sc_man_scanner.re" +#line 291 "src/sc_man_scanner.re" { if (YYCURSOR >= YYLIMIT) { @@ -4437,9 +4720,9 @@ yy688: } goto std1; } -#line 4441 "src/sc_man_scanner.h" +#line 4724 "src/sc_man_scanner.h" } -#line 312 "src/sc_man_scanner.re" +#line 313 "src/sc_man_scanner.re" newline: diff --git a/src/sc_man_scanner.re b/src/sc_man_scanner.re index 826a32190..56f5078a9 100644 --- a/src/sc_man_scanner.re +++ b/src/sc_man_scanner.re @@ -249,6 +249,7 @@ std2: [-] { goto negative_check; } ((D* [.] D+) | (D+ [.] D*)) { goto normal_token; } /* decimal number */ + (D+ E FS?) | (D* "." D+ E? FS?) | (D+ "." D* E? FS?) { goto normal_token; } /* float with exponent */ "::" { goto normal_token; } "&&" { goto normal_token; } "==" { goto normal_token; } diff --git a/zdoom.vcproj b/zdoom.vcproj index 2b0c1b899..f72913c08 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -1864,14 +1872,6 @@ Outputs="$(IntDir)/$(InputName).obj" /> - - - @@ -2061,14 +2061,6 @@ Outputs="$(IntDir)\$(InputName).obj" /> - - - @@ -2079,6 +2071,14 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + - - - + + + - - - @@ -5391,6 +5383,14 @@ AdditionalIncludeDirectories="src\win32;$(NoInherit)" /> + + + @@ -5669,7 +5669,7 @@ />