|
Porytiles
|
Generates C header code for tileset animations. More...
#include <anim_code_generator.hpp>
Public Member Functions | |
| ChainableResult< std::string > | generate (const std::string &tileset_name, const std::filesystem::path &tileset_path_from_project_root, const std::map< DynamicCasedName, AnimParams > &animations, bool is_primary) const |
Generates the complete generated_anim_code.h content. | |
Generates C header code for tileset animations.
AnimCodeGenerator produces the generated_anim_code.h header file that contains all the C code needed for tileset animations to work in a pokeemerald project. This includes:
The generated code follows the pattern used by vanilla pokeemerald animations, making it compatible with the existing tileset animation infrastructure.
Usage:
Definition at line 38 of file anim_code_generator.hpp.
| ChainableResult< std::string > porytiles::AnimCodeGenerator::generate | ( | const std::string & | tileset_name, |
| const std::filesystem::path & | tileset_path_from_project_root, | ||
| const std::map< DynamicCasedName, AnimParams > & | animations, | ||
| bool | is_primary | ||
| ) | const |
Generates the complete generated_anim_code.h content.
Produces a complete C header file containing all animation code for a tileset. The generated code includes proper include guards, INCBIN macro definitions (if not already defined), and all animation functions.
| tileset_name | The name of the tileset (e.g., "PorytilesAnimExample") |
| tileset_path_from_project_root | Relative path from project root to tileset directory |
| animations | Map of animation names to their parameters |
| is_primary | True if this is a primary tileset, false for secondary |
Definition at line 183 of file anim_code_generator.cpp.