Henrik Rydgård
dc96374eb2
Merge pull request #17380 from hrydgard/replacement-find-files
...
Pre-scan the root of texture packs for hash-named files.
2023-05-02 21:40:05 +02:00
Henrik Rydgård
ee7e8d7c06
Add a unit test, fix listing zip directories
2023-05-02 11:35:45 +02:00
Henrik Rydgård
bdd0eeb7c3
Avoid double texture cache load.
...
Texture packs are loaded from NotifyConfigChanged which is called
anyway.
Fixes #17381
2023-05-01 23:52:39 +02:00
Henrik Rydgård
d10fae7274
Scan the root of loaded texture packs to find all the hash-named files.
2023-05-01 23:23:37 +02:00
Henrik Rydgård
ef5abac1d3
Fix an oversight when saving replacement textures on scoped storage
...
We ended up not properly mangling the filename when changing extensions
if the file URI is an Android content URI.
Fixes #17320
2023-04-22 00:05:07 +02:00
Henrik Rydgård
ee6234ecb6
I18N: Switch to getting categories by index instead of by string lookup
...
Also gets rid of the shared_ptr usage, and generally makes things nicer.
Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård
ba705dcabd
Fix typo
2023-03-28 15:44:35 +02:00
Henrik Rydgård
55e9d9a3eb
Code cleanup
2023-03-28 11:18:45 +02:00
Henrik Rydgård
1fbabed7ff
Simplify the semantics, makes more sense now.
2023-03-27 22:09:10 +02:00
Henrik Rydgård
4e41233bb7
Replacement: Save textures even if already replaced, if the png is missing.
...
Fixes #17182
Not exactly sure what behavior we really want, but I think this one is
OK, and at least more similar to the old one. Now we save
already-replaced textures if the named replacement texture is missing, and there
isn't already a hash-named one in new or the "root".
2023-03-27 15:43:18 +02:00
Henrik Rydgård
d586ec0d5e
Don't create Host objects except in headless/unittest
2023-03-25 10:47:01 +01:00
Henrik Rydgård
9e125eeba7
Remove NotifyUserMessage from Host
2023-03-25 10:32:09 +01:00
Henrik Rydgård
0580b09eeb
Improve default replacer ini. Various cleanup
2023-03-19 00:00:59 +01:00
Henrik Rydgård
baf8cbf278
Tweaks
2023-03-18 15:07:45 +01:00
Henrik Rydgård
3302e6a76b
Lookup filtering overrides at texture load time instead of at runtime.
2023-03-18 13:03:05 +01:00
Unknown W. Brackets
5b0748a61c
Merge pull request #17137 from hrydgard/log-fixes
...
Log fixes
2023-03-17 18:51:47 -07:00
Henrik Rydgård
df41a5cebd
Improve default ini, logging fixes
2023-03-17 13:59:57 +01:00
Henrik Rydgård
8484dd4917
Nicer logging if no texture.zip file is there
2023-03-16 22:59:26 +01:00
Henrik Rydgård
725d4195df
Small cleanup of purging code
2023-03-16 11:53:39 +01:00
Henrik Rydgård
35f46ec161
Rework the replacement cache. No more duplicate ReplacedTexture objects.
2023-03-16 11:46:05 +01:00
Henrik Rydgård
cf6cce0744
Remove scaleFactor from struct ReplacedTextureDecodeInfo, instead pass in both unscaled and scaled dimensions
2023-03-16 10:21:57 +01:00
Henrik Rydgård
c58ceb5160
Mini refactor: Separate input and output arguments for LookupHashRange
2023-03-16 09:55:49 +01:00
Henrik Rydgård
d8c3269cc6
Fix zipped texture packs (it didn't load the ini from the zip, the rest worked).
...
Plus a few other things.
2023-03-14 17:53:01 +01:00
Henrik Rydgård
93bf82a906
Add KTX2 basis/UASTC texture transcoding support
2023-03-14 11:55:21 +01:00
Henrik Rydgård
a4b5641f11
Add compressed texture format support checks
2023-03-12 16:18:46 +01:00