Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Aug 23, 2025

This change implements access to shadowed files inside archives.

The Archive File System already kept track of all archives regardless of the shadowing, but made shadowed files inaccessible. This is now changed, which allows for some special uses cases we will run into when dealing with shadowed files of any kind. Shadowing is especially prevalent in Zero Hour, because that shadows a large amount of Generals files.

The review is quite a bit intricate given the complexity of the matter, the convuluted EA code and use of the uncommon multimap.

What is a shadowed file?

Consider the following files:

C:\GeneralsZH\art\textures\house.dds
C:\GeneralsZH\TexturesZH.big         -> contains art\textures\house.dds
C:\Generals\Textures.big             -> contains art\textures\house.dds

C:\GeneralsZH\art\textures\house.dds shadows art\textures\house.dds in C:\GeneralsZH\TexturesZH.big

art\textures\house.dds in C:\GeneralsZH\TexturesZH.big shadows art\textures\house.dds in C:\Generals\Textures.big

What is changed?

File instances can now be accessed by their instance index:

Instance 0 : C:\GeneralsZH\art\textures\house.dds
Instance 1 : C:\GeneralsZH\TexturesZH.big         -> contains art\textures\house.dds
Instance 2 : C:\Generals\Textures.big             -> contains art\textures\house.dds

@xezon xezon added Enhancement Is new feature or request Major Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour System Is Systems related labels Aug 23, 2025
@xezon xezon force-pushed the xezon/impl-file-instancing branch from 836fa3b to bd69bc2 Compare August 23, 2025 16:23
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not adding instance access to this function. I think it opens a potential rabbit hole and increase the complexity of this change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something worthwhile to investigate. I did not intent to fix it in this change because the potential side effects are unknown.

Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@xezon xezon force-pushed the xezon/impl-file-instancing branch from 37f1631 to b6f8342 Compare October 16, 2025 17:17
@xezon xezon force-pushed the xezon/impl-file-instancing branch from b6f8342 to 11d6fcf Compare October 16, 2025 17:23
@xezon xezon merged commit 6748e68 into TheSuperHackers:main Oct 16, 2025
17 checks passed
@xezon xezon deleted the xezon/impl-file-instancing branch October 16, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Is new feature or request Gen Relates to Generals Major Severity: Minor < Major < Critical < Blocker System Is Systems related ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants