Skip to content

Commit

Permalink
- diagnostics output for detecting potential problem mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 12, 2019
1 parent ed14951 commit 6a0f1ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/scripting/backend/codegen.cpp
Expand Up @@ -6120,6 +6120,10 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
{
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
}
else if (sym->mVersion >= MakeVersion(3, 8, 0))
{
ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
}
}

newex = new FxGlobalVariable(static_cast<PField *>(sym), ScriptPosition);
Expand Down Expand Up @@ -6215,6 +6219,10 @@ FxExpression *FxIdentifier::ResolveMember(FCompileContext &ctx, PContainerType *
{
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated member variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
}
else if (sym->mVersion >= MakeVersion(3, 8, 0))
{
ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated member variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
}
}

// We have 4 cases to consider here:
Expand Down Expand Up @@ -7801,6 +7809,8 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx)
{
if (ctx.Version >= MakeVersion(3, 8, 0))
ScriptPosition.Message(MSG_WARNING, "Deprecated use of %s. Action specials should only be used from actor methods", MethodName.GetChars());
else
ScriptPosition.Message(MSG_WARNING,TEXTCOLOR_BLUE "Deprecated use of %s. Action specials should only be used from actor methods", MethodName.GetChars());
}
FxExpression *x = new FxActionSpecialCall(self, special, ArgList, ScriptPosition);
delete this;
Expand Down Expand Up @@ -8764,6 +8774,10 @@ bool FxVMFunctionCall::CheckAccessibility(const VersionInfo &ver)
{
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated function %s - deprecated since %d.%d.%d", Function->SymbolName.GetChars(), Function->mVersion.major, Function->mVersion.minor, Function->mVersion.revision);
}
else if (Function->mVersion >= MakeVersion(3, 8, 0))
{
ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated function %s - deprecated since %d.%d.%d", Function->SymbolName.GetChars(), Function->mVersion.major, Function->mVersion.minor, Function->mVersion.revision);
}
}
return true;
}
Expand Down
7 changes: 7 additions & 0 deletions src/scripting/zscript/zcc_compile.cpp
Expand Up @@ -644,6 +644,13 @@ void ZCCCompiler::CreateClassTypes()
{
c->cls->Type = NewClassType(newclass);
DPrintf(DMSG_SPAMMY, "Created class %s with parent %s\n", c->Type()->TypeName.GetChars(), c->ClassType()->ParentClass->TypeName.GetChars());
if (c->ClassType()->IsDescendantOf(NAME_Thinker) && !c->ClassType()->IsDescendantOf(NAME_Actor))
{
if (Wads.GetLumpFile(Lump) != 0)
{
Printf(TEXTCOLOR_BLUE "Created thinker class %s\n", c->Type()->TypeName.GetChars());
}
}
}
}
catch (CRecoverableError &err)
Expand Down

0 comments on commit 6a0f1ae

Please sign in to comment.