Implementation if Pyredrid and AsparagusEduardo debug menu plus huge rewrite and tons of additions

V2: Fly, Warp, Flags, Vars, give items, give pkm 2 versions

Improved cheats, reworked the vars system

vars function now starts at VARS_START and end VARS_END

Figured out how to display FieldMessages, reimplemented CheckSafeBlock, cleanup

DebugAction_DestroyExtraWindow instead of multiple, renamed text variables

cleanup + pokemon simple

give pokemon complex nearly done

Complex pkm works, items now with icons

if statement cleanup

alter build tools to include maps per map group

Warp functionallity

added hex value to flags and vars

cleanup

Credits
This commit is contained in:
TheXaman
2020-09-26 00:51:02 +02:00
parent 16ecbc6446
commit 6456009a44
18 changed files with 2187 additions and 11 deletions

View File

@@ -393,11 +393,14 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n//\n\n";
int group_num = 0;
vector<int> map_count_vec; //DEBUG
for (auto &group : groups_data["group_order"].array_items()) {
text << "// Map Group " << group_num << "\n";
vector<Json> map_ids;
size_t max_length = 0;
size_t max_length = 0; //DEBUG
int map_count = 0; //DEBUG
for (auto &map_name : groups_data[group.string_value()].array_items()) {
string header_filepath = file_dir + map_name.string_value() + dir_separator + "map.json";
@@ -406,6 +409,7 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
map_ids.push_back(map_data["id"]);
if (map_data["id"].string_value().length() > max_length)
max_length = map_data["id"].string_value().length();
map_count++; //DEBUG
}
int map_id_num = 0;
@@ -416,9 +420,17 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
text << "\n";
group_num++;
map_count_vec.push_back(map_count); //DEBUG
}
text << "#define MAP_GROUPS_COUNT " << group_num << "\n\n";
text << "// static const u8 MAP_GROUP_COUNT[] = {"; //DEBUG
for(int i=0; i<group_num; i++){ //DEBUG
text << map_count_vec[i] << ", "; //DEBUG
} //DEBUG
text << "0};\n\n"; //DEBUG
text << "#endif // GUARD_CONSTANTS_MAP_GROUPS_H\n";
return text.str();