summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mame/misc/oneshot.cpp12
-rw-r--r--src/tools/unidasm.cpp16
2 files changed, 15 insertions, 13 deletions
diff --git a/src/mame/misc/oneshot.cpp b/src/mame/misc/oneshot.cpp
index 4e85fa476bf..7b6ae432db1 100644
--- a/src/mame/misc/oneshot.cpp
+++ b/src/mame/misc/oneshot.cpp
@@ -319,11 +319,11 @@ void oneshot_state::draw_crosshairs()
m_gun_x[0] += m_gun_x_shift;
- m_gun_y[0] -= 0x0a;
- if (m_gun_y[0] < 0)
+ if (m_gun_y[0] >= 0x0a)
+ m_gun_y[0] -= 0x0a;
+ else
m_gun_y[0] = 0;
-
// get gun raw coordinates (player 2)
m_gun_x[1] = (m_io_lightgun_x[1]->read() & 0xff) * 320 / 256;
m_gun_y[1] = (m_io_lightgun_y[1]->read() & 0xff) * 240 / 256;
@@ -332,8 +332,10 @@ void oneshot_state::draw_crosshairs()
//xpos = m_gun_x[1];
//ypos = m_gun_y[1];
- m_gun_x[1] += m_gun_x_shift - 0x0a;
- if (m_gun_x[1] < 0)
+ m_gun_x[1] += m_gun_x_shift;
+ if (m_gun_x[1] >= 0x0a)
+ m_gun_x[1] -= 0x0a;
+ else
m_gun_x[1] = 0;
}
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index cd5d04d6db6..3751db851a5 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -1477,7 +1477,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
if(is_octal) {
switch(granularity) {
case 1:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1491,7 +1491,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 2:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1505,7 +1505,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 4:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1519,7 +1519,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 8:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1535,7 +1535,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
} else {
switch(granularity) {
case 1:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1549,7 +1549,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 2:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1563,7 +1563,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 4:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1577,7 +1577,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 8:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)