From 5cf32f4b95c7d3a2941c0f6a4ac6f4f9c4039813 Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 25 Jan 2016 21:16:04 +0000 Subject: [PATCH] Of course, there's a problem with perfectly valid C++ code in Visual Studio at the last minute ... git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3264 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/emucore/TrackBall.cxx | 30 ++++++++++++++++++++++++++++++ src/emucore/TrackBall.hxx | 14 +++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/emucore/TrackBall.cxx b/src/emucore/TrackBall.cxx index ab0a4adfe..ddd1c07b9 100644 --- a/src/emucore/TrackBall.cxx +++ b/src/emucore/TrackBall.cxx @@ -146,3 +146,33 @@ bool TrackBall::setMouseControl( (xid != -1 || yid != -1); return true; } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableTB_H[2][2] = { + { 0x40, 0x00 }, { 0xc0, 0x80 } +}; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableTB_V[2][2] = { + { 0x00, 0x10 }, { 0x20, 0x30 } +}; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableST_H[4] = { + 0x00, 0x80, 0xc0, 0x40 +}; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableST_V[4] = { + 0x00, 0x10, 0x30, 0x20 +}; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableAM_H[4] = { + 0x00, 0x10, 0x50, 0x40 +}; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const uInt32 TrackBall::ourTrakBallTableAM_V[4] = { + 0x00, 0x80, 0xa0, 0x20 +}; diff --git a/src/emucore/TrackBall.hxx b/src/emucore/TrackBall.hxx index 30c3dff2b..be4b83aad 100644 --- a/src/emucore/TrackBall.hxx +++ b/src/emucore/TrackBall.hxx @@ -107,19 +107,19 @@ class TrackBall : public Controller int myScanCountH, myScanCountV, myCountH, myCountV; // Whether to use the mouse to emulate this controller - int myMouseEnabled; + int myMouseEnabled; // CX-22 - const uInt32 ourTrakBallTableTB_H[2][2] = {{ 0x40, 0x00 }, { 0xc0, 0x80 }}; - const uInt32 ourTrakBallTableTB_V[2][2] = {{ 0x00, 0x10 }, { 0x20, 0x30 }}; + static const uInt32 ourTrakBallTableTB_H[2][2]; + static const uInt32 ourTrakBallTableTB_V[2][2]; // ST mouse / CX-80 - const uInt32 ourTrakBallTableST_H[4] = { 0x00, 0x80, 0xc0, 0x40 }; - const uInt32 ourTrakBallTableST_V[4] = { 0x00, 0x10, 0x30, 0x20 }; + static const uInt32 ourTrakBallTableST_H[4]; + static const uInt32 ourTrakBallTableST_V[4]; // Amiga mouse - const uInt32 ourTrakBallTableAM_H[4] = { 0x00, 0x10, 0x50, 0x40 }; - const uInt32 ourTrakBallTableAM_V[4] = { 0x00, 0x80, 0xa0, 0x20 }; + static const uInt32 ourTrakBallTableAM_H[4]; + static const uInt32 ourTrakBallTableAM_V[4]; private: // Following constructors and assignment operators not supported