aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-20 15:28:48 +1000
committerPaul Gilbert2012-05-20 15:28:48 +1000
commit8b9831a50250ccc6b605058a702bb5f617a83978 (patch)
treedb71797a9794e0df630deb98f1b4dc3a6f2af2a1 /engines
parent6f6486e5896d8af782aaba408b1fe5ae53021c7f (diff)
downloadscummvm-rg350-8b9831a50250ccc6b605058a702bb5f617a83978.tar.gz
scummvm-rg350-8b9831a50250ccc6b605058a702bb5f617a83978.tar.bz2
scummvm-rg350-8b9831a50250ccc6b605058a702bb5f617a83978.zip
TONY: Converting Italian comments to English and formatting
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/font.cpp191
-rw-r--r--engines/tony/font.h81
-rw-r--r--engines/tony/game.cpp68
-rw-r--r--engines/tony/game.h9
-rw-r--r--engines/tony/gfxcore.cpp285
-rw-r--r--engines/tony/gfxcore.h32
-rw-r--r--engines/tony/gfxengine.cpp86
-rw-r--r--engines/tony/globals.h8
-rw-r--r--engines/tony/inventory.cpp92
-rw-r--r--engines/tony/inventory.h50
10 files changed, 424 insertions, 478 deletions
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 91d6708a20..972bd081bf 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -37,7 +37,7 @@
namespace Tony {
/****************************************************************************\
-* Metodi di RMFont
+* RMFont Methods
\****************************************************************************/
RMFont::RMFont() {
@@ -48,15 +48,13 @@ RMFont::~RMFont() {
Unload();
}
-/****************************************************************************\
-*
-* Function: void RMFont::Load(byte *buf, int nChars, int dimx, int dimy);
-*
-* Description: Carica un font da buffer
-*
-* Input: byte *buf Buffer contenente il font
-* int nChars Numero di caratteri (max 256)
-* int dimx,dimy Dimensione in pixel di un carattere
+
+/**
+ * Dumps a font to a buffer
+ * @param buf Buffer contenente il font
+ * @param nChars Numero di caratteri (max 256)
+ * @param dimx X dimension in pixels
+ * @param dimy Y dimension in pixels
*
\****************************************************************************/
@@ -84,9 +82,9 @@ void RMFont::Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palRes
}
#endif
- // Carichiamoce 'sto font
+ // Initialisation the fonts
for (int i = 0; i < nChars; i++) {
- // Inizializza il buffer con le lettere
+ // Initialise the buffer with the letters
m_letter[i].Init(buf + i * (dimx * dimy + 8) + 8, dimx, dimy);
m_letter[i].LoadPaletteWA(palResID);
}
@@ -118,15 +116,15 @@ RMGfxPrimitive *RMFont::MakeLetterPrimitive(byte bChar, int &nLength) {
RMFontPrimitive *prim;
int nLett;
- // Converte da carattere a lettera
+ // Convert from character to glyph index
nLett = ConvertToLetter(bChar);
assert(nLett < nLetters);
- // Crea la primitiva per il font
+ // Create primitive font
prim = new RMFontPrimitive(this);
prim->m_nChar = nLett;
- // Si fa' dare la lunghezza della lettera in pixel
+ // Get the length of the character in pixels
nLength = LetterLength(bChar);
return prim;
@@ -140,7 +138,7 @@ void RMFont::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim2)
CORO_BEGIN_CODE(_ctx);
- // Richiama la Draw della lettera assegnata alla primitiva
+ // Call the draw method of the letter assigned to the primitive
if (prim->m_nChar != -1)
CORO_INVOKE_2(m_letter[prim->m_nChar].Draw, bigBuf, prim);
@@ -190,7 +188,7 @@ void RMFontColor::SetBaseColor(byte r1, byte g1, byte b1) {
int i;
byte pal[768 * 3];
- // Controlla se siamo gia' sul colore giusto
+ // Check if we are already on the right colour
if (m_r == r1 && m_g == g1 && m_b == b1)
return;
@@ -198,7 +196,7 @@ void RMFontColor::SetBaseColor(byte r1, byte g1, byte b1) {
m_g = g1;
m_b = b1;
- // Costruisce la nuova palette per il font
+ // Constructs a new paletter for the font
for (i = 1; i < 16; i++) {
pal[i * 3 + 0] = r >> 16;
pal[i * 3 + 1] = g >> 16;
@@ -213,20 +211,20 @@ void RMFontColor::SetBaseColor(byte r1, byte g1, byte b1) {
pal[15 * 3 + 1] += 8;
pal[15 * 3 + 2] += 8;
- // La mette in tutte le lettere
+ // Puts in all the letters
for (i = 0; i < nLetters; i++)
m_letter[i].LoadPaletteWA(pal);
}
/***************************************************************************\
-* Metodi di RMFontParla
+* RMFontParla Methods
\****************************************************************************/
void RMFontParla::Init(void) {
int i;
- // bernie: numero di caratteri nel font
+ // bernie: Number of characters in the font
int nchars =
112 // base
+ 18 // polish
@@ -237,7 +235,7 @@ void RMFontParla::Init(void) {
Load(RES_F_PARL, nchars, 20, 20);
- // Inizializziamo le tabelline del cazzo
+ // Initialise the f**king table
lDefault = 13;
hDefault = 18;
Common::fill(&l2Table[0][0], &l2Table[0][0] + (256 * 256), '\0');
@@ -265,9 +263,9 @@ void RMFontParla::Init(void) {
cTable['<'] = 69;
cTable['>'] = 70;
cTable['!'] = 71;
- //cTable['!'] = 72; Esclamativo alla rovescia
+ //cTable['!'] = 72; Exclamation countdown
cTable['?'] = 73;
- //cTable['?'] = 74; Interrogativo alla rovescia
+ //cTable['?'] = 74; Question down
cTable['('] = 75;
cTable[')'] = 76;
cTable['\"'] = 77;
@@ -295,20 +293,20 @@ void RMFontParla::Init(void) {
cTable[(byte)'ü'] = 97;
cTable[(byte)'ÿ'] = 98;
cTable[(byte)'å'] = 99;
- //cTable[' '] = 100; e cerchietto
- //cTable[' '] = 101; i cerchietto
- //cTable[' '] = 102; o cerchietto
- //cTable[' '] = 103; u cerchietto
+ //cTable[' '] = 100; e circlet
+ //cTable[' '] = 101; i circlet
+ //cTable[' '] = 102; o circlet
+ //cTable[' '] = 103; u circlet
cTable[(byte)'ñ'] = 104;
cTable[(byte)'Ñ'] = 105;
cTable[(byte)'ç'] = 106;
cTable[(byte)'æ'] = 107;
cTable[(byte)'Æ'] = 108;
cTable[(byte)'ø'] = 109;
- //cTable['ƒ'] = 110; integrale
+ //cTable['ƒ'] = 110; integral
cTable['\''] = 111;
- // Un po' di lunghezze
+ // Little lengths
lTable[' '] = 9;
lTable['\''] = 5;
lTable['.'] = 5;
@@ -387,9 +385,9 @@ void RMFontParla::Init(void) {
} else if (_vm->getLanguage() == Common::RU_RUS) {
// Russian Characters
- // WARNING: Il russo usa molti dei caratteri ISO-Latin-1 che servono
- // per le altre traduzioni. Per compilare Tony in altre lingue,
- // commentare via queste definizioni.
+ // WARNING: The Russian font uses many of the ISO-Latin-1 font,
+ // allowing for further translations. To support Tonyin other langauges,
+ // these mappings could be used as a basis
cTable[(byte)'À'] = 130;
cTable[(byte)'Á'] = 131;
@@ -627,13 +625,13 @@ void RMFontParla::Init(void) {
/***************************************************************************\
-* Metodi di RMFontMacc
+* RMFontMacc Methods
\****************************************************************************/
void RMFontMacc::Init(void) {
int i;
- // bernie: numero di caratteri nel font
+ // bernie: Number of characters in the font
int nchars =
102 // base
+ 18 // polish
@@ -693,16 +691,16 @@ void RMFontMacc::Init(void) {
cTable[(byte)'å'] = 88;
cTable[(byte)'è'] = 89;
cTable[(byte)'ë'] = 90;
- //cTable[(byte)''] = 91; // e col pallino
+ //cTable[(byte)''] = 91; // e with ball
cTable[(byte)'ì'] = 92;
cTable[(byte)'ï'] = 93;
- //cTable[(byte)''] = 94; // i col pallino
+ //cTable[(byte)''] = 94; // i with ball
cTable[(byte)'ò'] = 95;
cTable[(byte)'ö'] = 96;
- //cTable[(byte)''] = 97; // o col pallino
+ //cTable[(byte)''] = 97; // o with ball
cTable[(byte)'ù'] = 98;
cTable[(byte)'ü'] = 99;
- //cTable[(byte)''] = 100; // u col pallino
+ //cTable[(byte)''] = 100; // u with ball
cTable[(byte)'ç'] = 101;
if (_vm->getLanguage() == Common::PL_POL) {
@@ -750,10 +748,9 @@ void RMFontMacc::Init(void) {
} else if (_vm->getLanguage() == Common::RU_RUS) {
// Russian Characters
- // WARNING: Il russo usa molti dei caratteri ISO-Latin-1 che servono
- // per le altre traduzioni. Per compilare Tony in altre lingue,
- // commentare via queste definizioni.
-
+ // WARNING: The Russian font uses many of the ISO-Latin-1 font,
+ // allowing for further translations. To support Tonyin other langauges,
+ // these mappings could be used as a basis
cTable[(byte)'À'] = 120;
cTable[(byte)'Á'] = 121;
cTable[(byte)'Â'] = 122;
@@ -992,13 +989,13 @@ void RMFontMacc::Init(void) {
}
/***************************************************************************\
-* Metodi di RMFontCredits
+* RMFontCredits Methods
\****************************************************************************/
void RMFontCredits::Init(void) {
int i;
- // bernie: numero di caratteri nel font
+ // bernie: Number of characters in the font
int nchars =
112 // base
+ 18 // polish
@@ -1200,12 +1197,10 @@ void RMFontCredits::Init(void) {
lTable[(byte)'Ÿ'] = 10;
} else if (_vm->getLanguage() == Common::RU_RUS) {
-
// Russian Characters
- // WARNING: Il russo usa molti dei caratteri ISO-Latin-1 che servono
- // per le altre traduzioni. Per compilare Tony in altre lingue,
- // commentare via queste definizioni.
-
+ // WARNING: The Russian font uses many of the ISO-Latin-1 font,
+ // allowing for further translations. To support Tonyin other langauges,
+ // these mappings could be used as a basis
cTable[(byte)'À'] = 130;
cTable[(byte)'Á'] = 131;
cTable[(byte)'Â'] = 132;
@@ -1465,7 +1460,7 @@ void RMFontObj::SetBothCase(int nChar, int nNext, signed char spiazz) {
void RMFontObj::Init(void) {
int i;
- //bernie: numero di caratteri nel font (solo maiuscolo)
+ //bernie: Number of characters in the font (solo maiuscolo)
int nchars =
85 // base
+ 9 // polish
@@ -1477,7 +1472,7 @@ void RMFontObj::Init(void) {
Load(RES_F_OBJ, nchars, 25, 30);
- // Inizializziamo le tabelline del cazzo
+ // Initialise the f**king table
lDefault = 26;
hDefault = 30;
Common::fill(&l2Table[0][0], &l2Table[0][0] + (256 * 256), '\0');
@@ -1502,7 +1497,7 @@ void RMFontObj::Init(void) {
cTable['-'] = 40;
cTable['+'] = 41;
cTable['!'] = 42;
- // cTable['!'] = 43; Esclamativo alla rovescia
+ // cTable['!'] = 43; Exclamation countdown
cTable['?'] = 44;
//cTable['?'] = 45; Interrogativo alla rovescia
cTable['/'] = 46;
@@ -1523,7 +1518,7 @@ void RMFontObj::Init(void) {
cTable[(byte)'»'] = 61;
cTable[(byte)'ø'] = 62;
cTable[(byte)'ç'] = 63;
- //cTable[(byte)'ƒ'] = 64; integrale
+ //cTable[(byte)'ƒ'] = 64; integral
cTable[(byte)'Ñ'] = 65;
cTable[(byte)'®'] = 66;
cTable[(byte)'©'] = 67;
@@ -1533,19 +1528,19 @@ void RMFontObj::Init(void) {
cTable[(byte)'Å'] = 71;
cTable[(byte)'È'] = 72;
cTable[(byte)'Ë'] = 73;
- //cTable[(byte)' '] = 74; e cerchietto
+ //cTable[(byte)' '] = 74; e circlet
cTable[(byte)'Ì'] = 75;
cTable[(byte)'Ï'] = 76;
- //cTable[(byte)' '] = 77; i cerchietto
+ //cTable[(byte)' '] = 77; i circlet
cTable[(byte)'Ò'] = 78;
cTable[(byte)'Ö'] = cTable[(byte)'ö'] = 79;
- //cTable[(byte)' '] = 80; o cerchietto
+ //cTable[(byte)' '] = 80; o circlet
cTable[(byte)'Ù'] = 81;
cTable[(byte)'Ü'] = cTable[(byte)'ü'] = 82;
- //cTable[' '] = 83; u cerchietto
+ //cTable[' '] = 83; u circlet
//cTable[' '] = 84; y dieresi
- /* Un po' di lunghezze */
+ /* Little lengths */
lTable[' '] = 11;
lTable['.'] = 8;
lTable['-'] = 12;
@@ -1635,9 +1630,9 @@ void RMFontObj::Init(void) {
} else if (_vm->getLanguage() == Common::RU_RUS) {
// Russian Characters
- // WARNING: Il russo usa molti dei caratteri ISO-Latin-1 che servono
- // per le altre traduzioni. Per compilare Tony in altre lingue,
- // commentare via queste definizioni.
+ // WARNING: The Russian font uses many of the ISO-Latin-1 font,
+ // allowing for further translations. To support Tonyin other langauges,
+ // these mappings could be used as a basis
cTable[(byte)'¥'] = cTable[(byte)'¹'] = 85;
lTable[(byte)'¥'] = lTable[(byte)'¹'] = 20;
@@ -1749,7 +1744,7 @@ void RMFontObj::Init(void) {
} else if (_vm->getLanguage() == Common::FR_FRA) {
// French
- // traduci le lettere accentate in lettere normali
+ // Translate accented characters as normal letters
cTable[(byte)'à'] = cTable[(byte)'á'] = cTable[(byte)'â'] = 0; // a
lTable[(byte)'à'] = lTable[(byte)'á'] = lTable[(byte)'â'] = 17;
@@ -1778,7 +1773,7 @@ void RMFontObj::Init(void) {
/****************************************************************************\
-* Metodi di RMText
+* RMText Methods
\****************************************************************************/
RMFontColor *RMText::m_fonts[4] = { NULL, NULL, NULL, NULL };
@@ -1789,10 +1784,10 @@ void RMText::InitStatics() {
}
RMText::RMText() {
- // Colore di default: bianco
+ // Default colour: white
m_r = m_g = m_b = 255;
- // Lunghezza di default
+ // Default length
maxLineLength = 350;
m_bTrasp0 = true;
@@ -1820,14 +1815,13 @@ void RMText::SetMaxLineLength(int max) {
}
void RMText::RemoveThis(CORO_PARAM, bool &result) {
-// Qui possiamo fare i controlli sul numero di frame, sul tempo trascorso
-// etc.
+ // Here we can do checks on the number of frames, time spent, etc.
result = true;
}
void RMText::WriteText(const RMString &text, int nFont, int *time) {
- // Inizializza i font (una volta sola)
+ // Initialises the font (only once)
if (m_fonts[0] == NULL) {
m_fonts[0] = new RMFontParla;
m_fonts[0]->Init();
@@ -1853,18 +1847,18 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
char *string;
int numlines;
- // Setta il colore di base
+ // Set the base colour
font->SetBaseColor(m_r, m_g, m_b);
- // Si autodistrugge il buffer prima di iniziare
+ // Destroy the buffer before starting
Destroy();
- // Se la stringa è vuota, non fare nulla
+ // If the string is empty, do nothing
if (text == NULL || text[0] == '\0')
return;
- // Divide la frase in linee. In questo ciclo, X contiene la lunghezza massima raggiunta da una linea
- // e I il numero delle linee
+ // Divide the words into lines. In this cycle, X contains the maximum length reached by a line,
+ // and the number of lines
string = p = text;
i = j = x = 0;
while (*p != '\0') {
@@ -1873,14 +1867,11 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
j -= font->StringLen(*p, p[1]);
if (j > x) x = j;
- // Torna indietro al primo spazio utile
+ // Back to the first usable space
//
- // BERNIE: nella versione originale le frasi contenenti
- // parole che superano la larghezza di una riga causavano
- // l'interruzione dell'intera frase.
- // Questo workaround e' parziale: la parola troppo lunga
- // viene spezzata bruscamente e si perde una lettera.
- // Oltre allo spazio e' ammesso il wrap sul carattere '-'.
+ // BERNIE: In the original, sentences containing words that exceed the
+ // width of a line caused discontinuation of the whole sentence.
+ // This workaround has the partial word broken up so it will still display
//
old_p = p;
while (*p != ' ' && *p != '-' && p > string) p--;
@@ -1888,7 +1879,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
if (p == string)
p = old_p;
- // Controlla se sono tutti spazi fino alla fine
+ // Check if there are any blanks to end
while (*p == ' ' && *p != '\0') p++;
if (*p == '\0')
break;
@@ -1905,15 +1896,13 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
i++;
numlines = i;
- // X=Lunghezza della linea piu' lunga. Controlla se puo' essere puttata a X1
- //x+=font->StringLen(-1)+1; // Meglio esagerare per sicurezza
x += 8;
- // Posizione di partenza per la surface: X1,Y
+ // Starting position for the surface: X1, Y
width = x;
height = (numlines - 1) * font->LetterHeight() + font->m_fontDimy;
- // Crea la surface
+ // Create the surface
Create(width, height);
//AddPrim(new RMGfxPrimitive(&m_clear));
Common::fill(m_buf, m_buf + width * height * 2, 0);
@@ -1923,7 +1912,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
y = 0;
numchar = 0;
for (; i > 0; i--) {
- // Misura la lunghezza della linea
+ // Measure the length of the line
x = 0;
j = font->StringLen(RMString(p));
@@ -1974,7 +1963,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
}
void RMText::ClipOnScreen(RMGfxPrimitive *prim) {
- // Cerca di non farlo uscire dallo schermo
+ // Don't let it go outside the screen
if (prim->Dst().x1 < 5) prim->Dst().x1 = 5;
if (prim->Dst().y1 < 5) prim->Dst().y1 = 5;
if (prim->Dst().x1 + m_dimx > 635) prim->Dst().x1 = 635 - m_dimx;
@@ -1986,14 +1975,14 @@ void RMText::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- // Allinea orizzontalmente
+ // Horizontally
if (aHorType == HCENTER)
prim->Dst().TopLeft() -= RMPoint(m_dimx / 2, 0);
else if (aHorType == HRIGHT)
prim->Dst().TopLeft() -= RMPoint(m_dimx, 0);
- // Alinea verticalemente
+ // Vertically
if (aVerType == VTOP) {
} else if (aVerType == VCENTER) {
@@ -2011,7 +2000,7 @@ void RMText::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
}
/****************************************************************************\
-* Metodi di RMTextDialog
+* RMTextDialog Methods
\****************************************************************************/
RMTextDialog::RMTextDialog() : RMText() {
@@ -2028,7 +2017,7 @@ RMTextDialog::RMTextDialog() : RMText() {
hCustomSkip2 = CORO_INVALID_PID_VALUE;
m_input = NULL;
- // Crea l'evento di fine displaying
+ // Create the event for displaying the end
hEndDisplay = CoroScheduler.createEvent(false, false);
}
@@ -2093,7 +2082,7 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
// Presume successful result
result = true;
- // Frase NON di background
+ // Don't erase the background
if (m_bSkipStatus) {
if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE))
if (GLOBALS.bCfgTimerizedText) {
@@ -2111,7 +2100,7 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
if (m_input->MouseLeftClicked() || m_input->MouseRightClicked())
return;
}
- // Frase di background
+ // Erase the background
else {
if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE))
if (!m_bForceNoTime)
@@ -2119,7 +2108,7 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
return;
}
- // Se il tempo è forzato
+ // If time is forced
if (m_bForceTime)
if (_vm->GetTime() > (uint32)m_time + m_startTime)
return;
@@ -2185,7 +2174,7 @@ void RMTextDialog::SetInput(RMInput *input) {
}
/****************************************************************************\
-* Metodi di RMTextDialogScrolling
+* RMTextDialogScrolling Methods
\****************************************************************************/
RMTextDialogScrolling::RMTextDialogScrolling() {
@@ -2298,7 +2287,7 @@ void RMTextItemName::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
if (m_buf == NULL)
return;
- // Setta come coordinate destinazione quelle del mouse
+ // Set the destination coordinates of the mouse
prim->Dst().TopLeft() = m_mpos - RMPoint(0, 30);
CORO_INVOKE_2(RMText::Draw, bigBuf, prim);
@@ -2327,7 +2316,7 @@ bool RMTextItemName::IsNormalItemSelected() {
/****************************************************************************\
-* Metodi di RMDialogChoice
+* RMDialogChoice Methods
\****************************************************************************/
RMDialogChoice::RMDialogChoice() {
@@ -2388,11 +2377,11 @@ void RMDialogChoice::SetNumChoices(int num) {
m_numChoices = num;
m_curAdded = 0;
- // Alloca lo spazio per le stringhe disegnate
+ // Allocate space for drawn strings
m_drawedStrings = new RMText[num];
m_ptDrawStrings = new RMPoint[num];
- // Le inizializza
+ // Initialisation
for (i = 0; i < m_numChoices; i++) {
m_drawedStrings[i].SetColor(0, 255, 0);
m_drawedStrings[i].SetAlignType(RMText::HLEFTPAR, RMText::VTOP);
@@ -2402,7 +2391,7 @@ void RMDialogChoice::SetNumChoices(int num) {
}
void RMDialogChoice::AddChoice(const RMString &string) {
- // Si disegna la stringa
+ // Draw the string
assert(m_curAdded < m_numChoices);
m_drawedStrings[m_curAdded++].WriteText(string, 0);
}
diff --git a/engines/tony/font.h b/engines/tony/font.h
index dab07b79b3..b7488399a4 100644
--- a/engines/tony/font.h
+++ b/engines/tony/font.h
@@ -43,7 +43,7 @@ class RMLocation;
class RMPointer;
/**
- * Gestisce un font, in cui ha varie surface per ogni lettera
+ * Manages a font, in which there is a different surface for each letter
*/
class RMFont : public RMGfxTaskSetPrior {
protected:
@@ -68,18 +68,18 @@ private:
};
protected:
- // Caricamento del font
+ // Loads the font
void Load(uint32 resID, int nChars, int dimx, int dimy, uint32 palResID = RES_F_PAL);
void Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palResID = RES_F_PAL);
- // Scaricamente del font (anche da distruttore)
+ // Remove the font
void Unload(void);
protected:
- // Conversione (da overloadare)
+ // Conversion form character to font index
virtual int ConvertToLetter(byte nChar) = 0;
- // Lunghezza dei caratteri (da overloadare)
+ // Character width
virtual int LetterLength(byte nChar, byte nNext = 0) = 0;
public:
@@ -89,17 +89,17 @@ public:
RMFont();
virtual ~RMFont();
- // Inizializzazione e chiusura
+ // Initialisation and closing
virtual void Init(void) = 0;
virtual void Close(void);
- // Funzione del task da overloadare
+ // Drawing
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBug, RMGfxPrimitive *prim);
- // Crea una primitiva per una lettera
+ // Create a primitive for a letter
RMGfxPrimitive *MakeLetterPrimitive(byte bChar, int &nLength);
- // Lunghezza in pixel di una stringa con il font corrente
+ // Length in pixels of a string with the current font
int StringLen(const RMString &text);
int StringLen(char bChar, char bNext = 0);
};
@@ -125,7 +125,7 @@ protected:
signed char l2Table[256][256];
protected:
- // Overload dei metodi
+ // Overloaded methods
int ConvertToLetter(byte nChar) {
return cTable[nChar];
}
@@ -170,7 +170,7 @@ public:
};
/**
- * Gestisce una scritta su schermo, con tutte le possibilita' di formattazione disponibile
+ * Manages writing text onto9 the screen
*/
class RMText : public RMGfxWoodyBuffer {
private:
@@ -206,27 +206,26 @@ public:
static void InitStatics();
static void Unload();
- // Setta il tipo di allineamento
+ // Set the alignment type
void SetAlignType(HORALIGN aHor, VERALIGN aVer) {
aHorType = aHor;
aVerType = aVer;
}
- // Setta la lunghezza massima di una linea in pixel (utilizzato per formattare il testo)
+ // Sets the maximum length of a line in pixels (used to format the text)
void SetMaxLineLength(int max);
- // Scrive un testo
+ // Write the text
void WriteText(const RMString &text, int font, int *time = NULL);
void WriteText(const RMString &text, RMFontColor *font, int *time = NULL);
- // Overloading della funzione ereditata da RMGfxTask per decidere
- // quando eliminare un oggetto dalla OTLIST
+ // Overloaded function to decide when you delete the object from the OT list
virtual void RemoveThis(CORO_PARAM, bool &result);
- // Overloading del Draw per centrare la scritta, se necessario
+ // Overloading of the Draw to center the text, if necessary
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- // Setta il colore di base
+ // Set the base colour
void SetColor(byte r, byte g, byte b) {
m_r = r;
m_g = g;
@@ -235,7 +234,7 @@ public:
};
/**
- * Gestisce il testo di un dialogo
+ * Manages text in a dialog
*/
class RMTextDialog : public RMText {
protected:
@@ -257,27 +256,25 @@ public:
RMTextDialog();
virtual ~RMTextDialog();
- // Scrive un testo
+ // Write the text
void WriteText(const RMString &text, int font, int *time = NULL);
void WriteText(const RMString &text, RMFontColor *font, int *time = NULL);
- // Overloading della funzione ereditata da RMGfxTask per decidere
- // quando eliminare un oggetto dalla OTLIST
+ // Overloaded function to decide when you delete the object from the OT list
virtual void RemoveThis(CORO_PARAM, bool &result);
- // Overloading della funzione di deregistrazione, utilizzata per capire
- // quando ci leviamo di torno
+ // Overloaded de-registration
virtual void Unregister(void);
- // Overloading del Draw per centrare la scritta, se necessario
+ // Overloading of the Draw to center the text, if necessary
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- // Setta la posizione
+ // Set the position
void SetPosition(const RMPoint &pt) {
dst = pt;
}
- // Aspetta che venga finita la visualizzazione
+ // Waiting
void WaitForEndDisplay(CORO_PARAM);
void SetCustomSkipHandle(uint32 hCustomSkip);
void SetCustomSkipHandle2(uint32 hCustomSkip);
@@ -288,7 +285,7 @@ public:
void ForceNoTime(void);
void SetAlwaysDisplay(void);
- // Setta il dispositivo di input, per permettere skip da mouse
+ // Set the input device, to allow skip from mouse
void SetInput(RMInput *input);
void Show(void);
@@ -311,12 +308,9 @@ public:
};
-/****************************************************************************\
-* class RMTextItemName
-* --------------------
-* Description: Gestisce il nome dell'oggetto selezionato su schermo
-\****************************************************************************/
-
+/**
+ * Manages the name of a selected item on the screen
+ */
class RMTextItemName : protected RMText {
protected:
RMPoint m_mpos;
@@ -373,31 +367,30 @@ public:
void Unregister(void);
public:
- // Inizializzazione
+ // Initialisation
RMDialogChoice();
virtual ~RMDialogChoice();
- // Inizializzazione e chiusura
+ // Initialisation and closure
void Init(void);
void Close(void);
- // Setta il numero delle frasi possibili, che dovranno essere poi aggiunte
- // con AddChoice()
+ // Sets the number of possible sentences, which then be added with AddChoice()
void SetNumChoices(int num);
- // Aggiunge una stringa con la scelta
+ // Adds a string with the choice
void AddChoice(const RMString &string);
- // Mostra e nasconde la scelta, con eventuali animazioni
- // NOTA: Se non viene passato parametro alla Show(), è obbligo del
- // chiamante assicurarsi che la classe venga inserita alla OTlist
+ // Show and hide the selection, with possible animations.
+ // NOTE: If no parameter is passed to Show(), it is the obligation of
+ // caller to ensure that the class is inserted into OT list
void Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf = NULL);
void Hide(CORO_PARAM);
- // Polling di aggiornamento
+ // Polling Update
void DoFrame(CORO_PARAM, RMPoint ptMousePos);
- // Ritorna la voce attualmente selezionata, o -1 se nessuna è selezionata
+ // Returns the currently selected item, or -1 if none is selected
int GetSelection(void);
};
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 3551f55c83..4fe1ea374e 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -43,7 +43,7 @@ namespace Tony {
using namespace MPAL;
/****************************************/
-/* Funzioni globali per la DLL Custom */
+/* Global functions */
/****************************************/
uint32 MainLoadLocation(int nLoc, RMPoint pt, RMPoint start) {
@@ -119,7 +119,7 @@ void MainSetPalesati(bool bPalesati) {
}
/****************************************************************************\
-* Metodi di RMOptionButton
+* RMOptionButton Methods
\****************************************************************************/
RMOptionButton::RMOptionButton(uint32 dwRes, RMPoint pt, bool bDoubleState) {
@@ -192,7 +192,7 @@ void RMOptionButton::AddToList(RMGfxTargetBuffer &bigBuf) {
}
/****************************************************************************\
-* Metodi di RMOptionSlide
+* RMOptionSlide Methods
\****************************************************************************/
RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int slideSize) {
@@ -240,7 +240,7 @@ RMOptionSlide::~RMOptionSlide() {
bool RMOptionSlide::DoFrame(const RMPoint &mousePos, bool bLeftClick, bool bRightClick) {
bool bRefresh = false;
- // Doframe dei bottoni
+ // Do the button DoFrame's
m_PushLeft->DoFrame(mousePos, bLeftClick, bRightClick);
m_PushRight->DoFrame(mousePos, bLeftClick, bRightClick);
@@ -317,7 +317,7 @@ void RMOptionSlide::AddToList(RMGfxTargetBuffer &bigBuf) {
/****************************************************************************\
-* Metodi di RMOptionScreen
+* RMOptionScreen Methods
\****************************************************************************/
RMOptionScreen::RMOptionScreen(void) {
@@ -983,7 +983,7 @@ bool RMOptionScreen::Close(void) {
if (m_FadeStep != 6)
return false;
- // Inizia il fade out
+ // Start fade out
m_FadeStep++;
m_FadeTime = _vm->GetTime();
return true;
@@ -994,7 +994,7 @@ bool RMOptionScreen::IsClosing(void) {
}
int RMOptionScreen::Priority() {
- // Appena sotto il mouse
+ // Just below the mouse
return 190;
}
@@ -1023,11 +1023,11 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
CORO_BEGIN_CODE(_ctx);
- // Se non è completamente aperto, non fare nulla
+ // If it is fully open, do nothing
if (m_FadeStep != 6)
return;
- // Legge l'input
+ // Reads input
_ctx->mousePos = input->MousePos();
_ctx->bLeftClick = input->MouseLeftClicked();
_ctx->bRightClick = input->MouseRightClicked();
@@ -1040,14 +1040,14 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
} else {
_ctx->bRefresh |= m_ButtonExit->DoFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
- // Controlla se ha clickato sull'uscita
+ // Check if you have clicked on the output
if (m_nState == MENUGAME || m_nState == MENUGFX || m_nState == MENUSOUND) {
- // bottoni senza grafica...
+ // Buttons without graphics...
m_ButtonGameMenu->DoFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
m_ButtonGfxMenu->DoFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
m_ButtonSoundMenu->DoFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
- // bottoni con grafica
+ // Buttons with graphics
if (!m_bNoLoadSave) {
if (!_vm->getIsDemo()) {
_ctx->bRefresh |= m_ButtonLoad->DoFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
@@ -1097,7 +1097,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
#define PROCESS_CHAR(cod,c) if (KEYPRESS(cod)) { \
m_EditName[strlen(m_EditName) +1 ] = '\0'; m_EditName[strlen(m_EditName)] = c; _ctx->bRefresh = true; }
- /**************** STATO BOTTONI **************/
+ /**************** State Buttons **************/
if (m_bEditSaveName) {
if (KEYPRESS(Common::KEYCODE_BACKSPACE)) {
if (m_EditName[0] != '\0') {
@@ -1141,7 +1141,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
if (strlen(m_EditName) < 12)
PROCESS_CHAR(Common::KEYCODE_KP9, '9');
- // ANNULLA
+ // Cancel
if (KEYPRESS(Common::KEYCODE_ESCAPE)) {
m_bEditSaveName = false;
_ctx->bRefresh = true;
@@ -1158,7 +1158,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
if (m_nState == MENULOAD || m_nState == MENUSAVE) {
if (m_ButtonExit->IsActive()) {
if (m_bLoadMenuOnly) {
- // Se è solo il menu di loading, chiudiamo
+ // If only the loading menu, close
Close();
} else {
CORO_INVOKE_1(ChangeState, m_nLastState);
@@ -1183,13 +1183,13 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
} else {
for (_ctx->i = 0; _ctx->i < 6; _ctx->i++)
if (m_ButtonSave_States[_ctx->i]->IsActive()) {
- // C'è da effettuare il salvataggio o il caricamento!!!!
+ // There by saving or loading!!!
if (m_nState == MENULOAD && m_curThumb[_ctx->i] != NULL) {
// Caricamento
CORO_INVOKE_1(_vm->LoadState, m_statePos + _ctx->i);
Close();
} else if (m_nState == MENUSAVE && (m_statePos != 0 || _ctx->i != 0)) {
- // Attiva la modalità di editing
+ // Turn on edit mode
m_bEditSaveName = true;
m_nEditPos = _ctx->i;
strcpy(m_EditName, m_curThumbName[_ctx->i]);
@@ -1241,7 +1241,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
}
if (m_nState == MENUGFX) {
- // Queste opzioni hanno effetto immediato
+ // These options take effect immediately
if (m_ButtonGfx_Anni30->IsActive())
GLOBALS.bCfgAnni30 = true;
else
@@ -1288,7 +1288,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
return;
if (m_FadeStep == 1) {
- // Discesa veloce
+ // Downhill fast
if (m_FadeTime == -1)
m_FadeY += FADE_SPEED;
else
@@ -1298,11 +1298,11 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeStep++;
}
- // Setta la parte da disegnare per lo scrolling
+ // Set the part to draw the scrolling
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 2) {
- // Rimbalzo 1
+ // Bounce 1
m_FadeY -= FADE_SPEED / 2 * SYNC;
if (m_FadeY < 400) {
m_FadeY = 400;
@@ -1321,7 +1321,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 4) {
- // Rimbalzo 1 - 2
+ // Bounce 1 - 2
m_FadeY += FADE_SPEED / 3 * SYNC;
if (m_FadeY > 420) {
m_FadeY = 420;
@@ -1357,11 +1357,11 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 9) {
- // Ciao ciao!
+ // Hello hello!
m_bExit = true;
m_FadeStep = 0;
- // Libera la memoria
+ // Free memory
CloseState();
return;
@@ -1391,7 +1391,7 @@ bool RMOptionScreen::LoadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
Common::InSaveFile *f;
char id[4];
- // Pulisce la destinazione
+ // Cleans the destination
Common::fill(lpDestBuf, lpDestBuf + 160 * 120 * 2, 0);
name = "No name";
diff = 10;
@@ -1463,7 +1463,7 @@ bool RMOptionScreen::LoadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
/****************************************************************************\
-* Metodi di RMPointer
+* RMPointer Methods
\****************************************************************************/
RMPointer::RMPointer() {
@@ -1525,7 +1525,7 @@ void RMPointer::Close(void) {
int RMPointer::Priority() {
- // Priorita' minima: davanti a tutto
+ // Pointer has minimum priority so it will be drawn last
return 200;
}
@@ -1536,15 +1536,15 @@ void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
CORO_BEGIN_CODE(_ctx);
- // Controlla il pointer
+ // Check the pointer
_ctx->n = m_nCurPointer;
if (_ctx->n == TA_COMBINE) _ctx->n = TA_USE;
- // Copia le coordinate di destinazione nella primitiva
+ // Copy the destination coordinates in the primitive
prim->SetDst(m_pos);
if (m_pos.x >= 0 && m_pos.y >= 0 && m_pos.x < RM_SX && m_pos.y < RM_SY) {
- // Richiama il draw del puntatore
+ // Call the Draw method of the poitner
prim->Dst() -= m_hotspot[_ctx->n];
if (m_nCurSpecialPointer == 0) {
@@ -1553,7 +1553,7 @@ void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
if (m_nCurSpecialPointer == PTR_CUSTOM)
CORO_INVOKE_2(m_nCurCustomPointer->Draw, bigBuf, prim);
else
- // Richiama il draw sul puntatore speciale
+ // Call the draw on the special pointer
CORO_INVOKE_2(m_specialPointer[m_nCurSpecialPointer - 1]->Draw, bigBuf, prim);
}
}
@@ -1562,16 +1562,16 @@ void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
}
void RMPointer::DoFrame(RMGfxTargetBuffer *bigBuf) {
- // Si aggiunge alla lista delle primitive
+ // Add it to the list of primitives
bigBuf->AddPrim(new RMGfxPrimitive(this));
- // Se c'e' un puntatore speciale, fa la DoFrame
+ // If there is a special pointer, does DoFrame
if (m_nCurSpecialPointer != 0 && m_nCurSpecialPointer != PTR_CUSTOM)
m_specialPointer[m_nCurSpecialPointer - 1]->DoFrame(bigBuf, false);
}
void RMPointer::RemoveThis(CORO_PARAM, bool &result) {
- // Si leva sempre dalla lista di OT, per supportare la DisableInput
+ // Always remove from the OT list, to support disabling the pointer
result = true;
}
diff --git a/engines/tony/game.h b/engines/tony/game.h
index 160637d9c2..532a457b8f 100644
--- a/engines/tony/game.h
+++ b/engines/tony/game.h
@@ -270,12 +270,12 @@ public:
bool Close();
bool IsClosing();
- // Metodi in overloading da RMGfxTask
- int Priority();
+ // Overloaded methods
+ virtual int Priority();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void RemoveThis(CORO_PARAM, bool &result);
- // Polling per l'option screen
+ // Polling for the option screen
void DoFrame(CORO_PARAM, RMInput *m_input);
// Retrieves a savegame's thumbnail, description, and difficulty level
@@ -288,10 +288,9 @@ protected:
void CloseState(void);
void ChangeState(CORO_PARAM, STATE newState);
- // Ridisegna tutto il menu delle opzioni
+ // Repaaint the options menu
void RefreshAll(CORO_PARAM);
void RefreshThumbnails(void);
-
};
} // End of namespace Tony
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index ae68860e79..8c992eb150 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -33,7 +33,7 @@
namespace Tony {
/****************************************************************************\
-* Metodi di RMGfxTask
+* RMGfxTask Methods
\****************************************************************************/
RMGfxTask::RMGfxTask() {
@@ -51,7 +51,7 @@ void RMGfxTask::RemoveThis(CORO_PARAM, bool &result) {
/****************************************************************************\
-* Metodi di RMGfxTaskSetPrior
+* RMGfxTaskSetPrior Methods
\****************************************************************************/
void RMGfxTaskSetPrior::SetPriority(int nPrior) {
@@ -60,7 +60,7 @@ void RMGfxTaskSetPrior::SetPriority(int nPrior) {
/****************************************************************************\
-* Metodi di RMGfxBuffer
+* RMGfxBuffer Methods
\****************************************************************************/
RMGfxBuffer::RMGfxBuffer() {
@@ -74,17 +74,17 @@ RMGfxBuffer::~RMGfxBuffer() {
}
void RMGfxBuffer::Create(int dimx, int dimy, int nBpp, bool bUseDDraw) {
- // Distruggi il buffer se esiste di gia'
+ // Destroy the buffer it is already exists
if (m_buf != NULL)
Destroy();
- // Copia i parametri nei membri privati
+ // Copy the parameters in the private members
m_dimx = dimx;
m_dimy = dimy;
m_bUseDDraw = bUseDDraw;
if (!m_bUseDDraw) {
- // Alloca il buffer
+ // Allocate a buffer
m_origBuf = m_buf = new byte[m_dimx * m_dimy * nBpp / 8];
assert(m_buf != NULL);
Common::fill(m_origBuf, m_origBuf + m_dimx * m_dimy * nBpp / 8, 0);
@@ -102,13 +102,13 @@ void RMGfxBuffer::Destroy(void) {
void RMGfxBuffer::Lock(void) {
if (m_bUseDDraw) {
- // Gestisce l'accelerazione
+ // Manages acceleration
}
}
void RMGfxBuffer::Unlock(void) {
if (m_bUseDDraw) {
- // Gestisce l'accelerazione
+ // Manages acceleration
}
}
@@ -130,26 +130,14 @@ RMGfxBuffer::RMGfxBuffer(int dimx, int dimy, int nBpp, bool bUseDDraw) {
}
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer
-\****************************************************************************/
-
-/****************************************************************************\
-*
-* Function:
-*
-* Description:
-*
-* Input:
-*
-* Return:
-*
+* RMGfxSourceBuffer Methods
\****************************************************************************/
int RMGfxSourceBuffer::Init(const byte *buf, int dimx, int dimy, bool bLoadPalette) {
Create(dimx, dimy, Bpp());
CopyMemory(m_buf, buf, dimx * dimy * Bpp() / 8);
- // Richiama la funzione di preparazione della surface (ereditata)
+ // Invokes the method for preparing the surface (inherited)
PrepareImage();
return dimx * dimy * Bpp() / 8;
@@ -160,7 +148,7 @@ void RMGfxSourceBuffer::Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPal
Create(dimx, dimy, Bpp());
ds.Read(m_buf, dimx * dimy * Bpp() / 8);
- // Richiama la funzione di preparazione della surface (ereditata)
+ // Invokes the method for preparing the surface (inherited)
PrepareImage();
}
@@ -168,7 +156,7 @@ RMGfxSourceBuffer::~RMGfxSourceBuffer() {
}
void RMGfxSourceBuffer::PrepareImage(void) {
- // Non fa nulla: puo' essere overloadata se necessaria
+ // Do nothing. Can be overloaded if necessary
}
bool RMGfxSourceBuffer::Clip2D(int &x1, int &y1, int &u, int &v, int &width, int &height, bool bUseSrc, RMGfxTargetBuffer *buf) {
@@ -226,23 +214,20 @@ bool RMGfxSourceBuffer::Clip2D(int &x1, int &y1, int &u, int &v, int &width, int
return true;
}
-/****************************************************************************\
-*
-* Function: void RMGfxSourceBuffer::Init(uint32 resID, int dimx, int dimy);
-*
-* Description: Carica una surface partendo dall'ID della risorsa
-*
-* Input: uint32 resID ID della risorsa
-* int dimx, dimy Dimensione del buffer
-*
-\****************************************************************************/
-int RMGfxSourceBuffer::Init(uint32 resID, int dimx, int dimy, bool bLoadPalette) {
+/**
+ * Initialises a surface by resource Id
+ *
+ * @param resID Resource ID
+ * @param dimx Buffer X dimension
+ * @param dimy Buffer Y dimension
+ */
+ int RMGfxSourceBuffer::Init(uint32 resID, int dimx, int dimy, bool bLoadPalette) {
return Init(RMRes(resID), dimx, dimy, bLoadPalette);
}
/****************************************************************************\
-* Metodi di RMGfxWoodyBuffer
+* RMGfxWoodyBuffer Methods
\****************************************************************************/
RMGfxWoodyBuffer::~RMGfxWoodyBuffer() {
@@ -255,10 +240,10 @@ void RMGfxWoodyBuffer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitiv
CORO_BEGIN_CODE(_ctx);
- // Prima si fa disegnare tramite la propria OT list
+ // Draw the OT list
CORO_INVOKE_0(DrawOT);
- // Poi disegna se stesso nel target buffer
+ // Draw itself into the target buffer
CORO_INVOKE_2(RMGfxSourceBuffer16::Draw, bigBuf, prim);
CORO_END_CODE;
@@ -275,7 +260,7 @@ RMGfxWoodyBuffer::RMGfxWoodyBuffer(int dimx, int dimy, bool bUseDDraw)
/****************************************************************************\
-* Metodi di RMGfxTargetBuffer
+* RMGfxTargetBuffer Methods
\****************************************************************************/
RMGfxClearTask RMGfxTargetBuffer::taskClear;
@@ -325,37 +310,37 @@ void RMGfxTargetBuffer::DrawOT(CORO_PARAM) {
_ctx->prev = NULL;
_ctx->cur = otlist;
- // Lock del buffer per accederci
+ // Lock the buffer to access it
Lock();
// g_system->lockMutex(csModifyingOT);
while (_ctx->cur != NULL) {
- // Richiama la draw sul task, passandogli una copia della primitiva
+ // Call the task Draw method, passing it a copy of the original
_ctx->myprim = _ctx->cur->prim->Duplicate();
CORO_INVOKE_2(_ctx->cur->prim->m_task->Draw, *this, _ctx->myprim);
delete _ctx->myprim;
- // Controlla se e' arrivato il momento di rimuovere il task dalla OTlist
+ // Check if it's time to remove the task from the OT list
CORO_INVOKE_1(_ctx->cur->prim->m_task->RemoveThis, _ctx->result);
if (_ctx->result) {
- // Deregistra il task
+ // De-register the task
_ctx->cur->prim->m_task->Unregister();
- // Cancella il task liberando la memoria
+ // Delete task, freeing the memory
delete _ctx->cur->prim;
_ctx->next = _ctx->cur->next;
delete _ctx->cur;
- // Se era il primo elemento, aggiorna la testa della lista
+ // If it was the first item, update the list head
if (_ctx->prev == NULL)
otlist = _ctx->next;
- // Altrimenti aggiorna il puntatore al successivo dell'elemento precedente
+ // Otherwise update the next pinter of the previous item
else
_ctx->prev->next = _ctx->next;
_ctx->cur = _ctx->next;
} else {
- // Aggiorna il puntatore al precedente e scorre la lista
+ // Update the pointer to the previous item, and the current to the next
_ctx->prev = _ctx->cur;
_ctx->cur = _ctx->cur->next;
}
@@ -363,7 +348,7 @@ void RMGfxTargetBuffer::DrawOT(CORO_PARAM) {
// g_system->unlockMutex(csModifyingOT);
- // Unlock dopo la scrittura
+ //Unlock after writing
Unlock();
CORO_END_CODE;
@@ -375,19 +360,19 @@ void RMGfxTargetBuffer::AddPrim(RMGfxPrimitive *prim) {
// g_system->lockMutex(csModifyingOT);
- // Avverte che e' in lista di OT
+ // Warn of the OT listing
prim->m_task->Register();
- // Controlla la sua priorita'
+ // Check the priority
nPrior = prim->m_task->Priority();
n = new OTList(prim);
- // Lista vuota
+ // Empty list
if (otlist == NULL) {
otlist = n;
otlist->next = NULL;
}
- // Inserimento in testa
+ // Inclusion in the head
else if (nPrior < otlist->prim->m_task->Priority()) {
n->next = otlist;
otlist = n;
@@ -409,7 +394,7 @@ void RMGfxTargetBuffer::AddClearTask(void) {
/****************************************************************************\
-* Metodi di RMGfxSourceBufferPal
+* RMGfxSourceBufferPal Methods
\****************************************************************************/
RMGfxSourceBufferPal::~RMGfxSourceBufferPal() {
@@ -458,10 +443,10 @@ void RMGfxSourceBufferPal::PreparePalette(void) {
int RMGfxSourceBufferPal::Init(const byte *buf, int dimx, int dimy, bool bLoadPalette) {
int read;
- // Carica l'immagine RAW
+ // Load the RAW image
read = RMGfxSourceBuffer::Init(buf, dimx, dimy);
- // Carica la palette se necessario
+ // Load the palette if necessary
if (bLoadPalette)
read += LoadPaletteWA(&buf[read]);
@@ -469,10 +454,10 @@ int RMGfxSourceBufferPal::Init(const byte *buf, int dimx, int dimy, bool bLoadPa
}
void RMGfxSourceBufferPal::Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette) {
- // Carica l'immagine RAW
+ // Load the RAW image
RMGfxSourceBuffer::Init(ds, dimx, dimy);
- // Carica la palette se necessario
+ // Load the palette if necessary
if (bLoadPalette) {
byte *suxpal = new byte[256 * 3];
ds.Read(suxpal, 256 * 3);
@@ -490,7 +475,7 @@ int RMGfxSourceBufferPal::LoadPaletteWA(uint32 resID, bool bSwapped) {
}
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer4
+* RMGfxSourceBuffer4 Methods
\****************************************************************************/
void RMGfxSourceBuffer4::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
@@ -501,16 +486,12 @@ RMGfxSourceBuffer4::RMGfxSourceBuffer4(int dimx, int dimy, bool bUseDDraw)
SetPriority(0);
}
-/****************************************************************************\
-*
-* Function: int RMGfxSourceBuffer4::Bpp();
-*
-* Description: Ritorna il numero di bit per pixel della surface
-*
-* Return: Bit per pixel
-*
-\****************************************************************************/
+/**
+ * Returns the number of bits per pixel of the surface
+ *
+ * @returns Bit per pixel
+ */
int RMGfxSourceBuffer4::Bpp() {
return 4;
}
@@ -520,7 +501,7 @@ void RMGfxSourceBuffer4::Create(int dimx, int dimy, bool bUseDDraw) {
}
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8
+* RMGfxSourceBuffer8 Methods
\****************************************************************************/
RMGfxSourceBuffer8::~RMGfxSourceBuffer8() {
@@ -533,12 +514,12 @@ void RMGfxSourceBuffer8::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimit
uint16 *buf = bigBuf;
byte *raw = m_buf;
- // Destination nel buffer
+ // Destination buffer
RMRect dst;
if (prim->HaveDst())
dst = prim->Dst();
- // Esegue il clip
+ // Clipping
if (prim->HaveSrc()) {
u = prim->Src().x1;
v = prim->Src().y1;
@@ -550,10 +531,10 @@ void RMGfxSourceBuffer8::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimit
if (!Clip2D(dst.x1, dst.y1, u, v, width, height, prim->HaveSrc(), &bigBuf))
return;
- // Offset iniziale nel buffer
+ // Starting offset into the buffer
buf += dst.y1 * bufx + dst.x1;
- // Passaggio normale
+ // Normal step
if (m_bTrasp0) {
for (y = 0; y < height; y++) {
raw = m_buf + (y + v) * m_dimx + u;
@@ -593,16 +574,11 @@ RMGfxSourceBuffer8::RMGfxSourceBuffer8(bool bTrasp0) {
}
-/****************************************************************************\
-*
-* Function: int RMGfxSourceBuffer8::Bpp();
-*
-* Description: Ritorna il numero di bit per pixel della surface
-*
-* Return: Bit per pixel
-*
-\****************************************************************************/
-
+/**
+ * Returns the number of bits per pixel of the surface
+ *
+ * @returns Bit per pixel
+ */
int RMGfxSourceBuffer8::Bpp() {
return 8;
}
@@ -617,7 +593,7 @@ void RMGfxSourceBuffer8::Create(int dimx, int dimy, bool bUseDDraw) {
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8AB
+* RMGfxSourceBuffer8AB Methods
\****************************************************************************/
RMGfxSourceBuffer8AB::~RMGfxSourceBuffer8AB() {
@@ -645,12 +621,12 @@ void RMGfxSourceBuffer8AB::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
uint16 *buf = bigBuf;
byte *raw = m_buf;
- // Destination nel buffer
+ // Destination buffer
RMRect dst;
if (prim->HaveDst())
dst = prim->Dst();
- // Esegue il clip
+ // Clipping
if (prim->HaveSrc()) {
u = prim->Src().x1;
v = prim->Src().y1;
@@ -662,7 +638,7 @@ void RMGfxSourceBuffer8AB::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
if (!Clip2D(dst.x1, dst.y1, u, v, width, height, prim->HaveSrc(), &bigBuf))
return;
- // Offset iniziale nel buffer
+ // Starting offset into the buffer
buf += dst.y1 * bufx + dst.x1;
// Passaggio normale
@@ -700,7 +676,7 @@ void RMGfxSourceBuffer8AB::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8RLE
+* RMGfxSourceBuffer8RLE Methods
\****************************************************************************/
byte RMGfxSourceBuffer8RLE::MegaRLEBuf[512 * 1024];
@@ -743,10 +719,10 @@ void RMGfxSourceBuffer8RLE::Init(RMDataStream &ds, int dimx, int dimy, bool bLoa
}
void RMGfxSourceBuffer8RLE::PreparePalette(void) {
- // Richiama il metodo padre
+ // Invoke the parent method
RMGfxSourceBuffer8::PreparePalette();
- // Si salva gli RGB di alpha blending
+ // Handle RGB alpha blending
if (alphaBlendColor != -1) {
alphaR = (m_palFinal[alphaBlendColor] >> 10) & 0x1F;
alphaG = (m_palFinal[alphaBlendColor] >> 5) & 0x1F;
@@ -755,10 +731,10 @@ void RMGfxSourceBuffer8RLE::PreparePalette(void) {
}
void RMGfxSourceBuffer8RLE::PrepareImage(void) {
- // Richiama il metodo padre
+ // Invoke the parent method
RMGfxSourceBuffer::PrepareImage();
- // Comprime
+ // Compress
CompressRLE();
}
@@ -776,17 +752,17 @@ void RMGfxSourceBuffer8RLE::CompressRLE(void) {
byte *startsrc;
int rep;
- // Esegue la compressione RLE, per linee
+ // Perform RLE compression for lines
cur = MegaRLEBuf;
src = m_buf;
for (y = 0; y < m_dimy; y++) {
- // Si salva l'inizio della linea
+ // Save the beginning of the line
startline = cur;
- // Lascia lo spazio per la lunghezza della linea
+ // Leave space for the length of the line
cur += 2;
- // Si parte dallo spazio vuoto
+ // It starts from the empty space
curdata = 0;
rep = 0;
startsrc = src;
@@ -813,7 +789,7 @@ void RMGfxSourceBuffer8RLE::CompressRLE(void) {
}
}
- // Dati in sospeso?
+ // Pending data?
if (curdata == 1) {
RLEWriteAlphaBlend(cur, rep);
RLEWriteData(cur, 0, NULL);
@@ -823,17 +799,17 @@ void RMGfxSourceBuffer8RLE::CompressRLE(void) {
RLEWriteData(cur, rep, startsrc);
}
- // Fine linea
+ // End of line
RLEWriteEOL(cur);
- // Scrive la lunghezza della linea
+ // Write the length of the line
WRITE_LE_UINT16(startline, (uint16)(cur - startline));
}
- // Cancella l'immagine originale
+ // Delete the original image
delete[] m_buf;
- // Ci copia l'immagine compressa
+ // Copy the compressed image
x = cur - MegaRLEBuf;
m_buf = new byte[x];
Common::copy(MegaRLEBuf, MegaRLEBuf + x, m_buf);
@@ -845,27 +821,27 @@ void RMGfxSourceBuffer8RLE::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
uint16 *buf = bigBuf;
int x1, y1, u, v, width, height;
- // Clippiamo lo sprite
+ // Clipping
x1 = prim->Dst().x1;
y1 = prim->Dst().y1;
if (!Clip2D(x1, y1, u, v, width, height, false, &bigBuf))
return;
- // Andiamo avanti di V linee nell'immagine RLE
+ // Go forward through the RLE lines
src = m_buf;
for (y = 0; y < v; y++)
src += READ_LE_UINT16(src);
- // Posizionamoci nel buffer di destinazione
+ // Calculate the position in the destination buffer
buf += y1 * bigBuf.Dimx();
- // Looppone
+ // Loop
if (prim->IsFlipped()) {
-// Annulliamo il clipping orizzontale
+// Eliminate horizontal clipping
// width = m_dimx;
// x1=prim->Dst().x1;
- // Flippiamo il clipping
+ // Clipping
u = m_dimx - (width + u);
x1 = (prim->Dst().x1 + m_dimx - 1) - u;
@@ -873,21 +849,21 @@ void RMGfxSourceBuffer8RLE::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
// Decompressione
RLEDecompressLineFlipped(buf + x1, src + 2, u, width);
- // Prossima linea
+ // Next line
src += READ_LE_UINT16(src);
- // Skippa alla linea successiva
+ // Skip to the next line
buf += bigBuf.Dimx();
}
} else {
for (y = 0; y < height; y++) {
- // Decompressione
+ // Decompression
RLEDecompressLine(buf + x1, src + 2, u, width);
- // Prossima linea
+ // Next line
src += READ_LE_UINT16(src);
- // Skippa alla linea successiva
+ // Skip to the next line
buf += bigBuf.Dimx();
}
}
@@ -895,7 +871,7 @@ void RMGfxSourceBuffer8RLE::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8RLEByte
+* RMGfxSourceBuffer8RLEByte Methods
\****************************************************************************/
RMGfxSourceBuffer8RLEByte::~RMGfxSourceBuffer8RLEByte() {
@@ -981,7 +957,7 @@ void RMGfxSourceBuffer8RLEByte::RLEDecompressLine(uint16 *dst, byte *src, int nS
while (1) {
RLEByteDoTrasp:
- // Via il trasp di merda
+ // Get the trasp of s**t
n = *src++;
// EOL?
@@ -1018,7 +994,7 @@ RLEByteDoAlpha2:
assert(nLength > 0);
//RLEByteDoCopy:
- // Copia la roba
+ // Copy the stuff
n = *src++;
RLEByteDoCopy2:
@@ -1087,7 +1063,7 @@ void RMGfxSourceBuffer8RLEByte::RLEDecompressLineFlipped(uint16 *dst, byte *src,
while (1) {
RLEByteFlippedDoTrasp:
- // Via il trasp di merda
+ // Get the trasp of s**t
n = *src++;
// EOL?
@@ -1124,7 +1100,7 @@ RLEByteFlippedDoAlpha2:
assert(nLength > 0);
//RLEByteFlippedDoCopy:
- // Copia la roba
+ // Copy the data
n = *src++;
RLEByteFlippedDoCopy2:
@@ -1143,7 +1119,7 @@ RLEByteFlippedDoCopy2:
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8RLEWord
+* RMGfxSourceBuffer8RLEWord Methods
\****************************************************************************/
RMGfxSourceBuffer8RLEWord::~RMGfxSourceBuffer8RLEWord() {
@@ -1232,7 +1208,7 @@ void RMGfxSourceBuffer8RLEWord::RLEDecompressLine(uint16 *dst, byte *src, int nS
while (1) {
RLEWordDoTrasp:
- // Via il trasp di merda
+ // Get the trasp of s**t
n = READ_LE_UINT16(src);
src += 2;
@@ -1274,7 +1250,7 @@ RLEWordDoAlpha2:
assert(nLength > 0);
//RLEWordDoCopy:
- // Copia la roba
+ // Copy the data
n = READ_LE_UINT16(src);
src += 2;
@@ -1350,7 +1326,7 @@ void RMGfxSourceBuffer8RLEWord::RLEDecompressLineFlipped(uint16 *dst, byte *src,
while (1) {
RLEWordFlippedDoTrasp:
- // Via il trasp di merda
+ // Get the trasp of s**t
n = READ_LE_UINT16(src);
src += 2;
@@ -1392,7 +1368,7 @@ RLEWordFlippedDoAlpha2:
assert(nLength > 0);
//RLEWordFlippedDoCopy:
- // Copia la roba
+ // Copy the data
n = READ_LE_UINT16(src);
src += 2;
@@ -1480,7 +1456,7 @@ void RMGfxSourceBuffer8RLEWordAB::RLEDecompressLine(uint16 *dst, byte *src, int
while (1) {
RLEWordDoTrasp:
- // Via il trasp di merda
+ // Get the trasp of s**t
n = READ_LE_UINT16(src);
src += 2;
@@ -1503,7 +1479,7 @@ RLEWordDoAlpha2:
if (n > nLength)
n = nLength;
- // @@@ NON DOVREBBE ESSERCI!!!!!
+ // @@@ SHOULD NOT BE THERE !!!!!
for (i = 0; i < n; i++) {
r = (*dst >> 10) & 0x1F;
g = (*dst >> 5) & 0x1F;
@@ -1523,7 +1499,7 @@ RLEWordDoAlpha2:
assert(nLength > 0);
//RLEWordDoCopy:
- // Copia la roba
+ // Copy the data
n = READ_LE_UINT16(src);
src += 2;
@@ -1566,22 +1542,22 @@ byte RMGfxSourceBuffer8AA::MegaAABuf[256 * 1024];
byte RMGfxSourceBuffer8AA::MegaAABuf2[64 * 1024];
void RMGfxSourceBuffer8AA::PrepareImage(void) {
- // Richiama il metodo padre
+ // Invoke the parent method
RMGfxSourceBuffer::PrepareImage();
- // Prepara il buffer di antialiasing
+ // Prepare the buffer for anti-aliasing
CalculateAA();
}
void RMGfxSourceBuffer8AA::CalculateAA(void) {
- // Io suxo tu suxi egli suxa noi suxiamo voi suxate essi suxano ---> ANTI ALIASING SUX!
+ // I suck, you suck, he sucks, we suck, they all suck ---> ANTI ALIASING SUX!
// ************************************************************
int x, y;
byte *src, *srcaa;
- /* Prima passata: cerchiamo i bordi */
+ /* First pass: fill the edges */
Common::fill(MegaAABuf, MegaAABuf + m_dimx * m_dimy, 0);
src = m_buf;
@@ -1643,20 +1619,19 @@ void RMGfxSourceBuffer8AA::DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
int r, g, b;
int step;
- // Clippiamo lo sprite
+ // Clip the sprite
x1 = prim->Dst().x1;
y1 = prim->Dst().y1;
if (!Clip2D(x1, y1, u, v, width, height, false, &bigBuf))
return;
- // Andiamo avanti di V linee nell'immagine RLE
+ // Go forward through the RLE lines
src = m_buf;
for (y = 0; y < v; y++)
src += READ_LE_UINT16(src);
- // Annulliamo il clipping orizzontale
+ // Eliminate horizontal clipping
- // Flippiamo il clipping
if (prim->IsFlipped()) {
u = m_dimx - (width + u);
x1 = (prim->Dst().x1 + m_dimx - 1) - u;
@@ -1665,7 +1640,7 @@ void RMGfxSourceBuffer8AA::DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
// x1=prim->Dst().x1;
- // Posizionamoci nel buffer di destinazione
+ // Poisition into the destination buffer
buf = bigBuf;
buf += y1 * bigBuf.Dimx();
@@ -1674,8 +1649,8 @@ void RMGfxSourceBuffer8AA::DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
else
step = 1;
- // Looppone
- buf += bigBuf.Dimx(); // skippa la prima linea
+ // Loop
+ buf += bigBuf.Dimx(); // Skip the first line
for (y = 1; y < height - 1; y++) {
/*
if (prim->IsFlipped())
@@ -1705,11 +1680,11 @@ void RMGfxSourceBuffer8AA::DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
mybuf[0] = (r << 10) | (g << 5) | b;
}
- // Skippa alla linea successiva
+ // Skip to the next line
buf += bigBuf.Dimx();
}
-// Posizionamoci nel buffer di destinazione
+// Position into the destination buffer
buf = bigBuf;
buf += y1 * bigBuf.Dimx();
@@ -1765,7 +1740,7 @@ void RMGfxSourceBuffer8AA::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer8RLEAA
+* RMGfxSourceBuffer8RLEAA Methods
\****************************************************************************/
RMGfxSourceBuffer8RLEByteAA::~RMGfxSourceBuffer8RLEByteAA() {
@@ -1799,7 +1774,7 @@ void RMGfxSourceBuffer8RLEByteAA::Init(RMDataStream &ds, int dimx, int dimy, boo
RMGfxSourceBuffer8RLE::Init(ds, dimx, dimy, bLoadPalette);
if (!bNeedRLECompress) {
- // Carica la maschera di antialiasing
+ // Load the anti-aliasing mask
m_aabuf = new byte[dimx * dimy];
ds.Read(m_aabuf, dimx * dimy);
}
@@ -1845,7 +1820,7 @@ void RMGfxSourceBuffer8RLEWordAA::Init(RMDataStream &ds, int dimx, int dimy, boo
/****************************************************************************\
-* Metodi di RMGfxSourceBuffer16
+* RMGfxSourceBuffer16 Methods
\****************************************************************************/
RMGfxSourceBuffer16::RMGfxSourceBuffer16(bool bTrasp0) {
@@ -1913,7 +1888,7 @@ void RMGfxSourceBuffer16::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimi
}
void RMGfxSourceBuffer16::PrepareImage(void) {
- // Color space conversion se necessario!
+ // Colour space conversion if necessary!
int i;
uint16 *buf = (uint16 *)m_buf;
@@ -1927,16 +1902,12 @@ RMGfxSourceBuffer16::RMGfxSourceBuffer16(int dimx, int dimy, bool bUseDDraw)
SetPriority(0);
}
-/****************************************************************************\
-*
-* Function: int RMGfxSourceBuffer16::Bpp();
-*
-* Description: Ritorna il numero di bit per pixel della surface
-*
-* Return: Bit per pixel
-*
-\****************************************************************************/
+/**
+ * Returns the number of bits per pixel of the surface
+ *
+ * @returns Bit per pixel
+ */
int RMGfxSourceBuffer16::Bpp() {
return 16;
}
@@ -1946,7 +1917,7 @@ void RMGfxSourceBuffer16::Create(int dimx, int dimy, bool bUseDDraw) {
}
/****************************************************************************\
-* Metodi di RMGfxBox
+* RMGfxBox Methods
\****************************************************************************/
void RMGfxBox::RemoveThis(CORO_PARAM, bool &result) {
@@ -1965,11 +1936,11 @@ void RMGfxBox::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim)
uint16 *buf = bigBuf;
RMRect rcDst;
- // Prende il rettangolo di destinazione
+ // It takes the destination rectangle
rcDst = prim->Dst();
buf += rcDst.y1 * bigBuf.Dimx() + rcDst.x1;
- // Fa il suo bravo loop di put
+ // Loop through the pixels
for (j = 0; j < rcDst.Height(); j++) {
for (i = 0; i < rcDst.Width(); i++)
*buf ++ = wFillColor;
@@ -1980,21 +1951,21 @@ void RMGfxBox::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim)
/****************************************************************************\
-* Metodi di RMGfxClearTask
+* RMGfxClearTask Methods
\****************************************************************************/
int RMGfxClearTask::Priority() {
- // Priorita' massima (deve essere fatto per primo)
+ // Maximum priority (must be done first)
return 1;
}
void RMGfxClearTask::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *) {
- // Pulisce tutto il target buffer
+ // Clean the target buffer
Common::fill((byte *)bigBuf, (byte *)bigBuf + (bigBuf.Dimx() * bigBuf.Dimy() * 2), 0x0);
}
void RMGfxClearTask::RemoveThis(CORO_PARAM, bool &result) {
- // Il task di clear si disattiva sempre
+ // The task is fine to be removed
result = true;
}
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index 1af13d9a66..f7ea40fa9b 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -39,13 +39,13 @@ namespace Tony {
* Prototipi di classi
\****************************************************************************/
-// Nome della classe Albero genealogico Astratto?
-class RMGfxTask; // Si
-class RMGfxTaskSetPrior; // Task Si
+// Class Name Family Treee Abstract?
+class RMGfxTask; // Yes
+class RMGfxTaskSetPrior; // Task Yes
class RMGfxBuffer; //
-class RMGfxSourceBuffer; // TaskP+[Buffer] Si
+class RMGfxSourceBuffer; // TaskP+[Buffer] Yes
class RMGfxTargetBuffer; // [Buffer]
-class RMGfxSourceBufferPal; // Source Si
+class RMGfxSourceBufferPal; // Source Yes
class RMGfxSourceBuffer4; // SourcePal
class RMGfxSourceBuffer8; // SourcePal
class RMGfxSourceBuffer16; // Source
@@ -221,7 +221,7 @@ protected:
int m_nInList;
public:
- // Costruttore standard
+ // Standard constructor
RMGfxTask();
virtual ~RMGfxTask() { }
@@ -284,7 +284,7 @@ public:
*/
class RMGfxSourceBuffer : public virtual RMGfxBuffer, public RMGfxTaskSetPrior {
public:
- // Carica i dati della surface a basso livello
+ // Load the data for the surface
virtual int Init(uint32 resID, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
@@ -316,7 +316,7 @@ public:
RMGfxSourceBuffer16(int dimx, int dimy, bool bUseDDraw = false);
virtual ~RMGfxSourceBuffer16();
- // Inizializzazione
+ // Initialisation
void Create(int dimx, int dimy, bool bUseDDraw = false);
int Bpp();
@@ -329,7 +329,7 @@ public:
*/
class RMGfxSourceBufferPal : public RMGfxSourceBuffer {
protected:
- // The size of the palette is (1<<Bpp())*4
+ // The size of the palette is (1 << Bpp()) * 4
byte m_pal[256 * 3];
uint16 m_palFinal[256];
@@ -361,7 +361,7 @@ public:
RMGfxSourceBuffer8(int dimx, int dimy, bool bUseDDraw = false);
virtual ~RMGfxSourceBuffer8();
- // Inizializzazione
+ // Initialisation
void Create(int dimx, int dimy, bool bUseDDraw = false);
int Bpp();
@@ -406,7 +406,7 @@ protected:
void CompressRLE(void);
protected:
- // Overriding initialization methods
+ // Overriding initialisation methods
virtual void PrepareImage(void);
virtual void PreparePalette(void);
@@ -414,7 +414,7 @@ public:
RMGfxSourceBuffer8RLE();
virtual ~RMGfxSourceBuffer8RLE();
- // Overload of the initialization method
+ // Overload of the initialisation method
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
@@ -472,10 +472,10 @@ protected:
static byte MegaAABuf2[];
byte *m_aabuf;
- // Calcola il buffer per l'antialiasing
+ // Calculate the buffer for the anti-aliasing
void CalculateAA(void);
- // Disegna l'AA
+ // Draw the AA
void DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
protected:
@@ -485,7 +485,7 @@ public:
RMGfxSourceBuffer8AA();
virtual ~RMGfxSourceBuffer8AA();
- // Draw con antialiasing
+ // Draw with anti-aliasing
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@@ -511,7 +511,7 @@ protected:
public:
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- // Overloaded initialisation method
+ // Overloaded initialisation methods
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(byte *buf, int dimx, int dimy, bool bLoadPalette = false);
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index 5d81c47333..e4f4cfb22d 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -37,7 +37,7 @@ namespace Tony {
/****************************************************************************\
-* Metodi di RMGfxEngine
+* RMGfxEngine Methods
\****************************************************************************/
void ExitAllIdles(CORO_PARAM, const void *param) {
@@ -48,7 +48,7 @@ void ExitAllIdles(CORO_PARAM, const void *param) {
CORO_BEGIN_CODE(_ctx);
- // Chiude le idle
+ // Closes idle
GLOBALS.bSkipSfxNoLoop = true;
CORO_INVOKE_2(mpalEndIdlePoll, nCurLoc, NULL);
@@ -60,7 +60,7 @@ void ExitAllIdles(CORO_PARAM, const void *param) {
}
RMGfxEngine::RMGfxEngine() {
- // Crea il big buffer dove verranno disegnati i frame
+ // Create big buffer where the frame will be rendered
m_bigBuf.Create(RM_BBX, RM_BBY, 16);
m_bigBuf.OffsetY(RM_SKIPY);
@@ -83,7 +83,7 @@ RMGfxEngine::RMGfxEngine() {
}
RMGfxEngine::~RMGfxEngine() {
- // Chiude il buffer
+ // Close the buffer
m_bigBuf.Destroy();
g_system->deleteMutex(csMainLoop);
}
@@ -121,7 +121,7 @@ void RMGfxEngine::OpenOptionScreen(CORO_PARAM, int type) {
EnableMouse();
_vm->GrabThumbnail();
- // Esce la IDLE onde evitare la morte prematura in caricamento
+ // Exists the IDLE to avoid premature death in loading
m_bMustEnterMenu = true;
if (type == 1 || type == 2) {
GLOBALS.bIdleExited = true;
@@ -145,7 +145,7 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
g_system->lockMutex(csMainLoop);
- // Poll dei dispositivi di input
+ // Poll of input devices
m_input.Poll();
if (m_bMustEnterMenu && GLOBALS.bIdleExited) {
@@ -166,25 +166,25 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
}
if (bDrawLocation && m_bLocationLoaded) {
- // Locazione e oggetti
+ // Location and objects
m_loc.DoFrame(&m_bigBuf);
- // Controlla gli input del mouse
+ // Check the mouse input
if (m_bInput && !m_tony.InAction()) {
- // Se siamo sull'inventario, è lui che controlla tutti gli input
+ // If we are on the inventory, it is it who controls all input
if (m_inv.HaveFocus(m_input.MousePos()) && !m_inter.Active()) {
- // CLICK SINISTRO
- // **************
+ // Left Click
+ // **********
if (m_input.MouseLeftClicked()/* && m_itemName.IsItemSelected()*/) {
- // Left click attiva il combine, se siamo su un oggetto
+ // Left click activates the combine, if we are on an object
if (m_inv.LeftClick(m_input.MousePos(), m_curActionObj)) {
m_curAction = TA_COMBINE;
m_point.SetAction(m_curAction);
}
} else
- // CLICK DESTRO
- // ************
+ // Right Click
+ // ***********
if (m_input.MouseRightClicked()) {
if (m_itemName.IsItemSelected()) {
m_curActionObj = 0;
@@ -193,8 +193,8 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
m_inv.RightClick(m_input.MousePos());
} else
- // RILASCIO DESTRO
- // ***************
+ // Right Release
+ // *************
if (m_input.MouseRightReleased()) {
if (m_inv.RightRelease(m_input.MousePos(), m_curAction)) {
CORO_INVOKE_3(m_tony.MoveAndDoAction, m_itemName.GetHotspot(), m_itemName.GetSelectedItem(), m_curAction);
@@ -204,7 +204,7 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
}
}
} else {
- // Menu Opzioni
+ // Options Menu
// ************
if (m_bGUIOption) {
if (!m_tony.InAction() && m_bInput) {
@@ -224,10 +224,10 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
}
}
- // CLICK SINISTRO
+ // Left Click
// **************
if (m_input.MouseLeftClicked() && !m_inter.Active()) {
- // Se clicko dentro un oggetto, esegui l'azione
+ // If click inside an item, perform action
//if (m_itemName.IsItemSelected())
{
if (m_curAction != TA_COMBINE)
@@ -246,10 +246,10 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
}
SKIPCLICKSINISTRO:
- // CLICK DESTRO
+ // Right Click
// ************
if (m_curAction == TA_COMBINE) {
- // Durante il combine, lo annulla.
+ // During a combine, it cancels it
if (m_input.MouseRightClicked()) {
m_inv.EndCombine();
m_curActionObj = 0;
@@ -259,7 +259,7 @@ SKIPCLICKSINISTRO:
}
} else if (m_input.MouseRightClicked() && m_itemName.IsItemSelected() && m_point.GetSpecialPointer() == RMPointer::PTR_NONE) {
if (m_bGUIInterface) {
- // Prima di aprire l'interfaccia, rimette GOTO
+ // Before opening the interface, replaces GOTO
m_curAction = TA_GOTO;
m_curActionObj = 0;
m_point.SetAction(m_curAction);
@@ -268,8 +268,8 @@ SKIPCLICKSINISTRO:
}
- // RILASCIO DESTRO
- // ***************
+ // Right Release
+ // *************
if (m_input.MouseRightReleased()) {
if (m_bGUIInterface) {
if (m_inter.Released(m_input.MousePos(), m_curAction)) {
@@ -283,21 +283,21 @@ SKIPCLICKSINISTRO:
}
}
- // Aggiorna il nome sotto il puntatore del mouse
+ // Update the name under the mouse pointer
m_itemName.SetMouseCoord(m_input.MousePos());
if (!m_inter.Active() && !m_inv.MiniActive())
CORO_INVOKE_4(m_itemName.DoFrame, m_bigBuf, m_loc, m_point, m_inv);
}
- // Inventario & interfaccia
+ // Interface & Inventory
m_inter.DoFrame(m_bigBuf, m_input.MousePos());
m_inv.DoFrame(m_bigBuf, m_point, m_input.MousePos(), (!m_tony.InAction() && !m_inter.Active() && m_bGUIInventory));
}
- // Anima Tony
+ // Animate Tony
CORO_INVOKE_2(m_tony.DoFrame, &m_bigBuf, m_nCurLoc);
- // Aggiorna lo scrolling per tenere Tony dentro lo schermo
+ // Update screen scrolling to keep Tony in focus
if (m_tony.MustUpdateScrolling() && m_bLocationLoaded) {
RMPoint showThis = m_tony.Position();
showThis.y -= 60;
@@ -313,7 +313,7 @@ SKIPCLICKSINISTRO:
}
// **********************
- // Disegna la lista di OT
+ // Draw the list in the OT
// **********************
CORO_INVOKE_0(m_bigBuf.DrawOT);
@@ -487,7 +487,7 @@ uint32 RMGfxEngine::LoadLocation(int nLoc, RMPoint ptTonyStart, RMPoint start) {
bLoaded = false;
for (i = 0; i < 5; i++) {
- // Retry sul loading della locazione
+ // Retry the loading of the location
RMRes res(m_nCurLoc);
if (!res.IsValid())
continue;
@@ -513,7 +513,7 @@ uint32 RMGfxEngine::LoadLocation(int nLoc, RMPoint ptTonyStart, RMPoint start) {
m_bLocationLoaded = true;
- // On Enter per la locazion
+ // On entering the location
return CORO_INVALID_PID_VALUE; //mpalQueryDoAction(0,m_nCurLoc,0);
}
@@ -524,7 +524,7 @@ void RMGfxEngine::UnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
CORO_BEGIN_CODE(_ctx);
- // Scarica tutta la memoria della locazione
+ // Release the location
CORO_INVOKE_2(mpalEndIdlePoll, m_nCurLoc, NULL);
// On Exit?
@@ -585,28 +585,28 @@ void RMGfxEngine::Init(/*HINSTANCE hInst*/) {
m_bWiping = false;
m_hWipeEvent = CoroScheduler.createEvent(false, false);
- // Crea l'evento di freeze
+ // Create the freeze event
csMainLoop = g_system->createMutex();
- // Inizializza la funzione di IRQ di Item per l'MPAL
+ // Initialise the IRQ function for items for MPAL
GLOBALS.GfxEngine = this;
mpalInstallItemIrq(ItemIrq);
- // Inizializza DirectInput
+ // Initialise the input
m_input.Init(/*hInst*/);
- // Inizializza il puntatore del mouse
+ // Initialise the mouse pointer
m_point.Init();
- // Inizializza Tony
+ // Initialise Tony
m_tony.Init();
m_tony.LinkToBoxes(&_vm->_theBoxes);
- // Inizializza l'inventario e l'interfaccia
+ // Initialise the inventory and the interface
m_inv.Init();
m_inter.Init();
- // Carica la locazione e setta le priorità @@@@@
+ // Download the location and set priorities @@@@@
m_bLocationLoaded = false;
/*
m_nCurLoc=1;
@@ -621,7 +621,7 @@ void RMGfxEngine::Init(/*HINSTANCE hInst*/) {
*/
EnableInput();
- // Inizio del gioco
+ // Starting the game
//m_tony.ExecuteAction(4,1,0); //PREGAME
m_tony.ExecuteAction(20, 1, 0);
@@ -707,7 +707,7 @@ void RMGfxEngine::SaveState(const Common::String &fn, byte *curThumb, const Comm
char buf[4];
RMPoint tp = m_tony.Position();
- // Saving: mpal variables, current location, + tony inventory position
+ // Saving: MPAL variables, current location, and Tony inventory position
// For now, we only save the MPAL state
size = mpalGetSaveStateSize();
@@ -802,7 +802,7 @@ void RMGfxEngine::SaveState(const Common::String &fn, byte *curThumb, const Comm
}
void RMGfxEngine::LoadState(CORO_PARAM, const Common::String &fn) {
- // PROBLEMA: Bisognerebbe caricare la locazione in un thread a parte per fare la OnEnter ...
+ // PROBLEM: You should change the location in a separate process to do the OnEnter
CORO_BEGIN_CONTEXT;
Common::InSaveFile *f;
byte *state, *statecmp;
@@ -896,7 +896,7 @@ void RMGfxEngine::LoadState(CORO_PARAM, const Common::String &fn) {
}
if (_ctx->ver >= 5) {
- // Versione 5:
+ // Versione 5
bool bStat = false;
bStat = _ctx->f->readByte();
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index 9115b22ccc..d2d47d392a 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -146,12 +146,10 @@ struct ChangedHotspotStruct {
}
};
-/****************************************************************************\
-* typedef CFCALL
-* --------------
-* Description: Descrizione di una chiamata a una custom function
-\****************************************************************************/
+/**
+ * Description of a call to a custom function.
+ */
typedef struct {
int nCf;
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index e10fe228d3..a2a4923093 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -77,37 +77,36 @@ void RMInventory::Init(void) {
int i, j;
int curres;
- // Crea il buffer principale
+ // Create the main buffer
Create(RM_SX, 68);
SetPriority(185);
- // Pulisce l'inventario
+ // Setup the inventory
m_nInv = 0;
m_curPos = 0;
m_bCombining = false;
- // Nuovi oggetti
- m_nItems = 78; // @@@ Numero di oggetti prendibili
+ // New items
+ m_nItems = 78; // @@@ Number of takeable items
m_items = new RMInventoryItem[m_nItems + 1];
curres = 10500;
- // Loop sugli oggetti
+ // Loop through the items
for (i = 0; i <= m_nItems; i++) {
- // Carica l'oggetto da risorsa
+ // Load the items from the resource
RMRes res(curres);
RMDataStream ds;
assert(res.IsValid());
- // Non deve inizializzare il cur pattern dell'oggetto dell'inventario leggendolo da MPAL!
- // Glelo mettiamo noi a MANO, e non c'entra nulla con l'oggetto in MPAL
+ // Initialise the MPAL inventory item by reading it in.
m_items[i].icon.SetInitCurPattern(false);
ds.OpenBuffer(res);
ds >> m_items[i].icon;
ds.Close();
- // Mette di default a pattern 1
+ // Puts in the default pattern 1
m_items[i].pointer = NULL;
m_items[i].status = 1;
m_items[i].icon.SetPattern(1);
@@ -131,7 +130,7 @@ void RMInventory::Init(void) {
m_items[28].icon.SetPattern(1);
m_items[29].icon.SetPattern(1);
- // Carica l'interfaccina
+ // Download interface
RMDataStream ds;
RMRes res(RES_I_MINIINTER);
assert(res.IsValid());
@@ -140,12 +139,12 @@ void RMInventory::Init(void) {
miniInterface.SetPattern(1);
ds.Close();
- // Crea il testo per gli hints sulla mini interfaccia
+ // Create the text for hints on the mini interface
m_hints[0].SetAlignType(RMText::HCENTER, RMText::VTOP);
m_hints[1].SetAlignType(RMText::HCENTER, RMText::VTOP);
m_hints[2].SetAlignType(RMText::HCENTER, RMText::VTOP);
- // Il testo viene preso da MPAL per la traduzione
+ // The text is taken from MPAL for translation
RMMessage msg1(15);
RMMessage msg2(13);
RMMessage msg3(14);
@@ -160,14 +159,14 @@ void RMInventory::Init(void) {
m_hints[2].WriteText("Use",1);
*/
- // Prepara il primo inventario
+ // Prepare initial inventory
Prepare();
DrawOT(Common::nullContext);
ClearOT();
}
void RMInventory::Close(void) {
- // Ciao memoria
+ // Has memory
if (m_items != NULL) {
// Delete the item pointers
for (int i = 0; i <= m_nItems; i++)
@@ -211,22 +210,22 @@ void RMInventory::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
_ctx->pos.Set((m_nSelectObj + 1) * 64 - 20, RM_SY - 113);
_ctx->pos2.Set((m_nSelectObj + 1) * 64 + 34, RM_SY - 150);
} else {
- _ctx->pos.Set((m_nSelectObj + 1) * 64 - 20, 72 - 4); // la parte marrone sta in alto :(
+ _ctx->pos.Set((m_nSelectObj + 1) * 64 - 20, 72 - 4); // The brown part is at the top :(
_ctx->pos2.Set((m_nSelectObj + 1) * 64 + 34, 119 - 4);
}
_ctx->p = new RMGfxPrimitive(prim->m_task, _ctx->pos);
_ctx->p2 = new RMGfxPrimitive(prim->m_task, _ctx->pos2);
- // Disegna l'interfaccina stupida
+ // Draw the mini interface
CORO_INVOKE_2(miniInterface.Draw, bigBuf, _ctx->p);
if (GLOBALS.bCfgInterTips) {
- if (miniAction == 1) // Esamina
+ if (miniAction == 1) // Examine
CORO_INVOKE_2(m_hints[0].Draw, bigBuf, _ctx->p2);
- else if (miniAction == 2) // Parla
+ else if (miniAction == 2) // Talk
CORO_INVOKE_2(m_hints[1].Draw, bigBuf, _ctx->p2);
- else if (miniAction == 3) // Usa
+ else if (miniAction == 3) // Use
CORO_INVOKE_2(m_hints[2].Draw, bigBuf, _ctx->p2);
}
@@ -267,13 +266,12 @@ void RMInventory::RemoveItem(int code) {
void RMInventory::AddItem(int code) {
if (code <= 10000 && code >= 10101) {
- // Se siamo qui, vuol dire che stiamo aggiungendo un oggetto che non dovrebbe essere
- // nell'inventario
+ // If we are here, it means that we are adding an item that should not be in the inventory
warning("Cannot find a valid icon for this item, and then it will not be added to the inventory");
} else {
g_system->lockMutex(m_csModifyInterface);
if (m_curPos + 8 == m_nInv) {
- // Sfondiamo l'inventario! Attivo il pattern di lampeggio
+ // Break through the inventory! On the flashing pattern
m_items[28].icon.SetPattern(2);
}
@@ -324,15 +322,15 @@ bool RMInventory::MiniActive(void) {
}
bool RMInventory::HaveFocus(const RMPoint &mpos) {
- // In fase di combine abbiamo il focus solo se siamo su una freccia (per poter scrollare)
+ // When we combine, have the focus only if we are on an arrow (to scroll)
if (m_state == OPENED && m_bCombining && CheckPointInside(mpos) && (mpos.x < 64 || mpos.x > RM_SX - 64))
return true;
- // Se l'inventario è aperto, abbiamo il focus quando ci andiamo sopra
+ // If the inventory is open, focus we we go over it
if (m_state == OPENED && !m_bCombining && CheckPointInside(mpos))
return true;
- // Se stiamo selezionando un verbo (quindi tasto destro premuto), abbiamo il focus alltime
+ // If we are selecting a verb (and then right down), we always focus
if (m_state == SELECTING)
return true;
@@ -346,12 +344,12 @@ void RMInventory::EndCombine(void) {
bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
int n;
- // Il click sinistro prende in mano un oggetto dell'inventario per utilizzarlo con lo sfondo
+ // The left click picks an item from your inventory to use it with the background
n = mpos.x / 64;
if (m_state == OPENED) {
if (n > 0 && n < RM_SX / 64 - 1 && m_inv[n - 1 + m_curPos] != 0) {
- m_bCombining = true; //m_state=COMBINING;
+ m_bCombining = true; //m_state = COMBINING;
m_nCombine = m_inv[n - 1 + m_curPos];
nCombineObj = m_nCombine + 10000;
@@ -360,7 +358,7 @@ bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
}
}
- // Click sulla freccia destra
+ // Click the right arrow
if ((m_state == OPENED) && m_bBlinkingRight) {
g_system->lockMutex(m_csModifyInterface);
m_curPos++;
@@ -380,7 +378,7 @@ bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
ClearOT();
g_system->unlockMutex(m_csModifyInterface);
}
- // Click sulla freccia sinistra
+ // Click the left arrow
else if ((m_state == OPENED) && m_bBlinkingLeft) {
assert(m_curPos > 0);
g_system->lockMutex(m_csModifyInterface);
@@ -413,7 +411,7 @@ void RMInventory::RightClick(const RMPoint &mpos) {
assert(CheckPointInside(mpos));
if (m_state == OPENED && !m_bCombining) {
- // Apre l'interfaccina contestuale
+ // Open the context interface
n = mpos.x / 64;
if (n > 0 && n < RM_SX / 64 - 1 && m_inv[n - 1 + m_curPos] != 0) {
@@ -494,12 +492,12 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
bool bNeedRedraw = false;
if (m_state != CLOSED) {
- // Pulisce l'OTList
+ // Clean up the OT list
g_system->lockMutex(m_csModifyInterface);
ClearOT();
- // Fa il DoFrame di tutti gli oggetti contenuti attualmente nell'inventario
- // @@@ forse bisognerebbe farlo di tutti gli oggetti takeable? Probabilmente non serve a nulla
+ // DoFrame makes all the objects currently in the inventory be displayed
+ // @@@ Maybe we should do all takeable objects? Please does not help
for (i = 0; i < m_nInv; i++)
if (m_items[m_inv[i]].icon.DoFrame(this, false) && (i >= m_curPos && i <= m_curPos + 7))
bNeedRedraw = true;
@@ -641,7 +639,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
else
starty = 70;
- // Controlla se si trova su uno dei verbi
+ // Make sure it is on one of the verbs
if (mpos.y > starty && mpos.y < starty + 45) {
if (mpos.x > startx && mpos.x < startx + 40) {
if (miniAction != 1) {
@@ -670,7 +668,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
miniAction = 0;
}
- // Aggiorna la miniinterface
+ // Update the mini-interface
miniInterface.DoFrame(&bigBuf, false);
}
@@ -780,16 +778,16 @@ int RMInterface::OnWhichBox(RMPoint pt) {
pt -= m_openStart;
- // Controlla quanti verbi bisogna considerare
+ // Check how many verbs you have to consider
max = 4;
if (m_bPalesati) max = 5;
- // Cerca il verbo
+ // Find the verb
for (i = 0; i < max; i++)
if (m_hotbbox[i].PtInRect(pt))
return i;
- // Nessun verbo trovato
+ // Found no verb
return -1;
}
@@ -803,7 +801,7 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
prim->Dst().TopLeft() = m_openStart;
CORO_INVOKE_2(RMGfxSourceBuffer8RLEByte::Draw, bigBuf, prim);
- // Controlla se c'e' da disegnare una zona calda
+ // Check if there is a draw hot zone
_ctx->h = OnWhichBox(m_mpos);
if (_ctx->h != -1) {
prim->Dst().TopLeft() = m_openStart;
@@ -826,7 +824,7 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
void RMInterface::DoFrame(RMGfxTargetBuffer &bigBuf, RMPoint mousepos) {
- // Se c'è bisogna, schedula nella OT list
+ // If needed, add to the OT schedule list
if (!m_nInList && m_bActive)
bigBuf.AddPrim(new RMGfxPrimitive(this));
@@ -837,17 +835,17 @@ void RMInterface::Clicked(const RMPoint &mousepos) {
m_bActive = true;
m_openPos = mousepos;
- // Calcola l'angolo in alto a sinistra dell'interfaccia
+ // Calculate the top left corner of the interface
m_openStart = m_openPos - RMPoint(m_dimx / 2, m_dimy / 2);
m_lastHotZone = -1;
- // La tiene dentro lo schermo
+ // Keep it inside the screen
if (m_openStart.x < 0) m_openStart.x = 0;
if (m_openStart.y < 0) m_openStart.y = 0;
if (m_openStart.x + m_dimx > RM_SX) m_openStart.x = RM_SX - m_dimx;
if (m_openStart.y + m_dimy > RM_SY) m_openStart.y = RM_SY - m_dimy;
- // Play dell'effetto sonoro
+ // Play the sound effect
_vm->PlayUtilSFX(0);
}
@@ -878,7 +876,7 @@ bool RMInterface::Released(const RMPoint &mousepos, RMTonyAction &action) {
action = TA_PALESATI;
break;
- default: // Nessun verbo
+ default: // No verb
return false;
}
@@ -914,8 +912,8 @@ void RMInterface::Init(void) {
m_hotzone[i].LoadPaletteWA(pal);
}
- m_hotbbox[0].SetRect(126, 123, 159, 208); // prendi
- m_hotbbox[1].SetRect(90, 130, 125, 186); // parla
+ m_hotbbox[0].SetRect(126, 123, 159, 208); // Take
+ m_hotbbox[1].SetRect(90, 130, 125, 186); // About
m_hotbbox[2].SetRect(110, 60, 152, 125);
m_hotbbox[3].SetRect(56, 51, 93, 99);
m_hotbbox[4].SetRect(51, 105, 82, 172);
@@ -926,7 +924,7 @@ void RMInterface::Init(void) {
m_hints[3].SetAlignType(RMText::HRIGHT, RMText::VTOP);
m_hints[4].SetAlignType(RMText::HRIGHT, RMText::VTOP);
- // Il testo viene preso da MPAL per la traduzione
+ // The text is taken from MPAL for translation
RMMessage msg0(12);
RMMessage msg1(13);
RMMessage msg2(14);
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index 309674ff0a..678caa1c78 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -79,66 +79,64 @@ protected:
OSystem::MutexRef m_csModifyInterface;
protected:
- // Prepara l'immagine dell'inventario. Va richiamato ogni volta
- // che l'inventario cambia
+ // Prepare the image inventory. It should be recalled whenever the inventory changes
void Prepare(void);
- // Controlla se la posizione Y del mouse è corretta, anche in base
- // alla posizione dell'inventario su schermo
+ // Check if the mouse Y position is conrrect, even under the inventory portion of the screen
bool CheckPointInside(const RMPoint &pt);
public:
RMInventory();
virtual ~RMInventory();
- // Prepara un frame
+ // Prepare a frame
void DoFrame(RMGfxTargetBuffer& bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen);
- // Inizializzazione e chiusura
+ // Initialisation and closing
void Init(void);
void Close(void);
void Reset(void);
- // Overload per la rimozione da otlist
+ // Overload test for removal from OT list
virtual void RemoveThis(CORO_PARAM, bool &result);
- // Overload per il disegno (per la posizione x&y e l'interfaccina)
+ // Overload the drawing of the inventory
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- // Metodo per determinare se l'inventario sta comandando gli input
+ // Method for determining whether the inventory currently has the focus
bool HaveFocus(const RMPoint &mpos);
- // Metodo per determinare se la mini interfaccia è attiva
+ // Method for determining if the mini interface is active
bool MiniActive(void);
- // Gestisce il click sinistro del mouse (solo quando c'ha focus)
+ // Handle the left mouse click (only when the inventory has the focus)
bool LeftClick(const RMPoint &mpos, int &nCombineObj);
- // Gestisce il tasto destro del mouse (solo quando c'ha focus)
+ // Handle the right mouse button (only when the inventory has the focus)
void RightClick(const RMPoint &mpos);
bool RightRelease(const RMPoint &mpos, RMTonyAction &curAction);
- // Avverte che è finito il combine
+ // Warn that an item combine is over
void EndCombine(void);
public:
- // Aggiunta di un oggetto all'inventario
+ // Add an item to the inventory
void AddItem(int code);
RMInventory& operator+=(RMItem *item) { AddItem(item->MpalCode()); return *this; }
RMInventory& operator+=(RMItem &item) { AddItem(item.MpalCode()); return *this; }
RMInventory& operator+=(int code) { AddItem(code); return *this; }
- // Rimozione di oggetto
+ // Removes an item
void RemoveItem(int code);
- // Siamo sopra un oggetto?
+ // We are on an object?
RMItem *WhichItemIsIn(const RMPoint &mpt);
bool ItemInFocus(const RMPoint &mpt);
- // Cambia l'icona di un oggetto
+ // Change the icon of an item
void ChangeItemStatus(uint32 dwCode, uint32 dwStatus);
- // Salvataggio
+ // Save methods
int GetSaveStateSize(void);
void SaveState(byte *state);
int LoadState(byte *state);
@@ -158,34 +156,34 @@ private:
int m_lastHotZone;
protected:
- // Dice su quale zona calda si trova il punto
+ // Return which box a given point is in
int OnWhichBox(RMPoint pt);
public:
virtual ~RMInterface();
- // Il solito DoFrame (polling del motore grafico)
+ // The usual DoFrame (poll the graphics engine)
void DoFrame(RMGfxTargetBuffer& bigBuf, RMPoint mousepos);
- // TRUE se è attiva (non si può selezionare oggetti)
+ // TRUE if it is active (you can select items)
bool Active();
- // Inizializzazione
+ // Initialisation
void Init(void);
void Close(void);
- // Resetta l'interfaccia
+ // Reset the interface
void Reset(void);
- // Avverte dei click e rilasci del mouse
+ // Warns of mouse clicks and releases
void Clicked(const RMPoint &mousepos);
bool Released(const RMPoint &mousepos, RMTonyAction &action);
- // Attiva o disattiva il quinto verbo
+ // Enalbes or disables the fifth verb
void SetPalesati(bool bOn);
bool GetPalesati(void);
- // Overloading del Draw per il posizionamente
+ // Overloaded Draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};