init
This commit is contained in:
commit
e45f121fb9
89 changed files with 336069 additions and 0 deletions
22
godot/src/grid_to_dict.h
Normal file
22
godot/src/grid_to_dict.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue