summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-05-14 14:27:45 +1000
committer Vas Crabb <vas@vastheman.com>2016-05-14 14:27:45 +1000
commit1b4222be28c4b4b0f42eb7f798e61563e477d1dc (patch)
tree1d24342858a51b5d8da892cbf8e72555e93720ce /src
parentc5f2a4800690bbec44241a05aa0058b8715cdd6b (diff)
It's even easier to read like this (nw)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/skylncr.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index b942c09b255..2bc5ac2fc1b 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -112,6 +112,8 @@
#include "machine/i8255.h"
#include "machine/nvram.h"
+#include <algorithm>
+
class skylncr_state : public driver_device
{
@@ -1944,23 +1946,13 @@ DRIVER_INIT_MEMBER(skylncr_state, sonikfig)
00 04 02 06 01 05 03 07
*/
{
- UINT8 *ROM = memregion("maincpu")->base();
- UINT8 byte01, byte03, byte04, byte06; // for a better visual understanding...
- int x;
-
- for (x= 0; x < 0x10000; x += 8)
+ UINT8 *const ROM = memregion("maincpu")->base();
+ for (unsigned x = 0; x < 0x10000; x += 8)
{
- byte01 = ROM[x + 1];
- byte03 = ROM[x + 3];
- byte04 = ROM[x + 4];
- byte06 = ROM[x + 6];
-
- ROM[x + 1] = byte04;
- ROM[x + 3] = byte06;
- ROM[x + 4] = byte01;
- ROM[x + 6] = byte03;
+ std::swap(ROM[x + 1], ROM[x + 4]);
+ std::swap(ROM[x + 3], ROM[x + 6]);
}
-
+
m_generic_paletteram_8.allocate(0x100 * 3);
m_generic_paletteram2_8.allocate(0x100 * 3);
}