| 1004 | |
| 1005 | static TMap<uint64_t, bool> checked; |
| 1006 | static void markClassForPrecache(PClass* cls, unsigned pal) |
| 1007 | { |
| 1008 | uint64_t key = cls->TypeName.GetIndex() + pal * (1ull << 32); |
| 1009 | if (checked.CheckKey(key)) return; |
| 1010 | checked.Insert(key, true); |
| 1011 | auto ainf = static_cast<PClassActor*>(cls)->ActorInfo(); |
| 1012 | for (auto clss : ainf->precacheClasses) |
| 1013 | { |
| 1014 | markClassForPrecache(clss, pal); |
| 1015 | } |
| 1016 | for (auto tex : ainf->SpriteSet) |
| 1017 | { |
| 1018 | markTextureForPrecache(tex, pal); |
| 1019 | } |
| 1020 | |
| 1021 | } |
| 1022 | void cacheit(void) |
| 1023 | { |
| 1024 | checked.Clear(); |