mirror of https://github.com/stella-emu/stella.git
TIA objects and collisions are now toggle with the Alt-period keys,
instead of having different keys to turn them on and off separately. This brings the functionality in line with the rest of the objects/ collision key-combos, which were also toggle-only. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2449 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
6737091149
commit
e3ba9f0ec2
|
@ -36,6 +36,10 @@
|
|||
- 'Juno First' ROMs now use an AtariVox/SaveKey when possible
|
||||
- 'Astroblast' ROMs now use the paddles by default
|
||||
|
||||
* Changed key-combo for enabling TIA objects and collisions to be
|
||||
toggled on and off with the Alt-period and Shift-Alt-period (instead
|
||||
of having two separate keys to turn them on and off).
|
||||
|
||||
* Updated included PNG library to latest stable version.
|
||||
|
||||
-Have fun!
|
||||
|
|
|
@ -1419,28 +1419,16 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Turn all TIA objects off</td>
|
||||
<td>Toggle all TIA objects</td>
|
||||
<td>Alt + .</td>
|
||||
<td>Cmd + .</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Turn all TIA objects on</td>
|
||||
<td>Alt + /</td>
|
||||
<td>Cmd + /</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Turn all TIA collisions off</td>
|
||||
<td>Toggle all TIA collisions</td>
|
||||
<td>Shift-Alt + .</td>
|
||||
<td>Shift-Cmd + .</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Turn all TIA collisions on</td>
|
||||
<td>Shift-Alt + /</td>
|
||||
<td>Shift-Cmd + /</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p><b>Other Keys (cannot be remapped, except those marked with '*')</b></p>
|
||||
|
|
|
@ -894,6 +894,14 @@ void Console::toggleTIABit(TIABit bit, const string& bitname, bool show) const
|
|||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleBits() const
|
||||
{
|
||||
bool enabled = myTIA->toggleBits();
|
||||
string message = string("TIA bits") + (enabled ? " enabled" : " disabled");
|
||||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleTIACollision(TIABit bit, const string& bitname, bool show) const
|
||||
{
|
||||
|
@ -902,6 +910,14 @@ void Console::toggleTIACollision(TIABit bit, const string& bitname, bool show) c
|
|||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleCollisions() const
|
||||
{
|
||||
bool enabled = myTIA->toggleCollisions();
|
||||
string message = string("TIA collisions") + (enabled ? " enabled" : " disabled");
|
||||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleHMOVE() const
|
||||
{
|
||||
|
@ -911,22 +927,6 @@ void Console::toggleHMOVE() const
|
|||
myOSystem->frameBuffer().showMessage("HMOVE blanking disabled");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::enableBits(bool enable) const
|
||||
{
|
||||
myTIA->enableBits(enable);
|
||||
string message = string("TIA bits") + (enable ? " enabled" : " disabled");
|
||||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::enableCollisions(bool enable) const
|
||||
{
|
||||
myTIA->enableCollisions(enable);
|
||||
string message = string("TIA collisions") + (enable ? " enabled" : " disabled");
|
||||
myOSystem->frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleFixedColors() const
|
||||
{
|
||||
|
|
|
@ -270,7 +270,7 @@ class Console : public Serializable
|
|||
void toggleBLBit() const { toggleTIABit(BLBit, "BL"); }
|
||||
void togglePFBit() const { toggleTIABit(PFBit, "PF"); }
|
||||
void toggleHMOVE() const;
|
||||
void enableBits(bool enable) const;
|
||||
void toggleBits() const;
|
||||
|
||||
/**
|
||||
Toggles the TIA collisions specified in the method name.
|
||||
|
@ -281,7 +281,7 @@ class Console : public Serializable
|
|||
void toggleM1Collision() const { toggleTIACollision(M1Bit, "M1"); }
|
||||
void toggleBLCollision() const { toggleTIACollision(BLBit, "BL"); }
|
||||
void togglePFCollision() const { toggleTIACollision(PFBit, "PF"); }
|
||||
void enableCollisions(bool enable) const;
|
||||
void toggleCollisions() const;
|
||||
|
||||
/**
|
||||
Toggles the TIA 'fixed debug colors' mode.
|
||||
|
@ -339,11 +339,11 @@ class Console : public Serializable
|
|||
System* mySystem;
|
||||
|
||||
// Pointer to the Cartridge (the debugger needs it)
|
||||
Cartridge *myCart;
|
||||
Cartridge* myCart;
|
||||
|
||||
// Pointer to the 6532 (aka RIOT) (the debugger needs it)
|
||||
// A RIOT of my own! (...with apologies to The Clash...)
|
||||
M6532 *myRiot;
|
||||
M6532* myRiot;
|
||||
|
||||
// Pointer to CompuMate handler (only used in CompuMate ROMs)
|
||||
CompuMate* myCMHandler;
|
||||
|
|
|
@ -434,16 +434,9 @@ void EventHandler::poll(uInt64 time)
|
|||
|
||||
case KBDK_PERIOD:
|
||||
if(mod & KMOD_SHIFT)
|
||||
myOSystem->console().enableCollisions(false);
|
||||
myOSystem->console().toggleCollisions();
|
||||
else
|
||||
myOSystem->console().enableBits(false);
|
||||
break;
|
||||
|
||||
case KBDK_SLASH:
|
||||
if(mod & KMOD_SHIFT)
|
||||
myOSystem->console().enableCollisions(true);
|
||||
else
|
||||
myOSystem->console().enableBits(true);
|
||||
myOSystem->console().toggleBits();
|
||||
break;
|
||||
|
||||
case KBDK_p: // Alt-p toggles phosphor effect
|
||||
|
|
|
@ -54,7 +54,10 @@ TIA::TIA(Console& console, Sound& sound, Settings& settings)
|
|||
myColorLossEnabled(false),
|
||||
myPartialFrameFlag(false),
|
||||
myAutoFrameEnabled(false),
|
||||
myFrameCounter(0)
|
||||
myFrameCounter(0),
|
||||
myBitsEnabled(true),
|
||||
myCollisionsEnabled(true)
|
||||
|
||||
{
|
||||
// Allocate buffers for two frame buffers
|
||||
myCurrentFrameBuffer = new uInt8[160 * 320];
|
||||
|
@ -701,6 +704,14 @@ bool TIA::toggleBit(TIABit b, uInt8 mode)
|
|||
return on;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleBits()
|
||||
{
|
||||
myBitsEnabled = !myBitsEnabled;
|
||||
enableBits(myBitsEnabled);
|
||||
return myBitsEnabled;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::enableCollisions(bool mode)
|
||||
{
|
||||
|
@ -744,6 +755,14 @@ bool TIA::toggleCollision(TIABit b, uInt8 mode)
|
|||
return on;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleCollisions()
|
||||
{
|
||||
myCollisionsEnabled = !myCollisionsEnabled;
|
||||
enableCollisions(myCollisionsEnabled);
|
||||
return myCollisionsEnabled;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TIA::toggleHMOVEBlank()
|
||||
{
|
||||
|
|
|
@ -270,16 +270,8 @@ class TIA : public Device
|
|||
bool scanlinePos(uInt16& x, uInt16& y) const;
|
||||
|
||||
/**
|
||||
Enables/disables all TIABit bits. Note that disabling a graphical
|
||||
object also disables its collisions.
|
||||
|
||||
@param mode Whether to enable or disable all bits
|
||||
*/
|
||||
void enableBits(bool mode);
|
||||
|
||||
/**
|
||||
Enables/disable/toggle the specified TIA bit. Note that disabling a
|
||||
graphical object also disables its collisions.
|
||||
Enables/disable/toggle the specified (or all) TIA bit(s). Note that
|
||||
disabling a graphical object also disables its collisions.
|
||||
|
||||
@param mode 1/0 indicates on/off, and values greater than 1 mean
|
||||
flip the bit from its current state
|
||||
|
@ -287,16 +279,10 @@ class TIA : public Device
|
|||
@return Whether the bit was enabled or disabled
|
||||
*/
|
||||
bool toggleBit(TIABit b, uInt8 mode = 2);
|
||||
bool toggleBits();
|
||||
|
||||
/**
|
||||
Enables/disables all TIABit collisions.
|
||||
|
||||
@param mode Whether to enable or disable all collisions
|
||||
*/
|
||||
void enableCollisions(bool mode);
|
||||
|
||||
/**
|
||||
Enables/disable/toggle the specified TIA bit collision.
|
||||
Enables/disable/toggle the specified (or all) TIA bit collision(s).
|
||||
|
||||
@param mode 1/0 indicates on/off, and values greater than 1 mean
|
||||
flip the collision from its current state
|
||||
|
@ -304,6 +290,7 @@ class TIA : public Device
|
|||
@return Whether the collision was enabled or disabled
|
||||
*/
|
||||
bool toggleCollision(TIABit b, uInt8 mode = 2);
|
||||
bool toggleCollisions();
|
||||
|
||||
/**
|
||||
Toggle the display of HMOVE blanks.
|
||||
|
@ -342,6 +329,21 @@ class TIA : public Device
|
|||
#endif
|
||||
|
||||
private:
|
||||
/**
|
||||
Enables/disables all TIABit bits. Note that disabling a graphical
|
||||
object also disables its collisions.
|
||||
|
||||
@param mode Whether to enable or disable all bits
|
||||
*/
|
||||
void enableBits(bool mode);
|
||||
|
||||
/**
|
||||
Enables/disables all TIABit collisions.
|
||||
|
||||
@param mode Whether to enable or disable all collisions
|
||||
*/
|
||||
void enableCollisions(bool mode);
|
||||
|
||||
// Update the current frame buffer to the specified color clock
|
||||
void updateFrame(Int32 clock);
|
||||
|
||||
|
@ -615,6 +617,9 @@ class TIA : public Device
|
|||
// The framerate currently in use by the Console
|
||||
float myFramerate;
|
||||
|
||||
// Whether TIA bits/collisions are currently enabled/disabled
|
||||
bool myBitsEnabled, myCollisionsEnabled;
|
||||
|
||||
private:
|
||||
// Copy constructor isn't supported by this class so make it private
|
||||
TIA(const TIA&);
|
||||
|
|
Loading…
Reference in New Issue