Creada la classe Resource

Afegida la musica i els sons a Resource
This commit is contained in:
2024-10-19 10:07:14 +02:00
parent b879673bc2
commit f23dcae5b6
19 changed files with 243 additions and 258 deletions

View File

@@ -223,7 +223,7 @@ JA_Sound_t *JA_LoadSound(const char* filename) {
int JA_PlaySound(JA_Sound_t *sound, const int loop)
{
if (!JA_soundEnabled) return 0;
if (!JA_soundEnabled || !sound) return 0;
int channel = 0;
while (channel < JA_MAX_SIMULTANEOUS_CHANNELS && channels[channel].state != JA_CHANNEL_FREE) { channel++; }