VERSIÓ 1.3.7

- [NEW] music.enable() i sound.enable()
This commit is contained in:
2025-10-30 16:27:40 +01:00
parent 4172c6af3d
commit 62ac5ae92d
7 changed files with 82 additions and 1 deletions

View File

@@ -410,6 +410,10 @@ int main(int argc,char*argv[]){
if (fullscreen) screen_fullscreen=strcmp(fullscreen, "true")==0?true:false;
const char *cursor = file_getconfigvalue("cursor");
if (cursor) screen_cursor=strcmp(cursor, "true")?true:false;
const char *music_enabled = file_getconfigvalue("music");
if (music_enabled) JA_EnableMusic(strcmp(music_enabled, "true")==0?true:false);
const char *sound_enabled = file_getconfigvalue("sound");
if (sound_enabled) JA_EnableSound(strcmp(sound_enabled, "true")==0?true:false);
}
setdest(newsurf(screen_width, screen_height));
@@ -1255,6 +1259,18 @@ float musicpos()
return JA_GetMusicPosition();
}
void enablemusic(const bool value)
{
JA_EnableMusic(value);
file_setconfigvalue("music", value?"true":"false");
}
const bool ismusicenabled()
{
return JA_IsMusicEnabled();
}
int loadsound(const char *filename) {
int size;
char *buffer = file_getfilebuffer(filename, size);
@@ -1282,6 +1298,17 @@ void stopsound(int soundchannel) {
//Mix_HaltChannel(soundchannel);
}
void enablesound(const bool value)
{
JA_EnableSound(value);
file_setconfigvalue("sound", value?"true":"false");
}
const bool issoundenabled()
{
return JA_IsSoundEnabled();
}
int getzoom() {
return screen_zoom;
}