Skip to content

Commit

Permalink
TONY: Converting Italian comments to English and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 20, 2012
1 parent 333c30b commit 0450275
Show file tree
Hide file tree
Showing 10 changed files with 433 additions and 519 deletions.
612 changes: 266 additions & 346 deletions engines/tony/loc.cpp

Large diffs are not rendered by default.

119 changes: 59 additions & 60 deletions engines/tony/loc.h
Expand Up @@ -128,8 +128,8 @@ class RMPattern {

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;
Expand Down Expand Up @@ -237,43 +237,43 @@ class RMItem : public RMGfxTask {

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);
RMPoint Hotspot() { return m_hot; }
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; }
Expand All @@ -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;
Expand Down Expand Up @@ -351,19 +351,19 @@ class RMGameBoxes {
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);
Expand Down Expand Up @@ -429,38 +429,38 @@ class RMCharacter : protected RMItem {
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; }
Expand Down Expand Up @@ -502,16 +502,16 @@ class RMWipe : public RMGfxTask {
*/
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:
Expand All @@ -526,41 +526,41 @@ RMItem* m_items; // Oggetti
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);
};

Expand Down Expand Up @@ -589,7 +589,6 @@ class RMMessage {
char *operator[](int num) { return lpPeriods[num]; }
};


} // End of namespace Tony

#endif /* TONY_H */
12 changes: 5 additions & 7 deletions engines/tony/tony.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}

Expand Down
12 changes: 6 additions & 6 deletions engines/tony/tony.h
Expand Up @@ -149,10 +149,10 @@ class TonyEngine : public Engine {
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();
Expand All @@ -167,7 +167,7 @@ class TonyEngine : public Engine {
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; }

Expand Down Expand Up @@ -195,19 +195,19 @@ class TonyEngine : public Engine {
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; }

Expand Down

0 comments on commit 0450275

Please sign in to comment.