diff --git a/AUTHORS b/AUTHORS index 983db78..42ad501 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,12 +2,15 @@ Li-Ri Game Official site : http://github.com/petitlapin/Li-Ri -Copyright (c) 2023 +Copyright (c) 2023-2026 Johnny Jazeix : port to SDL2 + android + cmake +Copyright (c) 2026 +Polishyk Mykyta "zabidentwfan@ukr.net" : musics ("menu.ogg", "ingame1.ogg", "ingame2.ogg") + Copyright (c) 2006 Dominique Roux-Serret: roux-serret@ifrance.com : design & programming & graphics & website. -Maf464 : site= http://maf464.free.fr : musics +Maf464 : site= http://maf464.free.fr : musics ("ingame1_legacy.xm", "ingame2_legacy.xm", "menu_legacy.mod") Thanks to: Christian H. and Adrian F. for the German correction. @@ -25,4 +28,4 @@ F. Doruk "http://www.fisek.org.tr" for Turkish translation. S. Etienne for the Hungarian translation. W. Bas for Dutch translation. An, Sanggap for the Korean version and translation. -M. Juhasz for the Hungarian corrections. +M. Juhasz for the Hungarian corrections. \ No newline at end of file diff --git a/COPYING.Music b/COPYING.Music index d0e8c1b..49c63fb 100644 --- a/COPYING.Music +++ b/COPYING.Music @@ -1,8 +1,12 @@ -LICENSE FOR 'jeu1.xm', 'jeu2.xm' and 'menu.mod' musics in Sounds directory. +LICENSE FOR 'ingame1_legacy.xm', 'ingame2_legacy.xm' and 'menu_legacy.mod' musics in Sounds directory. Copyright (c) 2006 - Maf464 - Charcosset B. - charcosset.b@free.fr site= http://maf464.free.fr +LICENSE FOR 'menu.ogg' (Li-Ri main theme), 'ingame1.ogg', 'ingame2.ogg' musics in Sounds directory. + +Copyright (c) 2026 - ZABIDEN - Mykyta Polishyk - zabidentwfan@ukr.net + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 diff --git a/NEWS.yaml b/NEWS.yaml index f60c0a5..4297edd 100644 --- a/NEWS.yaml +++ b/NEWS.yaml @@ -1,4 +1,9 @@ --- +Version: 3.1.7 +Date: 2026-xx-xx +Description: + - New audio menu music created by zabidenhtf (Mykyta Polishyk) +--- Version: 3.1.6 Date: 2025-12-24 Description: diff --git a/README.md b/README.md index 8e9384d..7bcd28e 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,16 @@ Information on how to compile Li-Ri is available in the INSTALL file. ------------- -Copyright (c) 2023 +Copyright (c) 2023-2026 Johnny Jazeix: port to SDL2 + android + cmake +Copyright (c) 2026 +Polishyk Mykyta "zabidentwfan@ukr.net" : musics ("menu.ogg") + Copyright (c) 2006 Dominique Roux-Serret: design & programming & graphics & website. -Maf464: musics +Maf464: musics ("jeu1.xm", "jeu2.xm", "menu_legacy.mod") + [Get it on F-Droid mZabiden) { + Pref.AudioTheme = mMaf; + } + m_audio.LoadMusic(0); + PyE = 4; + break; case 0: - case 5: case 6: + case 7: Pref.Volume += SDL_MIX_MAXVOLUME / 10.0; if (Pref.Volume > SDL_MIX_MAXVOLUME) { Pref.Volume = SDL_MIX_MAXVOLUME; @@ -501,8 +525,8 @@ eMenu Menu::SDLMain_Options() m_audio.Play(sLive); break; case 1: - case 7: case 8: + case 9: Pref.VolumeM += SDL_MIX_MAXVOLUME / 10.0; if (Pref.VolumeM > SDL_MIX_MAXVOLUME) { Pref.VolumeM = SDL_MIX_MAXVOLUME; @@ -514,12 +538,12 @@ eMenu Menu::SDLMain_Options() case SDLK_UP: PyE--; if (PyE < 0) { - PyE = 4; + PyE = 5; } break; case SDLK_DOWN: PyE++; - if (PyE >= 5) { + if (PyE >= 6) { PyE = 0; } break; @@ -544,7 +568,15 @@ eMenu Menu::SDLMain_Options() SDLMain_Language(); PyE = 3; break; - case 5: // Diminue volume sons + case 4: // Audio theme + Pref.AudioTheme = eAudioTheme(Pref.AudioTheme + 1); + if (Pref.AudioTheme > mZabiden) { + Pref.AudioTheme = mMaf; + } + m_audio.LoadMusic(0); + PyE = 4; + break; + case 6: // lower sounds volume Pref.Volume -= SDL_MIX_MAXVOLUME / 10.0; if (Pref.Volume < 0) { Pref.Volume = 0; @@ -552,7 +584,7 @@ eMenu Menu::SDLMain_Options() m_audio.DoVolume(); m_audio.Play(sLive); break; - case 6: + case 7: Pref.Volume += SDL_MIX_MAXVOLUME / 10.0; if (Pref.Volume > SDL_MIX_MAXVOLUME) { Pref.Volume = SDL_MIX_MAXVOLUME; @@ -560,14 +592,14 @@ eMenu Menu::SDLMain_Options() m_audio.DoVolume(); m_audio.Play(sLive); break; - case 7: // Diminue volume music + case 8: // lower music volume Pref.VolumeM -= SDL_MIX_MAXVOLUME / 10.0; if (Pref.VolumeM < 0) { Pref.VolumeM = 0; } m_audio.DoVolume(); break; - case 8: + case 9: Pref.VolumeM += SDL_MIX_MAXVOLUME / 10.0; if (Pref.VolumeM > SDL_MIX_MAXVOLUME) { Pref.VolumeM = SDL_MIX_MAXVOLUME; @@ -606,6 +638,15 @@ eMenu Menu::SDLMain_Options() Ec.PrintSprite(arrows, 4, 450, 300); } + switch (Pref.AudioTheme) { + case mMaf: + DrawString(430, 400, "MAF", Sprites[fmenu].Image[0]); + break; + case mZabiden: + DrawString(380, 400, "ZABIDEN", Sprites[fmenu].Image[0]); + break; + } + NumSp = (currentTime / 30) % 25; Ec.PrintSprite(sound, NumSp, 150, 110); NumSp = (currentTime / 30) % 25; @@ -639,12 +680,10 @@ eMenu Menu::SDLMain_Options() Print_Main(180); break; case 4: - Print_Main(CentreM); + Print_Main(470); break; case 5: - PyE = 0; - Print_Main(); - PyE = 5; + Print_Main(CentreM); break; case 6: PyE = 0; @@ -652,7 +691,7 @@ eMenu Menu::SDLMain_Options() PyE = 6; break; case 7: - PyE = 1; + PyE = 0; Print_Main(); PyE = 7; break; @@ -661,6 +700,11 @@ eMenu Menu::SDLMain_Options() Print_Main(); PyE = 8; break; + case 9: + PyE = 1; + Print_Main(); + PyE = 9; + break; default: Print_Main(); } diff --git a/src/preference.h b/src/preference.h index b24bdef..c181e90 100644 --- a/src/preference.h +++ b/src/preference.h @@ -99,6 +99,11 @@ struct sOldPreference struct sScore Sco[8]; // Mémorise les scores }; +enum eAudioTheme { + mMaf = 0, // original Ri-Li soundtrack + mZabiden = 1 // updated soundtrack +}; + struct sNewPreference { e_Difficulty Difficulty { Normal }; // current game difficulty @@ -115,6 +120,7 @@ struct sNewPreference float Volume { (float)SDL_MIX_MAXVOLUME }; // audio volume float VolumeM { (float)SDL_MIX_MAXVOLUME }; // music volume struct sScore Sco[8]; // store scores + eAudioTheme AudioTheme { mZabiden }; // which audio theme to use int HumanRightsQuiz { 1 }; // enable the human rights questions at the end of a level }; diff --git a/src/sprite.cc b/src/sprite.cc index 754e372..18b3785 100644 --- a/src/sprite.cc +++ b/src/sprite.cc @@ -287,7 +287,7 @@ void DrawNumber(int x, int y, int Nombre, SDL_Texture *Fond) /*** Affiche un Texte ***/ /************************/ -void DrawString(int x, int y, char *Texte, SDL_Texture *Fond) +void DrawString(int x, int y, const char *Texte, SDL_Texture *Fond) { int i = 0; int Le; diff --git a/src/sprite.h b/src/sprite.h index df5f7a2..ee5ecc7 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -183,7 +183,7 @@ int StringLength(char *Texte); // Retourne la longueur en pixels d'un texte bool CharExist(char C); // Si un caracataire existe void DrawNumber(int x, int y, int Nombre, SDL_Texture *Fond = nullptr); // Affiche un chiffre -void DrawString(int x, int y, char *Texte, SDL_Texture *Fond = nullptr); // Affiche une chaine de caractaire +void DrawString(int x, int y, const char *Texte, SDL_Texture *Fond = nullptr); // Affiche une chaine de caractaire void DrawText(int x, int y, e_Sprite Text, SDL_Texture *Fond = nullptr); // Affiche un text dans la langue diff --git a/src/utils.cc b/src/utils.cc index 9070adf..94a584a 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -274,6 +274,10 @@ bool Utils::LoadPref() if (pv) { Pref.VolumeM = std::stof(pv); } + pv = ini.GetValue("main", "audioTheme"); + if (pv) { + Pref.AudioTheme = eAudioTheme(std::stoi(pv)); + } pv = ini.GetValue("main", "humanRightsQuiz"); if (pv) { Pref.HumanRightsQuiz = std::stoi(pv); @@ -347,6 +351,7 @@ void Utils::SavePref() ini.SetValue("main", "audioVolume", std::to_string(Pref.Volume).c_str()); ini.SetValue("main", "musicVolume", std::to_string(Pref.VolumeM).c_str()); ini.SetValue("main", "humanRightsQuiz", std::to_string(Pref.HumanRightsQuiz).c_str()); + ini.SetValue("main", "audioTheme", std::to_string((int)Pref.AudioTheme).c_str()); ini.SetValue("easy", "maxLevel", std::to_string(Pref.LevelMax[0]).c_str()); ini.SetValue("normal", "maxLevel", std::to_string(Pref.LevelMax[1]).c_str()); ini.SetValue("difficult", "maxLevel", std::to_string(Pref.LevelMax[2]).c_str());