Skip to content

Commit

Permalink
Adição da música da intro e começando a sincronizar
Browse files Browse the repository at this point in the history
  • Loading branch information
8enrich committed Sep 2, 2024
1 parent a0a763c commit f709e78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Binary file added assets/intro.mp3
Binary file not shown.
12 changes: 8 additions & 4 deletions src/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ void Menu::OptionsHandling(){

void Menu::Intro(){
std::vector<std::string> texts = {"A dabzr & 8enrich production", "Sound by Daniel Santos & Art by José Iramar"};
Sound intro = LoadSound((std::string(ASSETS_PATH)+ "intro.mp3").c_str());
PlaySound(intro);
bool tip = false;
for(int i = 0; i < 3; i++){
int colorA = 0;
float posY = 1.0f/2;
for(int j = 0; j < 138; j++){
for(int j = 0; j < 350; j++){
int key = GetKeyPressed();
if(key == KEY_ENTER){
isFirstEntrance = false;
StopSound(intro);
return;
}
if(key != KEY_NULL) tip = true;
Expand All @@ -57,12 +60,13 @@ void Menu::Intro(){
if(i < 2) ray_functions::DrawFormatedText(texts[i].c_str(), Vec2<double>{1.0f/2, 1.0f/2}, 1.0f/20, color);
else ray_functions::DrawScaledImage(logoTexture, {1.0f/2, posY}, 0.5);
EndDrawing();
if(j < 64){
colorA+=4;
if(!i && j < 115) continue;
if(j < 250){
colorA+=2;
if(colorA > 255) colorA = 255;
}
else{
colorA-=4;
colorA-=3;
if(colorA < 0) colorA = 0;
}
if(j > 31 && posY > 1.0f/3) posY-=0.00158;
Expand Down

0 comments on commit f709e78

Please sign in to comment.