mirror of https://github.com/stella-emu/stella.git
Similar to the last commit, added cycle resetting the TrackBall class.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1519 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
f35ef466c6
commit
b270f7f231
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TrackBall.cxx,v 1.1 2008-05-12 22:40:25 stephena Exp $
|
// $Id: TrackBall.cxx,v 1.2 2008-05-19 03:15:12 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
|
@ -154,6 +154,13 @@ void TrackBall::update()
|
||||||
myDigitalPinState[Six] = (myEvent.get(Event::MouseButtonValue) == 0);
|
myDigitalPinState[Six] = (myEvent.get(Event::MouseButtonValue) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void TrackBall::systemCyclesReset()
|
||||||
|
{
|
||||||
|
myCyclesWhenSWCHARead -= mySystem.cycles();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
const uInt32 TrackBall::ourTrakBallTableTB_H[2][2] = {
|
const uInt32 TrackBall::ourTrakBallTableTB_H[2][2] = {
|
||||||
{ 0x40, 0x00 }, { 0xc0, 0x80 }
|
{ 0x40, 0x00 }, { 0xc0, 0x80 }
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TrackBall.hxx,v 1.1 2008-05-12 22:40:25 stephena Exp $
|
// $Id: TrackBall.hxx,v 1.2 2008-05-19 03:15:12 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef TRACKBALL_HXX
|
#ifndef TRACKBALL_HXX
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
AmigaMouse: Amiga Mouse
|
AmigaMouse: Amiga Mouse
|
||||||
|
|
||||||
@author Stephen Anthony & z26 team
|
@author Stephen Anthony & z26 team
|
||||||
@version $Id: TrackBall.hxx,v 1.1 2008-05-12 22:40:25 stephena Exp $
|
@version $Id: TrackBall.hxx,v 1.2 2008-05-19 03:15:12 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class TrackBall : public Controller
|
class TrackBall : public Controller
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,13 @@ class TrackBall : public Controller
|
||||||
*/
|
*/
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Notification method invoked by the system right before the
|
||||||
|
system resets its cycle counter to zero. It may be necessary
|
||||||
|
to override this method for devices that remember cycle counts.
|
||||||
|
*/
|
||||||
|
virtual void systemCyclesReset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Counter to iterate through the gray codes
|
// Counter to iterate through the gray codes
|
||||||
int myHCounter, myVCounter;
|
int myHCounter, myVCounter;
|
||||||
|
|
Loading…
Reference in New Issue