mirror of
https://github.com/holub/mame
synced 2025-04-25 01:40:16 +03:00
Use C++ swappable idiom correctly, clean up #include guards for headers that were moved.
This commit is contained in:
parent
0c9f5dd225
commit
82f9511ca4
@ -1,11 +1,13 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:AJR
|
||||
#ifndef MAME_AMPEX_AMPEX210_KBD_H
|
||||
#define MAME_AMPEX_AMPEX210_KBD_H
|
||||
|
||||
#ifndef MAME_SKELETON_AMPEX210_KBD_H
|
||||
#define MAME_SKELETON_AMPEX210_KBD_H
|
||||
#pragma once
|
||||
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
|
||||
|
||||
class ampex230_keyboard_device : public device_t
|
||||
{
|
||||
public:
|
||||
@ -46,4 +48,4 @@ private:
|
||||
// device type declaration
|
||||
DECLARE_DEVICE_TYPE(AMPEX230_KEYBOARD, ampex230_keyboard_device)
|
||||
|
||||
#endif // MAME_SKELETON_AMPEX210_KBD_H
|
||||
#endif // MAME_AMPEX_AMPEX210_KBD_H
|
||||
|
@ -5,9 +5,8 @@
|
||||
Micro Craft Dimension 68000 84-key keyboard
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef MAME_SKELETON_DIM68K_KBD_H
|
||||
#define MAME_SKELETON_DIM68K_KBD_H
|
||||
#ifndef MAME_MICROCRAFT_DIM68K_KBD_H
|
||||
#define MAME_MICROCRAFT_DIM68K_KBD_H
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -30,7 +29,7 @@ public:
|
||||
auto txd_callback() { return m_txd_callback.bind(); }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
// device_t implementation
|
||||
virtual void device_resolve_objects() override;
|
||||
virtual void device_start() override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
@ -64,4 +63,4 @@ private:
|
||||
// device type declarations
|
||||
DECLARE_DEVICE_TYPE(DIM68K_KEYBOARD, dim68k_keyboard_device)
|
||||
|
||||
#endif // MAME_SKELETON_DIM68K_KBD_H
|
||||
#endif // MAME_MICROCRAFT_DIM68K_KBD_H
|
||||
|
@ -200,6 +200,9 @@ dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const ch
|
||||
: device_t(mconfig, DMV_KEYBOARD, tag, owner, clock)
|
||||
, m_maincpu(*this, "mcu")
|
||||
, m_keyboard(*this, "COL.%u", 0)
|
||||
, m_col(0)
|
||||
, m_sd_data_state(0)
|
||||
, m_sd_poll_state(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,11 @@
|
||||
Decision Mate V keyboard emulation
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef MAME_SKELETON_DMV_KEYB_H
|
||||
#define MAME_SKELETON_DMV_KEYB_H
|
||||
#ifndef MAME_NCR_DMV_KEYB_H
|
||||
#define MAME_NCR_DMV_KEYB_H
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
|
||||
|
||||
@ -31,22 +29,20 @@ public:
|
||||
int sd_poll_r();
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// optional information overrides
|
||||
// device_t implementation
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
required_device<i8741a_device> m_maincpu;
|
||||
required_ioport_array<16> m_keyboard;
|
||||
|
||||
uint8_t m_col = 0;
|
||||
int m_sd_data_state = 0;
|
||||
int m_sd_poll_state = 0;
|
||||
uint8_t m_col;
|
||||
int m_sd_data_state;
|
||||
int m_sd_poll_state;
|
||||
|
||||
uint8_t port1_r();
|
||||
uint8_t port2_r();
|
||||
@ -54,8 +50,8 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
// device type declaration
|
||||
DECLARE_DEVICE_TYPE(DMV_KEYBOARD, dmv_keyboard_device)
|
||||
|
||||
|
||||
#endif // MAME_SKELETON_DMV_KEYB_H
|
||||
#endif // MAME_NCR_DMV_KEYB_H
|
||||
|
@ -17,6 +17,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/74259.h"
|
||||
@ -25,8 +26,10 @@
|
||||
#include "machine/scn_pci.h"
|
||||
#include "machine/x2212.h"
|
||||
#include "video/i8275.h"
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class t7000_state : public driver_device
|
||||
@ -95,11 +98,14 @@ I8275_DRAW_CHARACTER_MEMBER(t7000_state::display_character)
|
||||
rgb_t fg = rgb_t::white();
|
||||
rgb_t bg = rgb_t::black();
|
||||
if (m_outlatch->q2_r())
|
||||
std::swap(fg, bg);
|
||||
{
|
||||
using std::swap;
|
||||
swap(fg, bg);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
bitmap.pix(y, x + i) = (dots & 0x300) != 0 ? fg : bg;
|
||||
bitmap.pix(y, x + i) = ((dots & 0x300) != 0) ? fg : bg;
|
||||
dots <<= 1;
|
||||
}
|
||||
}
|
||||
@ -258,4 +264,4 @@ ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
SYST(1982, t7000, 0, 0, t7000, t7000, t7000_state, empty_init, "Wicat Systems", "T7000 Video Terminal", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE)
|
||||
SYST(1982, t7000, 0, 0, t7000, t7000, t7000_state, empty_init, "Wicat Systems", "T7000 Video Terminal", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE)
|
||||
|
Loading…
Reference in New Issue
Block a user