Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
470 stars 75 forks source link

Consistently use GetWareTex and GetWareTexStack instead of GetMapTexture #1672

Closed ottml closed 4 weeks ago

ottml commented 1 month ago

Use GetWareTex and GetWareTexStack texture interface instead of GetMapTexture.

Flamefire commented 1 month ago

Use abstract texture interface in all places. Needed to implement new addons more easy

Can you explain a bit more? Because although the changes look good and correct they don't match neither the title nor the description of the commit and PR:
All of the changes are like:

- LOADER.GetMapTexture(WARES_TEX_MAP_OFFSET + rttr::enum_cast(good))
+ LOADER.GetWareTex(good);

In both cases the "abstract texture interface", i.e. ITexture* is used. Hence I would have expected a title like "Consistently use GetWare(Stack)Tex instead of GetMapTexture`.

The description (at least of the PR) should have a sentence on WHY. Or e.g. "Makes implementing addons such as/doing X easier due to Y"