Commit Graph

10 Commits

Author SHA1 Message Date
Lars Mueller
14de9219b7 Remove unnecessary arguments 2023-06-02 16:24:13 +02:00
Lars Mueller
b56f030127 texmod.read: Unescaped ^ in (...) laxness 2023-06-02 16:19:56 +02:00
Lars Mueller
2b1c9cff7c Add support for new texture modifiers
https://github.com/minetest/minetest/pull/10100
has introduced a few inconsistencies with the formats of previous texture modifiers:

`[fill` is the first texture modifier to have a modifying and a generating variant.
Thus `texmod` "constructors" and `texmod` "modifiers" / methods had to be separated;
`texmod.fill` is not the same as `tm.fill` where `tm` is `texmod` instance.
It is rather dirty that the generating variant would ignore
extraneous parameters of the modifying variant, so this is not replicated by the parser.

`[hsl`, `[colorizehsl`, `[contrast` and `[screen` are pretty standard texture modifiers
as far as the DSL is concerned. `[hsl` and `[colorizehsl` are very similar.

`[hardlight` is the first texture modifier to exist just for swapping the base and parameter.
`a^[overlay:b` and `b^[hardlight:a` are both normalized to `b:[hardlight:a` by the DSL.
`[overlay` (called "overlay blend" in the docs) creates a naming conflict with
literal overlaying (`^`). This is resolved by renaming `:overlay` to `:blit`.
2023-05-31 20:12:18 +02:00
Lars Mueller
520ecc641b texmod.read: Fix [transform followed by a lowercase letter 2023-05-27 19:12:49 +02:00
Lars Mueller
73640f11d1 texmod: Stricter file name validation 2023-05-27 14:33:46 +02:00
Lars Mueller
8e5bdc817c Fix handling of multiple texmod transforms 2023-05-27 14:24:54 +02:00
Lars Mueller
e07d646203 texmod.read: Make transforms case-insensitive 2023-05-26 19:27:47 +02:00
Lars Mueller
741746613b Move local var to appropriate scope 2023-05-24 22:42:38 +02:00
Lars Mueller
95159c48e8 Refactor texmod:read to pass reader around 2023-05-24 22:27:25 +02:00
Lars Mueller
9fc4aaf3b8 Add experimental texture modifier DSL 2023-05-24 19:39:20 +02:00