Dungeon object updates
This commit is contained in:
@@ -19,7 +19,7 @@ class ExperimentFlags {
|
||||
bool kUseBitmapManager = true;
|
||||
|
||||
// Log instructions to the GUI debugger.
|
||||
bool kLogInstructions = true;
|
||||
bool kLogInstructions = false;
|
||||
|
||||
// Flag to enable ImGui input config flags. Currently is
|
||||
// handled manually by controller class but should be
|
||||
@@ -35,7 +35,7 @@ class ExperimentFlags {
|
||||
bool kSaveWithChangeQueue = false;
|
||||
|
||||
// Attempt to run the dungeon room draw routine when opening a room.
|
||||
bool kDrawDungeonRoomGraphics = false;
|
||||
bool kDrawDungeonRoomGraphics = true;
|
||||
};
|
||||
|
||||
ExperimentFlags() = default;
|
||||
@@ -58,11 +58,43 @@ class ExperimentFlags {
|
||||
static std::shared_ptr<Flags> flags_;
|
||||
};
|
||||
|
||||
// NotifyFlag is a special type class which stores two copies of a type
|
||||
// and uses that to check if the value was updated last or not
|
||||
// It should have an accessor which says if it was modified or not
|
||||
// and when that is read it should reset the value and state
|
||||
template <typename T>
|
||||
class NotifyFlag {
|
||||
public:
|
||||
NotifyFlag() : value_(), modified_(false) {}
|
||||
|
||||
void set(const T &value) {
|
||||
value_ = value;
|
||||
modified_ = true;
|
||||
}
|
||||
|
||||
const T &get() {
|
||||
modified_ = false;
|
||||
return value_;
|
||||
}
|
||||
|
||||
void operator=(const T &value) { set(value); }
|
||||
operator T() const { return get(); }
|
||||
|
||||
bool isModified() const { return modified_; }
|
||||
|
||||
private:
|
||||
T value_;
|
||||
bool modified_;
|
||||
};
|
||||
|
||||
uint32_t SnesToPc(uint32_t addr);
|
||||
uint32_t PcToSnes(uint32_t addr);
|
||||
|
||||
uint32_t MapBankToWordAddress(uint8_t bank, uint16_t addr);
|
||||
|
||||
int AddressFromBytes(uint8_t addr1, uint8_t addr2, uint8_t addr3);
|
||||
int HexToDec(char *input, int length);
|
||||
|
||||
bool StringReplace(std::string &str, const std::string &from,
|
||||
const std::string &to);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user