X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tail_.c;h=d8429f3b7a85d3d3db2c50b4ce2ce991c5258b54;hb=a565be31ce92d6168ae6983042da75b0b683e52b;hp=567a4f18acef07bae7b69ee148d2512dbb1d13c8;hpb=f2a811af6076e5d139acaef8c0fcf7c40244d8ed;p=16.git diff --git a/src/lib/16_tail_.c b/src/lib/16_tail_.c index 567a4f18..d8429f3b 100755 --- a/src/lib/16_tail_.c +++ b/src/lib/16_tail_.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -86,7 +86,7 @@ void TL_DosLibStartup(global_game_variables_t *gvar) void TL_VidInit(global_game_variables_t *gvar) { - start_timer(gvar); + start_timer(gvar); //i do not remeber why this is here wwww i think it should be somewhere else www if(!gvar->DLStarted) TL_DosLibStartup(gvar); @@ -96,3 +96,68 @@ void TL_VidInit(global_game_variables_t *gvar) if(!gvar->video.old_mode) gvar->video.old_mode = VL_vgaGetMode();//out.h.al; gvar->video.VL_Initiated = 1; } + +//=========================================================================== + +/* +============================================================================= + + MUSIC STUFF + +============================================================================= +*/ + + +/* +================= += += StopMusic += +================= +*/ + +void PL_StopMusic(global_game_variables_t *gvar) +{ + int i; + + SD_MusicOff(); + for (i = 0;i < LASTMUSIC;i++) + if (gvar->ca.audiosegs[STARTMUSIC + i]) + { + MM_SetPurge(MEMPTRCONV gvar->ca.audiosegs[STARTMUSIC + i],3, gvar); + MM_SetLock(MEMPTRCONV gvar->ca.audiosegs[STARTMUSIC + i],false, gvar); + } +} + +//========================================================================== + + +/* +================= += += StartMusic += +================= +*/ + +void PL_StartMusic(global_game_variables_t *gvar) +{ + musicnames chunk; + + SD_MusicOff(); + chunk = 0;//++++songs[gamestate.mapon+gamestate.episode*10]; + +// if ((chunk == -1) || (MusicMode != smm_AdLib)) +//DEBUG control panel return; + +//++++ MM_BombOnError (false,gvar); +//++++ CA_CacheAudioChunk(STARTMUSIC + chunk, gvar); +//++++ MM_BombOnError (true,gvar); +//++++ if (gvar->mm.mmerror) +//++++ gvar->mm.mmerror = false; +//++++ else +//++++ { + MM_SetLock(MEMPTRCONV gvar->ca.audiosegs[STARTMUSIC + chunk],true, gvar); + SD_StartMusic((MusicGroup far *)gvar->ca.audiosegs[STARTMUSIC + chunk]); +//++++ } +}