mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 04:43:12 +00:00
(svn r14810) -Codechange: use the proper style for global variables.
This commit is contained in:
parent
455a6e4554
commit
099022224f
@ -5,7 +5,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "music.h"
|
#include "music.h"
|
||||||
|
|
||||||
const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE] = {
|
const SongSpecs _origin_songs_specs[] = {
|
||||||
{"gm_tt00.gm", "Tycoon DELUXE Theme"},
|
{"gm_tt00.gm", "Tycoon DELUXE Theme"},
|
||||||
{"gm_tt02.gm", "Easy Driver"},
|
{"gm_tt02.gm", "Easy Driver"},
|
||||||
{"gm_tt03.gm", "Little Red Diesel"},
|
{"gm_tt03.gm", "Little Red Diesel"},
|
||||||
@ -29,3 +29,5 @@ const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE] = {
|
|||||||
{"gm_tt20.gm", "Jammit"},
|
{"gm_tt20.gm", "Jammit"},
|
||||||
{"gm_tt11.gm", "Hard Drivin'"},
|
{"gm_tt11.gm", "Hard Drivin'"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
assert_compile(NUM_SONGS_AVAILABLE == lengthof(_origin_songs_specs));
|
||||||
|
@ -13,6 +13,6 @@ struct SongSpecs {
|
|||||||
char song_name[64];
|
char song_name[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE];
|
extern const SongSpecs _origin_songs_specs[];
|
||||||
|
|
||||||
#endif //MUSIC_H
|
#endif //MUSIC_H
|
||||||
|
@ -96,7 +96,7 @@ static void DoPlaySong()
|
|||||||
{
|
{
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
FioFindFullPath(filename, lengthof(filename), GM_DIR,
|
FioFindFullPath(filename, lengthof(filename), GM_DIR,
|
||||||
origin_songs_specs[_music_wnd_cursong - 1].filename);
|
_origin_songs_specs[_music_wnd_cursong - 1].filename);
|
||||||
_music_driver->PlaySong(filename);
|
_music_driver->PlaySong(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ static void SelectSongToPlay()
|
|||||||
do {
|
do {
|
||||||
/* We are now checking for the existence of that file prior
|
/* We are now checking for the existence of that file prior
|
||||||
* to add it to the list of available songs */
|
* to add it to the list of available songs */
|
||||||
if (FioCheckFileExists(origin_songs_specs[_playlists[msf.playlist][i] - 1].filename, GM_DIR)) {
|
if (FioCheckFileExists(_origin_songs_specs[_playlists[msf.playlist][i] - 1].filename, GM_DIR)) {
|
||||||
_cur_playlist[j] = _playlists[msf.playlist][i];
|
_cur_playlist[j] = _playlists[msf.playlist][i];
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
@ -1189,7 +1189,7 @@ static char *GetSpecialNameString(char *buff, int ind, const int64 *argv, const
|
|||||||
return GenPresidentName(buff, GetInt32(&argv), last);
|
return GenPresidentName(buff, GetInt32(&argv), last);
|
||||||
|
|
||||||
case 4: // song names
|
case 4: // song names
|
||||||
return strecpy(buff, origin_songs_specs[GetInt32(&argv) - 1].song_name, last);
|
return strecpy(buff, _origin_songs_specs[GetInt32(&argv) - 1].song_name, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* town name? */
|
/* town name? */
|
||||||
|
Loading…
Reference in New Issue
Block a user