]> 4ch.mooo.com Git - plz.git/commitdiff
dots for a simple port but damn it! master
authorsparky4 <sparky4@cock.li>
Fri, 11 Aug 2017 19:13:16 +0000 (14:13 -0500)
committersparky4 <sparky4@cock.li>
Fri, 11 Aug 2017 19:13:16 +0000 (14:13 -0500)
19 files changed:
dots/a [new file with mode: 0755]
dots/asm.asm [new file with mode: 0755]
dots/asm.c [new file with mode: 0755]
dots/asm.h [new file with mode: 0755]
dots/clink.inc [new file with mode: 0755]
dots/cut [new file with mode: 0755]
dots/dots.c [new file with mode: 0755]
dots/dots.lnk [new file with mode: 0755]
dots/dots.meh [new file with mode: 0755]
dots/dots.obj [new file with mode: 0755]
dots/dp_prefs [new file with mode: 0755]
dots/face.c [new file with mode: 0755]
dots/face.exe [new file with mode: 0755]
dots/face.inc [new file with mode: 0755]
dots/main.c [new file with mode: 0755]
dots/makefile [new file with mode: 0755]
dots/makefile.old [new file with mode: 0755]
dots/sin1024.inc [new file with mode: 0755]
plzpart/makefile [new file with mode: 0755]

diff --git a/dots/a b/dots/a
new file mode 100755 (executable)
index 0000000..d01757e
Binary files /dev/null and b/dots/a differ
diff --git a/dots/asm.asm b/dots/asm.asm
new file mode 100755 (executable)
index 0000000..16b8e52
--- /dev/null
@@ -0,0 +1,251 @@
+include clink.inc\r
+code SEGMENT para public 'CODE'\r
+ASSUME cs:code\r
+\r
+.386\r
+\r
+MAXDOTS equ 1024\r
+\r
+BOTTOM equ 8000\r
+\r
+public _gravitybottom\r
+_gravitybottom dw BOTTOM\r
+\r
+public _bpmin,_bpmax\r
+_bpmin dw      30000\r
+_bpmax dw      -30000\r
+\r
+public _gravity\r
+_gravity dw    0\r
+\r
+public _dotnum\r
+_dotnum dw     0\r
+\r
+public _gravityd\r
+_gravityd dw   16\r
+\r
+dw -1280\r
+dw -960\r
+dw -640\r
+dw -320\r
+public _rows\r
+_rows  dw  200 dup(0)\r
+\r
+public _dot\r
+_dot LABEL WORD\r
+dot dw MAXDOTS dup(0,0,0,0,0,0,0,0) ;x,y,z,oldposshadow,oldpos,-,-,-\r
+\r
+public _rotsin,_rotcos\r
+_rotsin dw 0\r
+_rotcos dw 0\r
+\r
+public _bgpic\r
+_bgpic dw 0,0\r
+\r
+public _depthtable1,_depthtable2,_depthtable3,_depthtable4\r
+_depthtable1 dd 128 dup(0)\r
+_depthtable2 dd 128 dup(0)\r
+_depthtable3 dd 128 dup(0)\r
+_depthtable4 dd 128 dup(0)\r
+\r
+public _drawdots\r
+_drawdots PROC FAR\r
+       CBEG\r
+       mov     ax,0a000h\r
+       mov     es,ax\r
+       mov     ax,cs\r
+       mov     ds,ax\r
+       mov     fs,cs:_bgpic[2]\r
+       mov     cx,cs:_dotnum\r
+       mov     si,OFFSET dot\r
+@@loo:\r
+@@1:   push    cx\r
+\r
+       mov     ax,ds:[si+0] ;X\r
+       imul    ds:_rotsin\r
+       mov     ax,ax\r
+       mov     cx,dx\r
+       mov     ax,ds:[si+4] ;Z\r
+       imul    ds:_rotcos\r
+       sub     ax,bx\r
+       sub     dx,cx\r
+       mov     bp,dx\r
+       add     bp,9000\r
+       \r
+       mov     ax,ds:[si+0] ;X\r
+       imul    ds:_rotcos\r
+       mov     bx,ax\r
+       mov     cx,dx\r
+       mov     ax,ds:[si+4] ;Z\r
+       imul    ds:_rotsin\r
+       add     ax,bx\r
+       adc     dx,cx\r
+       shrd    ax,dx,8\r
+       sar     dx,8\r
+       \r
+       mov     bx,ax\r
+       mov     cx,dx\r
+       shrd    ax,dx,3\r
+       sar     dx,3\r
+       add     ax,bx\r
+       adc     dx,cx\r
+       \r
+       idiv    bp\r
+       add     ax,160\r
+       push    ax\r
+       cmp     ax,319\r
+       ja      @@2\r
+       \r
+       ;shadow\r
+\r
+       xor     ax,ax\r
+       mov     dx,8\r
+       idiv    bp\r
+       add     ax,100\r
+       cmp     ax,199\r
+       ja      @@2\r
+       mov     bx,ax\r
+       shl     bx,1\r
+       mov     bx,ds:_rows[bx]\r
+       pop     ax\r
+       add     bx,ax\r
+       push    ax\r
+       \r
+       mov     di,ds:[si+6]\r
+       mov     ax,fs:[di]\r
+       mov     es:[di],ax\r
+       mov     ax,87+87*256\r
+       mov     word ptr es:[bx],ax\r
+       mov     ds:[si+6],bx\r
+       \r
+       ;ball\r
+       \r
+       mov     ax,ds:_gravity\r
+       add     ds:[si+14],ax\r
+       mov     ax,ds:[si+2] ;Y\r
+       add     ax,ds:[si+14]\r
+       cmp     ax,ds:_gravitybottom\r
+       jl      @@4\r
+       push    ax\r
+       mov     ax,ds:[si+14]\r
+       neg     ax\r
+       imul    cs:_gravityd\r
+       sar     ax,4\r
+       mov     ds:[si+14],ax\r
+       pop     ax\r
+       add     ax,ds:[si+14]\r
+@@4:   mov     ds:[si+2],ax\r
+       cwd\r
+       shld    dx,ax,6\r
+       shl     ax,6\r
+       idiv    bp\r
+       add     ax,100\r
+       cmp     ax,199\r
+       ja      @@3\r
+       mov     bx,ax\r
+       shl     bx,1\r
+       mov     bx,ds:_rows[bx]\r
+       pop     ax\r
+       add     bx,ax\r
+\r
+       mov     di,ds:[si+8]\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+;      add     di,320\r
+;      mov     eax,fs:[di]\r
+;      mov     es:[di],eax\r
+       shr     bp,6\r
+       and     bp,not 3\r
+       \r
+       cmp     bp,cs:_bpmin\r
+       jge     @@t1\r
+       mov     cs:_bpmin,bp\r
+@@t1:  cmp     bp,cs:_bpmax\r
+       jle     @@t2\r
+       mov     cs:_bpmax,bp\r
+@@t2:\r
+       mov     ax,word ptr ds:_depthtable1[bp]\r
+       mov     word ptr es:[bx+1],ax\r
+       mov     eax,ds:_depthtable2[bp]\r
+       mov     dword ptr es:[bx+320],eax\r
+       mov     ax,word ptr ds:_depthtable3[bp]\r
+       mov     word ptr es:[bx+641],ax\r
+       mov     ds:[si+8],bx\r
+\r
+@@z:   pop     cx\r
+       add     si,16\r
+       loop    @@1oo\r
+@@0:   CEND\r
+\r
+@@2:   mov     di,ds:[si+8]\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       mov     di,ds:[si+6]\r
+       mov     ds:[si+6],ax\r
+       mov     ax,fs:[di]\r
+       mov     es:[di],ax\r
+       pop     bx\r
+       pop     cx\r
+       add     si,16\r
+       loop    @@1\r
+       jmp     @@0\r
+@@3:   mov     di,ds:[si+8]\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       add     di,320\r
+       mov     eax,fs:[di]\r
+       mov     es:[di],eax\r
+       pop     bx\r
+       pop     cx\r
+       add     si,16\r
+       loop    @@1\r
+       jmp     @@0\r
+_drawdots ENDP\r
+\r
+PUBLIC _setpalette\r
+_setpalette PROC FAR\r
+       push    bp\r
+       mov     bp,sp\r
+       push    si\r
+       push    di\r
+       push    ds\r
+       mov     si,[bp+6]\r
+       mov     ds,[bp+8]\r
+       mov     dx,3c8h\r
+       mov     al,0\r
+       out     dx,al\r
+       inc     dx\r
+       mov     cx,768\r
+       rep     outsb\r
+       pop     ds\r
+       pop     di\r
+       pop     si\r
+       pop     bp\r
+       ret\r
+_setpalette ENDP\r
+\r
+_face  LABEL WORD\r
+public _face\r
+include face.inc\r
+dw     30000,30000,30000\r
+\r
+PUBLIC _sin1024\r
+include sin1024.inc\r
+\r
+code ENDS\r
+END\r
diff --git a/dots/asm.c b/dots/asm.c
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dots/asm.h b/dots/asm.h
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dots/clink.inc b/dots/clink.inc
new file mode 100755 (executable)
index 0000000..3d5effb
--- /dev/null
@@ -0,0 +1,41 @@
+FIXWORD        MACRO ;go to word boundary\r
+       if ($-start) mod 1\r
+       db 0\r
+       endif\r
+       ENDM\r
+       \r
+CDS    MACRO\r
+       mov     ax,cs\r
+       mov     ds,ax\r
+       ENDM\r
+\r
+CBEG   MACRO ;C/Assembler procedure begin\r
+       push    bp\r
+       mov     bp,sp\r
+       push    si\r
+       push    di\r
+       push    ds\r
+       ENDM\r
+\r
+CEND   MACRO ;C/Assembler procedure end\r
+       pop     ds\r
+       pop     di\r
+       pop     si\r
+       pop     bp\r
+       ret\r
+       ENDM\r
+\r
+CBEG0  MACRO ;C/Assembler procedure begin, minimal\r
+       push    bp\r
+       mov     bp,sp\r
+       ENDM\r
+\r
+CEND0  MACRO ;C/Assembler procedure end, minimal\r
+       pop     bp\r
+       ret\r
+       ENDM\r
+\r
+movpar MACRO   reg,par ;loads parameter [par(0..)] to register [reg]\r
+       mov     reg,[bp+par*2+6]\r
+       ENDM\r
+\r
diff --git a/dots/cut b/dots/cut
new file mode 100755 (executable)
index 0000000..0dd2c9c
--- /dev/null
+++ b/dots/cut
@@ -0,0 +1,86 @@
+       #if 0\r
+       switch(mode=c)\r
+       {\r
+       case 0:\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=(rand()-16384)/2;\r
+                       dot[a].y=(rand()-16384)/2;\r
+                       dot[a].z=(rand()-16384)/2;\r
+               }\r
+               break;\r
+       case 1 :\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=sin(f*2)*3500+cos(f*5)*3500;\r
+                       dot[a].y=sin(f*3)*3500+cos(f*6)*3500;\r
+                       dot[a].z=sin(f*4)*3500+cos(f*7)*3500;\r
+                       f+=.05;\r
+               }\r
+               break;\r
+       case 2 :\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=sin(a*4)*3500+cos(a*7)*3500;\r
+                       dot[a].y=cos(a*5)*3500+sin(a*8)*3500;\r
+                       dot[a].z=sin(a*6)*3500+cos(a*9)*3500;\r
+                       f+=.05;\r
+               }\r
+               break;\r
+       case 3 :\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=sin(a)*7500*sin(3.141592*a/dotnum);\r
+                       dot[a].y=-4000+a*8;\r
+                       dot[a].z=cos(a)*7500*sin(3.141592*a/dotnum);\r
+                       f+=.05;\r
+               }\r
+               gravity=3;\r
+               break;\r
+       case 4 :\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=sin(a*4)*3500+cos(a*7)*3500;\r
+                       dot[a].y=cos(a*5)*3500+sin(a*8)*3500;\r
+                       dot[a].z=sin(a*6)*3500+cos(a*9)*3500;\r
+                       f+=.05;\r
+               }\r
+               gravity=3;\r
+               break;\r
+       case 5 :\r
+               b=0;\r
+               for(a=0;a<dotnum && face[b]!=30000;a++)\r
+               {\r
+                       dot[a].x=face[b++];\r
+                       dot[a].y=face[b++];\r
+                       dot[a].z=face[b++];\r
+               }\r
+               break;\r
+       case 6 :\r
+               gravity=0;\r
+               i=0;\r
+               break;\r
+       default :\r
+               timer=15000;\r
+       case 7 :\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=0;\r
+                       dot[a].y=0;\r
+                       dot[a].z=-19000;\r
+               }\r
+               mode=7;\r
+               gravity=3;\r
+               gravityd=13;\r
+               i=-1;\r
+               break;\r
+       case 8:\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=(rand()-16384)/2;\r
+                       dot[a].y=8000;\r
+                       dot[a].z=(rand()-16384)/2;\r
+               }\r
+               break;\r
+       }\r
+       #endif\r
diff --git a/dots/dots.c b/dots/dots.c
new file mode 100755 (executable)
index 0000000..a994da8
--- /dev/null
@@ -0,0 +1,291 @@
+#include <stdio.h>\r
+#include <string.h>\r
+#include <stdlib.h>\r
+#include <conio.h>\r
+#include <malloc.h>\r
+#include <math.h>\r
+#include "../dis/dis.h"\r
+\r
+extern int face[];\r
+\r
+extern int bpmin,bpmax;\r
+\r
+extern char *bgpic;\r
+extern int rotsin,rotcos;\r
+extern int rows[];\r
+extern long depthtable1[];\r
+extern long depthtable2[];\r
+extern long depthtable3[];\r
+extern long depthtable4[];\r
+\r
+extern int dotnum;\r
+\r
+extern void drawdots(void);\r
+\r
+char far *vram=(char far *)0xa0000000L;\r
+\r
+char   pal[768];\r
+char   pal2[768];\r
+\r
+extern sin1024[];\r
+\r
+int    isin(int deg)\r
+{\r
+       return(sin1024[deg&1023]);\r
+}\r
+\r
+int    icos(int deg)\r
+{\r
+       return(sin1024[(deg+256)&1023]);\r
+}\r
+\r
+extern struct\r
+{\r
+       int     x;\r
+       int     y;\r
+       int     z;\r
+       int     old1;\r
+       int     old2;\r
+       int     old3;\r
+       int     old4;\r
+       int     yadd;\r
+} dot[];\r
+\r
+extern int gravity;\r
+extern int gravitybottom;\r
+extern int gravityd;\r
+\r
+void setborder(unsigned char color)\r
+{\r
+       _asm\r
+       {\r
+               mov     dx,3dah\r
+               in      al,dx\r
+               mov     dx,3c0h\r
+               mov     al,11h+32\r
+               out     dx,al\r
+               mov     al,color\r
+               out     dx,al\r
+       }\r
+}\r
+\r
+int    cols[]={\r
+0,0,0,\r
+4,25,30,\r
+8,40,45,\r
+16,55,60};\r
+int    dottaul[1024];\r
+\r
+int main(int argc,char *argv[])\r
+{\r
+       int     timer=30000;\r
+       int     dropper,repeat;\r
+       int     frame=0;\r
+       int     rota=-1*64;\r
+       int     fb=0;\r
+       int     rot=0,rots=0;\r
+       int     a,b,c,d,i,j,mode;\r
+       int     grav,gravd;\r
+       int     f=0;\r
+       dis_partstart();\r
+       dotnum=512;\r
+       for(a=0;a<dotnum;a++)  dottaul[a]=a;\r
+       for(a=0;a<500;a++)\r
+       {\r
+               b=rand()%dotnum;\r
+               c=rand()%dotnum;\r
+               d=dottaul[b];\r
+               dottaul[b]=dottaul[c];\r
+               dottaul[c]=d;\r
+       }\r
+       {\r
+               dropper=22000;\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=0;\r
+                       dot[a].y=2560-dropper;\r
+                       dot[a].z=0;\r
+                       dot[a].yadd=0;\r
+               }\r
+               mode=7;\r
+               grav=3;\r
+               gravd=13;\r
+               gravitybottom=8105;\r
+               i=-1;\r
+       }\r
+       for(a=0;a<500;a++)\r
+       { // scramble\r
+               b=rand()%dotnum;\r
+               c=rand()%dotnum;\r
+               d=dot[b].x; dot[b].x=dot[c].x; dot[c].x=d;\r
+               d=dot[b].y; dot[b].y=dot[c].y; dot[c].y=d;\r
+               d=dot[b].z; dot[b].z=dot[c].z; dot[c].z=d;\r
+       }\r
+       for(a=0;a<200;a++) rows[a]=a*320;\r
+       _asm mov ax,13h\r
+       _asm int 10h\r
+       outp(0x3c8,0);\r
+       for(a=0;a<16;a++) for(b=0;b<4;b++)\r
+       {\r
+               c=100+a*9;\r
+               outp(0x3c9,cols[b*3+0]);\r
+               outp(0x3c9,cols[b*3+1]*c/256);\r
+               outp(0x3c9,cols[b*3+2]*c/256);\r
+       }\r
+       outp(0x3c8,255);\r
+       outp(0x3c9,31);\r
+       outp(0x3c9,0);\r
+       outp(0x3c9,15);\r
+       outp(0x3c8,64);\r
+       for(a=0;a<100;a++)\r
+       {\r
+               c=64-256/(a+4);\r
+               c=c*c/64;\r
+               outp(0x3c9,c/4);\r
+               outp(0x3c9,c/4);\r
+               outp(0x3c9,c/4);\r
+       }\r
+       outp(0x3c7,0);\r
+       for(a=0;a<768;a++) pal[a]=inp(0x3c9);\r
+       outp(0x3c8,0);\r
+       for(a=0;a<768;a++) outp(0x3c9,0);\r
+       for(a=0;a<100;a++)\r
+       {\r
+               memset(vram+(100+a)*320,a+64,320);\r
+       }\r
+       for(a=0;a<128;a++)\r
+       {\r
+               c=a-(43+20)/2;\r
+               c=c*3/4;\r
+               c+=8;\r
+               if(c<0) c=0; else if(c>15) c=15;\r
+               c=15-c;\r
+               depthtable1[a]=0x202+0x04040404*c;\r
+               depthtable2[a]=0x02030302+0x04040404*c;\r
+               depthtable3[a]=0x202+0x04040404*c;\r
+               //depthtable4[a]=0x02020302+0x04040404*c;\r
+       }\r
+       bgpic=halloc(64000L,1L);\r
+       memcpy(bgpic,vram,64000);\r
+       a=0;\r
+       for(b=64;b>=0;b--)\r
+       {       \r
+               for(c=0;c<768;c++)\r
+               {\r
+                       a=pal[c]-b;\r
+                       if(a<0) a=0;\r
+                       pal2[c]=a;\r
+               }\r
+               dis_waitb();\r
+               dis_waitb();\r
+               outp(0x3c8,0);\r
+               for(c=0;c<768;c++) outp(0x3c9,pal2[c]);\r
+       }\r
+       \r
+       while(!dis_exit() && frame<2450)\r
+       {\r
+               //setborder(0);\r
+               repeat=dis_waitb();\r
+               if(frame>2300) setpalette(pal2);\r
+               //setborder(1);\r
+               if(dis_indemo())\r
+               {\r
+                       a=dis_musplus();\r
+                       if(a>-4 && a<0) break;\r
+               }\r
+               while(repeat--)\r
+               {\r
+                       frame++;\r
+                       if(frame==500) f=0;\r
+                       i=dottaul[j];\r
+                       j++; j%=dotnum;\r
+                       if(frame<500)\r
+                       {\r
+                               dot[i].x=isin(f*11)*40;\r
+                               dot[i].y=icos(f*13)*10-dropper;\r
+                               dot[i].z=isin(f*17)*40;\r
+                               dot[i].yadd=0;\r
+                       }\r
+                       else if(frame<900)\r
+                       {\r
+                               dot[i].x=icos(f*15)*55;\r
+                               dot[i].y=dropper;\r
+                               dot[i].z=isin(f*15)*55;\r
+                               dot[i].yadd=-260;\r
+                       }\r
+                       else if(frame<1700)\r
+                       {       \r
+                               a=sin1024[frame&1023]/8;\r
+                               dot[i].x=icos(f*66)*a;\r
+                               dot[i].y=8000;\r
+                               dot[i].z=isin(f*66)*a;\r
+                               dot[i].yadd=-300;\r
+                       }\r
+                       else if(frame<2360)\r
+                       {\r
+                               /*\r
+                               a=rand()/128+32;\r
+                               dot[i].y=8000-a*80;\r
+                               b=rand()&1023;\r
+                               a+=rand()&31;\r
+                               dot[i].x=sin1024[b]*a/3+(a-50)*7;\r
+                               dot[i].z=sin1024[(b+256)&1023]*a/3+(a-40)*7;\r
+                               dot[i].yadd=300;\r
+                               if(frame>1640 && !(frame&31) && grav>-2) grav--;\r
+                               */\r
+                               dot[i].x=rand()-16384;\r
+                               dot[i].y=8000-rand()/2;\r
+                               dot[i].z=rand()-16384;\r
+                               dot[i].yadd=0;\r
+                               if(frame>1900 && !(frame&31) && grav>0) grav--;\r
+                       }\r
+                       else if(frame<2400)\r
+                       {\r
+                               a=frame-2360;\r
+                               for(b=0;b<768;b+=3)\r
+                               {\r
+                                       c=pal[b+0]+a*3;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+0]=c;\r
+                                       c=pal[b+1]+a*3;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+1]=c;\r
+                                       c=pal[b+2]+a*4;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+2]=c;\r
+                               }\r
+                       }\r
+                       else if(frame<2440)\r
+                       {\r
+                               a=frame-2400;\r
+                               for(b=0;b<768;b+=3)\r
+                               {\r
+                                       c=63-a*2;\r
+                                       if(c<0) c=0;\r
+                                       pal2[b+0]=c;\r
+                                       pal2[b+1]=c;\r
+                                       pal2[b+2]=c;\r
+                               }\r
+                       }\r
+                       if(dropper>4000) dropper-=100;\r
+                       rotcos=icos(rot)*64; rotsin=isin(rot)*64;\r
+                       rots+=2;\r
+                       if(frame>1900) \r
+                       {\r
+                               rot+=rota/64;\r
+                               rota--;\r
+                       }\r
+                       else rot=isin(rots);\r
+                       f++;\r
+                       gravity=grav;\r
+                       gravityd=gravd;\r
+               }\r
+               drawdots();\r
+       }\r
+       if(!dis_indemo())\r
+       {\r
+               _asm mov ax,3h\r
+               _asm int 10h\r
+       }\r
+       return(0);\r
+}\r
diff --git a/dots/dots.lnk b/dots/dots.lnk
new file mode 100755 (executable)
index 0000000..69615a8
--- /dev/null
@@ -0,0 +1,6 @@
+debug dwarf all
+option stack=32768
+system dos
+file dots.obj
+name dots.exe
+option map=dots.meh
diff --git a/dots/dots.meh b/dots/dots.meh
new file mode 100755 (executable)
index 0000000..c5864b4
--- /dev/null
@@ -0,0 +1,255 @@
+Open Watcom Linker Version 2.0 beta Nov 19 2016 01:49:19 (64-bit)
+Copyright (c) 2002-2016 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
+Created on:       17/08/11 14:12:27
+Executable Image: dots.exe
+creating a DOS executable
+Error! E2028: _sin1024 is an undefined reference
+Error! E2028: dis_partstart_ is an undefined reference
+Error! E2028: _dotnum is an undefined reference
+Error! E2028: _dot is an undefined reference
+Error! E2028: _gravitybottom is an undefined reference
+Error! E2028: _rows is an undefined reference
+Error! E2028: _depthtable1 is an undefined reference
+Error! E2028: _depthtable2 is an undefined reference
+Error! E2028: _depthtable3 is an undefined reference
+Error! E2028: _bgpic is an undefined reference
+Error! E2028: dis_waitb_ is an undefined reference
+Error! E2028: dis_exit_ is an undefined reference
+Error! E2028: setpalette_ is an undefined reference
+Error! E2028: dis_indemo_ is an undefined reference
+Error! E2028: dis_musplus_ is an undefined reference
+Error! E2028: _rotcos is an undefined reference
+Error! E2028: _rotsin is an undefined reference
+Error! E2028: _gravity is an undefined reference
+Error! E2028: _gravityd is an undefined reference
+Error! E2028: drawdots_ is an undefined reference
+
+
+                        +------------+
+                        |   Groups   |
+                        +------------+
+
+Group                           Address              Size
+=====                           =======              ====
+
+DGROUP                          01b9:0000            00008ee0
+
+
+
+                        +--------------+
+                        |   Segments   |
+                        +--------------+
+
+Segment                Class          Group          Address         Size
+=======                =====          =====          =======         ====
+
+dots_TEXT              CODE           AUTO           0000:0000       0000092e
+_TEXT                  CODE           AUTO           0000:0930       00001255
+FAR_DATA               FAR_DATA       AUTO           01b8:0005       00000000
+_NULL                  BEGDATA        DGROUP         01b9:0000       00000020
+_AFTERNULL             BEGDATA        DGROUP         01bb:0000       00000002
+CONST                  DATA           DGROUP         01bb:0002       00000000
+CONST2                 DATA           DGROUP         01bb:0002       00000000
+_DATA                  DATA           DGROUP         01bc:0000       0000006e
+XIB                    DATA           DGROUP         01c2:000e       00000000
+XI                     DATA           DGROUP         01c2:000e       00000012
+XIE                    DATA           DGROUP         01c4:0000       00000000
+YIB                    DATA           DGROUP         01c4:0000       00000000
+YI                     DATA           DGROUP         01c4:0000       00000006
+YIE                    DATA           DGROUP         01c4:0006       00000000
+STRINGS                DATA           DGROUP         01c4:0006       00000000
+DATA                   DATA           DGROUP         01c4:0006       00000000
+_BSS                   BSS            DGROUP         01c4:0006       00000e1c
+STACK                  STACK          DGROUP         02a7:0000       00008000
+
+
+                        +----------------+
+                        |   Memory Map   |
+                        +----------------+
+
+* = unreferenced symbol
++ = symbol only referenced locally
+
+Address        Symbol
+=======        ======
+
+Module: dots.obj(/dos/z/plz/dots/dots.c)
+0000:0000+     isin_
+0000:0026+     icos_
+0000:004e+     setborder_
+0000:0082      main_
+01b9:0030+     _vram
+01b9:0034+     _cols
+01b9:00b6+     _dottaul
+01b9:08b6+     _pal2
+01b9:0bb6+     _pal
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(stk086.asm)
+0000:0935      __STK
+0000:0955*     __STKOVERFLOW_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(rand.c)
+0000:0972      rand_
+0000:09b4*     srand_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(i4m.asm)
+0000:09d8      __I4M
+0000:09d8      __U4M
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(haloc.c)
+0000:0a05      halloc_
+0000:0aae*     hfree_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(cstart)
+01b9:0000*     __nullarea
+01b9:0052*     __ovlflag
+01b9:0053*     __intno
+01b9:0054*     __ovlvec
+0000:0ab6      _cstart_
+0000:0b89*     _Not_Enough_Memory_
+0000:0cbb      __exit_
+0000:0cd8      __do_exit_with_msg__
+0000:0d31      __GETDS
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(cmodel.asm)
+0000:0d3c      _big_code_
+0000:0d3c*     CodeModelMismatch
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(argcv.c)
+01b9:0eb6      __argv
+01b9:0eba      ___argv
+01b9:0ebe      __argc
+01b9:0ec0      ___argc
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(xmsg.c)
+0000:0d3c*     __exit_with_msg_
+0000:0d41      __fatal_runtime_error_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(crwdata)
+01b9:0058      __curbrk
+01b9:0060      __STACKLOW
+01b9:0062      __STACKTOP
+01b9:0064      __cbyte
+01b9:0066      __child
+01b9:0068      __no87
+01b9:0075      ___FPE_handler
+01b9:005a      __psp
+01b9:0069      __get_ovl_stack
+01b9:006d      __restore_ovl_stack
+01b9:0071      __close_ovl_file
+01b9:0079      __LpCmdLine
+01b9:007d      __LpPgmName
+01b9:005c      __osmajor
+01b9:005d      __osminor
+01b9:005e      __osmode
+01b9:005f      __HShift
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(pia.asm)
+0000:0d63      __PIA
+0000:0d5c*     __PIS
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(cmain086.c)
+0000:0d7a      __CMain
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(initrtns.c)
+0000:0ddb      __InitRtns
+0000:0ddb*     __FInitRtns
+0000:0e36      __FiniRtns
+0000:0e36*     __FFiniRtns
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(uselfn.c)
+01b9:0082      ___uselfn
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(dosseg)
+0000:0e9a      __DOSseg__
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(initargv.c)
+0000:1098      __Init_Argv_
+0000:10fa      __Fini_Argv_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(enterdb.c)
+0000:1124      __EnterWVIDEO_
+01b9:0084+     ___WD_Present
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(___argc.c)
+01b9:0ec6      ____Argv
+01b9:0eca      ____Argc
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(amblksiz.c)
+01b9:0086      __amblksiz
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(exit.c)
+0000:1148+     __null_int23_exit_
+0000:1149      exit_
+0000:1161*     _exit_
+01b9:0088+     ___int23_exit
+01b9:008c+     ___FPE_handler_exit
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(sgdef086)
+01b9:009e      __Start_XI
+01b9:00b0      __End_XI
+01b9:00b0      __Start_YI
+01b9:00b6      __End_YI
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(nmalloc.c)
+0000:117c      _nmalloc_
+01b9:0090      ___nheapbeg
+01b9:0092      ___MiniHeapRover
+01b9:0094      ___LargestSizeB4MiniHeapRover
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(fmalloc.c)
+0000:1253*     _fmalloc_
+0000:1253      malloc_
+01b9:0096+     ___fheap
+01b9:0098      ___fheapRover
+01b9:009a      ___LargestSizeB4Rover
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(histsplt.c)
+01b9:0ecc      ___historical_splitparms
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(ffree.c)
+0000:1365*     _ffree_
+0000:1365      free_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(mem.c)
+0000:13b0      __MemAllocator
+0000:147a      __MemFree
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(nmemneed.c)
+0000:15e6      __nmemneed_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(grownear.c)
+0000:166e      __LastFree_
+0000:16e8      __ExpandDGROUP_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(growseg.c)
+0000:17f9      __GrowSeg_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(allocseg.c)
+0000:18e9      __AllocSeg_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(fmemneed.c)
+0000:1980      __fmemneed_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(heapgrow.c)
+0000:1983*     _heapgrow_
+0000:1983*     _fheapgrow_
+0000:1984      _nheapgrow_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(nfree.c)
+0000:19fb      _nfree_
+01b9:0ece+     ___MiniHeapFreeRover
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(heapen.c)
+0000:1af6*     _heapenable_
+01b9:009c      ___heap_enabled
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(sbrk.c)
+0000:1b07      __brk_
+0000:1b6e*     sbrk_
+Module: /dos/fdos/watcom2/lib286/dos/clibl.lib(errno.c)
+0000:1b7e*     __get_errno_ptr_
+01b9:0ed0      _errno
+
+
+                        +---------------------------+
+                        |   Unresolved References   |
+                        +---------------------------+
+
+Undefined Symbol                Referenced by
+================                =============
+
+_sin1024                        dots.obj(/dos/z/plz/dots/dots.c)
+dis_partstart_                  dots.obj(/dos/z/plz/dots/dots.c)
+_dotnum                         dots.obj(/dos/z/plz/dots/dots.c)
+_dot                            dots.obj(/dos/z/plz/dots/dots.c)
+_gravitybottom                  dots.obj(/dos/z/plz/dots/dots.c)
+_rows                           dots.obj(/dos/z/plz/dots/dots.c)
+_depthtable1                    dots.obj(/dos/z/plz/dots/dots.c)
+_depthtable2                    dots.obj(/dos/z/plz/dots/dots.c)
+_depthtable3                    dots.obj(/dos/z/plz/dots/dots.c)
+_bgpic                          dots.obj(/dos/z/plz/dots/dots.c)
+dis_waitb_                      dots.obj(/dos/z/plz/dots/dots.c)
+dis_exit_                       dots.obj(/dos/z/plz/dots/dots.c)
+setpalette_                     dots.obj(/dos/z/plz/dots/dots.c)
+dis_indemo_                     dots.obj(/dos/z/plz/dots/dots.c)
+dis_musplus_                    dots.obj(/dos/z/plz/dots/dots.c)
+_rotcos                         dots.obj(/dos/z/plz/dots/dots.c)
+_rotsin                         dots.obj(/dos/z/plz/dots/dots.c)
+_gravity                        dots.obj(/dos/z/plz/dots/dots.c)
+_gravityd                       dots.obj(/dos/z/plz/dots/dots.c)
+drawdots_                       dots.obj(/dos/z/plz/dots/dots.c)
+
+
+                        +--------------------+
+                        |   Libraries Used   |
+                        +--------------------+
+
+/dos/fdos/watcom2/lib286/dos/clibl.lib
diff --git a/dots/dots.obj b/dots/dots.obj
new file mode 100755 (executable)
index 0000000..7735faf
Binary files /dev/null and b/dots/dots.obj differ
diff --git a/dots/dp_prefs b/dots/dp_prefs
new file mode 100755 (executable)
index 0000000..f76dcd5
Binary files /dev/null and b/dots/dp_prefs differ
diff --git a/dots/face.c b/dots/face.c
new file mode 100755 (executable)
index 0000000..7012189
--- /dev/null
@@ -0,0 +1,26 @@
+#include <stdio.h>\r
+\r
+char   buf[1024];\r
+\r
+main()\r
+{\r
+       FILE    *f1;\r
+       int     a,b,c=0;\r
+       float   x,y,z;\r
+       f1=fopen("face.asc","rt");\r
+       while(!feof(f1))\r
+       {\r
+               fgets(buf,1024,f1);\r
+               fgets(buf,1024,f1);\r
+               if(!memcmp(buf,"Vertex ",7))\r
+               {\r
+                       if(c)\r
+                       {\r
+                               sscanf(buf,"Vertex %i: X: %f Y: %f Z: %f",&a,&x,&y,&z);\r
+                               printf("dw %i,%i,%i\n",(int)(x*1000),-(int)(z*1000),(int)(y*1000));\r
+                       } \r
+                       else c=1;\r
+               }\r
+       }\r
+       fclose(f1);\r
+}\r
diff --git a/dots/face.exe b/dots/face.exe
new file mode 100755 (executable)
index 0000000..419e449
Binary files /dev/null and b/dots/face.exe differ
diff --git a/dots/face.inc b/dots/face.inc
new file mode 100755 (executable)
index 0000000..301b1c0
--- /dev/null
@@ -0,0 +1 @@
+dw 2248,-2306,0\r
diff --git a/dots/main.c b/dots/main.c
new file mode 100755 (executable)
index 0000000..8bc0af6
--- /dev/null
@@ -0,0 +1,291 @@
+#include <stdio.h>\r
+#include <string.h>\r
+#include <stdlib.h>\r
+#include <conio.h>\r
+#include <malloc.h>\r
+#include <math.h>\r
+#include "..\dis\dis.h"\r
+\r
+extern int face[];\r
+\r
+extern int bpmin,bpmax;\r
+\r
+extern char *bgpic;\r
+extern int rotsin,rotcos;\r
+extern int rows[];\r
+extern long depthtable1[];\r
+extern long depthtable2[];\r
+extern long depthtable3[];\r
+extern long depthtable4[];\r
+\r
+extern int dotnum;\r
+\r
+extern void drawdots(void);\r
+\r
+char far *vram=(char far *)0xa0000000L;\r
+\r
+char   pal[768];\r
+char   pal2[768];\r
+\r
+extern sin1024[];\r
+\r
+int    isin(int deg)\r
+{\r
+       return(sin1024[deg&1023]);\r
+}\r
+\r
+int    icos(int deg)\r
+{\r
+       return(sin1024[(deg+256)&1023]);\r
+}\r
+\r
+extern struct\r
+{\r
+       int     x;\r
+       int     y;\r
+       int     z;\r
+       int     old1;\r
+       int     old2;\r
+       int     old3;\r
+       int     old4;\r
+       int     yadd;\r
+} dot[];\r
+\r
+extern int gravity;\r
+extern int gravitybottom;\r
+extern int gravityd;\r
+\r
+void setborder(int color)\r
+{\r
+       _asm\r
+       {\r
+               mov     dx,3dah\r
+               in      al,dx\r
+               mov     dx,3c0h\r
+               mov     al,11h+32\r
+               out     dx,al\r
+               mov     al,color\r
+               out     dx,al\r
+       }\r
+}\r
+\r
+int    cols[]={\r
+0,0,0,\r
+4,25,30,\r
+8,40,45,\r
+16,55,60};\r
+int    dottaul[1024];\r
+\r
+main(int argc,char *argv[])\r
+{\r
+       int     timer=30000;\r
+       int     dropper,repeat;\r
+       int     frame=0;\r
+       int     rota=-1*64;\r
+       int     fb=0;\r
+       int     rot=0,rots=0;\r
+       int     a,b,c,d,i,j,mode;\r
+       int     grav,gravd;\r
+       int     f=0;\r
+       dis_partstart();\r
+       dotnum=512;\r
+       for(a=0;a<dotnum;a++)  dottaul[a]=a;\r
+       for(a=0;a<500;a++)\r
+       {\r
+               b=rand()%dotnum;\r
+               c=rand()%dotnum;\r
+               d=dottaul[b];\r
+               dottaul[b]=dottaul[c];\r
+               dottaul[c]=d;\r
+       }\r
+       {\r
+               dropper=22000;\r
+               for(a=0;a<dotnum;a++)\r
+               {\r
+                       dot[a].x=0;\r
+                       dot[a].y=2560-dropper;\r
+                       dot[a].z=0;\r
+                       dot[a].yadd=0;\r
+               }\r
+               mode=7;\r
+               grav=3;\r
+               gravd=13;\r
+               gravitybottom=8105;\r
+               i=-1;\r
+       }\r
+       for(a=0;a<500;a++)\r
+       { // scramble\r
+               b=rand()%dotnum;\r
+               c=rand()%dotnum;\r
+               d=dot[b].x; dot[b].x=dot[c].x; dot[c].x=d;\r
+               d=dot[b].y; dot[b].y=dot[c].y; dot[c].y=d;\r
+               d=dot[b].z; dot[b].z=dot[c].z; dot[c].z=d;\r
+       }\r
+       for(a=0;a<200;a++) rows[a]=a*320;\r
+       _asm mov ax,13h\r
+       _asm int 10h\r
+       outp(0x3c8,0);\r
+       for(a=0;a<16;a++) for(b=0;b<4;b++)\r
+       {\r
+               c=100+a*9;\r
+               outp(0x3c9,cols[b*3+0]);\r
+               outp(0x3c9,cols[b*3+1]*c/256);\r
+               outp(0x3c9,cols[b*3+2]*c/256);\r
+       }\r
+       outp(0x3c8,255);\r
+       outp(0x3c9,31);\r
+       outp(0x3c9,0);\r
+       outp(0x3c9,15);\r
+       outp(0x3c8,64);\r
+       for(a=0;a<100;a++)\r
+       {\r
+               c=64-256/(a+4);\r
+               c=c*c/64;\r
+               outp(0x3c9,c/4);\r
+               outp(0x3c9,c/4);\r
+               outp(0x3c9,c/4);\r
+       }\r
+       outp(0x3c7,0);\r
+       for(a=0;a<768;a++) pal[a]=inp(0x3c9);\r
+       outp(0x3c8,0);\r
+       for(a=0;a<768;a++) outp(0x3c9,0);\r
+       for(a=0;a<100;a++)\r
+       {\r
+               memset(vram+(100+a)*320,a+64,320);\r
+       }\r
+       for(a=0;a<128;a++)\r
+       {\r
+               c=a-(43+20)/2;\r
+               c=c*3/4;\r
+               c+=8;\r
+               if(c<0) c=0; else if(c>15) c=15;\r
+               c=15-c;\r
+               depthtable1[a]=0x202+0x04040404*c;\r
+               depthtable2[a]=0x02030302+0x04040404*c;\r
+               depthtable3[a]=0x202+0x04040404*c;\r
+               //depthtable4[a]=0x02020302+0x04040404*c;\r
+       }\r
+       bgpic=halloc(64000L,1L);\r
+       memcpy(bgpic,vram,64000);\r
+       a=0;\r
+       for(b=64;b>=0;b--)\r
+       {       \r
+               for(c=0;c<768;c++)\r
+               {\r
+                       a=pal[c]-b;\r
+                       if(a<0) a=0;\r
+                       pal2[c]=a;\r
+               }\r
+               dis_waitb();\r
+               dis_waitb();\r
+               outp(0x3c8,0);\r
+               for(c=0;c<768;c++) outp(0x3c9,pal2[c]);\r
+       }\r
+       \r
+       while(!dis_exit() && frame<2450)\r
+       {\r
+               //setborder(0);\r
+               repeat=dis_waitb();\r
+               if(frame>2300) setpalette(pal2);\r
+               //setborder(1);\r
+               if(dis_indemo())\r
+               {\r
+                       a=dis_musplus();\r
+                       if(a>-4 && a<0) break;\r
+               }\r
+               while(repeat--)\r
+               {\r
+                       frame++;\r
+                       if(frame==500) f=0;\r
+                       i=dottaul[j];\r
+                       j++; j%=dotnum;\r
+                       if(frame<500)\r
+                       {\r
+                               dot[i].x=isin(f*11)*40;\r
+                               dot[i].y=icos(f*13)*10-dropper;\r
+                               dot[i].z=isin(f*17)*40;\r
+                               dot[i].yadd=0;\r
+                       }\r
+                       else if(frame<900)\r
+                       {\r
+                               dot[i].x=icos(f*15)*55;\r
+                               dot[i].y=dropper;\r
+                               dot[i].z=isin(f*15)*55;\r
+                               dot[i].yadd=-260;\r
+                       }\r
+                       else if(frame<1700)\r
+                       {       \r
+                               a=sin1024[frame&1023]/8;\r
+                               dot[i].x=icos(f*66)*a;\r
+                               dot[i].y=8000;\r
+                               dot[i].z=isin(f*66)*a;\r
+                               dot[i].yadd=-300;\r
+                       }\r
+                       else if(frame<2360)\r
+                       {\r
+                               /*\r
+                               a=rand()/128+32;\r
+                               dot[i].y=8000-a*80;\r
+                               b=rand()&1023;\r
+                               a+=rand()&31;\r
+                               dot[i].x=sin1024[b]*a/3+(a-50)*7;\r
+                               dot[i].z=sin1024[(b+256)&1023]*a/3+(a-40)*7;\r
+                               dot[i].yadd=300;\r
+                               if(frame>1640 && !(frame&31) && grav>-2) grav--;\r
+                               */\r
+                               dot[i].x=rand()-16384;\r
+                               dot[i].y=8000-rand()/2;\r
+                               dot[i].z=rand()-16384;\r
+                               dot[i].yadd=0;\r
+                               if(frame>1900 && !(frame&31) && grav>0) grav--;\r
+                       }\r
+                       else if(frame<2400)\r
+                       {\r
+                               a=frame-2360;\r
+                               for(b=0;b<768;b+=3)\r
+                               {\r
+                                       c=pal[b+0]+a*3;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+0]=c;\r
+                                       c=pal[b+1]+a*3;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+1]=c;\r
+                                       c=pal[b+2]+a*4;\r
+                                       if(c>63) c=63;\r
+                                       pal2[b+2]=c;\r
+                               }\r
+                       }\r
+                       else if(frame<2440)\r
+                       {\r
+                               a=frame-2400;\r
+                               for(b=0;b<768;b+=3)\r
+                               {\r
+                                       c=63-a*2;\r
+                                       if(c<0) c=0;\r
+                                       pal2[b+0]=c;\r
+                                       pal2[b+1]=c;\r
+                                       pal2[b+2]=c;\r
+                               }\r
+                       }\r
+                       if(dropper>4000) dropper-=100;\r
+                       rotcos=icos(rot)*64; rotsin=isin(rot)*64;\r
+                       rots+=2;\r
+                       if(frame>1900) \r
+                       {\r
+                               rot+=rota/64;\r
+                               rota--;\r
+                       }\r
+                       else rot=isin(rots);\r
+                       f++;\r
+                       gravity=grav;\r
+                       gravityd=gravd;\r
+               }\r
+               drawdots();\r
+       }\r
+       if(!dis_indemo())\r
+       {\r
+               _asm mov ax,3h\r
+               _asm int 10h\r
+       }\r
+       return(0);\r
+}\r
diff --git a/dots/makefile b/dots/makefile
new file mode 100755 (executable)
index 0000000..53048b3
--- /dev/null
@@ -0,0 +1,48 @@
+MEMORYMODE=l\r
+# symbolic debug for wsample/wprof/wd\r
+D_FLAGS=-d1+\r
+\r
+# stacksize\r
+STKSIZ=32768\r
+#STKSIZ=24576#40960\r
+\r
+#\r
+# compile flags\r
+#\r
+S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k$(STKSIZ)\r
+Z_FLAGS=-zk0 -zc#### -zp4 -ei# -zm\r
+O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm\r
+T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 $(D_FLAGS) -fo=.obj## -e=65536\r
+\r
+DBUGFLAGS=-fm=$^&.meh -fd=$^& $(D_FLAGS)\r
+CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -DSTACKSIZE=$(STKSIZ)\r
+\r
+AFLAGS=$(T_FLAGS)\r
+CFLAGS=$(T_FLAGS) -wo -i"$(DOSLIBDIR)" $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS)\r
+LFLAGS=-l=dos $(S_FLAGS) $(DBUGFLAGS)\r
+#asm_f = /ML /m2 /s /JJUMPS\r
+#c_f   = /AL /c /W3\r
+\r
+#.asm.obj : \r
+#      tasm $(asm_f) $<\r
+#\r
+#.c.obj : \r
+#      cl /qc $(c_f) $<\r
+\r
+.c.obj:\r
+       *wcl $(CFLAGS) $(extra_$^&_obj_opts) $(CPPFLAGS) -c $[@\r
+.asm.obj:\r
+       *wcl $(AFLAGS) $(extra_$^&_obj_opts) -c $[@\r
+.obj.exe :\r
+       *wcl $(LFLAGS) $(extra_$^&_exe_opts)$< -fe=$@\r
+\r
+#      link /E $(objs),dots.exe,nul;\r
+#      copy dots.exe ..\main\data\minvball.exe\r
+\r
+DOTSOBJS=dots.obj ../dis/disc.obj# asm.obj\r
+\r
+all : dots.exe\r
+\r
+dots.exe : $(DOTSOBJS)\r
+\r
+#asm.asm : face.inc\r
diff --git a/dots/makefile.old b/dots/makefile.old
new file mode 100755 (executable)
index 0000000..945ebad
--- /dev/null
@@ -0,0 +1,24 @@
+all : dots.exe face.exe\r
+\r
+face.exe : face.c\r
+       cl /qc /AL face.c\r
+       face > face.inc\r
+\r
+objs=main.obj asm.obj ..\dis\disc.obj\r
+\r
+asm_f  = /ML /m2 /s /JJUMPS\r
+c_f    = /AL /c /W3\r
+\r
+.asm.obj : \r
+       tasm $(asm_f) $<\r
+       \r
+.c.obj : \r
+       cl /qc $(c_f) $<\r
+\r
+dots.exe : $(objs)\r
+       link /E $(objs),dots.exe,nul;\r
+       copy dots.exe ..\main\data\minvball.exe\r
+       \r
+asm.asm : face.inc\r
+\r
+\r
diff --git a/dots/sin1024.inc b/dots/sin1024.inc
new file mode 100755 (executable)
index 0000000..6614fbe
--- /dev/null
@@ -0,0 +1,33 @@
+_sin1024 LABEL WORD\r
+dw 0,1,3,4,6,7,9,10,12,14,15,17,18,20,21,23,25,26,28,29,31,32,34,36,37,39,40,42,43,45,46,48\r
+dw 49,51,53,54,56,57,59,60,62,63,65,66,68,69,71,72,74,75,77,78,80,81,83,84,86,87,89,90,92,93,95,96\r
+dw 97,99,100,102,103,105,106,108,109,110,112,113,115,116,117,119,120,122,123,124,126,127,128,130,131,132,134,135,136,138,139,140\r
+dw 142,143,144,146,147,148,149,151,152,153,155,156,157,158,159,161,162,163,164,166,167,168,169,170,171,173,174,175,176,177,178,179\r
+dw 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,211\r
+dw 212,213,214,215,216,217,217,218,219,220,221,221,222,223,224,225,225,226,227,227,228,229,230,230,231,232,232,233,234,234,235,235\r
+dw 236,237,237,238,238,239,239,240,241,241,242,242,243,243,244,244,244,245,245,246,246,247,247,247,248,248,249,249,249,250,250,250\r
+dw 251,251,251,251,252,252,252,252,253,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255\r
+dw 256,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,254,253,253,253,253,252,252,252,252,251,251,251\r
+dw 251,250,250,250,249,249,249,248,248,247,247,247,246,246,245,245,244,244,244,243,243,242,242,241,241,240,239,239,238,238,237,237\r
+dw 236,235,235,234,234,233,232,232,231,230,230,229,228,227,227,226,225,225,224,223,222,221,221,220,219,218,217,217,216,215,214,213\r
+dw 212,211,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182\r
+dw 181,179,178,177,176,175,174,173,171,170,169,168,167,166,164,163,162,161,159,158,157,156,155,153,152,151,149,148,147,146,144,143\r
+dw 142,140,139,138,136,135,134,132,131,130,128,127,126,124,123,122,120,119,117,116,115,113,112,110,109,108,106,105,103,102,100,99\r
+dw 97,96,95,93,92,90,89,87,86,84,83,81,80,78,77,75,74,72,71,69,68,66,65,63,62,60,59,57,56,54,53,51\r
+dw 49,48,46,45,43,42,40,39,37,36,34,32,31,29,28,26,25,23,21,20,18,17,15,14,12,10,9,7,6,4,3,1\r
+dw 0,-1,-3,-4,-6,-7,-9,-10,-12,-14,-15,-17,-18,-20,-21,-23,-25,-26,-28,-29,-31,-32,-34,-36,-37,-39,-40,-42,-43,-45,-46,-48\r
+dw -49,-51,-53,-54,-56,-57,-59,-60,-62,-63,-65,-66,-68,-69,-71,-72,-74,-75,-77,-78,-80,-81,-83,-84,-86,-87,-89,-90,-92,-93,-95,-96\r
+dw -97,-99,-100,-102,-103,-105,-106,-108,-109,-110,-112,-113,-115,-116,-117,-119,-120,-122,-123,-124,-126,-127,-128,-130,-131,-132,-134,-135,-136,-138,-139,-140\r
+dw -142,-143,-144,-146,-147,-148,-149,-151,-152,-153,-155,-156,-157,-158,-159,-161,-162,-163,-164,-166,-167,-168,-169,-170,-171,-173,-174,-175,-176,-177,-178,-179\r
+dw -181,-182,-183,-184,-185,-186,-187,-188,-189,-190,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-205,-206,-207,-208,-209,-210,-211,-211\r
+dw -212,-213,-214,-215,-216,-217,-217,-218,-219,-220,-221,-221,-222,-223,-224,-225,-225,-226,-227,-227,-228,-229,-230,-230,-231,-232,-232,-233,-234,-234,-235,-235\r
+dw -236,-237,-237,-238,-238,-239,-239,-240,-241,-241,-242,-242,-243,-243,-244,-244,-244,-245,-245,-246,-246,-247,-247,-247,-248,-248,-249,-249,-249,-250,-250,-250\r
+dw -251,-251,-251,-251,-252,-252,-252,-252,-253,-253,-253,-253,-254,-254,-254,-254,-254,-254,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255\r
+dw -256,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-254,-254,-254,-254,-254,-254,-253,-253,-253,-253,-252,-252,-252,-252,-251,-251,-251\r
+dw -251,-250,-250,-250,-249,-249,-249,-248,-248,-247,-247,-247,-246,-246,-245,-245,-244,-244,-244,-243,-243,-242,-242,-241,-241,-240,-239,-239,-238,-238,-237,-237\r
+dw -236,-235,-235,-234,-234,-233,-232,-232,-231,-230,-230,-229,-228,-227,-227,-226,-225,-225,-224,-223,-222,-221,-221,-220,-219,-218,-217,-217,-216,-215,-214,-213\r
+dw -212,-211,-211,-210,-209,-208,-207,-206,-205,-204,-203,-202,-201,-200,-199,-198,-197,-196,-195,-194,-193,-192,-191,-190,-189,-188,-187,-186,-185,-184,-183,-182\r
+dw -181,-179,-178,-177,-176,-175,-174,-173,-171,-170,-169,-168,-167,-166,-164,-163,-162,-161,-159,-158,-157,-156,-155,-153,-152,-151,-149,-148,-147,-146,-144,-143\r
+dw -142,-140,-139,-138,-136,-135,-134,-132,-131,-130,-128,-127,-126,-124,-123,-122,-120,-119,-117,-116,-115,-113,-112,-110,-109,-108,-106,-105,-103,-102,-100,-99\r
+dw -97,-96,-95,-93,-92,-90,-89,-87,-86,-84,-83,-81,-80,-78,-77,-75,-74,-72,-71,-69,-68,-66,-65,-63,-62,-60,-59,-57,-56,-54,-53,-51\r
+dw -49,-48,-46,-45,-43,-42,-40,-39,-37,-36,-34,-32,-31,-29,-28,-26,-25,-23,-21,-20,-18,-17,-15,-14,-12,-10,-9,-7,-6,-4,-3,-1\r
diff --git a/plzpart/makefile b/plzpart/makefile
new file mode 100755 (executable)
index 0000000..e70bb5b
--- /dev/null
@@ -0,0 +1,133 @@
+#
+#      Higanbana Project makefile
+#
+#
+# Possible optimizations for 8088 class processors
+#
+# -oa   Relax alias checking
+# -ob   Try to generate straight line code
+# -oe - expand user functions inline (-oe=20 is default, adds lots of code)
+# -oh   Enable repeated optimizations
+# -oi   generate certain lib funcs inline
+# -oi+  Set max inline depth (C++ only, use -oi for C)
+# -ok   Flowing of register save into function flow graph
+# -ol   loop optimizations
+# -ol+  loop optimizations plus unrolling
+# -or   Reorder for pipelined (486+ procs); not sure if good to use
+# -os   Favor space over time
+# -ot   Favor time over space
+# -ei   Allocate an "int" for all enum types
+# -zp2  Allow compiler to add padding to structs
+# -zpw  Use with above; make sure you are warning free!
+# -0    8088/8086 class code generation
+# -s    disable stack overflow checking
+
+# -zk0u        translate kanji to unicode... wwww
+# -zk0 kanji support~
+# -zkl         current codepage
+
+#%.C
+#192x144
+#wwww will add these
+!ifdef __LINUX__
+REMOVECOMMAND=rm -f
+COPYCOMMAND=cp -f
+DIRSEP=/
+OBJ=o
+!else
+REMOVECOMMAND=del
+COPYCOMMAND=copy /y
+DIRSEP=\
+OBJ=obj
+!endif
+#!ifndef INCLUDE
+#IN=..$(DIRSEP)..$(DIRSEP)fdos$(DIRSEP)watcom2$(DIRSEP)h
+#IFLAGS=-i=$(IN)
+#!endif
+
+TARGET_OS = dos
+
+#EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
+SRC=src$(DIRSEP)
+SRCLIB=$(SRC)lib$(DIRSEP)
+
+AFLAGS=-mh -0 -d1 -e=65536
+PLZFLAGS=-fh=plzpart.hed
+SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768
+DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
+ZFLAGS=-zk0 -zq -zc -zp8# -zm
+CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo##wwww
+OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok####x
+FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
+
+
+EXEC = plzpart.exe
+OBJS = copper.$(OBJ) tweak.$(OBJ) plz.$(OBJ) asmyt.$(OBJ)
+
+all: $(EXEC)
+
+#
+#game and bakapi executables
+#
+plzpart.exe: plzpart.$(OBJ) $(OBJS)
+       wcl $(FLAGS) $(PLZFLAGS) plzpart.$(OBJ) $(OBJS) -fm=plzpart.map
+
+
+#
+#executable's objects
+#
+plzpart.$(OBJ): plzpart.h plzpart.c
+       wcl $(FLAGS) -c plzpart.c
+
+#
+#non executable objects libraries
+#
+plz.$(OBJ): plz.h plz.c
+       wcl $(FLAGS) -c plz.c
+tweak.$(OBJ): tweak.h tweak.c
+       wcl $(FLAGS) -c tweak.c
+asmyt.$(OBJ): asmyt.h asmyt.c
+       wcl $(FLAGS) -c asmyt.c
+copper.$(OBJ): copper.h copper.c
+       wcl $(FLAGS) -c copper.c
+
+
+#
+#other~
+#
+clean: .symbolic
+       @$(REMOVECOMMAND) $(EXEC)
+#      @$(REMOVECOMMAND) *.$(OBJ)
+       @$(REMOVECOMMAND) *.o
+
+#
+# PLZPART_OBJS = plz.o copper.o asmyt.o tweak.o vect.o vga.o opengl.o \
+#                plza.o plzfill.o sinit.o spline.o main.o
+#
+# PLZPART_PATH = plzpart
+#
+# PLZPART_PATH_OBJS = $(addprefix $(PLZPART_PATH)/,$(PLZPART_OBJS))
+#
+# PLZPART_BIN  = plzpart
+#
+# OBJS += $(PLZPART_PATH_OBJS)
+#
+# default-plzpart:
+#      $(MAKE) -C .. plzpart-all
+#
+# plzpart-all: $(PLZPART_PATH)/$(PLZPART_BIN)
+#
+# $(PLZPART_PATH)/$(PLZPART_BIN): $(PLZPART_PATH_OBJS)
+#      $(LD) -o $@ $(LDFLAGS) $(PLZPART_PATH_OBJS) $(LIBS)
+#
+# plz.c: tweak.h ptau.pre
+asmyt.c
+copper.c
+main.c
+plza.c
+plz.c
+plzfill.c
+sinit.c
+spline.c
+tweak.c
+vect.c