More miscellaneous fixes:

* Fixed tiny build for consolidated driver files.
* tools/unidasm.cpp: Capture big objects by reference in lambdas.
* misc/oneshot.cpp: Fixed unsigned comparison to zero bugs.
This commit is contained in:
Vas Crabb 2022-09-14 04:44:28 +10:00
parent ef89299953
commit f9728327f8
3 changed files with 15 additions and 15 deletions

View File

@ -163,8 +163,6 @@ files{
MAME_DIR .. "src/mame/gaelco/gaelco_v.cpp",
MAME_DIR .. "src/mame/gaelco/gaelcrpt.cpp",
MAME_DIR .. "src/mame/gaelco/wrally.cpp",
MAME_DIR .. "src/mame/gaelco/wrally.h",
MAME_DIR .. "src/mame/gaelco/wrally_v.cpp",
MAME_DIR .. "src/mame/gaelco/gaelco_wrally_sprites.cpp",
MAME_DIR .. "src/mame/gaelco/gaelco_wrally_sprites.h",
MAME_DIR .. "src/mame/gaelco/gaelco_ds5002fp.cpp",

View File

@ -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;
}

View File

@ -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)