This commit is contained in:
saarsena@gmail.com 2026-04-16 21:04:50 -04:00
commit e45f121fb9
89 changed files with 336069 additions and 0 deletions

22
godot/src/grid_to_dict.h Normal file
View file

@ -0,0 +1,22 @@
#pragma once
#include <godot_cpp/variant/dictionary.hpp>
#include <godot_cpp/variant/vector2i.hpp>
extern "C" {
#include "gen/grid.h"
}
namespace godot {
/* Pack a grid_t into a Dictionary with the shape documented in the plugin
README (terrain/liquid/flags/room_id/machine_id/surface arrays). Used by
both BrogueGen.generate() and BrogueReplay.get_grid(). Additional
metadata (rooms, machines, chokepoints, stairs) are computed and added
when add_metadata is true. */
Dictionary grid_to_dictionary(grid_t g, int seed, int depth, bool add_metadata);
/* Pack a single cell as a Dictionary. */
Dictionary cell_to_dictionary(grid_t g, int x, int y);
} // namespace godot