Page MenuHomeWildfire Games

Support inheritance in special filter templates
Needs ReviewPublic

Authored by TheCake91 on Tue, Jan 8, 6:15 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#5380
Summary

This modification allows special filter templates to inherit from a parent. Instead of just loading the filter template directly onto the base filter, the filter template gets loaded and applied recursively with the new ApplyTemplateFilter method.

Test Plan

I tested the implementation roughly by having a filter template inheriting from another filter template and running the simulation successfully in Atlas. Before writing a unit test (unfortunately, there are no unit tests at all for the TemplateManager so far) and a more detailed test plan, I would like to ask if the current implementation is on the right way?

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

TheCake91 created this revision.Tue, Jan 8, 6:15 PM
TheCake91 updated the Trac tickets for this revision.Tue, Jan 8, 6:17 PM
smiley added a reviewer: Restricted Owners Package.Tue, Jan 8, 6:44 PM
smiley added a subscriber: smiley.

Add yourself to binaries/data/mods/public/gui/credit/programming.json. I might have messed up that path.

TheCake91 updated this revision to Diff 7312.Tue, Jan 8, 10:59 PM

Adding myself to the contributors list as suggested by simley.

vladislavbelov added inline comments.
source/ps/TemplateLoader.cpp
76

And L"special" / L"filter" instead of "special/filter/".

123

I suppose the templateFilter should have the VfsPath.

126

Why exactly 100? Probably it crashes even with this value on slower machines. The value should be a constant.

Also why there are infinity loops? Why not to handle them?

134

ok > result or even shorter:

if (xero.Load(g_VFS, path) != PSRETURN_OK)
	return false; // ...