diff options
author | 2020-04-13 19:57:13 -0400 | |
---|---|---|
committer | 2020-04-13 20:04:25 -0400 | |
commit | 86e7693df08201e82d06e8f23a77cc5982e3dcd3 (patch) | |
tree | edee95c1e7f8d65e3201b73338e136ceb2abb352 /src/frontend/mame/cheat.cpp | |
parent | dcf2109120ef5ec5c65ee6e15de46bea1d8f2822 (diff) |
Make expressions octal for applicable address spaces in disassembly view
debug/express.cpp, debugcpu.cpp: General cleanup (nw)
- Change default base from hardcoded macro to dynamic parameter for parsed_expression
- Change symbol table parameters and variables to references or std::reference_wrapper
- Remove the (unused) ability to construct a parsed_expression without a symbol table
- Eliminate symbol_table &table and void *memory_param arguments from callbacks (superfluous now that std::function can bind everything necessary)
- Eliminate globalref pointer from symbol_table
- Add explicitly defaulted move constructor and move assignment operator
Diffstat (limited to 'src/frontend/mame/cheat.cpp')
-rw-r--r-- | src/frontend/mame/cheat.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp index e007f0d8372..00f8c9d67fd 100644 --- a/src/frontend/mame/cheat.cpp +++ b/src/frontend/mame/cheat.cpp @@ -401,8 +401,8 @@ cheat_script::script_entry::script_entry( std::string const &filename, util::xml::data_node const &entrynode, bool isaction) - : m_condition(&symbols) - , m_expression(&symbols) + : m_condition(symbols) + , m_expression(symbols) { char const *expression(nullptr); try @@ -610,7 +610,7 @@ cheat_script::script_entry::output_argument::output_argument( symbol_table &symbols, std::string const &filename, util::xml::data_node const &argnode) - : m_expression(&symbols) + : m_expression(symbols) , m_count(0) { // first extract attributes @@ -679,7 +679,7 @@ void cheat_script::script_entry::output_argument::save(emu_file &cheatfile) cons cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, std::string const &filename, util::xml::data_node const &cheatnode) : m_manager(manager) - , m_symbols(&manager.machine(), &globaltable) + , m_symbols(&globaltable) , m_state(SCRIPT_STATE_OFF) , m_numtemp(DEFAULT_TEMP_VARIABLES) , m_argindex(0) @@ -1058,7 +1058,7 @@ constexpr int cheat_manager::CHEAT_VERSION; cheat_manager::cheat_manager(running_machine &machine) : m_machine(machine) , m_disabled(true) - , m_symtable(&machine) + , m_symtable() { // if the cheat engine is disabled, we're done if (!machine.options().cheat()) @@ -1329,7 +1329,7 @@ std::string cheat_manager::quote_expression(const parsed_expression &expression) // execute_frombcd - convert a value from BCD //------------------------------------------------- -uint64_t cheat_manager::execute_frombcd(symbol_table &table, int params, const uint64_t *param) +uint64_t cheat_manager::execute_frombcd(int params, const uint64_t *param) { uint64_t value(param[0]); uint64_t multiplier(1); @@ -1349,7 +1349,7 @@ uint64_t cheat_manager::execute_frombcd(symbol_table &table, int params, const u // execute_tobcd - convert a value to BCD //------------------------------------------------- -uint64_t cheat_manager::execute_tobcd(symbol_table &table, int params, const uint64_t *param) +uint64_t cheat_manager::execute_tobcd(int params, const uint64_t *param) { uint64_t value(param[0]); uint64_t result(0); |