se va la luz

This commit is contained in:
2022-09-26 18:18:27 +02:00
parent b092d3f86a
commit 35e7abcd3c
19 changed files with 1261 additions and 528 deletions

View File

@@ -17,21 +17,19 @@ Title::Title(SDL_Window *window, SDL_Renderer *renderer, Screen *screen, Input *
mFade = new Fade(renderer);
mTitleTexture = new LTexture(mRenderer);
mItemsTexture = new LTexture(mRenderer);
mTextTexture = new LTexture(mRenderer);
mTextTexture2 = new LTexture(mRenderer);
mCoffeeBitmap = new SmartSprite();
mCrisisBitmap = new SmartSprite();
mDustBitmapL = new AnimatedSprite();
mDustBitmapR = new AnimatedSprite();
mTile = new Sprite();
mGradient = new Sprite();
mText = new Text(mAsset->get("smb2.txt"), mTextTexture, mRenderer);
mText2 = new Text(mAsset->get("8bithud.txt"), mTextTexture2, mRenderer);
mText = new Text(mAsset->get("smb2.png"), mAsset->get("smb2.txt"), mRenderer);
mText2 = new Text(mAsset->get("8bithud.png"), mAsset->get("8bithud.txt"), mRenderer);
mMenu.title = new Menu(mRenderer, mText, mInput, mAsset);
mMenu.options = new Menu(mRenderer, mText, mInput, mAsset);
// Crea la textura para el mosaico de fondo
mBackground = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2);
mBackground = SDL_CreateTexture(mRenderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAME_WIDTH * 2, GAME_HEIGHT * 2);
if (mBackground == nullptr)
{
printf("TitleSurface could not be created!\nSDL Error: %s\n", SDL_GetError());
@@ -243,8 +241,8 @@ void Title::init(bool demo, Uint8 subsection)
// Coloca la ventana que recorre el mosaico de fondo de manera que coincida con el mosaico que hay pintado en el titulo al iniciar
mBackgroundWindow.x = 128;
mBackgroundWindow.y = 96;
mBackgroundWindow.w = SCREEN_WIDTH;
mBackgroundWindow.h = SCREEN_HEIGHT;
mBackgroundWindow.w = GAME_WIDTH;
mBackgroundWindow.h = GAME_HEIGHT;
// Inicializa los valores del vector con los valores del seno
for (int i = 0; i < 360; i++)
@@ -862,7 +860,7 @@ section_t Title::run(Uint8 subsection)
mCrisisBitmap->render();
// Texto con el copyright y versión
mText2->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, SCREEN_HEIGHT - (BLOCK * 2), TEXT_COPYRIGHT, 1, noColor, 1, shdwTxtColor);
mText2->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, GAME_HEIGHT - (BLOCK * 2), TEXT_COPYRIGHT, 1, noColor, 1, shdwTxtColor);
}
if (mMenuVisible == true)