Fixed offset from render messages with nokia font
This commit is contained in:
@@ -75,7 +75,7 @@ Temps detes:
|
|||||||
## 37 - TEXTOS DEL JUEGO
|
## 37 - TEXTOS DEL JUEGO
|
||||||
D E M O
|
D E M O
|
||||||
## 38 - TEXTOS DEL JUEGO
|
## 38 - TEXTOS DEL JUEGO
|
||||||
PANTALLA
|
Pantalla
|
||||||
## 39 - MARCADOR
|
## 39 - MARCADOR
|
||||||
PUNTS
|
PUNTS
|
||||||
## 40 - MARCADOR
|
## 40 - MARCADOR
|
||||||
@@ -99,7 +99,7 @@ SI
|
|||||||
## 49 - MENU GAME OVER
|
## 49 - MENU GAME OVER
|
||||||
NO
|
NO
|
||||||
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
||||||
FELICITATS!!
|
Felicitats!!
|
||||||
## 51 - MENU DEL TITULO
|
## 51 - MENU DEL TITULO
|
||||||
1 JUGADOR
|
1 JUGADOR
|
||||||
## 52 - MENU DEL TITULO
|
## 52 - MENU DEL TITULO
|
||||||
@@ -148,10 +148,10 @@ NEAREST
|
|||||||
ACTIVADA
|
ACTIVADA
|
||||||
## 74 - MENU DE OPCIONES
|
## 74 - MENU DE OPCIONES
|
||||||
DESACTIVADA
|
DESACTIVADA
|
||||||
## 75 - MENU DE OPCIONES
|
## 75 - JUEGO
|
||||||
ENDAVANT!
|
Endavant!
|
||||||
## 76 - JUEGO
|
## 76 - JUEGO
|
||||||
1.000.000 DE PUNTS!
|
1.000.000 de punts!
|
||||||
## 77 - PANTALLA DE GAME OVER
|
## 77 - PANTALLA DE GAME OVER
|
||||||
PUNTS J1:
|
PUNTS J1:
|
||||||
## 78 - PANTALLA DE GAME OVER
|
## 78 - PANTALLA DE GAME OVER
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Time Stopped:
|
|||||||
## 37 - TEXTOS DEL JUEGO
|
## 37 - TEXTOS DEL JUEGO
|
||||||
D E M O
|
D E M O
|
||||||
## 38 - TEXTOS DEL JUEGO
|
## 38 - TEXTOS DEL JUEGO
|
||||||
STAGE
|
Stage
|
||||||
## 39 - MARCADOR
|
## 39 - MARCADOR
|
||||||
SCORE
|
SCORE
|
||||||
## 40 - MARCADOR
|
## 40 - MARCADOR
|
||||||
@@ -99,7 +99,7 @@ YES
|
|||||||
## 49 - MENU GAME OVER
|
## 49 - MENU GAME OVER
|
||||||
NO
|
NO
|
||||||
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
||||||
NICE!!
|
Perfect!!
|
||||||
## 51 - MENU DEL TITULO
|
## 51 - MENU DEL TITULO
|
||||||
1 PLAYER
|
1 PLAYER
|
||||||
## 52 - MENU DEL TITULO
|
## 52 - MENU DEL TITULO
|
||||||
@@ -151,7 +151,7 @@ OFF
|
|||||||
## 75 - JUEGO
|
## 75 - JUEGO
|
||||||
Get Ready!
|
Get Ready!
|
||||||
## 76 - JUEGO
|
## 76 - JUEGO
|
||||||
1.000.000 POINTS!
|
1.000.000 points!
|
||||||
## 77 - PANTALLA DE GAME OVER
|
## 77 - PANTALLA DE GAME OVER
|
||||||
PLAYER1 SCORE:
|
PLAYER1 SCORE:
|
||||||
## 78 - PANTALLA DE GAME OVER
|
## 78 - PANTALLA DE GAME OVER
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Tiempo:
|
|||||||
## 37 - TEXTOS DEL JUEGO
|
## 37 - TEXTOS DEL JUEGO
|
||||||
D E M O
|
D E M O
|
||||||
## 38 - TEXTOS DEL JUEGO
|
## 38 - TEXTOS DEL JUEGO
|
||||||
FASE
|
Fase
|
||||||
## 39 - MARCADOR
|
## 39 - MARCADOR
|
||||||
PUNTOS
|
PUNTOS
|
||||||
## 40 - MARCADOR
|
## 40 - MARCADOR
|
||||||
@@ -99,7 +99,7 @@ SI
|
|||||||
## 49 - MENU GAME OVER
|
## 49 - MENU GAME OVER
|
||||||
NO
|
NO
|
||||||
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
## 50 - TEXTO DE COMPLETAR EL JUEGO
|
||||||
FELICIDADES!!
|
Felicidades!!
|
||||||
## 51 - MENU DEL TITULO
|
## 51 - MENU DEL TITULO
|
||||||
1 JUGADOR
|
1 JUGADOR
|
||||||
## 52 - MENU DEL TITULO
|
## 52 - MENU DEL TITULO
|
||||||
@@ -148,10 +148,10 @@ NEAREST
|
|||||||
ACTIVADA
|
ACTIVADA
|
||||||
## 74 - MENU DE OPCIONES
|
## 74 - MENU DE OPCIONES
|
||||||
DESACTIVADA
|
DESACTIVADA
|
||||||
## 75 - MENU DE OPCIONES
|
## 75 - JUEGO
|
||||||
ADELANTE!
|
Adelante!
|
||||||
## 76 - JUEGO
|
## 76 - JUEGO
|
||||||
1.000.000 DE PUNTOS!
|
1.000.000 de puntos!
|
||||||
## 77 - PANTALLA DE GAME OVER
|
## 77 - PANTALLA DE GAME OVER
|
||||||
PUNTUACION J1:
|
PUNTUACION J1:
|
||||||
## 78 - PANTALLA DE GAME OVER
|
## 78 - PANTALLA DE GAME OVER
|
||||||
|
|||||||
@@ -50,14 +50,14 @@ Game::Game(int numPlayers, SDL_Renderer *renderer, std::string *filelist, Lang *
|
|||||||
mTextureText = new LTexture();
|
mTextureText = new LTexture();
|
||||||
mTextureTextScoreBoard = new LTexture();
|
mTextureTextScoreBoard = new LTexture();
|
||||||
mTextureTextBig = new LTexture();
|
mTextureTextBig = new LTexture();
|
||||||
mTextureTextNokia = new LTexture();
|
mTextureTextNokia2 = new LTexture();
|
||||||
mTextureTextNokiaBig = new LTexture();
|
mTextureTextNokiaBig2 = new LTexture();
|
||||||
|
|
||||||
mText = new Text(mFileList[48], mTextureText, mRenderer);
|
mText = new Text(mFileList[48], mTextureText, mRenderer);
|
||||||
mTextScoreBoard = new Text(mFileList[46], mTextureTextScoreBoard, mRenderer);
|
mTextScoreBoard = new Text(mFileList[46], mTextureTextScoreBoard, mRenderer);
|
||||||
mTextBig = new Text(mFileList[47], mTextureTextBig, mRenderer);
|
mTextBig = new Text(mFileList[47], mTextureTextBig, mRenderer);
|
||||||
mTextNokia = new Text(mFileList[52], mTextureTextNokia, mRenderer);
|
mTextNokia2 = new Text(mFileList[57], mTextureTextNokia2, mRenderer);
|
||||||
mTextNokiaBig = new Text(mFileList[55], mTextureTextNokiaBig, mRenderer);
|
mTextNokiaBig2 = new Text(mFileList[55], mTextureTextNokiaBig2, mRenderer);
|
||||||
|
|
||||||
mMenuGameOver = new Menu(mRenderer, mText, mInput, mFileList);
|
mMenuGameOver = new Menu(mRenderer, mText, mInput, mFileList);
|
||||||
mMenuPause = new Menu(mRenderer, mText, mInput, mFileList);
|
mMenuPause = new Menu(mRenderer, mText, mInput, mFileList);
|
||||||
@@ -194,13 +194,13 @@ Game::~Game()
|
|||||||
delete mTextureTextBig;
|
delete mTextureTextBig;
|
||||||
mTextureTextBig = nullptr;
|
mTextureTextBig = nullptr;
|
||||||
|
|
||||||
mTextureTextNokia->unload();
|
mTextureTextNokia2->unload();
|
||||||
delete mTextureTextNokia;
|
delete mTextureTextNokia2;
|
||||||
mTextureTextNokia = nullptr;
|
mTextureTextNokia2 = nullptr;
|
||||||
|
|
||||||
mTextureTextNokiaBig->unload();
|
mTextureTextNokiaBig2->unload();
|
||||||
delete mTextureTextNokiaBig;
|
delete mTextureTextNokiaBig2;
|
||||||
mTextureTextNokiaBig = nullptr;
|
mTextureTextNokiaBig2 = nullptr;
|
||||||
|
|
||||||
delete mText;
|
delete mText;
|
||||||
mText = nullptr;
|
mText = nullptr;
|
||||||
@@ -211,11 +211,11 @@ Game::~Game()
|
|||||||
delete mTextScoreBoard;
|
delete mTextScoreBoard;
|
||||||
mTextScoreBoard = nullptr;
|
mTextScoreBoard = nullptr;
|
||||||
|
|
||||||
delete mTextNokia;
|
delete mTextNokia2;
|
||||||
mTextNokia = nullptr;
|
mTextNokia2 = nullptr;
|
||||||
|
|
||||||
delete mTextNokiaBig;
|
delete mTextNokiaBig2;
|
||||||
mTextNokiaBig = nullptr;
|
mTextNokiaBig2 = nullptr;
|
||||||
|
|
||||||
delete mMenuGameOver;
|
delete mMenuGameOver;
|
||||||
mMenuGameOver = nullptr;
|
mMenuGameOver = nullptr;
|
||||||
@@ -541,8 +541,8 @@ bool Game::loadMedia()
|
|||||||
success &= loadTextureFromFile(mTextureText, mFileList[30], mRenderer);
|
success &= loadTextureFromFile(mTextureText, mFileList[30], mRenderer);
|
||||||
success &= loadTextureFromFile(mTextureTextScoreBoard, mFileList[27], mRenderer);
|
success &= loadTextureFromFile(mTextureTextScoreBoard, mFileList[27], mRenderer);
|
||||||
success &= loadTextureFromFile(mTextureTextBig, mFileList[29], mRenderer);
|
success &= loadTextureFromFile(mTextureTextBig, mFileList[29], mRenderer);
|
||||||
success &= loadTextureFromFile(mTextureTextNokia, mFileList[28], mRenderer);
|
success &= loadTextureFromFile(mTextureTextNokia2, mFileList[56], mRenderer);
|
||||||
success &= loadTextureFromFile(mTextureTextNokiaBig, mFileList[54], mRenderer);
|
success &= loadTextureFromFile(mTextureTextNokiaBig2, mFileList[54], mRenderer);
|
||||||
|
|
||||||
success &= loadTextureFromFile(mTexturePlayer1Legs, mFileList[39], mRenderer);
|
success &= loadTextureFromFile(mTexturePlayer1Legs, mFileList[39], mRenderer);
|
||||||
success &= loadTextureFromFile(mTexturePlayer1Head, mFileList[41], mRenderer);
|
success &= loadTextureFromFile(mTexturePlayer1Head, mFileList[41], mRenderer);
|
||||||
@@ -2982,14 +2982,14 @@ void Game::renderMessages()
|
|||||||
//const color_t color = {0x17, 0x17, 0x26};
|
//const color_t color = {0x17, 0x17, 0x26};
|
||||||
//mTextBig->writeShadowed((int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), color, 2);
|
//mTextBig->writeShadowed((int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), color, 2);
|
||||||
//mTextBig->writeDX(TXT_STROKE, (int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), 1, noColor, 1, shdwTxtColor);
|
//mTextBig->writeDX(TXT_STROKE, (int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), 1, noColor, 1, shdwTxtColor);
|
||||||
mTextNokiaBig->write((int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), -2);
|
mTextNokiaBig2->write((int)mGetReadyBitmapPath[mCounter], PLAY_AREA_CENTER_Y - 8, mLang->getText(75), -2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Time Stopped
|
// Time Stopped
|
||||||
if (mTimeStopped)
|
if (mTimeStopped)
|
||||||
{
|
{
|
||||||
if ((mTimeStoppedCounter > 100) || (mTimeStoppedCounter % 10 > 4))
|
if ((mTimeStoppedCounter > 100) || (mTimeStoppedCounter % 10 > 4))
|
||||||
mText->writeDX(TXT_CENTER | TXT_STROKE, PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, mLang->getText(36) + std::to_string(mTimeStoppedCounter / 10), 1, noColor, 1, shdwTxtColor);
|
mTextNokia2->writeDX(TXT_CENTER, PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, mLang->getText(36) + std::to_string(mTimeStoppedCounter / 10), 0, noColor, 1, shdwTxtColor);
|
||||||
|
|
||||||
if (mTimeStoppedCounter > 100)
|
if (mTimeStoppedCounter > 100)
|
||||||
{
|
{
|
||||||
@@ -3006,7 +3006,7 @@ void Game::renderMessages()
|
|||||||
// D E M O
|
// D E M O
|
||||||
if (mDemo.enabled)
|
if (mDemo.enabled)
|
||||||
if (mDemo.counter % 30 > 14)
|
if (mDemo.counter % 30 > 14)
|
||||||
mTextBig->writeDX(TXT_CENTER | TXT_SHADOW, PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, mLang->getText(37), 0, noColor, 2, shdwTxtColor);
|
mTextNokiaBig2->writeDX(TXT_CENTER, PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, mLang->getText(37), 0, noColor, 2, shdwTxtColor);
|
||||||
|
|
||||||
// STAGE NUMBER
|
// STAGE NUMBER
|
||||||
if (mStageBitmapCounter < STAGE_COUNTER)
|
if (mStageBitmapCounter < STAGE_COUNTER)
|
||||||
@@ -3014,13 +3014,13 @@ void Game::renderMessages()
|
|||||||
std::string text = mLang->getText(38) + std::to_string(mStage[mCurrentStage].number);
|
std::string text = mLang->getText(38) + std::to_string(mStage[mCurrentStage].number);
|
||||||
if (!mGameCompleted)
|
if (!mGameCompleted)
|
||||||
{
|
{
|
||||||
mTextBig->writeDX(TXT_CENTER | TXT_SHADOW, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter], text, 1, noColor, 2, shdwTxtColor);
|
mTextNokiaBig2->writeDX(TXT_CENTER, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter], text, -2, noColor, 2, shdwTxtColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Texto de juego completado
|
{ // Texto de juego completado
|
||||||
text = mLang->getText(50);
|
text = mLang->getText(50);
|
||||||
mTextBig->writeDX(TXT_CENTER | TXT_STROKE, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter], text, 1, noColor, 1, shdwTxtColor);
|
mTextNokiaBig2->writeDX(TXT_CENTER, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter], text, -2, noColor, 1, shdwTxtColor);
|
||||||
mText->writeDX(TXT_CENTER | TXT_STROKE, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter] + 17, mLang->getText(76), 1, noColor, 1, shdwTxtColor);
|
mTextNokia2->writeDX(TXT_CENTER, PLAY_AREA_CENTER_X, mStageBitmapPath[mStageBitmapCounter] + 17, mLang->getText(76), 0, noColor, 1, shdwTxtColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3457,7 +3457,7 @@ void Game::initPaths()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Letrero de GetReady
|
// Letrero de GetReady
|
||||||
const int size = mTextBig->lenght(mLang->getText(75), -2);
|
const int size = mTextNokiaBig2->lenght(mLang->getText(75), -2);
|
||||||
|
|
||||||
const float start1 = PLAY_AREA_LEFT - size;
|
const float start1 = PLAY_AREA_LEFT - size;
|
||||||
const float finish1 = PLAY_AREA_CENTER_X - (size / 2);
|
const float finish1 = PLAY_AREA_CENTER_X - (size / 2);
|
||||||
|
|||||||
@@ -108,14 +108,14 @@ private:
|
|||||||
LTexture *mTextureText; // Textura para el texto del juego
|
LTexture *mTextureText; // Textura para el texto del juego
|
||||||
LTexture *mTextureTextScoreBoard; // Textura para el texto del marcador
|
LTexture *mTextureTextScoreBoard; // Textura para el texto del marcador
|
||||||
LTexture *mTextureTextBig; // Textura para el texto grande
|
LTexture *mTextureTextBig; // Textura para el texto grande
|
||||||
LTexture *mTextureTextNokia; // Textura para la fuente de texto Nokia
|
LTexture *mTextureTextNokia2; // Textura para la fuente de texto Nokia
|
||||||
LTexture *mTextureTextNokiaBig; // Textura para la fuente de texto Nokia grande
|
LTexture *mTextureTextNokiaBig2; // Textura para la fuente de texto Nokia grande
|
||||||
|
|
||||||
Text *mText; // Fuente para los textos del juego
|
Text *mText; // Fuente para los textos del juego
|
||||||
Text *mTextBig; // Fuente de texto grande
|
Text *mTextBig; // Fuente de texto grande
|
||||||
Text *mTextScoreBoard; // Fuente para el marcador del juego
|
Text *mTextScoreBoard; // Fuente para el marcador del juego
|
||||||
Text *mTextNokia; // Otra fuente de texto para mesajes
|
Text *mTextNokia2; // Otra fuente de texto para mesajes
|
||||||
Text *mTextNokiaBig; // Y la versión en grande
|
Text *mTextNokiaBig2; // Y la versión en grande
|
||||||
|
|
||||||
Menu *mMenuGameOver; // Menú de la pantalla de game over
|
Menu *mMenuGameOver; // Menú de la pantalla de game over
|
||||||
Menu *mMenuPause; // Menú de la pantalla de pausa
|
Menu *mMenuPause; // Menú de la pantalla de pausa
|
||||||
|
|||||||
Reference in New Issue
Block a user