Skip to content

Commit

Permalink
TONY: Replace C-style comments by C++-style ones.
Browse files Browse the repository at this point in the history
Also translate some more Italian comments
  • Loading branch information
Strangerke committed Aug 29, 2012
1 parent 766eade commit 825e089
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 116 deletions.
5 changes: 0 additions & 5 deletions engines/tony/custom.h
Expand Up @@ -18,7 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/

/*
Expand All @@ -37,10 +36,6 @@ namespace Tony {

using namespace MPAL;

/*
* Defines
*/

typedef uint32 HWND;

#define INIT_CUSTOM_FUNCTION MapCustomFunctions
Expand Down
8 changes: 4 additions & 4 deletions engines/tony/font.cpp
Expand Up @@ -206,7 +206,7 @@ void RMFontDialog::init() {

load(RES_F_PARL, nchars, 20, 20);

// Initialize the f**king table
// Initialize the font table
_lDefault = 13;
_hDefault = 18;
Common::fill(&_l2Table[0][0], &_l2Table[0][0] + (256 * 256), '\0');
Expand Down Expand Up @@ -281,7 +281,7 @@ void RMFontCredits::init() {


/***************************************************************************\
* Metodi di RMFontObj
* RMFontObj Methods
\****************************************************************************/

#define TOUPPER(a) ((a) >= 'a' && (a) <= 'z' ? (a) + 'A' - 'a' : (a))
Expand Down Expand Up @@ -310,7 +310,7 @@ void RMFontObj::init() {

load(RES_F_OBJ, nchars, 25, 30);

// Initialize the f**king table
// Initialize the font table
_lDefault = 26;
_hDefault = 30;
Common::fill(&_l2Table[0][0], &_l2Table[0][0] + (256 * 256), '\0');
Expand All @@ -320,7 +320,7 @@ void RMFontObj::init() {
_lTable[i] = g_vm->_lTableObj[i];
}

/* Casi particolari */
// Special case
setBothCase('C', 'C', 2);
setBothCase('A', 'T', -2);
setBothCase('R', 'S', 2);
Expand Down
7 changes: 2 additions & 5 deletions engines/tony/game.cpp
Expand Up @@ -43,10 +43,7 @@ namespace Tony {

using namespace MPAL;

/****************************************/
/* Global functions */
/****************************************/

// Global functions
void mainEnableGUI() {
g_vm->getEngine()->_bGUIInterface = true;
g_vm->getEngine()->_bGUIInventory = true;
Expand Down Expand Up @@ -1045,7 +1042,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
#define PROCESS_CHAR(cod,c) if (KEYPRESS(cod)) { \
_editName[strlen(_editName) + 1] = '\0'; _editName[strlen(_editName)] = c; _ctx->bRefresh = true; }

/**************** State Buttons **************/
// State Buttons
if (_bEditSaveName) {
if (KEYPRESS(Common::KEYCODE_BACKSPACE)) {
if (_editName[0] != '\0') {
Expand Down
20 changes: 8 additions & 12 deletions engines/tony/gfxcore.cpp
Expand Up @@ -1610,7 +1610,7 @@ void RMGfxSourceBuffer8AA::calculateAA() {
int x, y;
byte *src, *srcaa;

/* First pass: fill the edges */
// First pass: fill the edges
Common::fill(_megaAABuf, _megaAABuf + _dimx * _dimy, 0);

src = _buf;
Expand Down Expand Up @@ -1715,11 +1715,9 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
// Loop
buf += bigBuf.getDimx(); // Skip the first line
for (y = 1; y < height - 1; y++) {
/*
if (prim->IsFlipped())
mybuf=&buf[x1+m_dimx-1];
else
*/
// if (prim->IsFlipped())
// mybuf=&buf[x1+m_dimx-1];
// else
mybuf = &buf[x1];

for (x = 0; x < width; x++, mybuf += step) {
Expand Down Expand Up @@ -1748,18 +1746,16 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
buf += bigBuf.getDimx();
}

// Position into the destination buffer
// Position into the destination buffer
buf = bigBuf;
buf += y1 * bigBuf.getDimx();

// Looppone
buf += bigBuf.getDimx();
for (y = 1; y < height - 1; y++) {
/*
if (prim->IsFlipped())
mybuf=&buf[x1+m_dimx-1];
else
*/
// if (prim->IsFlipped())
// mybuf=&buf[x1+m_dimx-1];
// else
mybuf = &buf[x1];

for (x = 0; x < width; x++, mybuf += step) {
Expand Down
4 changes: 0 additions & 4 deletions engines/tony/mpal/expr.cpp
Expand Up @@ -31,10 +31,6 @@
#include "tony/mpal/mpaldll.h"
#include "tony/tony.h"

/*
#include "lzo1x.h"
*/

namespace Tony {

namespace MPAL {
Expand Down
14 changes: 7 additions & 7 deletions engines/tony/mpal/loadmpc.cpp
Expand Up @@ -145,7 +145,7 @@ static const byte *parseDialog(const byte *lpBuf, LPMPALDIALOG lpmdDialog) {
lpmdDialog->nObj = READ_LE_UINT32(lpBuf);
lpBuf += 4;

/* Periods */
// Periods
uint32 num = READ_LE_UINT16(lpBuf);
lpBuf += 2;

Expand All @@ -166,7 +166,7 @@ static const byte *parseDialog(const byte *lpBuf, LPMPALDIALOG lpmdDialog) {
lpmdDialog->_periodNums[i] = 0;
lpmdDialog->_periods[i] = NULL;

/* Groups */
// Groups
num = READ_LE_UINT16(lpBuf);
lpBuf += 2;
uint32 curCmd = 0;
Expand Down Expand Up @@ -255,7 +255,7 @@ static const byte *parseDialog(const byte *lpBuf, LPMPALDIALOG lpmdDialog) {
if (curCmd >= MAX_COMMANDS_PER_DIALOG)
error("Too much commands in dialog #%d",lpmdDialog->nObj);

/* Choices */
// Choices
num = READ_LE_UINT16(lpBuf);
lpBuf += 2;

Expand Down Expand Up @@ -344,7 +344,7 @@ static const byte *parseItem(const byte *lpBuf, LPMPALITEM lpmiItem) {
lpmiItem->nActions=*lpBuf;
lpBuf++;

/* Allocation action */
// Allocation action
if (lpmiItem->nActions > 0)
lpmiItem->Action = (ItemAction *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizeof(struct ItemAction) * (int)lpmiItem->nActions);

Expand Down Expand Up @@ -519,7 +519,7 @@ static const byte *ParseLocation(const byte *lpBuf, LPMPALLOCATION lpmlLocation)
bool ParseMpc(const byte *lpBuf) {
byte *lpTemp;

/* 1. Variables */
// 1. Variables
if (lpBuf[0] != 'V' || lpBuf[1] != 'A' || lpBuf[2] != 'R' || lpBuf[3] != 'S')
return false;

Expand Down Expand Up @@ -547,7 +547,7 @@ bool ParseMpc(const byte *lpBuf) {

globalUnlock(GLOBALS._hVars);

/* 2. Messages */
// 2. Messages
if (lpBuf[0] != 'M' || lpBuf[1] != 'S' || lpBuf[2] != 'G' || lpBuf[3] != 'S')
return false;

Expand Down Expand Up @@ -596,7 +596,7 @@ bool ParseMpc(const byte *lpBuf) {
globalUnlock(GLOBALS._hMsgs);
#endif

/* 3. Objects */
// 3. Objects
if (lpBuf[0] != 'O' || lpBuf[1] != 'B' || lpBuf[2] != 'J' || lpBuf[3] != 'S')
return false;

Expand Down

0 comments on commit 825e089

Please sign in to comment.