TONY: Converting Italian comments to English and formatting

This commit is contained in:
Paul Gilbert 2012-05-20 13:54:59 +10:00
parent 333c30b8c7
commit 0450275c44
10 changed files with 433 additions and 519 deletions

File diff suppressed because it is too large Load Diff

View File

@ -128,8 +128,8 @@ public:
private:
int m_speed;
RMPoint m_pos; // Coordinate babbo
RMPoint m_curPos; // Coordinate babbo+figlio
RMPoint m_pos; // Parent coordinates
RMPoint m_curPos; // Parent + child coordinates
int m_bLoop;
int m_nSlots;
int m_nCurSlot;
@ -237,29 +237,29 @@ public:
friend RMDataStream& operator>>(RMDataStream &ds, RMItem &item);
// Processa l'oggetto per fare andare avanti eventuale animazioni. Ritorna TRUE se dovrà
// essere ridisegnato il prossimo frame
// Process to make the object move on any animations.
// Returns TRUE if it should be redrawn on the next frame
bool DoFrame(RMGfxTargetBuffer *bigBuf, bool bAddToList = true);
// Setta la posizione corrente di scrolling
// Sets the current scrolling position
void SetScrollPosition(const RMPoint &scroll);
// Overloading della funzione per la rimozione da ot list
// Overloading of check whether to remove from active list
virtual void RemoveThis(CORO_PARAM, bool &result);
// Overloading del draw
// Overloaded Draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Overloading della priorità: è la Z
// Overloaded priority: it's based on Z ordering
virtual int Priority() { return m_z; }
// Numero di pattern
// Pattern number
int NumPattern() { return m_nPatterns; }
// Setta un nuovo pattern di animazione, cambiando bruscamente da quello corrente
// Set anew animation pattern, changing abruptly from the current
virtual void SetPattern(int nPattern, bool bPlayP0 = false);
// Setta un nuovo status.
// Set a new status
void SetStatus(int nStatus);
bool IsIn(const RMPoint &pt, int *size = NULL);
@ -267,13 +267,13 @@ public:
bool GetName(RMString &name);
int MpalCode() { return m_mpalCode; }
// Scarica l'item
// Unload
void Unload(void);
// Aspetta la fine del pattern in play
// Wait for the end of the current pattern
void WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE);
// Setta un nuovo hotspot per l'oggetto
// Sets a new hotspot fro the object
void ChangeHotspot(const RMPoint &pt);
void SetInitCurPattern(bool status) { m_bInitCurPattern=status; }
@ -285,30 +285,30 @@ void ReadFromStream(RMDataStream& ds, bool bLOX=false);
void PauseSound(bool bPause);
protected:
// Crea una primitiva che ha come task l'item stesso
// Create a primitive that has as it's task this item
virtual RMGfxPrimitive *NewItemPrimitive();
// Alloca la memoria per gli sprites
virtual RMGfxSourceBuffer* NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
// Allocate memory for the sprites
virtual RMGfxSourceBuffer *NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
};
#define MAXBOXES 50 // Non si puo' cambiare, comanda cosi' il boxed
#define MAXHOTSPOT 20 // Idem
#define MAXBOXES 50 // Maximum number of allowed boxes
#define MAXHOTSPOT 20 // Maximum nimber of allowed hotspots
class RMBox {
public:
struct T_HOTSPOT {
int hotx, hoty; // coordinate HotSpot
int destination; // destinazione HotSpot
int hotx, hoty; // Hotspot coordinates
int destination; // Hotspot destination
};
public:
int left,top,right,bottom; // Vertici BoundingBox
int adj[MAXBOXES]; // Lista di adjacenza
int numhotspot; // Numero HotSpot
uint8 Zvalue; // Zvalue per quel BoundingBox
T_HOTSPOT hotspot[MAXHOTSPOT]; // Lista degli HotSpot
int left, top, right, bottom; // Vertici bounding boxes
int adj[MAXBOXES]; // List of adjacent bounding boxes
int numhotspot; // Hotspot number
uint8 Zvalue; // Z value for the bounding box
T_HOTSPOT hotspot[MAXHOTSPOT]; // List of hotspots
bool attivo;
bool bReversed;
@ -351,19 +351,19 @@ public:
void Init(void);
void Close(void);
// Prende i box di una locazione
// Get binding boxes for a given location
RMBoxLoc *GetBoxes(int nLoc);
// Calcola in quale box si trova il punto
// Return the box which contains a given point
int WhichBox(int nLoc, const RMPoint &pt);
// Controlla che il punto sia dentro un certo box
// Check whether a point is inside a given box
bool IsInBox(int nLoc, int nBox, const RMPoint &pt);
// Cambia lo stato di un box
// Change the status of a box
void ChangeBoxStatus(int nLoc, int nBox, int status);
// Salvataggi
// Save state handling
int GetSaveStateSize(void);
void SaveState(byte *buf);
void LoadState(byte *buf);
@ -429,38 +429,38 @@ protected:
bool bMoving;
bool bDrawNow;
bool bNeedToStop;
// virtual RMGfxPrimitive* NewItemPrimitive();
// virtual RMGfxPrimitive *NewItemPrimitive();
public:
RMCharacter();
virtual ~RMCharacter();
void LinkToBoxes(RMGameBoxes* theBoxes);
void LinkToBoxes(RMGameBoxes *theBoxes);
virtual void RemoveThis(CORO_PARAM, bool &result);
// Aggiorna la posizione del personaggio
// Update the position of a character
void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc);
// Overloading del Draw
// Overloaded draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// TRUE se si è appena fermato
// TRUE if you just stopped
bool EndOfPath() { return bEndOfPath; }
// Cambia il pattern del personaggio per fermarlo
// Change the pattern of a character to STOP
virtual void Stop(CORO_PARAM);
// Controlla se il personaggio si sta muovendo
// Check if the character is moving
bool IsMoving() { return bMoving; }
// Muove il personaggio a una certa posizione
// Move the character to a certain position
void Move(CORO_PARAM, RMPoint pt, bool *result = NULL);
// Posiziona il personaggio a una certa posizione SENZA farlo muovere
// Place the character in a certain position WITHOUT moving
void SetPosition(const RMPoint &pt, int newloc = -1);
// Aspetta la fine del movimento
// Wait for the end of movement
void WaitForEndMovement(CORO_PARAM);
void SetFixedScroll(const RMPoint &fix) { m_fixedScroll = fix; }
@ -502,16 +502,16 @@ public:
*/
class RMLocation : public RMGfxTaskSetPrior {
public:
RMString m_name; // Nome
RMString m_name; // Name
private:
RMColorMode m_cmode; // Color mode
RMGfxSourceBuffer* m_buf; // Immagine della locazione
RMColorMode m_cmode; // Color mode
RMGfxSourceBuffer *m_buf; // Location picture
int m_nItems; // Numero oggetti
RMItem* m_items; // Oggetti
int m_nItems; // Number of objects
RMItem *m_items; // Objects
RMPoint m_curScroll; // Posizione corrente di scroll
RMPoint m_curScroll; // Current scroll position
RMPoint m_fixedScroll;
public:
@ -526,41 +526,41 @@ public:
RMLocation();
virtual ~RMLocation();
// Caricamento da disco
// Load variations
bool Load(const char *lpszFileName);
bool Load(Common::File &file);
bool Load(const byte *buf);
bool Load(RMDataStream &ds);
bool LoadLOX(RMDataStream &ds);
// Scaricamento
// Unload
void Unload(void);
// Overloading del Draw
// Overloaded draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Prepara un frame disegnando la locazione e tutti i suoi item
// Prepare a frame by drawing the location and all it's items
void DoFrame(RMGfxTargetBuffer *bigBuf);
// Si fa dare il numero dell'item
// Return the item at a given point
RMItem *WhichItemIsIn(const RMPoint &pt);
// Si fa dare un elemento dal suo codice MPAL
RMItem* GetItemFromCode(uint32 dwCode);
// Return the item based on it's MPAL code
RMItem *GetItemFromCode(uint32 dwCode);
// Setta la posizione corrente di scrolling
// Set the current scroll position
void SetScrollPosition(const RMPoint &scroll);
// Setta un offset aggiuntivo di scrolling da aggiungere sempre
// Sets an additinal offset for scrolling
void SetFixedScroll(const RMPoint &scroll);
// Aggiorna le coordinate di scrolling in modo da visualizzare sempre il punto fornito
// Update the scrolling coordinates to display the specified point
void UpdateScrolling(const RMPoint &ptShowThis);
// Legge la posizione di scrolling corrente
// Read the current scroll position
RMPoint ScrollPosition() { return m_curScroll; }
// Pausa sonoro
// Pause sound
void PauseSound(bool bPause);
};
@ -589,7 +589,6 @@ public:
char *operator[](int num) { return lpPeriods[num]; }
};
} // End of namespace Tony
#endif /* TONY_H */

View File

@ -124,14 +124,12 @@ Common::ErrorCode TonyEngine::Init() {
// Link to the custom graphics engine
_theEngine.InitCustomDll();
// Inizializza il gfxEngine
_theEngine.Init();
// Memoria per il thumbnail
// Allocate space for thumbnails when saving the game
m_curThumbnail = new uint16[160 * 120];
// Configurazione di default
// Set up global defaults
GLOBALS.bCfgInvLocked = false;
GLOBALS.bCfgInvNoScroll = false;
GLOBALS.bCfgTimerizedText = true;
@ -358,14 +356,14 @@ void TonyEngine::InitMusic() {
m_sfx[i] = m_utilSfx[i] = NULL;
}
// Crea la critical section per la musica
// Create the mutex for controlling music access
// csMusic = g_system->createMutex();
// Carica effetti sonori
// Preload sound effects
// PreloadUtilSFX(0,"AccendiOpzione.ADP");
// PreloadUtilSFX(1,"ApriInterfaccia.ADP");
PreloadUtilSFX(0, "U01.ADP"); // invertiti!!
PreloadUtilSFX(0, "U01.ADP"); // Reversed!!
PreloadUtilSFX(1, "U02.ADP");
}

View File

@ -149,10 +149,10 @@ public:
Common::Error loadGameState(int slot);
Common::Error saveGameState(int slot, const Common::String &desc);
// Avverte che siamo guidati dal GDI
// Warn when are being controlled by the GDI
void GDIControl(bool bCon);
// Loop che gestisce i messaggi quando siamo in pausa
// Loop that handles messages when the game is paused
void PauseLoop(void);
void Play();
@ -167,7 +167,7 @@ public:
void ShowLocation(void) { m_bDrawLocation = true; }
void HideLocation(void) { m_bDrawLocation = false; }
// Mette o leva la pausa
// Handle pause mode
void Pause(bool bPause);
bool IsPaused() { return m_bPaused; }
@ -195,19 +195,19 @@ public:
void PreloadUtilSFX(int nSfx, const char *fn);
void UnloadAllUtilSFX(void);
// Ferma tutta la parte audio
// Stop all the audio
void PauseSound(bool bPause);
void SetMusicVolume(int nChannel, int volume);
int GetMusicVolume(int nChannel);
// Salvataggio
// Handle saving
void AutoSave(CORO_PARAM);
void SaveState(int n, const char *name);
void LoadState(CORO_PARAM, int n);
static Common::String GetSaveStateFileName(int n);
// Prende il thumbnail
// Get a thumbnail
void GrabThumbnail(void);
uint16 *GetThumbnail(void) { return m_curThumbnail; }

View File

@ -93,10 +93,10 @@ void RMTony::Init(void) {
RMRes body(9999);
RMDataStream ds;
// Mostra Tony di default
m_bShow=m_bShowOmbra = true;
// Tony is shown by default
m_bShow = m_bShowOmbra = true;
// Nessuna azione in attesa
// No action pending
m_bActionPending = false;
m_bAction = false;
@ -104,18 +104,18 @@ void RMTony::Init(void) {
m_bIsTalking = false;
m_bIsStaticTalk = false;
// Apre il buffer
// Opens the buffer
ds.OpenBuffer(tony);
// Legge dallo stream l'oggetto corrente (cioè Tony)
ReadFromStream(ds, true); // da OGX
// Reads his details from the stream
ReadFromStream(ds, true);
// Chiude il buffer
// Closes the buffer
ds.Close();
// Legge il corpo di Tony
// Reads Tony's body
ds.OpenBuffer(body);
m_body.ReadFromStream(ds, true); // da OGX
m_body.ReadFromStream(ds, true);
ds.Close();
m_body.SetPattern(0);
@ -124,7 +124,7 @@ void RMTony::Init(void) {
void RMTony::Close(void) {
// Disalloca @@@ Manca la disallocazione di un item
// Disalloca @@@ Deallocation of missing item
m_ombra.Destroy();
}
@ -140,7 +140,7 @@ void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
SetSpeed(GLOBALS.nCfgTonySpeed);
// Esegue il movimento normale del personaggio
// Runs the normal character movement
_ctx->time = _vm->GetTime();
do {
@ -149,9 +149,9 @@ void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
} while (_ctx->time > m_nTimeLastStep + (1000 / 40));
// Controlla se siamo alla fine del percorso
// Check if we are at the end of a path
if (EndOfPath() && m_bActionPending) {
// Bisogna eseguire l'azione sulla quale abbiamo clickato
// Must perform the action on which we clicked
m_bActionPending = false;
}
@ -239,17 +239,16 @@ void RMTony::MoveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction,
void RMTony::ExecuteAction(int nAction, int nActionItem, int nParm) {
// fixme: See if hThread can be converted to uint32
uint32 pid;
if (nAction == TA_COMBINE) {
pid = mpalQueryDoAction(TA_COMBINE, nParm, nActionItem);
// Se è fallito il combine, proviamo con il ReceiveCombine
// If you failed the combine, we have RECEIVECOMBINE as a fallback
if (pid == CORO_INVALID_PID_VALUE) {
pid = mpalQueryDoAction(TA_RECEIVECOMBINE, nActionItem, nParm);
// Se è fallito il receive, andiamo con quelli generici
// If you failed with that, go with the generic
// @@@ CombineGive!
if (pid == CORO_INVALID_PID_VALUE) {
pid = mpalQueryDoAction(TA_COMBINE, nParm, 0);
@ -313,15 +312,15 @@ void RMTony::Stop(CORO_PARAM) {
CORO_BEGIN_CODE(_ctx);
if (m_ActionItem != NULL) {
// Richiama l'MPAL per scegliere la direzione
// Call MPAL to choose the direction
_ctx->pid = mpalQueryDoAction(21, m_ActionItem->MpalCode(), 0);
if (_ctx->pid == CORO_INVALID_PID_VALUE)
CORO_INVOKE_0(RMCharacter::Stop);
else {
bNeedToStop = false; // Se facciamo la OnWhichDirection, almeno dopo non dobbiamo fare la Stop()
bNeedToStop = false; // If we make the OnWhichDirection, we don't need at least after the Stop().
bMoving = false;
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->pid, CORO_INFINITE); // @@@ Mettere un assert dopo 10 secondi
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->pid, CORO_INFINITE); // @@@ Put an assert after 10 seconds
}
} else {
CORO_INVOKE_0(RMCharacter::Stop);
@ -406,7 +405,7 @@ void RMTony::Take(int nWhere, int nPart) {
if (nPart == 0) {
switch (GetCurPattern()) {
case PAT_STANDDOWN:
assert(0); // Non esiste il prende mentre sei in StandDown
assert(0); // Not while you're doing a StandDown
break;
case PAT_STANDUP:
@ -481,7 +480,7 @@ void RMTony::Put(int nWhere, int nPart) {
if (nPart == 0) {
switch (GetCurPattern()) {
case PAT_STANDDOWN:
//assert(0); // Non esiste il prende mentre sei in StandDown
//assert(0);
break;
case PAT_STANDUP:
@ -560,7 +559,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
m_nPatB4Talking = GetCurPattern();
m_nTalkType = nTalkType;
// Setta la direzione di parlata SOLO se non siamo in una static animation (perché l'ha già fatto)
// Set the direction of speech ONLY if we are not in a static animation (since it would have already been done)
if (!m_bIsStaticTalk) {
switch (m_nPatB4Talking) {
case PAT_STANDDOWN:
@ -591,12 +590,12 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
}
// Mette davanti il corpo di default
// Puts the body in front by default
m_bCorpoDavanti = true;
}
if (m_bPastorella) {
// Da pastorella, c'è un solo parlato
// Talking whilst a shepherdess
MainFreeze();
switch (m_TalkDirection) {
case UP:
@ -967,8 +966,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
}
break;
// La barba è l'unico caso in cui la testa è animata a parte
// mentre il corpo è quello standard
// The beard is the only case in which the head is animated separately while the body is the standard
case TALK_CONBARBASTATIC:
switch (m_TalkDirection) {
case LEFT:
@ -1127,7 +1125,7 @@ void RMTony::StartTalk(CORO_PARAM, TALKTYPE nTalkType) {
_ctx->headLoopPat, _ctx->bodyLoopPat))
return;
// Esegue il set dei pattern vero e proprio
// Perform the set pattern
if (_ctx->headStartPat != 0 || _ctx->bodyStartPat != 0) {
MainFreeze();
SetPattern(_ctx->headStartPat);
@ -1446,7 +1444,7 @@ void RMTony::EndTalk(CORO_PARAM) {
if (!EndTalkCalculate(_ctx->headStandPat, _ctx->headEndPat, _ctx->bodyEndPat, _ctx->finalPat, _ctx->bStatic))
return;
// Gestisce la fine di una animazione static lasciando tutto invariato
// Handles the end of an animated and static, leaving everything unchanged
if (m_bIsStaticTalk) {
if (m_nTalkType == TALK_CONBARBASTATIC) {
MainFreeze();
@ -1471,7 +1469,7 @@ void RMTony::EndTalk(CORO_PARAM) {
return;
}
// Set dei pattern
// Set the pattern
if (_ctx->headEndPat != 0 && _ctx->bodyEndPat != 0) {
MainFreeze();
SetPattern(_ctx->headEndPat);

View File

@ -106,13 +106,13 @@ private:
uint32 hActionThread;
protected:
// Overload dell'allocazione degli sprites per cambiare il tipo
// Overload of the allocation allocation of sprites
virtual RMGfxSourceBuffer *NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
// Thread which waits for the end of an action
// Watch thread which waits for the end of an action
static void WaitEndOfAction(CORO_PARAM, const void *param);
public: // per farlo rialzare, altrimenti private
public:
enum PATTERNS {
PAT_TAKEUP_UP1 = 9,
PAT_TAKEUP_UP2,
@ -140,7 +140,7 @@ public: // per farlo rialzare, altrimenti private
PAT_SIRIALZARIGHT,
PAT_PERTERRARIGHT,
// Pastorella!
// Sheperdess!
PAT_PAST_WALKUP,
PAT_PAST_WALKDOWN,
PAT_PAST_WALKLEFT,
@ -151,19 +151,19 @@ public: // per farlo rialzare, altrimenti private
PAT_PAST_STANDLEFT,
PAT_PAST_STANDRIGHT,
// Parlata
// Speech
PAT_TALK_UP,
PAT_TALK_DOWN,
PAT_TALK_LEFT,
PAT_TALK_RIGHT,
// Testa statica
// Static head
PAT_TESTA_UP,
PAT_TESTA_DOWN,
PAT_TESTA_LEFT,
PAT_TESTA_RIGHT,
// Risata
// Laugh
PAT_RIDELEFT_START,
PAT_RIDELEFT_LOOP,
PAT_RIDELEFT_END,
@ -171,13 +171,13 @@ public: // per farlo rialzare, altrimenti private
PAT_RIDERIGHT_LOOP,
PAT_RIDERIGHT_END,
// Parlata da pastorella
// Speaking as a shepherdess
PAT_PAST_TALKUP,
PAT_PAST_TALKDOWN,
PAT_PAST_TALKLEFT,
PAT_PAST_TALKRIGHT,
// Spavento
// Fear
PAT_SPAVENTOLEFT_START,
PAT_SPAVENTOLEFT_LOOP,
PAT_SPAVENTOLEFT_END,
@ -188,16 +188,16 @@ public: // per farlo rialzare, altrimenti private
PAT_SPAVENTODOWN_LOOP,
PAT_SPAVENTODOWN_END,
// Con oggetti: corpo completo
// With objects: full body
PAT_CONBICCHIERE,
PAT_CONCORDA,
PAT_CONVERME,
PAT_CONMARTELLO,
// Suona il fischietto
// Sound the whistle
PAT_FISCHIETTORIGHT,
// Testa con barba
// Head with beard
PAT_TALKBARBA_LEFT,
PAT_TALKBARBA_RIGHT,
@ -205,7 +205,7 @@ public: // per farlo rialzare, altrimenti private
PAT_SNIFFA_LEFT,
PAT_SNIFFA_RIGHT,
// Schifato
// Disgusted
PAT_SCHIFATOLEFT_START,
PAT_SCHIFATOLEFT_LOOP,
PAT_SCHIFATOLEFT_END,
@ -219,7 +219,7 @@ public: // per farlo rialzare, altrimenti private
PAT_NAAHRIGHT_LOOP,
PAT_NAAHRIGHT_END,
// Stand spaventato
// Stand scared
PAT_SPAVENTOLEFT_STAND,
PAT_SPAVENTORIGHT_STAND,
PAT_SPAVENTODOWN_STAND,
@ -361,81 +361,80 @@ public:
static void InitStatics();
RMTony();
// Inizializza Tony
// Initialise Tony
void Init(void);
// Libera tutta la memoria
// Free all memory
void Close(void);
// Fa un frame di Tony, aggiornando il movimento, etc
// Tony makes a frame, updating the movement, etc.
void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
// Metodi di Draw, che controlla la variabile di show
// Draw method, which controls chararacter display
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Mostra o nascondi
// Show or hide
void Show(void);
void Hide(bool bShowOmbra = false);
// Si muove e fa un azione, se necessario
// Move and make an action, if necessary
void MoveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm = 0);
// Ferma Tony (dalla parte giusta rispetto a un eventuale oggetto)
// Tony stops (on the right side with respect to any subject)
virtual void Stop(CORO_PARAM);
void StopNoAction(CORO_PARAM);
// Setta un pattern
// Set a pattern
void SetPattern(int npatt, bool bPlayP0 = false);
// Legge il pattern corrente
// Reads the current pattern
int GetCurPattern();
// Attende la fine di un pattern
// Waits until the end of a pattern
void WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE) {
RMCharacter::WaitForEndPattern(coroParam, hCustomSkip);
}
// Controlla se si trova in azione
bool InAction() { return (m_bActionPending&&m_Action != 0) | m_bAction; }
// Check if currently in an action
bool InAction() { return (m_bActionPending && m_Action != 0) | m_bAction; }
// Controlla se c'è da aggiornare il movimento di scrolling
// Check if there needs to be an update for scrolling movement
bool MustUpdateScrolling() { return ((!InAction()) || (IsMoving())); }
// Prende la posizione di Tony
// Returns Tony's position
RMPoint Position() { return m_pos; }
// Setta la posizione di scrolling
// Set the scrolling position
void SetScrollPosition(const RMPoint &pt) { RMCharacter::SetScrollPosition(pt); }
// Setta l'animazione di Take
// Set the take animation
void Take(int nWhere, int nPart);
void Put(int nWhere, int nPart);
// Start e End Talk
// Start or End Talk
bool StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
int &headLoopPat, int &bodyLoopPat);
void StartTalk(CORO_PARAM, TALKTYPE nTalkType);
bool EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic);
void EndTalk(CORO_PARAM);
// Start e End Static
// Start or End Static
void StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
int &bodyStartPat, int &bodyLoopPat);
void StartStatic(CORO_PARAM, TALKTYPE nTalkType);
void EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat);
void EndStatic(CORO_PARAM, TALKTYPE nTalkType);
// Tony si traveste!
// Tony disguises himself!
void SetPastorella(bool bIsPast) { m_bPastorella=bIsPast; }
int GetPastorella(void) { return m_bPastorella; }
// Esegue una azione
// Perform an action
void ExecuteAction(int nAction, int nActionItem, int nParm);
void PlaySfx(int nSfx) { RMItem::PlaySfx(nSfx); }
};
} // End of namespace Tony
#endif

View File

@ -40,9 +40,9 @@ namespace Tony {
* Constructor
*/
RMString::RMString() {
m_string=NULL;
m_length=0;
m_realLength=0;
m_string = NULL;
m_length = 0;
m_realLength = 0;
}
/**
@ -188,8 +188,8 @@ const RMString& RMString::operator=(const int ch) {
// Destroy the current string
if (m_realLength > 0) {
delete [] m_string;
m_string=NULL;
m_length=m_realLength=0;
m_string = NULL;
m_length = m_realLength = 0;
}
} else {
// Resize if necessary
@ -213,7 +213,7 @@ void RMString::Connect(const char *str, int size) {
if (size > 0) {
// Calculate the new lenght
nlen=m_length+size;
nlen = m_length+size;
// Resize
Resize(nlen + 1, true);
@ -242,7 +242,7 @@ const RMString &RMString::operator+=(RMString &str) {
* @returns Refrence to our string
*/
const RMString &RMString::operator+=(const char *str) {
Connect(str,strlen(str));
Connect(str, strlen(str));
return *this;
}
@ -385,7 +385,7 @@ void RMString::Format(const char *str, ...) {
}
/****************************************************************************\
* Metodi di RMFileStreamSlow
* RMFileStreamSlow Methods
\****************************************************************************/
RMFileStreamSlow::RMFileStreamSlow() : RMDataStream() {
@ -410,7 +410,7 @@ bool RMFileStreamSlow::OpenFile(Common::File &file) {
bool RMFileStreamSlow::OpenFile(const char *lpFN) {
// Apre il file in lettura
// Open file for reading
Common::File f;
if (!f.open(lpFN))
return false;
@ -679,13 +679,13 @@ int RMDataStream::Seek(int nBytes, RMDSPos origin) {
break;
case START:
m_pos=0;
m_pos = 0;
break;
case END:
if (m_length == SIZENOTKNOWN)
return m_pos;
m_pos=m_length;
m_pos = m_length;
break;
}
@ -741,8 +741,8 @@ RMPoint::RMPoint() {
* Copy constructor
*/
RMPoint::RMPoint(const RMPoint &p) {
x=p.x;
y=p.y;
x = p.x;
y = p.y;
}
/**
@ -969,13 +969,13 @@ RMRect operator-(const RMRect& rc, RMPoint p) {
RMRect operator+(RMPoint p, const RMRect& rc) {
RMRect r(rc);
return (r+=p);
return (r += p);
}
RMRect operator-(RMPoint p, const RMRect& rc) {
RMRect r(rc);
return (r+=p);
return (r += p);
}
bool RMRect::operator==(const RMRect& rc) {
@ -987,7 +987,7 @@ bool RMRect::operator!=(const RMRect& rc) {
}
void RMRect::NormalizeRect(void) {
SetRect(MIN(x1,x2), MIN(y1,y2), MAX(x1,x2), MAX(y1,y2));
SetRect(MIN(x1, x2), MIN(y1, y2), MAX(x1, x2), MAX(y1, y2));
}
RMDataStream &operator>>(RMDataStream &ds, RMRect &rc) {
@ -1029,7 +1029,7 @@ void RMResUpdate::Init(const Common::String &fileName) {
_infos = new ResUpdInfo[_numUpd];
// Load the index of the resources in the file
for (i=0; i<_numUpd; ++i) {
for (i = 0; i < _numUpd; ++i) {
ResUpdInfo &info = _infos[i];
info.dwRes = _hFile.readUint32LE();
@ -1045,7 +1045,7 @@ HGLOBAL RMResUpdate::QueryResource(uint32 dwRes) {
return NULL;
uint32 i;
for (i=0; i < _numUpd; ++i)
for (i = 0; i < _numUpd; ++i)
if (_infos[i].dwRes == dwRes)
// Found the index
break;

View File

@ -71,7 +71,7 @@ public:
void OpenBuffer(const byte *buf, int size = SIZENOTKNOWN);
void Close(void);
// Attributi
// Attributei
int Length();
virtual int Pos();
@ -86,14 +86,14 @@ public:
friend RMDataStream &operator>>(RMDataStream &df, int &var);
friend RMDataStream &operator>>(RMDataStream &df, uint32 &var);
// Lettura generica
// General read
virtual bool Read(void *buf, int size);
// Skipping & Seeking
virtual RMDataStream &operator+=(int nBytes);
virtual int Seek(int nBytes, RMDSPos origin = CUR);
// Gestione errori
// Error handling
void SetError(int ecode);
int GetError();
bool IsError();
@ -111,7 +111,7 @@ public:
RMFileStream();
virtual ~RMFileStream();
// Apre lo stream da file
// Methods for opening file
bool OpenFile(const char *lpFN);
bool OpenFile(Common::File &file);
@ -165,7 +165,7 @@ public:
RMString(const char *str);
RMString(const int ch);
// Metodi generici
// General methods
int Length() const;
void Compact();
@ -196,10 +196,10 @@ public:
friend RMString operator+(RMString &str, const char *s);
friend RMString operator+(const char *s, RMString &str);
// Estrazione da data stream
// Extraction from data streams
friend RMDataStream& operator>>(RMDataStream& df, RMString &var);
// Formattazione di stringa
// String formatting
void Format(const char *str, ...);
private:
@ -220,11 +220,11 @@ public:
RMPoint(const RMPoint &p);
RMPoint(int x1, int y1);
// Copia
// Copy
RMPoint& operator=(RMPoint p);
// Set
void Set(int x1, int y1) { x=x1; y=y1; }
void Set(int x1, int y1) { x = x1; y = y1; }
// Offset
void Offset(int xOff, int yOff);
@ -235,7 +235,7 @@ public:
RMPoint &operator-=(RMPoint p);
RMPoint operator-();
// Confronti
// Comparison
bool operator==(RMPoint p);
bool operator!=(RMPoint p);

View File

@ -245,9 +245,9 @@ void RMSnapshot::GrabScreenshot(byte *lpBuf, int dezoom, uint16 *lpDestBuf) {
else
curv = v;
sommab += cursrc[curv*RM_BBX + u] & 0x1F;
sommag += (cursrc[curv*RM_BBX + u] >> 5) & 0x1F;
sommar += (cursrc[curv*RM_BBX + u] >> 10) & 0x1F;
sommab += cursrc[curv * RM_BBX + u] & 0x1F;
sommag += (cursrc[curv * RM_BBX + u] >> 5) & 0x1F;
sommar += (cursrc[curv * RM_BBX + u] >> 10) & 0x1F;
}
}
rgb[k + 0] = (byte) (sommab * 8 / (dezoom * dezoom));

View File

@ -78,21 +78,21 @@ public:
RMWindow();
~RMWindow();
// Initialization
// Initialisation
void Init(/*HINSTANCE hInst*/);
void InitDirectDraw(void);
void Close(void);
// Repaint grafico tramite DirectDraw
// Drawing
void Repaint(void);
// Switch tra windowed e fullscreen
// Switch between windowed and fullscreen
void SwitchFullscreen(bool bFull) {}
// Legge il prossimo frame
// Reads the next frame
void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse);
// Avverte di grabbare un thumbnail per il salvataggio
// Request a thumbnail be grabbed during the next frame
void GrabThumbnail(uint16 *buf);
int getFps() const { return fps; }