Add LogToConsole experiment flag
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -54,6 +55,9 @@ class ExperimentFlags {
|
|||||||
|
|
||||||
// Save dungeon map edits to the ROM.
|
// Save dungeon map edits to the ROM.
|
||||||
bool kSaveDungeonMaps = false;
|
bool kSaveDungeonMaps = false;
|
||||||
|
|
||||||
|
// Log to the console.
|
||||||
|
bool kLogToConsole = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ExperimentFlags() = default;
|
ExperimentFlags() = default;
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ void MasterEditor::DrawFileMenu() {
|
|||||||
MenuItem("Backup ROM", "", &backup_rom_);
|
MenuItem("Backup ROM", "", &backup_rom_);
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
Text("Experiment Flags");
|
Text("Experiment Flags");
|
||||||
|
Checkbox("Enable console logging", &mutable_flags()->kLogToConsole);
|
||||||
Checkbox("Enable Texture Streaming",
|
Checkbox("Enable Texture Streaming",
|
||||||
&mutable_flags()->kLoadTexturesAsStreaming);
|
&mutable_flags()->kLoadTexturesAsStreaming);
|
||||||
Checkbox("Enable Overworld Sprites",
|
Checkbox("Enable Overworld Sprites",
|
||||||
|
|||||||
@@ -986,15 +986,18 @@ void Overworld::LoadExits() {
|
|||||||
exit_scroll_mod_y, exit_scroll_mod_x, exit_door_type_1,
|
exit_scroll_mod_y, exit_scroll_mod_x, exit_door_type_1,
|
||||||
exit_door_type_2);
|
exit_door_type_2);
|
||||||
|
|
||||||
|
if (rom()->flags()->kLogToConsole) {
|
||||||
std::cout << "Exit: " << i << " RoomID: " << exit_room_id
|
std::cout << "Exit: " << i << " RoomID: " << exit_room_id
|
||||||
<< " MapID: " << exit_map_id << " VRAM: " << exit_vram
|
<< " MapID: " << exit_map_id << " VRAM: " << exit_vram
|
||||||
<< " YScroll: " << exit_y_scroll << " XScroll: " << exit_x_scroll
|
<< " YScroll: " << exit_y_scroll
|
||||||
<< " YPlayer: " << py << " XPlayer: " << px
|
<< " XScroll: " << exit_x_scroll << " YPlayer: " << py
|
||||||
<< " YCamera: " << exit_y_camera << " XCamera: " << exit_x_camera
|
<< " XPlayer: " << px << " YCamera: " << exit_y_camera
|
||||||
|
<< " XCamera: " << exit_x_camera
|
||||||
<< " ScrollModY: " << exit_scroll_mod_y
|
<< " ScrollModY: " << exit_scroll_mod_y
|
||||||
<< " ScrollModX: " << exit_scroll_mod_x
|
<< " ScrollModX: " << exit_scroll_mod_x
|
||||||
<< " DoorType1: " << exit_door_type_1
|
<< " DoorType1: " << exit_door_type_1
|
||||||
<< " DoorType2: " << exit_door_type_2 << std::endl;
|
<< " DoorType2: " << exit_door_type_2 << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (px == 0xFFFF && py == 0xFFFF) {
|
if (px == 0xFFFF && py == 0xFFFF) {
|
||||||
exit.deleted = true;
|
exit.deleted = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user