canvi de pc

This commit is contained in:
2025-03-08 22:23:40 +01:00
parent 9f8d1fbcd7
commit 72cb39da78
3 changed files with 28 additions and 23 deletions

BIN
data/gfx/intro/intro2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -474,7 +474,7 @@ void Director::setFileList()
}
{ // Intro
Asset::get()->add(prefix + "/data/gfx/intro/intro.png", AssetType::BITMAP);
Asset::get()->add(prefix + "/data/gfx/intro/intro2.png", AssetType::BITMAP);
}
{ // Logo

View File

@@ -20,7 +20,7 @@
// Constructor
Intro::Intro()
: texture_(Resource::get()->getTexture("intro.png")),
: texture_(Resource::get()->getTexture("intro2.png")),
text_(Resource::get()->getText("04b_25_metal"))
{
@@ -28,67 +28,70 @@ Intro::Intro()
section::name = section::Name::INTRO;
section::options = section::Options::NONE;
const int BITMAP_WIDTH = texture_->getWidth() / 2;
const int BITMAP_HEIGHT = texture_->getHeight() / 3;
// Inicializa los bitmaps de la intro
constexpr int totalBitmaps = 6;
for (int i = 0; i < totalBitmaps; ++i)
constexpr int TOTAL_BITMAPS = 6;
for (int i = 0; i < TOTAL_BITMAPS; ++i)
{
auto ss = std::make_unique<SmartSprite>(texture_);
ss->setWidth(128);
ss->setHeight(96);
ss->setWidth(BITMAP_WIDTH);
ss->setHeight(BITMAP_HEIGHT);
ss->setFinishedCounter(20);
ss->setDestX(param.game.game_area.center_x - 64);
ss->setDestY(param.game.game_area.first_quarter_y - 24);
ss->setDestX(param.game.game_area.center_x - (BITMAP_WIDTH / 2));
ss->setDestY(param.game.game_area.first_quarter_y - (BITMAP_HEIGHT / 4));
bitmaps_.push_back(std::move(ss));
}
bitmaps_[0]->setPosX(-128);
bitmaps_[0]->setPosY(param.game.game_area.first_quarter_y - 24);
bitmaps_[0]->setPosX(-BITMAP_WIDTH);
bitmaps_[0]->setPosY(param.game.game_area.first_quarter_y - (BITMAP_HEIGHT / 4));
bitmaps_[0]->setVelX(0.0f);
bitmaps_[0]->setVelY(0.0f);
bitmaps_[0]->setAccelX(0.6f);
bitmaps_[0]->setAccelY(0.0f);
bitmaps_[0]->setSpriteClip(0, 0, 128, 96);
bitmaps_[0]->setSpriteClip(0, 0, BITMAP_WIDTH, BITMAP_HEIGHT);
bitmaps_[1]->setPosX(param.game.width);
bitmaps_[1]->setPosY(param.game.game_area.first_quarter_y - 24);
bitmaps_[1]->setPosY(param.game.game_area.first_quarter_y - (BITMAP_HEIGHT / 4));
bitmaps_[1]->setVelX(-1.0f);
bitmaps_[1]->setVelY(0.0f);
bitmaps_[1]->setAccelX(-0.3f);
bitmaps_[1]->setAccelY(0.0f);
bitmaps_[1]->setSpriteClip(128, 0, 128, 96);
bitmaps_[1]->setSpriteClip(BITMAP_WIDTH, 0, BITMAP_WIDTH, BITMAP_HEIGHT);
bitmaps_[2]->setPosX(param.game.game_area.center_x - 64);
bitmaps_[2]->setPosY(-96);
bitmaps_[2]->setPosX(param.game.game_area.center_x - (BITMAP_WIDTH / 2));
bitmaps_[2]->setPosY(-BITMAP_HEIGHT);
bitmaps_[2]->setVelX(0.0f);
bitmaps_[2]->setVelY(3.0f);
bitmaps_[2]->setAccelX(0.1f);
bitmaps_[2]->setAccelY(0.3f);
bitmaps_[2]->setSpriteClip(0, 96, 128, 96);
bitmaps_[2]->setSpriteClip(0, BITMAP_HEIGHT, BITMAP_WIDTH, BITMAP_HEIGHT);
bitmaps_[2]->setFinishedCounter(250);
bitmaps_[3]->setPosX(param.game.game_area.center_x - 64);
bitmaps_[3]->setPosX(param.game.game_area.center_x - (BITMAP_WIDTH / 2));
bitmaps_[3]->setPosY(param.game.height);
bitmaps_[3]->setVelX(0.0f);
bitmaps_[3]->setVelY(-0.7f);
bitmaps_[3]->setAccelX(0.0f);
bitmaps_[3]->setAccelY(0.0f);
bitmaps_[3]->setSpriteClip(128, 96, 128, 96);
bitmaps_[3]->setSpriteClip(BITMAP_WIDTH, BITMAP_HEIGHT, BITMAP_WIDTH, BITMAP_HEIGHT);
bitmaps_[4]->setPosX(param.game.game_area.center_x - 64);
bitmaps_[4]->setPosY(-96);
bitmaps_[4]->setPosX(param.game.game_area.center_x - (BITMAP_WIDTH / 2));
bitmaps_[4]->setPosY(-BITMAP_HEIGHT);
bitmaps_[4]->setVelX(0.0f);
bitmaps_[4]->setVelY(3.0f);
bitmaps_[4]->setAccelX(0.1f);
bitmaps_[4]->setAccelY(0.3f);
bitmaps_[4]->setSpriteClip(0, 192, 128, 96);
bitmaps_[4]->setSpriteClip(0, BITMAP_HEIGHT * 2, BITMAP_WIDTH, BITMAP_HEIGHT);
bitmaps_[5]->setPosX(param.game.width);
bitmaps_[5]->setPosY(param.game.game_area.first_quarter_y - 24);
bitmaps_[5]->setPosY(param.game.game_area.first_quarter_y - (BITMAP_HEIGHT / 4));
bitmaps_[5]->setVelX(-0.7f);
bitmaps_[5]->setVelY(0.0f);
bitmaps_[5]->setAccelX(0.0f);
bitmaps_[5]->setAccelY(0.0f);
bitmaps_[5]->setSpriteClip(128, 192, 128, 96);
bitmaps_[5]->setSpriteClip(BITMAP_WIDTH, BITMAP_HEIGHT * 2, BITMAP_WIDTH, BITMAP_HEIGHT);
// Inicializa los textos de la intro
constexpr int totalTexts = 9;
@@ -140,7 +143,9 @@ Intro::Intro()
texts_[8]->setSpeed(16);
for (auto &text : texts_)
{
text->center(param.game.game_area.center_x);
}
}
// Recarga todas las texturas