X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tail.c;h=4d6040cb640fcbb51a9907bf805aeb7998b76c3d;hb=adefd71cb8a3e70da10523e4eb97e442a655a6cd;hp=b56a6600b921f896880cf19f6da268ef9958bab5;hpb=18e1b0c530d68a65c6e9434b03ad8df4c1985a1a;p=16.git diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index b56a6600..4d6040cb 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -409,6 +409,69 @@ noxor: //=========================================================================== +/* +============================================================================= + + MUSIC STUFF + +============================================================================= +*/ + + +/* +================= += += StopMusic += +================= +*/ + +void TL_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 TL_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]); +//++++ } +} + /* ================== = @@ -450,6 +513,128 @@ void DebugMemory_(global_game_variables_t *gvar, boolean q) // if(q) MM_ShowMemory (gvar); } +/* +=================== += += TestSprites += +=================== +*/ + +#if 0 +#define DISPWIDTH 110 +#define TEXTWIDTH 40 +void TestSprites(void) +{ + int hx,hy,sprite,oldsprite,bottomy,topx,shift; + spritetabletype far *spr; + spritetype _seg *block; + unsigned mem,scan; + + + VW_FixRefreshBuffer (); + US_CenterWindow (30,17); + + US_CPrint ("Sprite Test"); + US_CPrint ("-----------"); + + hy=PrintY; + hx=(PrintX+56)&(~7); + topx = hx+TEXTWIDTH; + + US_Print ("Chunk:\nWidth:\nHeight:\nOrgx:\nOrgy:\nXl:\nYl:\nXh:\nYh:\n" + "Shifts:\nMem:\n"); + + bottomy = PrintY; + + sprite = STARTSPRITES; + shift = 0; + + do + { + if (sprite>=STARTTILE8) + sprite = STARTTILE8-1; + else if (spritewidth);US_Print ("\n");PrintX=hx; + US_PrintUnsigned (spr->height);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->orgx);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->orgy);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->xl);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->yl);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->xh);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->yh);US_Print ("\n");PrintX=hx; + US_PrintSigned (spr->shifts);US_Print ("\n");PrintX=hx; + if (!block) + { + US_Print ("-----"); + } + else + { + mem = block->sourceoffset[3]+5*block->planesize[3]; + mem = (mem+15)&(~15); // round to paragraphs + US_PrintUnsigned (mem); + } + + oldsprite = sprite; + do + { + // + // draw the current shift, then wait for key + // + VWB_Bar(topx,hy,DISPWIDTH,bottomy-hy,WHITE); + if (block) + { + PrintX = topx; + PrintY = hy; + US_Print ("Shift:"); + US_PrintUnsigned (shift); + US_Print ("\n"); + VWB_DrawSprite (topx+16+shift*2,PrintY,sprite); + } + + VW_UpdateScreen(); + + scan = IN_WaitForKey (); + + switch (scan) + { + case sc_UpArrow: + sprite++; + break; + case sc_DownArrow: + sprite--; + break; + case sc_LeftArrow: + if (--shift == -1) + shift = 3; + break; + case sc_RightArrow: + if (++shift == 4) + shift = 0; + break; + case sc_Escape: + return; + } + + } while (sprite == oldsprite); + + } while (1); + + +} + +#endif + /* ========================== = @@ -524,10 +709,7 @@ void Quit (global_game_variables_t *gvar, char *error) //=========================================================================== -#ifndef __WATCOMC__ -char global_temp_status_text[512]; -char global_temp_status_text2[512]; -#else +#ifdef __WATCOMC__ // // for mary4 (XT) // this is from my XT's BIOS