mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-09-01 17:25:58 -04:00
rewrite gpathtable and path resolution
This commit is contained in:
parent
ccebc91f0d
commit
4a0c7d4fd0
125 changed files with 889 additions and 901 deletions
|
@ -1,15 +1,16 @@
|
|||
#include <platform.h>
|
||||
#include <platform/platform.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <mem.h>
|
||||
#include <memman.h>
|
||||
#include <zvuk.h>
|
||||
#include <wav_mem.h>
|
||||
#include <event.h>
|
||||
|
||||
#include <libs/memman.h>
|
||||
#include <libs/zvuk.h>
|
||||
#include <libs/wav_mem.h>
|
||||
#include <libs/event.h>
|
||||
#include "globals.h"
|
||||
#include <math.h>
|
||||
#include <strlite.h>
|
||||
#include <libs/strlite.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#define PL_RANDOM 1
|
||||
#define PL_FORWARD 2
|
||||
|
@ -379,8 +380,6 @@ const char * end_of_song_callback(void *ctx) {
|
|||
const char *get_next_music_from_playlist()
|
||||
{
|
||||
int i,step;
|
||||
static char d[MAX_FILESYSTEM_PATH];
|
||||
|
||||
if (cur_playlist==NULL) return NULL;
|
||||
if (!remain_play)
|
||||
for(i=0;cur_playlist[i]!=NULL;remain_play++,i++) cur_playlist[i][0]=32;
|
||||
|
@ -397,12 +396,9 @@ const char *get_next_music_from_playlist()
|
|||
}
|
||||
while (step);
|
||||
playing_track=i;
|
||||
snprintf(d,sizeof(d),"%s%s",pathtable[SR_MUSIC],cur_playlist[i]+1);
|
||||
const char *d = build_pathname(2, gpathtable[SR_MUSIC], cur_playlist[i]+1);
|
||||
if (!check_file_exists(d)) {
|
||||
snprintf(d,sizeof(d),"%s%s",pathtable[SR_ORGMUSIC],cur_playlist[i]+1);
|
||||
if (!check_file_exists(d)) {
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
cur_playlist[i][0]=33;
|
||||
remain_play--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue