X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tail_.c;h=ad107a4fa201638f5ea32a1657c69547ffa5ea60;hb=04fe364b1c5b4fdddca823044c2d584531691af6;hp=2e680faf5a6dc14ff5ff44cef210661be3c36990;hpb=320be82ab5e414d1b771b295403218b614ed9d13;p=16.git diff --git a/src/lib/16_tail_.c b/src/lib/16_tail_.c index 2e680faf..ad107a4f 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-2021 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -26,9 +26,20 @@ #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(); @@ -60,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; @@ -67,3 +96,69 @@ 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 += +================= +*/ +#if 0 +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]); +//++++ } +} +#endif //disabled due to some fuckery i am not sure.