Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ To create a package, use the *package* target from cmake invocation: `cmake --bu
## Releasing
Update NEWS.yaml to add a new version and the changelog.
Then, run `./tools/create_release.sh -v 3.1.5` to update all the files necessary for the release.

## Audio sounds
The ogg sounds have been created using LMMS DAW. You can install it on your OS using your package manager. To generate the ogg files in command line, run `lmms render input.mmpz -f ogg -b 160 -o output.ogg`
5 changes: 5 additions & 0 deletions NEWS.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
Version: 4.0.0
Date: 2026-xx-xx
Description:
- New audio theme (menu and in game music) created by zabidenhtf (Mykyta Polishyk)
---
Version: 3.1.6
Date: 2025-12-24
Description:
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ You drive a toy wooden train on many levels and you must collect all the wagons
German, Italian, Japanese, Korean, Portuguese, Russian, Slovak,
Spanish, Swedish, Polish, Turkish, Hungarian, Dutch.
- Colorful animated wood engine.
- 50 levels in this first version
- 3 beautiful musics and many sound effects.
- 50 levels in this first version.
- 2 themes with 3 beautiful pieces of music and many sound effects.

## Screenshots
![Main menu](fastlane/metadata/android/en-US/images/sevenInchScreenshots/01.png)
Expand All @@ -21,7 +21,7 @@ Main menu
Gameplay

## Building
Information on how to compile Li-Ri is available in the INSTALL file.
Information on how to compile Li-Ri is available in the INSTALL.md file.

## Thanks
* Christian H. and Adrian F. for the German correction.
Expand All @@ -43,14 +43,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\_zabiden.ogg", "ingame1\_zabiden.ogg", "ingame2\_zabiden.ogg")

Copyright (c) 2006
Dominique Roux-Serret: design & programming & graphics & website.
Maf464: musics

Copyright (c) 2006 (for "menu.mod", "ingame1.xm", "ingame2.xm") MAF464 (email charcosset.b@free.fr; website http://maf464.free.fr). This music licensed under GPL license. See COPYING for details
Copyright (c) 2006 Maf464 (email charcosset.b@free.fr; website http://maf464.free.fr): ("menu\_maf.ogg", "ingame1\_maf.ogg", "ingame2\_maf.ogg")

[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
Expand Down
File renamed without changes.
Binary file added Sounds/ingame1_zabiden.mmpz
Binary file not shown.
Binary file added Sounds/ingame1_zabiden.ogg
Binary file not shown.
File renamed without changes.
Binary file added Sounds/ingame2_zabiden.mmpz
Binary file not shown.
Binary file added Sounds/ingame2_zabiden.ogg
Binary file not shown.
File renamed without changes.
Binary file added Sounds/menu_zabiden.mmpz
Binary file not shown.
Binary file added Sounds/menu_zabiden.ogg
Binary file not shown.
33 changes: 22 additions & 11 deletions src/audio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_log.h> // for SDL_LogInfo, SDL_LOG_CATEGORY_APPLICATION
#include <cstring>
#include <cstdio>

#include "audio.h"
#include "utils.h"
Expand All @@ -51,7 +52,7 @@ bool Audio::Init()
{
char PathFile[512];

if (Mix_OpenAudio(22050, AUDIO_S16, 1, 1024)) {
if (Mix_OpenAudio(44100, AUDIO_S16, 1, 1024)) {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Enable to init Sound card: %s", SDL_GetError());
return false;
}
Expand Down Expand Up @@ -97,18 +98,14 @@ bool Audio::Init()
Utils::GetPath(PathFile);
Sound[sLive] = Mix_LoadWAV(PathFile);

strcpy(PathFile, "Sounds/menu.mod");
Utils::GetPath(PathFile);
Music = Mix_LoadMUS(PathFile);

return true;
}

/*** Loads a music track, 0 = menu music 1,2,3,4=game music tracks ***/
/*********************************************************************/
void Audio::LoadMusic(int Num)
{
char Provi[512] = "Sounds/ingame1.xm";
char Provi[512];

if (!N) {
return;
Expand All @@ -118,18 +115,32 @@ void Audio::LoadMusic(int Num)

if (Music) {
PauseMusic(true);
Mix_HaltMusic(); // Stops the music
Mix_HaltMusic();
Mix_FreeMusic(Music);
Music = nullptr;
}

if (Num == 0) { // if menu music
strcpy(Provi, "Sounds/menu.mod");
if (Num == 0) { // menu music
switch (Pref.AudioTheme) {
case mMaf:
strcpy(Provi, "Sounds/menu_maf.mod");
break;
case mZabiden:
strcpy(Provi, "Sounds/menu_zabiden.ogg");
break;
}
Utils::GetPath(Provi);
Music = Mix_LoadMUS(Provi);
}
else {
Provi[13] = (char)(Num) + '0';
else { // in game music
switch (Pref.AudioTheme) {
case mMaf:
sprintf(Provi, "Sounds/ingame%d_maf.xm", Num);
break;
case mZabiden:
sprintf(Provi, "Sounds/ingame%d_zabiden.ogg", Num);
break;
}
Utils::GetPath(Provi);
Music = Mix_LoadMUS(Provi);
}
Expand Down
4 changes: 3 additions & 1 deletion src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ int main(int narg, char *argv[])
exit(-1);
}

audio.PlayMusic();
// Start background music
audio.LoadMusic(0);

Mouse mouse { audio, screen };
mouse.InitStart();

Expand Down
Loading
Loading