mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract 7 newer texture generators into cli_gen_texture.cpp
Moves the Worley/cellular-noise-based texture handlers (--gen-texture-cobble, -marble, -metal, -leather, -sand, -snow, -lava) into their own translation unit. Each handler previously had its own ~33-line copy of the parseHex lambda; all 7 copies are replaced with a single shared parseHex helper at file scope. Older simpler generators (gradient/noise/radial/stripes/dots/ rings/checker/brick/wood/grass/fabric) still live in main.cpp and will be migrated in subsequent batches. main.cpp drops 26,286 → 25,494 lines (-792). Behavior unchanged across all 7 handlers (re-verified).
This commit is contained in:
parent
6272e58212
commit
6ea2dfcf8c
4 changed files with 842 additions and 943 deletions
24
tools/editor/cli_gen_texture.hpp
Normal file
24
tools/editor/cli_gen_texture.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the procedural texture generator handlers that have
|
||||
// been moved out of main.cpp. Currently the 7 newer Worley/
|
||||
// noise-based generators:
|
||||
// --gen-texture-cobble --gen-texture-marble
|
||||
// --gen-texture-metal --gen-texture-leather
|
||||
// --gen-texture-sand --gen-texture-snow
|
||||
// --gen-texture-lava
|
||||
//
|
||||
// Older simpler generators (gradient/noise/radial/stripes/dots/
|
||||
// rings/checker/brick/wood/grass/fabric) still live in main.cpp
|
||||
// and will be migrated in subsequent batches.
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleGenTexture(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue