mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
Merge pull request #2307 from AsparagusEduardo/RHH/pr/debugMapCount
Automated creation of MAP_GROUP_COUNT for the debug menu
This commit is contained in:
commit
6cfacb396e
1
src/data/map_group_count.h
Normal file
1
src/data/map_group_count.h
Normal file
@ -0,0 +1 @@
|
||||
static const u8 MAP_GROUP_COUNT[] = {57, 5, 5, 6, 7, 8, 9, 7, 7, 14, 8, 17, 10, 23, 13, 15, 15, 2, 2, 2, 3, 1, 1, 1, 108, 61, 89, 2, 1, 13, 1, 1, 3, 1, 0};
|
@ -290,10 +290,7 @@ extern u8 Debug_CheatStart[];
|
||||
extern u8 PlayersHouse_2F_EventScript_SetWallClock[];
|
||||
extern u8 PlayersHouse_2F_EventScript_CheckWallClock[];
|
||||
|
||||
|
||||
// *******************************
|
||||
//Maps per map group COPY FROM /include/constants/map_groups.h
|
||||
static const u8 MAP_GROUP_COUNT[] = {57, 5, 5, 6, 7, 8, 9, 7, 7, 14, 8, 17, 10, 23, 13, 15, 15, 2, 2, 2, 3, 1, 1, 1, 108, 61, 89, 2, 1, 13, 1, 1, 3, 1, 0};
|
||||
#include "data/map_group_count.h"
|
||||
|
||||
// Text
|
||||
// Main Menu
|
||||
|
@ -386,6 +386,7 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
|
||||
char dir_separator = file_dir.back();
|
||||
|
||||
ostringstream text;
|
||||
ostringstream mapCountText;
|
||||
|
||||
text << "#ifndef GUARD_CONSTANTS_MAP_GROUPS_H\n"
|
||||
<< "#define GUARD_CONSTANTS_MAP_GROUPS_H\n\n";
|
||||
@ -424,15 +425,16 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
char s = file_dir.back();
|
||||
mapCountText << "static const u8 MAP_GROUP_COUNT[] = {"; //DEBUG
|
||||
for(int i=0; i<group_num; i++){ //DEBUG
|
||||
mapCountText << map_count_vec[i] << ", "; //DEBUG
|
||||
} //DEBUG
|
||||
mapCountText << "0};\n"; //DEBUG
|
||||
write_text_file(file_dir + ".." + s + ".." + s + "src" + s + "data" + s + "map_group_count.h", mapCountText.str());
|
||||
|
||||
return text.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user