Move similar/arch/sdl/jukebox.c -> similar/arch/sdl/jukebox.cpp

This commit is contained in:
Kp 2012-11-11 22:12:51 +00:00
parent ace3238790
commit fce2717e83
4 changed files with 18 additions and 2 deletions

View file

@ -733,7 +733,7 @@ class DXXProgram(DXXCommon):
objects_similar_arch_sdlmixer = DXXCommon.create_lazy_object_property([{
'source':[os.path.join('similar', f) for f in [
'arch/sdl/digi_mixer.cpp',
'arch/sdl/jukebox.c'
'arch/sdl/jukebox.cpp'
]
],
'transform_target':_apply_target_name,

View file

@ -1,6 +1,10 @@
#ifndef __JUKEBOX_H__
#define __JUKEBOX_H__
#ifdef __cplusplus
extern "C" {
#endif
extern const char *const jukebox_exts[7];
void jukebox_unload();
@ -12,4 +16,8 @@ int jukebox_is_playing();
int jukebox_numtracks();
void jukebox_list();
#ifdef __cplusplus
}
#endif
#endif

View file

@ -7,6 +7,10 @@
#ifndef _SONGS_H
#define _SONGS_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct bim_song_info {
char filename[16];
} bim_song_info;
@ -45,5 +49,9 @@ void songs_set_volume(int volume);
void songs_uninit();
#ifdef __cplusplus
}
#endif
#endif

View file

@ -118,7 +118,7 @@ int read_m3u(void)
{
if (JukeboxSongs.num_songs >= JukeboxSongs.max_songs)
{
char **new_list = d_realloc(JukeboxSongs.list, JukeboxSongs.max_buf*sizeof(char *)*MEM_K);
char **new_list = reinterpret_cast<char **>(d_realloc(JukeboxSongs.list, JukeboxSongs.max_buf*sizeof(char *)*MEM_K));
if (new_list == NULL)
break;
JukeboxSongs.max_buf *= MEM_K;