X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=blobdiff_plain;f=src%2Flib%2F16_tail.h;h=ef3b906609c3d2ff4be9a3b3e4681b884a53e904;hp=d9d37b1632e768a72cf4c1d9f81b9033e6a66518;hb=050d28da3358d5c1434fda542ec11adbee182ea5;hpb=f32fe889a9eeb3fc17f9441f0c257e8ef44ceb2d diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index d9d37b16..ef3b9066 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -24,18 +24,121 @@ #define __16_TAIL__ #include "src/lib/16_head.h" +#include "src/lib/16text.h" #include "src/lib/16_pm.h" #include "src/lib/16_mm.h" #include "src/lib/16_ca.h" #include "src/lib/16_in.h" +#include "src/lib/16_dbg.h" +#include "src/lib/16_vl.h" +#include "src/lib/testpatt.h" -extern boolean dbg_debugpm; - -void DebugMemory_(global_game_variables_t *gvar, boolean q); -void Shutdown16(global_game_variables_t *gvar); -void Startup16(global_game_variables_t *gvar); #ifdef __WATCOMC__ -void Quit (char *error); +#include +#include +#include +#include +#include #endif +extern struct glob_game_vars *ggvv; + +#define FIZZLEFADEFUNCTION \ + if(gvar.in.inst->Keyboard[sc_F]){ FizzleFade(\ + atoi(gvar.video.page[0].data),atoi(gvar.video.page[1].data),\ +320,240,true, &gvar); IN_UserInput(1, &gvar); } \ + +#define TAIL_FUNCTIONKEYFUNCTIONS \ + if(gvar.in.inst->Keyboard[88]){ panswitch=!panswitch; IN_UserInput(1, &gvar); } \ + TAIL_FUNCTIONKEYFUNCTIONS0EXE + +#define RFDEBUGFUNCTIONS +#ifdef __DEBUG_RF__ +#undef RFDEBUGFUNCTIONS +#define RFDEBUGFUNCTIONS \ + if(gvar.in.inst->Keyboard[sc_F11]){ dbg_pagedelayrendermap=!dbg_pagedelayrendermap; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_F9]){ dbg_pagenorendermap=!dbg_pagenorendermap; IN_UserInput(1, &gvar); } #endif + +/*#define MAPDEBUGFUNCTIONS +#ifdef __DEBUG_MAP__ +#undef MAPDEBUGFUNCTIONS +#define MAPDEBUGFUNCTIONS \ + if(gvar.in.inst->Keyboard[sc_F12]){ dbg_maptext!=dbg_maptext; IN_UserInput(1, &gvar); } +#endif*/ + +/*#define SPRIDEBUGFUNCTIONS +#ifdef __DEBUG_SPRI__ +#undef SPRIDEBUGFUNCTIONS +#define SPRIDEBUGFUNCTIONS \ + if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } +// if(gvar.in.inst->Keyboard[sc_F9]){ dbg_pagenorendermap=!dbg_pagenorendermap; IN_UserInput(1, &gvar); } +#endif*/ + +#define TAIL_FUNCTIONKEYFUNCTIONS0EXE \ + if(gvar.in.inst->Keyboard[sc_F4]){ turboXT(12); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[68/*sc_F10*/]){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_F8]){ gvar.video.vga_state.bgps=!gvar.video.vga_state.bgps; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_F7]){ ZC_ShowMV(&gvar.mv, 0, 1); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_F6]){ ZC_ShowMV(&gvar.mv, 0, 0); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_Q]){ VL_modexPrintTextBox(&gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_W]){ VL_MemToScreen((byte __far *)&gvar, 64, 64, 16, 16, &gvar); IN_UserInput(1, &gvar); } \ + RFDEBUGFUNCTIONS +//FIZZLEFADEFUNCTION + +#define TAIL_PANKEYFUN \ + TAIL_PANKEYFUNZC \ + TAIL_FUNCTIONKEYDRAWJUNK + +#define TAIL_PANKEYFUNZC \ + ZC_panPageManual(&gvar.mv, &gvar.player, 0); + +#define FUNCTIONKEYSHOWMV \ + if(gvar.in.inst->Keyboard[1+1]){ gvar.video.sp=0; ZC_ShowMV(&gvar.mv, 0, 0); } \ + if(gvar.in.inst->Keyboard[2+1]){ gvar.video.sp=1; ZC_ShowMV(&gvar.mv, 0, 0); } \ + if(gvar.in.inst->Keyboard[3+1]){ gvar.video.sp=2; ZC_ShowMV(&gvar.mv, 0, 1); } \ + if(gvar.in.inst->Keyboard[4+1]){ gvar.video.sp=3; ZC_ShowMV(&gvar.mv, 0, 1); } + +#define TAIL_FUNCTIONKEYDRAWJUNK \ + FUNCTIONKEYSHOWMV \ + TAIL_FUNCTIONKEYDRAWJUNKNOMV + +#define TAIL_FUNCTIONKEYDRAWJUNKNOMV \ + if(gvar.in.inst->Keyboard[sc_A]){ modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 3); } \ + if(gvar.in.inst->Keyboard[sc_S]){ modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 4); } \ +\ + if(gvar.in.inst->Keyboard[sc_Z]){ DRAWCORNERBOXES } \ + if(gvar.in.inst->Keyboard[sc_X]){ TESTBG12 } \ + if(gvar.in.inst->Keyboard[sc_C]){ TESTBG34 } \ + if(gvar.in.inst->Keyboard[sc_V]){ VL_PatternDraw(&gvar.video, 0, 1, 1); } \ + if(gvar.in.inst->Keyboard[sc_I]){ dbg_maptext=!dbg_maptext; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_PgDn]){ \ + rotateR(gvar.video.palette, sizeof(gvar.video.palette)/sizeof(gvar.video.palette[0])); \ + VL_UpdatePaletteWrite(&gvar.video.palette, 0, &gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_PgUp]){ \ + rotateL(gvar.video.palette, sizeof(gvar.video.palette)/sizeof(gvar.video.palette[0])); \ + VL_UpdatePaletteWrite(&gvar.video.palette, 0, &gvar); IN_UserInput(1, &gvar); } +#ifdef __BORLANDC__ +#define PAL_WRITE_REG 0x03C8 /* Color register, write address */ +#define PAL_DATA_REG 0x03C9 /* Color register, data port */ +word modexPalOverscan(word col); +#endif + +void Shutdown16(global_game_variables_t *gvar), + Startup16(global_game_variables_t *gvar), + StartupCAMMPM (global_game_variables_t *gvar), + ShutdownCAMMPM (global_game_variables_t *gvar); +void TL_DosLibStartup(global_game_variables_t *gvar); +void TL_VidInit(global_game_variables_t *gvar); +boolean FizzleFade (unsigned source, unsigned dest, unsigned width, unsigned height, unsigned frames, boolean abortable, global_game_variables_t *gvar); +void DebugMemory_(global_game_variables_t *gvar, boolean q); +void ClearMemory (global_game_variables_t *gvar); +void Quit (char *error); +void turboXT(byte bakapee); +void nibbletest(); +void booleantest(); + +#endif /*__16_TAIL__ */