[Scummvm-cvs-logs] scummvm master -> a440c6a20e614c64dcd88380ee5273e9aad77169
Strangerke
Strangerke at scummvm.org
Fri Feb 28 23:25:49 CET 2014
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
81d733aec0 TONY: Fix some British comments
a440c6a20e TONY: Reduce the scope of more variables
Commit: 81d733aec0c4422fa8c0b34b0c7f4d5b74c991c0
https://github.com/scummvm/scummvm/commit/81d733aec0c4422fa8c0b34b0c7f4d5b74c991c0
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-28T13:49:05-08:00
Commit Message:
TONY: Fix some British comments
Changed paths:
engines/tony/mpal/mpal.cpp
engines/tony/mpal/mpal.h
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 305f897..c813b35 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -1518,7 +1518,7 @@ void mpalFree() {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns numeric results.
*/
uint32 mpalQueryDWORD(uint16 wQueryType, ...) {
@@ -1714,7 +1714,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns a pointer or handle.
*/
MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
@@ -1867,7 +1867,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet) {
diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h
index e88fd36..af24c46 100644
--- a/engines/tony/mpal/mpal.h
+++ b/engines/tony/mpal/mpal.h
@@ -391,7 +391,7 @@ void mpalFree();
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns numeric results.
*/
uint32 mpalQueryDWORD(uint16 wQueryType, ...);
@@ -402,7 +402,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...);
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns a pointer or handle.
*/
MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...);
@@ -413,7 +413,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...);
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet);
Commit: a440c6a20e614c64dcd88380ee5273e9aad77169
https://github.com/scummvm/scummvm/commit/a440c6a20e614c64dcd88380ee5273e9aad77169
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-28T14:24:09-08:00
Commit Message:
TONY: Reduce the scope of more variables
Changed paths:
engines/tony/game.cpp
engines/tony/gfxcore.cpp
engines/tony/gfxengine.cpp
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 986eac9..c102242 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -140,8 +140,6 @@ void RMOptionButton::setActiveState(bool bState) {
\****************************************************************************/
RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int slideSize) {
- RMResRaw *raw;
-
_pos = pt;
_nSlideSize = slideSize;
_nMax = nRange;
@@ -154,6 +152,7 @@ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int
_sliderSingle = NULL;
// Sliders
+ RMResRaw *raw;
INIT_GFX16_FROMRAW(20029, _sliderCenter);
INIT_GFX16_FROMRAW(20030, _sliderLeft);
INIT_GFX16_FROMRAW(20031, _sliderRight);
@@ -966,6 +965,8 @@ void RMOptionScreen::changeState(CORO_PARAM, OptionScreenState newState) {
void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_BEGIN_CONTEXT;
bool bLeftClick, bRightClick;
+ RMResRaw *raw;
+
RMPoint mousePos;
bool bRefresh;
int i;
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 3afad9b..9254d59 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -821,27 +821,24 @@ void RMGfxSourceBuffer8RLE::setAlreadyCompressed() {
}
void RMGfxSourceBuffer8RLE::compressRLE() {
- byte *startline;
byte *cur;
byte curdata;
byte *src;
- byte *startsrc;
- int rep;
// Perform RLE compression for lines
cur = _megaRLEBuf;
src = _buf;
for (int y = 0; y < _dimy; y++) {
// Save the beginning of the line
- startline = cur;
+ byte *startline = cur;
// Leave space for the length of the line
cur += 2;
// It starts from the empty space
curdata = 0;
- rep = 0;
- startsrc = src;
+ int rep = 0;
+ byte *startsrc = src;
for (int x = 0; x < _dimx;) {
if ((curdata == 0 && *src == 0) || (curdata == 1 && *src == _alphaBlendColor)
|| (curdata == 2 && (*src != _alphaBlendColor && *src != 0))) {
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index 92469b7..efbf63a 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -352,11 +352,10 @@ void RMGfxEngine::initCustomDll() {
}
void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
- RMItem *item;
assert(GLOBALS._gfxEngine);
if (GLOBALS._gfxEngine->_bLocationLoaded) {
- item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem);
+ RMItem *item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem);
if (item != NULL) {
if (nPattern != -1) {
item->setPattern(nPattern, true);
@@ -452,8 +451,8 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
void RMGfxEngine::init() {
// Screen loading
- RMResRaw *raw;
RMGfxSourceBuffer16 *load = NULL;
+ RMResRaw *raw;
INIT_GFX16_FROMRAW(20038, load);
_bigBuf.addPrim(new RMGfxPrimitive(load));
_bigBuf.drawOT(Common::nullContext);
@@ -722,9 +721,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
if (_ctx->ver >= 5) {
// Version 5
- bool bStat = false;
-
- bStat = _ctx->f->readByte();
+ bool bStat = _ctx->f->readByte();
_tony.setShepherdess(bStat);
bStat = _ctx->f->readByte();
_inter.setPerorate(bStat);
More information about the Scummvm-git-logs
mailing list