]> 4ch.mooo.com Git - 16.git/commitdiff
seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd...
authorsparky4 <sparky4@cock.li>
Wed, 22 Mar 2017 15:35:15 +0000 (10:35 -0500)
committersparky4 <sparky4@cock.li>
Wed, 22 Mar 2017 15:35:15 +0000 (10:35 -0500)
29 files changed:
makefile
src/lib/wl_debug.c [new file with mode: 0755]
src/util/git/git_igno.re
src/util/gitgit_con.fig [deleted file]
src/util/gitgit_igno.re [deleted file]
src/util/gitgit_modu.les [deleted file]
src/util/shbat/DLD.BAT [moved from DLD.BAT with 100% similarity]
src/util/shbat/DLDV.BAT [moved from DLDV.BAT with 100% similarity]
src/util/shbat/WBUILD.BAT [moved from WBUILD.BAT with 100% similarity]
src/util/shbat/awoo.sh [moved from awoo.sh with 73% similarity]
src/util/shbat/boop.sh [moved from boop.sh with 100% similarity]
src/util/shbat/btget.bat [moved from btget.bat with 100% similarity]
src/util/shbat/cutetest.bat [moved from cutetest.bat with 100% similarity]
src/util/shbat/dld.sh [moved from dld.sh with 100% similarity]
src/util/shbat/dldv.sh [moved from dldv.sh with 100% similarity]
src/util/shbat/l4get.bat [moved from l4get.bat with 100% similarity]
src/util/shbat/mkdld.sh [moved from mkdld.sh with 100% similarity]
src/util/shbat/q.sh [moved from q.sh with 100% similarity]
src/util/shbat/qcata.sh [moved from qcata.sh with 100% similarity]
src/util/shbat/qdl.sh [moved from qdl.sh with 100% similarity]
src/util/shbat/qkeen.sh [moved from qkeen.sh with 100% similarity]
src/util/shbat/qwolf.sh [moved from qwolf.sh with 100% similarity]
src/util/shbat/run.bat [moved from run.bat with 100% similarity]
src/util/shbat/spri.sh [moved from spri.sh with 100% similarity]
src/util/shbat/ud.sh [moved from ud.sh with 100% similarity]
src/util/shbat/wbuild.sh [moved from wbuild.sh with 100% similarity]
src/util/shbat/winrun.bat [moved from winrun.bat with 100% similarity]
src/util/shbat/x4get.bat [moved from x4get.bat with 100% similarity]
src/util/shbat/xxdiff.sh [moved from xxdiff.sh with 100% similarity]

index 82bab4d35e3386d991d38781e3b5953adbff8ee1..6c97f4e4fae4f6574dc736390ea2055cd3a8a95c 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -73,6 +73,7 @@ SPRI=$(DATADIR)/spri
 SRC=src
 UTIL=$(SRC)/util
 GITCONFIGDIR=$(UTIL)/git
+SCRIPTBATDIR=$(UTIL)/shbat
 SRCLIB=$(SRC)/lib
 JSMNLIB=$(SRCLIB)/jsmn
 NYANLIB=$(SRCLIB)/nyan
@@ -417,14 +418,36 @@ clean: .symbolic
 
 nuke: .symbolic
        @wmake clean
+       @wmake backupscript
        @wmake cldl
        @wmake all
        @wmake comp
 
 backupconfig: .symbolic
-       @$(COPYCOMMAND) .git$(DIRSEP)config $(GITCONFIGDIR)git_con.fig
-       @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)git_modu.les
-       @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)git_igno.re
+       @$(COPYCOMMAND) .git$(DIRSEP)config $(GITCONFIGDIR)/git_con.fig
+       @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)/git_modu.les
+       @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)/git_igno.re
+
+initconfig:
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_con.fig .git/config
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_modu.les .gitmodules
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_igno.re .gitignore
+
+
+backupscript: .symbolic
+       @if exist *.bat $(MOVECOMMAND) *.bat $(SCRIPTBATDIR)/
+       @if exist *.sh $(MOVECOMMAND) *.sh $(SCRIPTBATDIR)/
+!ifdef __LINUX__
+       @if exist *.BAT $(MOVECOMMAND) *.BAT $(SCRIPTBATDIR)/
+!endif
+
+initscript: .symbolic
+       @if not exist *.bat $(COPYCOMMAND) $(SCRIPTBATDIR)/*.bat ./
+       @if not exist *.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/*.sh ./
+!ifdef __LINUX__
+       @if not exist *.BAT $(COPYCOMMAND) $(SCRIPTBATDIR)/*.BAT ./
+!endif
+
 
 comp: .symbolic
        @*upx -9 $(EXEC)
@@ -501,9 +524,7 @@ reinitlibs: .symbolic
        @wmake -h initlibs
 
 initlibs: .symbolic
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_con.fig .git/config
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_modu.les .gitmodules
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_igno.re .gitignore
+       @wmake -h initconfig
        @wmake -h getlib
        @cd 16
        @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git
diff --git a/src/lib/wl_debug.c b/src/lib/wl_debug.c
new file mode 100755 (executable)
index 0000000..dd4674b
--- /dev/null
@@ -0,0 +1,722 @@
+// WL_DEBUG.C\r
+\r
+#include "WL_DEF.H"\r
+#pragma hdrstop\r
+#include <BIOS.H>\r
+\r
+/*\r
+=============================================================================\r
+\r
+                                                LOCAL CONSTANTS\r
+\r
+=============================================================================\r
+*/\r
+\r
+#define VIEWTILEX      (viewwidth/16)\r
+#define VIEWTILEY      (viewheight/16)\r
+\r
+/*\r
+=============================================================================\r
+\r
+                                                GLOBAL VARIABLES\r
+\r
+=============================================================================\r
+*/\r
+\r
+\r
+int DebugKeys (void);\r
+\r
+/*\r
+=============================================================================\r
+\r
+                                                LOCAL VARIABLES\r
+\r
+=============================================================================\r
+*/\r
+\r
+\r
+int    maporgx;\r
+int    maporgy;\r
+enum {mapview,tilemapview,actoratview,visview} viewtype;\r
+\r
+void ViewMap (void);\r
+\r
+//===========================================================================\r
+\r
+/*\r
+==================\r
+=\r
+= DebugMemory\r
+=\r
+==================\r
+*/\r
+\r
+void DebugMemory (void)\r
+{\r
+       int     i;\r
+       char    scratch[80],str[10];\r
+       long    mem;\r
+       spritetype _seg *block;\r
+\r
+       CenterWindow (16,7);\r
+\r
+       US_CPrint ("Memory Usage");\r
+       US_CPrint ("------------");\r
+       US_Print ("Total     :");\r
+       US_PrintUnsigned (mminfo.mainmem/1024);\r
+       US_Print ("k\nFree      :");\r
+       US_PrintUnsigned (MM_UnusedMemory()/1024);\r
+       US_Print ("k\nWith purge:");\r
+       US_PrintUnsigned (MM_TotalFree()/1024);\r
+       US_Print ("k\n");\r
+       VW_UpdateScreen();\r
+       IN_Ack ();\r
+}\r
+\r
+//===========================================================================\r
+\r
+/*\r
+==================\r
+=\r
+= CountObjects\r
+=\r
+==================\r
+*/\r
+\r
+void CountObjects (void)\r
+{\r
+       int     i,total,count,active,inactive,doors;\r
+       objtype *obj;\r
+\r
+       CenterWindow (16,7);\r
+       active = inactive = count = doors = 0;\r
+\r
+       US_Print ("Total statics :");\r
+       total = laststatobj-&statobjlist[0];\r
+       US_PrintUnsigned (total);\r
+\r
+       US_Print ("\nIn use statics:");\r
+       for (i=0;i<total;i++)\r
+               if (statobjlist[i].shapenum != -1)\r
+                       count++;\r
+               else\r
+                       doors++;        //debug\r
+       US_PrintUnsigned (count);\r
+\r
+       US_Print ("\nDoors         :");\r
+       US_PrintUnsigned (doornum);\r
+\r
+       for (obj=player->next;obj;obj=obj->next)\r
+       {\r
+               if (obj->active)\r
+                       active++;\r
+               else\r
+                       inactive++;\r
+       }\r
+\r
+       US_Print ("\nTotal actors  :");\r
+       US_PrintUnsigned (active+inactive);\r
+\r
+       US_Print ("\nActive actors :");\r
+       US_PrintUnsigned (active);\r
+\r
+       VW_UpdateScreen();\r
+       IN_Ack ();\r
+}\r
+\r
+//===========================================================================\r
+\r
+/*\r
+================\r
+=\r
+= PicturePause\r
+=\r
+================\r
+*/\r
+\r
+void PicturePause (void)\r
+{\r
+       int                     i;\r
+       byte            p;\r
+       unsigned        x;\r
+       byte            far     *dest,far *src;\r
+       memptr          buffer;\r
+\r
+       VW_ColorBorder (15);\r
+       FinishPaletteShifts ();\r
+\r
+       LastScan = 0;\r
+       while (!LastScan)\r
+       ;\r
+       if (LastScan != sc_Enter)\r
+       {\r
+               VW_ColorBorder (0);\r
+               return;\r
+       }\r
+\r
+       VW_ColorBorder (1);\r
+       VW_SetScreen (0,0);\r
+//\r
+// vga stuff...\r
+//\r
+\r
+       ClearMemory ();\r
+       CA_SetAllPurge();\r
+       MM_GetPtr (&buffer,64000);\r
+       for (p=0;p<4;p++)\r
+       {\r
+          src = MK_FP(0xa000,displayofs);\r
+          dest = (byte far *)buffer+p;\r
+          VGAREADMAP(p);\r
+          for (x=0;x<16000;x++,dest+=4)\r
+                  *dest = *src++;\r
+       }\r
+\r
+\r
+#if 0\r
+       for (p=0;p<4;p++)\r
+       {\r
+               src = MK_FP(0xa000,0);\r
+               dest = (byte far *)buffer+51200+p;\r
+               VGAREADMAP(p);\r
+               for (x=0;x<3200;x++,dest+=4)\r
+                       *dest = *src++;\r
+       }\r
+#endif\r
+\r
+       asm     mov     ax,0x13\r
+       asm     int     0x10\r
+\r
+       dest = MK_FP(0xa000,0);\r
+       _fmemcpy (dest,buffer,64000);\r
+\r
+       VL_SetPalette (&gamepal);\r
+\r
+\r
+       IN_Shutdown ();\r
+\r
+       VW_WaitVBL(70);\r
+       bioskey(0);\r
+       VW_WaitVBL(70);\r
+       Quit (NULL);\r
+}\r
+\r
+\r
+//===========================================================================\r
+\r
+\r
+/*\r
+================\r
+=\r
+= ShapeTest\r
+=\r
+================\r
+*/\r
+\r
+#pragma warn -pia\r
+void ShapeTest (void)\r
+{\r
+extern word    NumDigi;\r
+extern word    _seg *DigiList;\r
+static char    buf[10];\r
+\r
+       boolean                 done;\r
+       ScanCode                scan;\r
+       int                             i,j,k,x;\r
+       longword                l;\r
+       memptr                  addr;\r
+       PageListStruct  far *page;\r
+\r
+       CenterWindow(20,16);\r
+       VW_UpdateScreen();\r
+       for (i = 0,done = false;!done;)\r
+       {\r
+               US_ClearWindow();\r
+//             sound = -1;\r
+\r
+               page = &PMPages[i];\r
+               US_Print(" Page #");\r
+               US_PrintUnsigned(i);\r
+               if (i < PMSpriteStart)\r
+                       US_Print(" (Wall)");\r
+               else if (i < PMSoundStart)\r
+                       US_Print(" (Sprite)");\r
+               else if (i == ChunksInFile - 1)\r
+                       US_Print(" (Sound Info)");\r
+               else\r
+                       US_Print(" (Sound)");\r
+\r
+               US_Print("\n XMS: ");\r
+               if (page->xmsPage != -1)\r
+                       US_PrintUnsigned(page->xmsPage);\r
+               else\r
+                       US_Print("No");\r
+\r
+               US_Print("\n Main: ");\r
+               if (page->mainPage != -1)\r
+                       US_PrintUnsigned(page->mainPage);\r
+               else if (page->emsPage != -1)\r
+               {\r
+                       US_Print("EMS ");\r
+                       US_PrintUnsigned(page->emsPage);\r
+               }\r
+               else\r
+                       US_Print("No");\r
+\r
+               US_Print("\n Last hit: ");\r
+               US_PrintUnsigned(page->lastHit);\r
+\r
+               US_Print("\n Address: ");\r
+               addr = PM_GetPageAddress(i);\r
+               sprintf(buf,"0x%04x",(word)addr);\r
+               US_Print(buf);\r
+\r
+               if (addr)\r
+               {\r
+                       if (i < PMSpriteStart)\r
+                       {\r
+                       //\r
+                       // draw the wall\r
+                       //\r
+                               bufferofs += 32*SCREENWIDTH;\r
+                               postx = 128;\r
+                               postwidth = 1;\r
+                               postsource = ((long)((unsigned)addr))<<16;\r
+                               for (x=0;x<64;x++,postx++,postsource+=64)\r
+                               {\r
+                                       wallheight[postx] = 256;\r
+                                       FarScalePost ();\r
+                               }\r
+                               bufferofs -= 32*SCREENWIDTH;\r
+                       }\r
+                       else if (i < PMSoundStart)\r
+                       {\r
+                       //\r
+                       // draw the sprite\r
+                       //\r
+                               bufferofs += 32*SCREENWIDTH;\r
+                               SimpleScaleShape (160, i-PMSpriteStart, 64);\r
+                               bufferofs -= 32*SCREENWIDTH;\r
+                       }\r
+                       else if (i == ChunksInFile - 1)\r
+                       {\r
+                               US_Print("\n\n Number of sounds: ");\r
+                               US_PrintUnsigned(NumDigi);\r
+                               for (l = j = k = 0;j < NumDigi;j++)\r
+                               {\r
+                                       l += DigiList[(j * 2) + 1];\r
+                                       k += (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
+                               }\r
+                               US_Print("\n Total bytes: ");\r
+                               US_PrintUnsigned(l);\r
+                               US_Print("\n Total pages: ");\r
+                               US_PrintUnsigned(k);\r
+                       }\r
+                       else\r
+                       {\r
+                               byte far *dp = (byte far *)MK_FP(addr,0);\r
+                               for (j = 0;j < NumDigi;j++)\r
+                               {\r
+                                       k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
+                                       if\r
+                                       (\r
+                                               (i >= PMSoundStart + DigiList[j * 2])\r
+                                       &&      (i < PMSoundStart + DigiList[j * 2] + k)\r
+                                       )\r
+                                               break;\r
+                               }\r
+                               if (j < NumDigi)\r
+                               {\r
+//                                     sound = j;\r
+                                       US_Print("\n Sound #");\r
+                                       US_PrintUnsigned(j);\r
+                                       US_Print("\n Segment #");\r
+                                       US_PrintUnsigned(i - PMSoundStart - DigiList[j * 2]);\r
+                               }\r
+                               for (j = 0;j < page->length;j += 32)\r
+                               {\r
+                                       byte v = dp[j];\r
+                                       int v2 = (unsigned)v;\r
+                                       v2 -= 128;\r
+                                       v2 /= 4;\r
+                                       if (v2 < 0)\r
+                                               VWB_Vlin(WindowY + WindowH - 32 + v2,\r
+                                                               WindowY + WindowH - 32,\r
+                                                               WindowX + 8 + (j / 32),BLACK);\r
+                                       else\r
+                                               VWB_Vlin(WindowY + WindowH - 32,\r
+                                                               WindowY + WindowH - 32 + v2,\r
+                                                               WindowX + 8 + (j / 32),BLACK);\r
+                               }\r
+                       }\r
+               }\r
+\r
+               VW_UpdateScreen();\r
+\r
+               while (!(scan = LastScan))\r
+                       SD_Poll();\r
+\r
+               IN_ClearKey(scan);\r
+               switch (scan)\r
+               {\r
+               case sc_LeftArrow:\r
+                       if (i)\r
+                               i--;\r
+                       break;\r
+               case sc_RightArrow:\r
+                       if (++i >= ChunksInFile)\r
+                               i--;\r
+                       break;\r
+               case sc_W:      // Walls\r
+                       i = 0;\r
+                       break;\r
+               case sc_S:      // Sprites\r
+                       i = PMSpriteStart;\r
+                       break;\r
+               case sc_D:      // Digitized\r
+                       i = PMSoundStart;\r
+                       break;\r
+               case sc_I:      // Digitized info\r
+                       i = ChunksInFile - 1;\r
+                       break;\r
+               case sc_L:      // Load all pages\r
+                       for (j = 0;j < ChunksInFile;j++)\r
+                               PM_GetPage(j);\r
+                       break;\r
+               case sc_P:\r
+//                     if (sound != -1)\r
+//                             SD_PlayDigitized(sound);\r
+                       break;\r
+               case sc_Escape:\r
+                       done = true;\r
+                       break;\r
+               case sc_Enter:\r
+                       PM_GetPage(i);\r
+                       break;\r
+               }\r
+       }\r
+       SD_StopDigitized();\r
+}\r
+#pragma warn +pia\r
+\r
+\r
+\r
+//===========================================================================\r
+\r
+\r
+/*\r
+================\r
+=\r
+= DebugKeys\r
+=\r
+================\r
+*/\r
+\r
+int DebugKeys (void)\r
+{\r
+       boolean esc;\r
+       int level,i;\r
+\r
+       if (Keyboard[sc_B])             // B = border color\r
+       {\r
+               CenterWindow(24,3);\r
+               PrintY+=6;\r
+               US_Print(" Border color (0-15):");\r
+               VW_UpdateScreen();\r
+               esc = !US_LineInput (px,py,str,NULL,true,2,0);\r
+               if (!esc)\r
+               {\r
+                       level = atoi (str);\r
+                       if (level>=0 && level<=15)\r
+                               VW_ColorBorder (level);\r
+               }\r
+               return 1;\r
+       }\r
+\r
+       if (Keyboard[sc_C])             // C = count objects\r
+       {\r
+               CountObjects();\r
+               return 1;\r
+       }\r
+\r
+       if (Keyboard[sc_E])             // E = quit level\r
+       {\r
+               if (tedlevel)\r
+                       Quit (NULL);\r
+               playstate = ex_completed;\r
+//             gamestate.mapon++;\r
+       }\r
+\r
+       if (Keyboard[sc_F])             // F = facing spot\r
+       {\r
+               CenterWindow (14,4);\r
+               US_Print ("X:");\r
+               US_PrintUnsigned (player->x);\r
+               US_Print ("\nY:");\r
+               US_PrintUnsigned (player->y);\r
+               US_Print ("\nA:");\r
+               US_PrintUnsigned (player->angle);\r
+               VW_UpdateScreen();\r
+               IN_Ack();\r
+               return 1;\r
+       }\r
+\r
+       if (Keyboard[sc_G])             // G = god mode\r
+       {\r
+               CenterWindow (12,2);\r
+               if (godmode)\r
+                 US_PrintCentered ("God mode OFF");\r
+               else\r
+                 US_PrintCentered ("God mode ON");\r
+               VW_UpdateScreen();\r
+               IN_Ack();\r
+               godmode ^= 1;\r
+               return 1;\r
+       }\r
+       if (Keyboard[sc_H])             // H = hurt self\r
+       {\r
+               IN_ClearKeysDown ();\r
+               TakeDamage (16,NULL);\r
+       }\r
+       else if (Keyboard[sc_I])                        // I = item cheat\r
+       {\r
+               CenterWindow (12,3);\r
+               US_PrintCentered ("Free items!");\r
+               VW_UpdateScreen();\r
+               GivePoints (100000);\r
+               HealSelf (99);\r
+               if (gamestate.bestweapon<wp_chaingun)\r
+                       GiveWeapon (gamestate.bestweapon+1);\r
+               gamestate.ammo += 50;\r
+               if (gamestate.ammo > 99)\r
+                       gamestate.ammo = 99;\r
+               DrawAmmo ();\r
+               IN_Ack ();\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_M])                        // M = memory info\r
+       {\r
+               DebugMemory();\r
+               return 1;\r
+       }\r
+#ifdef SPEAR\r
+       else if (Keyboard[sc_N])                        // N = no clip\r
+       {\r
+               noclip^=1;\r
+               CenterWindow (18,3);\r
+               if (noclip)\r
+                       US_PrintCentered ("No clipping ON");\r
+               else\r
+                       US_PrintCentered ("No clipping OFF");\r
+               VW_UpdateScreen();\r
+               IN_Ack ();\r
+               return 1;\r
+       }\r
+#endif\r
+#if 0\r
+       else if (Keyboard[sc_O])                        // O = overhead\r
+       {\r
+               ViewMap();\r
+               return 1;\r
+       }\r
+#endif\r
+       else if (Keyboard[sc_P])                        // P = pause with no screen disruptioon\r
+       {\r
+               PicturePause ();\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_Q])                        // Q = fast quit\r
+               Quit (NULL);\r
+       else if (Keyboard[sc_S])                        // S = slow motion\r
+       {\r
+               singlestep^=1;\r
+               CenterWindow (18,3);\r
+               if (singlestep)\r
+                       US_PrintCentered ("Slow motion ON");\r
+               else\r
+                       US_PrintCentered ("Slow motion OFF");\r
+               VW_UpdateScreen();\r
+               IN_Ack ();\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_T])                        // T = shape test\r
+       {\r
+               ShapeTest ();\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_V])                        // V = extra VBLs\r
+       {\r
+               CenterWindow(30,3);\r
+               PrintY+=6;\r
+               US_Print("  Add how many extra VBLs(0-8):");\r
+               VW_UpdateScreen();\r
+               esc = !US_LineInput (px,py,str,NULL,true,2,0);\r
+               if (!esc)\r
+               {\r
+                       level = atoi (str);\r
+                       if (level>=0 && level<=8)\r
+                               extravbls = level;\r
+               }\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_W])                        // W = warp to level\r
+       {\r
+               CenterWindow(26,3);\r
+               PrintY+=6;\r
+#ifndef SPEAR\r
+               US_Print("  Warp to which level(1-10):");\r
+#else\r
+               US_Print("  Warp to which level(1-21):");\r
+#endif\r
+               VW_UpdateScreen();\r
+               esc = !US_LineInput (px,py,str,NULL,true,2,0);\r
+               if (!esc)\r
+               {\r
+                       level = atoi (str);\r
+#ifndef SPEAR\r
+                       if (level>0 && level<11)\r
+#else\r
+                       if (level>0 && level<22)\r
+#endif\r
+                       {\r
+                               gamestate.mapon = level-1;\r
+                               playstate = ex_warped;\r
+                       }\r
+               }\r
+               return 1;\r
+       }\r
+       else if (Keyboard[sc_X])                        // X = item cheat\r
+       {\r
+               CenterWindow (12,3);\r
+               US_PrintCentered ("Extra stuff!");\r
+               VW_UpdateScreen();\r
+               // DEBUG: put stuff here\r
+               IN_Ack ();\r
+               return 1;\r
+       }\r
+\r
+       return 0;\r
+}\r
+\r
+\r
+#if 0\r
+/*\r
+===================\r
+=\r
+= OverheadRefresh\r
+=\r
+===================\r
+*/\r
+\r
+void OverheadRefresh (void)\r
+{\r
+       unsigned        x,y,endx,endy,sx,sy;\r
+       unsigned        tile;\r
+\r
+\r
+       endx = maporgx+VIEWTILEX;\r
+       endy = maporgy+VIEWTILEY;\r
+\r
+       for (y=maporgy;y<endy;y++)\r
+               for (x=maporgx;x<endx;x++)\r
+               {\r
+                       sx = (x-maporgx)*16;\r
+                       sy = (y-maporgy)*16;\r
+\r
+                       switch (viewtype)\r
+                       {\r
+#if 0\r
+                       case mapview:\r
+                               tile = *(mapsegs[0]+farmapylookup[y]+x);\r
+                               break;\r
+\r
+                       case tilemapview:\r
+                               tile = tilemap[x][y];\r
+                               break;\r
+\r
+                       case visview:\r
+                               tile = spotvis[x][y];\r
+                               break;\r
+#endif\r
+                       case actoratview:\r
+                               tile = (unsigned)actorat[x][y];\r
+                               break;\r
+                       }\r
+\r
+                       if (tile<MAXWALLTILES)\r
+                               LatchDrawTile(sx,sy,tile);\r
+                       else\r
+                       {\r
+                               LatchDrawChar(sx,sy,NUMBERCHARS+((tile&0xf000)>>12));\r
+                               LatchDrawChar(sx+8,sy,NUMBERCHARS+((tile&0x0f00)>>8));\r
+                               LatchDrawChar(sx,sy+8,NUMBERCHARS+((tile&0x00f0)>>4));\r
+                               LatchDrawChar(sx+8,sy+8,NUMBERCHARS+(tile&0x000f));\r
+                       }\r
+               }\r
+\r
+}\r
+#endif\r
+\r
+#if 0\r
+/*\r
+===================\r
+=\r
+= ViewMap\r
+=\r
+===================\r
+*/\r
+\r
+void ViewMap (void)\r
+{\r
+       boolean         button0held;\r
+\r
+       viewtype = actoratview;\r
+//     button0held = false;\r
+\r
+\r
+       maporgx = player->tilex - VIEWTILEX/2;\r
+       if (maporgx<0)\r
+               maporgx = 0;\r
+       if (maporgx>MAPSIZE-VIEWTILEX)\r
+               maporgx=MAPSIZE-VIEWTILEX;\r
+       maporgy = player->tiley - VIEWTILEY/2;\r
+       if (maporgy<0)\r
+               maporgy = 0;\r
+       if (maporgy>MAPSIZE-VIEWTILEY)\r
+               maporgy=MAPSIZE-VIEWTILEY;\r
+\r
+       do\r
+       {\r
+//\r
+// let user pan around\r
+//\r
+               PollControls ();\r
+               if (controlx < 0 && maporgx>0)\r
+                       maporgx--;\r
+               if (controlx > 0 && maporgx<mapwidth-VIEWTILEX)\r
+                       maporgx++;\r
+               if (controly < 0 && maporgy>0)\r
+                       maporgy--;\r
+               if (controly > 0 && maporgy<mapheight-VIEWTILEY)\r
+                       maporgy++;\r
+\r
+#if 0\r
+               if (c.button0 && !button0held)\r
+               {\r
+                       button0held = true;\r
+                       viewtype++;\r
+                       if (viewtype>visview)\r
+                               viewtype = mapview;\r
+               }\r
+               if (!c.button0)\r
+                       button0held = false;\r
+#endif\r
+\r
+               OverheadRefresh ();\r
+\r
+       } while (!Keyboard[sc_Escape]);\r
+\r
+       IN_ClearKeysDown ();\r
+}\r
+#endif\r
+\r
index 3ef83bde91a460f54b84700357e03f50631da018..70ed7d7559f36ad034ae916e1aac57babd351473 100755 (executable)
@@ -8,6 +8,7 @@
 *.[O]\r
 *.BCO\r
 *.*~\r
+FUCK\r
 *.err\r
 *.ERR\r
 *.lib\r
@@ -25,13 +26,7 @@ __wcl__.lnk
 img\r
 !.git/config\r
 !.gitmodules\r
-pcx2vrl\r
-pcxsscut\r
-vrl2vrs\r
-vrsdump\r
 # except foo.html which is maintained by hand.\r
 #!foo.html\r
 # Ignore objects and archives.\r
 *.[oa]\r
-#*.16W\r
-#*.16B\r
diff --git a/src/util/gitgit_con.fig b/src/util/gitgit_con.fig
deleted file mode 100755 (executable)
index f07fc6d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-[core]
-       repositoryformatversion = 0
-       filemode = true
-       bare = false
-       logallrefupdates = true
-[remote "x4"]
-       url = ssh://sparky4@4ch.mooo.com:26/var/www/16/16.git
-       fetch = +refs/heads/*:refs/remotes/x4/*
-[branch "master"]
-       remote = origin
-       merge = refs/heads/master
-[remote "origin"]
-       url = git@github.com:sparky4/16.git
-       fetch = +refs/heads/*:refs/remotes/origin/*
-[remote "sf"]
-       url = ssh://sparky4q@git.code.sf.net/p/project16/code
-       fetch = +refs/heads/*:refs/remotes/sf/*
-[remote "jp"]
-       url = ssh://sparky4@git.osdn.jp:/gitroot/proj16/16.git
-       fetch = +refs/heads/*:refs/remotes/jp/*
-[remote "bb"]
-       url = git@bitbucket.org:sparky4/16.git
-       fetch = +refs/heads/*:refs/remotes/bb/*
diff --git a/src/util/gitgit_igno.re b/src/util/gitgit_igno.re
deleted file mode 100755 (executable)
index 70ed7d7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Lines starting with '#' are considered comments.\r
-# Ignore (generated) html files,\r
-*.html\r
-*.htm\r
-!proj16.bfproject\r
-*.obj\r
-*.OBJ\r
-*.[O]\r
-*.BCO\r
-*.*~\r
-FUCK\r
-*.err\r
-*.ERR\r
-*.lib\r
-*.LIB\r
-makefile~\r
-README~\r
-TODO~\r
-LICENCE~\r
-*.meh\r
-*.MEH\r
-__wcl__.lnk\r
-!bcexmm.map\r
-!makefile\r
-!modex.lib\r
-img\r
-!.git/config\r
-!.gitmodules\r
-# except foo.html which is maintained by hand.\r
-#!foo.html\r
-# Ignore objects and archives.\r
-*.[oa]\r
diff --git a/src/util/gitgit_modu.les b/src/util/gitgit_modu.les
deleted file mode 100755 (executable)
index 11d69bb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-[submodule "src/lib/doslib"]
-        path = src/lib/doslib
-        url = https://github.com/joncampbell123/doslib.git
-
-[submodule "src/lib/jsmn"]
-       path = src/lib/jsmn
-       url = https://github.com/zserge/jsmn.git
-
-[submodule "CatacombApocalypse"]
-       path = 16/CatacombApocalypse
-       url = https://github.com/FlatRockSoft/CatacombApocalypse.git
-
-[submodule "wolf3d"]
-        path = 16/wolf3d
-        url = https://github.com/id-Software/wolf3d.git
-
-[submodule "keen"]
-        path = 16/keen
-       url = https://github.com/keendreams/keen.git
-
-[submodule "Catacomb3D"]
-        path = 16/Catacomb3D
-       url = https://github.com/FlatRockSoft/Catacomb3D.git
similarity index 100%
rename from DLD.BAT
rename to src/util/shbat/DLD.BAT
similarity index 100%
rename from DLDV.BAT
rename to src/util/shbat/DLDV.BAT
similarity index 100%
rename from WBUILD.BAT
rename to src/util/shbat/WBUILD.BAT
similarity index 73%
rename from awoo.sh
rename to src/util/shbat/awoo.sh
index 3626e3a642889eedad38e72e3d9479f8975c7ff9..6ccf53ac45536482884e53e56f26a57f478326ca 100755 (executable)
--- a/awoo.sh
@@ -5,6 +5,7 @@
 #fi
 wmake -h www
 wmake -h clean
+wmake -h backupscript
 if [ -z "$*" ]; then
                pee="wwww"
        else
@@ -12,6 +13,7 @@ if [ -z "$*" ]; then
 fi
 ##echo "$pee"
 git add .
-. ./boop.sh "$pee"
+. src/util/shbat/boop.sh "$pee"
+wmake -h initscript
 . ./wbuild.sh
 ##. ./mkdld.sh# slow compile ww
similarity index 100%
rename from boop.sh
rename to src/util/shbat/boop.sh
similarity index 100%
rename from btget.bat
rename to src/util/shbat/btget.bat
similarity index 100%
rename from cutetest.bat
rename to src/util/shbat/cutetest.bat
similarity index 100%
rename from dld.sh
rename to src/util/shbat/dld.sh
similarity index 100%
rename from dldv.sh
rename to src/util/shbat/dldv.sh
similarity index 100%
rename from l4get.bat
rename to src/util/shbat/l4get.bat
similarity index 100%
rename from mkdld.sh
rename to src/util/shbat/mkdld.sh
similarity index 100%
rename from q.sh
rename to src/util/shbat/q.sh
similarity index 100%
rename from qcata.sh
rename to src/util/shbat/qcata.sh
similarity index 100%
rename from qdl.sh
rename to src/util/shbat/qdl.sh
similarity index 100%
rename from qkeen.sh
rename to src/util/shbat/qkeen.sh
similarity index 100%
rename from qwolf.sh
rename to src/util/shbat/qwolf.sh
similarity index 100%
rename from run.bat
rename to src/util/shbat/run.bat
similarity index 100%
rename from spri.sh
rename to src/util/shbat/spri.sh
similarity index 100%
rename from ud.sh
rename to src/util/shbat/ud.sh
similarity index 100%
rename from wbuild.sh
rename to src/util/shbat/wbuild.sh
similarity index 100%
rename from winrun.bat
rename to src/util/shbat/winrun.bat
similarity index 100%
rename from x4get.bat
rename to src/util/shbat/x4get.bat
similarity index 100%
rename from xxdiff.sh
rename to src/util/shbat/xxdiff.sh