Play Intro songs
This commit is contained in:
parent
e5e55a9550
commit
caf277f5a0
|
@ -243,6 +243,15 @@ extern void wait_vsync(void);
|
|||
extern char KeyArray[128];
|
||||
extern void RemoveKeyboardDriver();
|
||||
extern void AddKeyboardDriver();
|
||||
|
||||
// IIGS NTP Songs
|
||||
extern char egypt_lz4;
|
||||
extern char mbase_lz4;
|
||||
extern char rick1_lz4;
|
||||
extern char rick1victory_lz4;
|
||||
extern char samerica_lz4;
|
||||
extern char schwarz_lz4;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,11 +20,19 @@ segment "dat";
|
|||
#include "maps.h"
|
||||
|
||||
map_t map_maps[MAP_NBR_MAPS] = {
|
||||
#ifdef IIGS
|
||||
{0x0008, 0x008b, 0x0008, 000000, &samerica_lz4},
|
||||
{0x0008, 0x008b, 0x0068, 0x0009, &egypt_lz4},
|
||||
{0x0010, 0x008b, 0x0010, 0x0014, &schwarz_lz4},
|
||||
{0x0010, 0x008b, 0x0010, 0x0026, &mbase_lz4},
|
||||
{0x0074, 0x00c8, 0x0008, 0x0026, &mbase_lz4},
|
||||
#else
|
||||
{0x0008, 0x008b, 0x0008, 000000, "sounds/tune0.wav"},
|
||||
{0x0008, 0x008b, 0x0068, 0x0009, "sounds/tune1.wav"},
|
||||
{0x0010, 0x008b, 0x0010, 0x0014, "sounds/tune2.wav"},
|
||||
{0x0010, 0x008b, 0x0010, 0x0026, "sounds/tune3.wav"},
|
||||
{0x0074, 0x00c8, 0x0008, 0x0026, "sounds/tune4.wav"},
|
||||
#endif
|
||||
};
|
||||
|
||||
submap_t map_submaps[MAP_NBR_SUBMAPS] = {
|
||||
|
|
17
src/game.c
17
src/game.c
|
@ -200,12 +200,25 @@ game_toggleCheat(U8 nbr)
|
|||
#endif
|
||||
|
||||
#ifdef ENABLE_SOUND
|
||||
#ifdef IIGS
|
||||
void NTPstop(void);
|
||||
void NTPplay(int bPlayOnce);
|
||||
int NTPprepare(void* pNTPData);
|
||||
extern char* pNtpSong;
|
||||
#endif
|
||||
/*
|
||||
* Music
|
||||
*/
|
||||
void
|
||||
game_setmusic(char *name, U8 loop)
|
||||
{
|
||||
#ifdef IIGS
|
||||
NTPstop();
|
||||
LZ4_Unpack(pNtpSong, name);
|
||||
NTPprepare((void*)pNtpSong);
|
||||
NTPplay(0);
|
||||
#endif
|
||||
|
||||
#ifndef IIGS
|
||||
U8 channel;
|
||||
|
||||
|
@ -223,6 +236,10 @@ game_setmusic(char *name, U8 loop)
|
|||
void
|
||||
game_stopmusic(void)
|
||||
{
|
||||
#ifdef IIGS
|
||||
NTPstop();
|
||||
#endif
|
||||
|
||||
#ifndef IIGS
|
||||
syssnd_stopsound(music_snd);
|
||||
music_snd = NULL;
|
||||
|
|
|
@ -49,7 +49,9 @@ screen_gameover(void)
|
|||
period = game_period; /* save period, */
|
||||
game_period = 50; /* and use our own */
|
||||
#ifdef ENABLE_SOUND
|
||||
#ifndef IIGS
|
||||
game_setmusic("sounds/gameover.wav", 1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,11 @@ screen_introMain(void)
|
|||
game_period = 50;
|
||||
game_rects = &draw_SCREENRECT;
|
||||
#ifdef ENABLE_SOUND
|
||||
#ifdef IIGS
|
||||
game_setmusic(&rick1_lz4, -1);
|
||||
#else
|
||||
game_setmusic("sounds/tune5.wav", -1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -137,9 +137,17 @@ screen_introMap(void)
|
|||
}
|
||||
|
||||
if (control_status & CONTROL_EXIT) /* check for exit request */
|
||||
{
|
||||
#ifdef IIGS
|
||||
game_stopmusic();
|
||||
#endif
|
||||
return SCREEN_EXIT;
|
||||
}
|
||||
|
||||
if (seq == 5) { /* end as soon as key pressed */
|
||||
#ifdef IIGS
|
||||
game_stopmusic();
|
||||
#endif
|
||||
sysvid_clear();
|
||||
seq = 0;
|
||||
return SCREEN_DONE;
|
||||
|
|
|
@ -61,7 +61,11 @@ screen_xrick(void)
|
|||
case 1: /* wait */
|
||||
if (wait++ > 0x2) {
|
||||
#ifdef ENABLE_SOUND
|
||||
#ifdef IIGS
|
||||
syssnd_play(SND_BULLET,1);
|
||||
#else
|
||||
game_setmusic("sounds/bullet.wav", 1);
|
||||
#endif
|
||||
#endif
|
||||
seq = 2;
|
||||
wait = 0;
|
||||
|
|
|
@ -40,7 +40,6 @@ char* pNtpDriver = NULL;
|
|||
char* pNtpSong = NULL;
|
||||
|
||||
extern char ntpplayer_lz4;
|
||||
extern char samerica_lz4;
|
||||
extern char sfx_lz4;
|
||||
extern char sfx_lz5;
|
||||
|
||||
|
|
Loading…
Reference in New Issue