--- SIDPlayer/src/main.h 2000/07/28 12:42:30 1.1.1.1 +++ SIDPlayer/src/main.h 2004/01/12 15:15:49 1.8 @@ -1,7 +1,7 @@ /* - * main.h - SIDPlayer main program + * main.h - SIDPlayer common routines * - * SIDPlayer (C) Copyright 1996-2000 Christian Bauer + * SIDPlayer (C) Copyright 1996-2004 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,22 +28,25 @@ * Definitions */ -// C64 replay routine address (set by LoadPSIDFile(), used by sid.cpp) +// C64 replay routine address (set by UpdatePlayAdr(), used by sid.cpp) extern uint16 play_adr; -// Module name, author name, copyright info in UTF8 charset (set by LoadPSIDFile()) +// Module name, author name, copyright info in ISO Latin1 (BeOS: UTF8) charset (set by LoadPSIDFile()) extern char module_name[64], author_name[64], copyright_info[64]; +// Total number of songs in module and currently played song number (0..n) +extern int number_of_songs, current_song; + /* * Functions */ // Init everything -extern void InitAll(void); +extern void InitAll(int &argc, char **&argv); // Exit everything -extern void ExitAll(void); +extern void ExitAll(); // Read PSID file header to buffer extern bool LoadPSIDHeader(const char *file, uint8 *p); @@ -57,19 +60,25 @@ extern bool IsPSIDFile(const char *file) // Load PSID file for playing extern bool LoadPSIDFile(const char *file); +// PSID file loaded and ready? +extern bool IsPSIDLoaded(); + // Select song for playing extern void SelectSong(int num); +// Update play_adr if necessary +extern void UpdatePlayAdr(); + // Adjust replay speed extern void AdjustSpeed(int percent); // Show About window -extern void AboutWindow(void); +extern void AboutWindow(); // Fast pseudo-random number generator extern uint32 f_rand_seed; -inline static uint8 f_rand(void) +inline static uint8 f_rand() { f_rand_seed = f_rand_seed * 1103515245 + 12345; return f_rand_seed >> 16;