From 666e40c8bbac67a1e6039dd866b7f43150729347 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 19 Feb 2009 14:36:37 +0000 Subject: [PATCH] - Added MF5_CANTSEEK flag to prevent seeker missiles from homing in on certain actors and added an option to APowerInvisibility to set this flag when active. - Added map specific automap backgrounds. - Fixed: Voodoo dolls did not play a sound when dying. - Added colorized error messages to DECORATE and made a few more error conditions that do not block further parsing not immediately abort. - Made all errors in CreateNewActor not immediately fatal so that the rest of the DECORATE lump can be parsed normally to look for more errors. - Fixed: Defining classes with the same name as their immediate base class was legal. It should not be allowed that a class has another one with the same name in its ancestry. - Fixed: Formatting of the intermission screen on Heretic, Hexen and Strife was broken. Changed it to use WI_Drawpercent which does it properly and also allows showing percentage in these games now. - Fixed: The MAPINFO parser ignored missing terminating braces of the last block in the file. SVN r1425 (trunk) --- docs/rh-log.txt | 24 + src/actor.h | 1 + src/am_map.cpp | 4 +- src/g_doom/a_revenant.cpp | 2 +- src/g_level.h | 2 + src/g_mapinfo.cpp | 25 + src/g_shared/a_artifacts.cpp | 28 +- src/g_shared/a_artifacts.h | 1 + src/g_shared/sbarinfo_display.cpp | 2 +- src/g_skill.cpp | 1 + src/g_strife/a_spectral.cpp | 2 +- src/gameconfigfile.cpp | 3 + src/p_mobj.cpp | 2 +- src/p_user.cpp | 9 +- src/sc_man.cpp | 12 +- src/sc_man.h | 3 +- src/thingdef/thingdef.cpp | 33 +- src/thingdef/thingdef.h | 2 +- src/thingdef/thingdef_data.cpp | 1 + src/thingdef/thingdef_parse.cpp | 40 +- src/wi_stuff.cpp | 15 +- src/win32/i_system.cpp | 1 + zdoom.vcproj | 748 +++++++++++++++--------------- 23 files changed, 545 insertions(+), 416 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index d1b7578b4..f908e82a3 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,27 @@ +February 15, 2009 (Changes by Graf Zahl) +- Fixed: The CHARFORMAT structure that is used to set the color in a Windows + Rich Edit control was not fully initialized resulting in incorrect colors + being set. + +February 14, 2009 (Changes by Graf Zahl) +- Added MF5_CANTSEEK flag to prevent seeker missiles from homing in on + certain actors and added an option to APowerInvisibility to set this + flag when active. +- Added map specific automap backgrounds. +- Fixed: Voodoo dolls did not play a sound when dying. +- Added colorized error messages to DECORATE and made a few more error + conditions that do not block further parsing not immediately abort. +- Made all errors in CreateNewActor not immediately fatal so that the + rest of the DECORATE lump can be parsed normally to look for more errors. +- Fixed: Defining classes with the same name as their immediate base class + was legal. It should not be allowed that a class has another one with the + same name in its ancestry. +- Fixed: Formatting of the intermission screen on Heretic, Hexen and Strife + was broken. Changed it to use WI_Drawpercent which does it properly and + also allows showing percentage in these games now. +- Fixed: The MAPINFO parser ignored missing terminating braces of the last + block in the file. + February 10, 2009 - Moved the V_InitFontColors() call earlier in the startup sequence so that colored error messages appear colored in the startup window. Also lightened diff --git a/src/actor.h b/src/actor.h index e3eeb824a..1f581764d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -304,6 +304,7 @@ enum MF5_SUMMONEDMONSTER = 0x02000000, // To mark the friendly Minotaur. Hopefully to be generalized later. MF5_NOVERTICALMELEERANGE=0x04000000,// Does not check vertical distance for melee range MF5_BRIGHT = 0x08000000, // Actor is always rendered fullbright + MF5_CANTSEEK = 0x10000000, // seeker missiles cannot home in on this actor // --- mobj.renderflags --- diff --git a/src/am_map.cpp b/src/am_map.cpp index 45468ce96..3e689c0f2 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -798,7 +798,9 @@ void AM_loadPics () marknums[i] = TexMan.CheckForTexture (namebuf, FTexture::TEX_MiscPatch); } - mapback = TexMan.CheckForTexture("AUTOPAGE", FTexture::TEX_MiscPatch); + const char *autopage = level.info->mapbg[0] == 0? "AUTOPAGE" : (const char*)level.info->mapbg[0]; + + mapback = TexMan.CheckForTexture(autopage, FTexture::TEX_MiscPatch); } bool AM_clearMarks () diff --git a/src/g_doom/a_revenant.cpp b/src/g_doom/a_revenant.cpp index 9b610ac11..6f021d754 100644 --- a/src/g_doom/a_revenant.cpp +++ b/src/g_doom/a_revenant.cpp @@ -73,7 +73,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer) // adjust direction dest = self->tracer; - if (!dest || dest->health <= 0 || self->Speed == 0) + if (!dest || dest->health <= 0 || self->Speed == 0 || (dest->flags5 & MF5_CANTSEEK)) return; // change angle diff --git a/src/g_level.h b/src/g_level.h index 48db7b197..8fa288629 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -95,6 +95,7 @@ struct FMapInfoParser bool CheckNumber(); bool CheckFloat(); void SkipToNext(); + void CheckEndOfFile(const char *block); }; #define DEFINE_MAP_OPTION(name, old) \ @@ -284,6 +285,7 @@ struct level_info_t FString SoundInfo; FString SndSeq; char bordertexture[9]; + char mapbg[9]; float teamdamage; diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 860d6ac5e..254546c40 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -541,6 +541,21 @@ void FMapInfoParser::SkipToNext() } } + +//========================================================================== +// +// checks if the current block was properly terminated +// +//========================================================================== + +void FMapInfoParser::CheckEndOfFile(const char *block) +{ + if (format_type == FMT_New && !sc.Compare("}")) + { + sc.ScriptError("Unexpected end of file in %s definition", block); + } +} + //========================================================================== // // ParseLookupname @@ -715,6 +730,7 @@ void FMapInfoParser::ParseCluster() break; } } + CheckEndOfFile("cluster"); } @@ -1191,6 +1207,13 @@ DEFINE_MAP_OPTION(teamdamage, true) info->teamdamage = parse.sc.Float; } +DEFINE_MAP_OPTION(mapbackground, true) +{ + parse.ParseAssign(); + parse.ParseLumpOrTextureName(info->mapbg); +} + + //========================================================================== // // All flag based map options @@ -1421,6 +1444,7 @@ void FMapInfoParser::ParseMapDefinition(level_info_t &info) } } } + CheckEndOfFile("map"); } @@ -1620,6 +1644,7 @@ void FMapInfoParser::ParseEpisodeInfo () break; } } + CheckEndOfFile("episode"); if (extended && !(gameinfo.flags & GI_MENUHACK_EXTENDED)) { // If the episode is for the extended Heretic, but this is diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 37bf53123..eab16b561 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -540,6 +540,22 @@ PalEntry APowerStrength::GetBlend () IMPLEMENT_CLASS (APowerInvisibility) +//=========================================================================== +// +// APowerInvisibility :: CommonInit +// +// stuff that's done for all subclasses +// +//=========================================================================== + +void APowerInvisibility::CommonInit() +{ + Owner->flags |= MF_SHADOW; + // transfer seeker missile blocking (but only if the owner does not already have this flag + if (!(Owner->flags5 & MF5_CANTSEEK) && (flags5 & MF5_CANTSEEK)) Owner->flags5 |= MF5_CANTSEEK; + else flags &=~MF5_CANTSEEK; +} + //=========================================================================== // // APowerInvisibility :: InitEffect @@ -548,11 +564,16 @@ IMPLEMENT_CLASS (APowerInvisibility) void APowerInvisibility::InitEffect () { - Owner->flags |= MF_SHADOW; + CommonInit(); Owner->alpha = FRACUNIT/5; Owner->RenderStyle = STYLE_OptFuzzy; } +//=========================================================================== +// +// APowerInvisibility :: DoEffect +// +//=========================================================================== void APowerInvisibility::DoEffect () { Super::DoEffect(); @@ -571,6 +592,7 @@ void APowerInvisibility::EndEffect () { if (Owner != NULL) { + if (flags5 & MF5_CANTSEEK) Owner->flags5 &= ~MF5_CANTSEEK; Owner->flags &= ~MF_SHADOW; Owner->flags3 &= ~MF3_GHOST; Owner->RenderStyle = STYLE_Normal; @@ -628,7 +650,7 @@ IMPLEMENT_CLASS (APowerGhost) void APowerGhost::InitEffect () { - Owner->flags |= MF_SHADOW; + CommonInit(); Owner->flags3 |= MF3_GHOST; Owner->alpha = HR_SHADOW; Owner->RenderStyle = STYLE_Translucent; @@ -705,7 +727,7 @@ bool APowerShadow::HandlePickup (AInventory *item) void APowerShadow::InitEffect () { - Owner->flags |= MF_SHADOW; + CommonInit(); Owner->alpha = special1 == 0 ? TRANSLUC25 : 0; Owner->RenderStyle = STYLE_Translucent; } diff --git a/src/g_shared/a_artifacts.h b/src/g_shared/a_artifacts.h index 3d16d6fe5..187ed0562 100644 --- a/src/g_shared/a_artifacts.h +++ b/src/g_shared/a_artifacts.h @@ -77,6 +77,7 @@ class APowerInvisibility : public APowerup { DECLARE_CLASS (APowerInvisibility, APowerup) protected: + void CommonInit (); void InitEffect (); void DoEffect (); void EndEffect (); diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index c15638f5f..176241d38 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -309,7 +309,7 @@ void DSBarInfo::Tick () oldHealth += clamp((health - oldHealth), 1, script->interpolationSpeed); } } - AInventory *armor = CPlayer->mo->FindInventory(); + AInventory *armor = CPlayer->mo != NULL? CPlayer->mo->FindInventory() : NULL; if(armor == NULL) { oldArmor = 0; diff --git a/src/g_skill.cpp b/src/g_skill.cpp index 075cc18c4..e280c1e3f 100644 --- a/src/g_skill.cpp +++ b/src/g_skill.cpp @@ -225,6 +225,7 @@ void FMapInfoParser::ParseSkill () break; } } + CheckEndOfFile("skill"); for(unsigned int i = 0; i < AllSkills.Size(); i++) { if (AllSkills[i].Name == skill.Name) diff --git a/src/g_strife/a_spectral.cpp b/src/g_strife/a_spectral.cpp index 5ec8a4fa0..92b8305fc 100644 --- a/src/g_strife/a_spectral.cpp +++ b/src/g_strife/a_spectral.cpp @@ -91,7 +91,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer2) dest = self->tracer; - if (dest == NULL || dest->health <= 0 || self->Speed == 0) + if (!dest || dest->health <= 0 || self->Speed == 0 || (dest->flags5 & MF5_CANTSEEK)) return; // change angle diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 7c4286c7b..9f34c22b8 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -71,6 +71,7 @@ EXTERN_CVAR (Color, am_wallcolor) EXTERN_CVAR (Color, am_fdwallcolor) EXTERN_CVAR (Color, am_cdwallcolor) EXTERN_CVAR (Float, spc_amp) +EXTERN_CVAR (Bool, wi_percents) FString WeaponSection; @@ -638,6 +639,8 @@ void FGameConfigFile::SetRavenDefaults (bool isHexen) color.ResetToDefault (); } + val.Bool = false; + wi_percents.SetGenericRepDefault (val, CVAR_Bool); val.Bool = true; con_centernotify.SetGenericRepDefault (val, CVAR_Bool); snd_pitched.SetGenericRepDefault (val, CVAR_Bool); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 55dfc9533..3b1e93f5c 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1284,7 +1284,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax) AActor *target; target = actor->tracer; - if (target == NULL || actor->Speed == 0) + if (target == NULL || actor->Speed == 0 || (target->flags5 & MF5_CANTSEEK)) { return false; } diff --git a/src/p_user.cpp b/src/p_user.cpp index 8ff455b79..b1bf1bfb7 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1221,7 +1221,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_PlayerScream) if (self->player == NULL || self->DeathSound != 0) { - S_Sound (self, CHAN_VOICE, self->DeathSound, 1, ATTN_NORM); + if (self->DeathSound != 0) + { + S_Sound (self, CHAN_VOICE, self->DeathSound, 1, ATTN_NORM); + } + else + { + S_Sound (self, CHAN_VOICE, "*death", 1, ATTN_NORM); + } return; } diff --git a/src/sc_man.cpp b/src/sc_man.cpp index c474439b6..6119b98fc 100644 --- a/src/sc_man.cpp +++ b/src/sc_man.cpp @@ -1013,7 +1013,7 @@ void STACK_ARGS FScanner::ScriptMessage (const char *message, ...) va_end (arglist); } - Printf (TEXTCOLOR_RED"Script error, \"%s\" line %d:\n%s\n", ScriptName.GetChars(), + Printf (TEXTCOLOR_RED"Script error, \"%s\" line %d:\n"TEXTCOLOR_RED"%s\n", ScriptName.GetChars(), AlreadyGot? AlreadyGotLine : Line, composed.GetChars()); } @@ -1087,6 +1087,7 @@ void STACK_ARGS FScriptPosition::Message (int severity, const char *message, ... va_end (arglist); } const char *type = ""; + const char *color; int level = PRINT_HIGH; switch (severity) @@ -1096,29 +1097,34 @@ void STACK_ARGS FScriptPosition::Message (int severity, const char *message, ... case MSG_WARNING: type = "warning"; + color = TEXTCOLOR_YELLOW; break; case MSG_ERROR: ErrorCounter++; type = "error"; + color = TEXTCOLOR_RED; break; + case MSG_MESSAGE: case MSG_DEBUG: type = "message"; + color = TEXTCOLOR_GREEN; break; case MSG_DEBUGLOG: case MSG_LOG: type = "message"; level = PRINT_LOG; + color = ""; break; case MSG_FATAL: I_Error ("Script error, \"%s\" line %d:\n%s\n", FileName.GetChars(), ScriptLine, composed.GetChars()); } - Printf (level, "Script %s, \"%s\" line %d:\n%s\n", - type, FileName.GetChars(), ScriptLine, composed.GetChars()); + Printf (level, "%sScript %s, \"%s\" line %d:\n%s%s\n", + color, type, FileName.GetChars(), ScriptLine, color, composed.GetChars()); } diff --git a/src/sc_man.h b/src/sc_man.h index dcfb9254e..28d035346 100644 --- a/src/sc_man.h +++ b/src/sc_man.h @@ -227,7 +227,8 @@ enum MSG_ERROR, MSG_DEBUG, MSG_LOG, - MSG_DEBUGLOG + MSG_DEBUGLOG, + MSG_MESSAGE }; //========================================================================== diff --git a/src/thingdef/thingdef.cpp b/src/thingdef/thingdef.cpp index 5510b1c08..8e171e67f 100644 --- a/src/thingdef/thingdef.cpp +++ b/src/thingdef/thingdef.cpp @@ -78,7 +78,7 @@ PSymbolTable GlobalSymbols; // Starts a new actor definition // //========================================================================== -FActorInfo *CreateNewActor(FName typeName, FName parentName, bool native) +FActorInfo *CreateNewActor(FScriptPosition &sc, FName typeName, FName parentName, bool native) { const PClass *replacee = NULL; PClass *ti = NULL; @@ -89,18 +89,32 @@ FActorInfo *CreateNewActor(FName typeName, FName parentName, bool native) if (parentName != NAME_None) { parent = const_cast (PClass::FindClass (parentName)); + + const PClass *p = parent; + while (p != NULL) + { + if (p->TypeName == typeName) + { + sc.Message(MSG_ERROR, "'%s' inherits from a class with the same name", typeName.GetChars()); + break; + } + p = p->ParentClass; + } if (parent == NULL) { - I_Error( "Parent type '%s' not found in %s", parentName.GetChars(), typeName.GetChars()); + sc.Message(MSG_ERROR, "Parent type '%s' not found in %s", parentName.GetChars(), typeName.GetChars()); + parent = RUNTIME_CLASS(AActor); } else if (!parent->IsDescendantOf(RUNTIME_CLASS(AActor))) { - I_Error( "Parent type '%s' is not an actor in %s", parentName.GetChars(), typeName.GetChars()); + sc.Message(MSG_ERROR, "Parent type '%s' is not an actor in %s", parentName.GetChars(), typeName.GetChars()); + parent = RUNTIME_CLASS(AActor); } else if (parent->ActorInfo == NULL) { - I_Error( "uninitialized parent type '%s' in %s", parentName.GetChars(), typeName.GetChars()); + sc.Message(MSG_ERROR, "uninitialized parent type '%s' in %s", parentName.GetChars(), typeName.GetChars()); + parent = RUNTIME_CLASS(AActor); } } @@ -109,21 +123,26 @@ FActorInfo *CreateNewActor(FName typeName, FName parentName, bool native) ti = (PClass*)PClass::FindClass(typeName); if (ti == NULL) { - I_Error( "Unknown native class '%s'", typeName.GetChars()); + sc.Message(MSG_ERROR, "Unknown native class '%s'", typeName.GetChars()); + goto create; } else if (ti != RUNTIME_CLASS(AActor) && ti->ParentClass->NativeClass() != parent->NativeClass()) { - I_Error( "Native class '%s' does not inherit from '%s'", typeName.GetChars(), parentName.GetChars()); + sc.Message(MSG_ERROR, "Native class '%s' does not inherit from '%s'", typeName.GetChars(), parentName.GetChars()); + parent = RUNTIME_CLASS(AActor); + goto create; } else if (ti->ActorInfo != NULL) { - I_Error( "Redefinition of internal class '%s'", typeName.GetChars()); + sc.Message(MSG_ERROR, "Redefinition of internal class '%s'", typeName.GetChars()); + goto create; } ti->InitializeActorInfo(); info = ti->ActorInfo; } else { + create: ti = parent->CreateDerivedClass (typeName, parent->Size); info = ti->ActorInfo; } diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index 611cedc40..3314458c7 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -189,7 +189,7 @@ PSymbolActionFunction *FindGlobalActionFunction(const char *name); // //========================================================================== -FActorInfo *CreateNewActor(FName typeName, FName parentName, bool native); +FActorInfo *CreateNewActor(FScriptPosition &sc, FName typeName, FName parentName, bool native); void SetReplacement(FActorInfo *info, FName replaceName); void HandleActorFlag(FScanner &sc, Baggage &bag, const char *part1, const char *part2, int mod); diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index c2cba2639..fcba47a5b 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -206,6 +206,7 @@ static FFlagDef ActorFlags[]= DEFINE_FLAG(MF5, SUMMONEDMONSTER, AActor, flags5), DEFINE_FLAG(MF5, NOVERTICALMELEERANGE, AActor, flags5), DEFINE_FLAG(MF5, BRIGHT, AActor, flags5), + DEFINE_FLAG(MF5, CANTSEEK, AActor, flags5), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index 6c4d392c3..ec6653963 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -704,13 +704,18 @@ static void ParseActorProperty(FScanner &sc, Baggage &bag) } else { - sc.ScriptError("\"%s\" requires an actor of type \"%s\"\n", propname.GetChars(), prop->cls->TypeName.GetChars()); + sc.ScriptMessage("\"%s\" requires an actor of type \"%s\"\n", propname.GetChars(), prop->cls->TypeName.GetChars()); + FScriptPosition::ErrorCounter++; } } else if (!propname.CompareNoCase("States")) { - if (!bag.StateSet) ParseStates(sc, bag.Info, (AActor *)bag.Info->Class->Defaults, bag); - else sc.ScriptError("Multiple state declarations not allowed"); + if (bag.StateSet) + { + sc.ScriptMessage("'%s' contains multiple state declarations", bag.Info->Class->TypeName.GetChars()); + FScriptPosition::ErrorCounter++; + } + ParseStates(sc, bag.Info, (AActor *)bag.Info->Class->Defaults, bag); bag.StateSet=true; } else if (MatchString(propname, statenames) != -1) @@ -740,6 +745,7 @@ static void ParseActionDef (FScanner &sc, PClass *cls) OPTIONAL = 1 }; + bool error = false; AFuncDesc *afd; FName funcname; FString args; @@ -748,7 +754,8 @@ static void ParseActionDef (FScanner &sc, PClass *cls) if (sc.LumpNum == -1 || Wads.GetLumpFile(sc.LumpNum) > 0) { - sc.ScriptError ("action functions can only be imported by internal class and actor definitions!"); + sc.ScriptMessage ("action functions can only be imported by internal class and actor definitions!"); + error++; } sc.MustGetToken(TK_Native); @@ -757,7 +764,8 @@ static void ParseActionDef (FScanner &sc, PClass *cls) afd = FindFunction(sc.String); if (afd == NULL) { - sc.ScriptError ("The function '%s' has not been exported from the executable.", sc.String); + sc.ScriptMessage ("The function '%s' has not been exported from the executable.", sc.String); + error++; } sc.MustGetToken('('); if (!sc.CheckToken(')')) @@ -808,7 +816,9 @@ static void ParseActionDef (FScanner &sc, PClass *cls) sc.UnGet(); break; default: - sc.ScriptError ("Unknown variable type %s", sc.TokenName(sc.TokenType, sc.String).GetChars()); + sc.ScriptMessage ("Unknown variable type %s", sc.TokenName(sc.TokenType, sc.String).GetChars()); + type = 'x'; + FScriptPosition::ErrorCounter++; break; } // Read the optional variable name @@ -862,11 +872,16 @@ static void ParseActionDef (FScanner &sc, PClass *cls) { sym->defaultparameterindex = -1; } - if (cls->Symbols.AddSymbol (sym) == NULL) + if (error) + { + FScriptPosition::ErrorCounter++; + } + else if (cls->Symbols.AddSymbol (sym) == NULL) { delete sym; - sc.ScriptError ("'%s' is already defined in class '%s'.", + sc.ScriptMessage ("'%s' is already defined in class '%s'.", funcname.GetChars(), cls->TypeName.GetChars()); + FScriptPosition::ErrorCounter++; } } @@ -935,7 +950,12 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag) if (sc.CheckNumber()) { if (sc.Number>=-1 && sc.Number<32768) DoomEdNum = sc.Number; - else sc.ScriptError ("DoomEdNum must be in the range [-1,32767]"); + else + { + // does not need to be fatal. + sc.ScriptMessage ("DoomEdNum must be in the range [-1,32767]"); + FScriptPosition::ErrorCounter++; + } } if (sc.CheckString("native")) @@ -945,7 +965,7 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag) try { - FActorInfo *info = CreateNewActor(typeName, parentName, native); + FActorInfo *info = CreateNewActor(FScriptPosition(sc), typeName, parentName, native); info->DoomEdNum = DoomEdNum > 0? DoomEdNum : -1; SetReplacement(info, replaceName); diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 08ee1273c..718eeeace 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -1807,25 +1807,18 @@ void WI_drawStats (void) screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); - int slashpos = gameinfo.gametype==GAME_Strife? 235:237; - int countpos = gameinfo.gametype==GAME_Strife? 185:200; + int countpos = gameinfo.gametype==GAME_Strife? 285:270; if (sp_state >= 2) { - WI_drawNum (IntermissionFont, countpos, 65, cnt_kills[0], 3, false); - WI_DrawCharPatch (IntermissionFont, '/', slashpos, 65); - WI_drawNum (IntermissionFont, 248, 65, wbs->maxkills, 3, false); + WI_drawPercent (IntermissionFont, countpos, 65, cnt_kills[0], wbs->maxkills); } if (sp_state >= 4) { - WI_drawNum (IntermissionFont, countpos, 90, cnt_items[0], 3, false); - WI_DrawCharPatch (IntermissionFont, '/', slashpos, 90); - WI_drawNum (IntermissionFont, 248, 90, wbs->maxitems, 3, false); + WI_drawPercent (IntermissionFont, countpos, 90, cnt_items[0], wbs->maxitems); } if (sp_state >= 6) { - WI_drawNum (IntermissionFont, countpos, 115, cnt_secret[0], 3, false); - WI_DrawCharPatch (IntermissionFont, '/', slashpos, 115); - WI_drawNum (IntermissionFont, 248, 115, wbs->maxsecret, 3, false); + WI_drawPercent (IntermissionFont, countpos, 115, cnt_secret[0], wbs->maxsecret); } if (sp_state >= 8) { diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index edb92f9a8..7092d8483 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -566,6 +566,7 @@ void I_PrintStr (const char *cp) // Change the color. format.cbSize = sizeof(format); format.dwMask = CFM_COLOR; + format.dwEffects = 0; format.crTextColor = color; SendMessage (edit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&format); } diff --git a/zdoom.vcproj b/zdoom.vcproj index 0dba37b40..2158b6888 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -1844,14 +1852,6 @@ Outputs="$(IntDir)/$(InputName).obj" /> - - - @@ -2017,14 +2017,6 @@ Outputs="$(IntDir)\$(InputName).obj" /> - - - @@ -2035,6 +2027,14 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + - - - + + + - - - @@ -5343,6 +5335,14 @@ AdditionalIncludeDirectories="src\win32;$(NoInherit)" /> + + + @@ -5621,7 +5621,7 @@ />