X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tail_.c;h=a9d9d8b313b8b2ade77d779a878bbb2c6fa0e0d3;hb=5af1604f7af6c1d1ab94299bfe6a4195b203a323;hp=3ab26f0b09e6e48d1e40168b8b2fc33c3e2aa89a;hpb=23c4d02d9d36e5c5aa030fa5d1413d1558fc8af0;p=16.git diff --git a/src/lib/16_tail_.c b/src/lib/16_tail_.c index 3ab26f0b..a9d9d8b3 100755 --- a/src/lib/16_tail_.c +++ b/src/lib/16_tail_.c @@ -24,10 +24,22 @@ */ #include "src/lib/16_tail.h" +#include "src/lib/16_vl.h" -void TL_VidInit(global_game_variables_t *gvar) +//=========================================================================== + +/* +==================== += += TL_DosLibStartup += +==================== +*/ + +void TL_DosLibStartup(global_game_variables_t *gvar) { - start_timer(gvar); + if(gvar->DLStarted) + return; // DOSLIB: check our environment probe_dos(); @@ -59,6 +71,24 @@ void TL_VidInit(global_game_variables_t *gvar) _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); textInit(); + gvar->DLStarted = true; +} + +//=========================================================================== + +/* +==================== += += TL_VidInit += +==================== +*/ + +void TL_VidInit(global_game_variables_t *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); // get old video mode //in.h.ah = 0xf; @@ -66,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]); +//++++ } +}