From: sparky4 Date: Thu, 23 Mar 2017 16:41:45 +0000 (-0500) Subject: __seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd... X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=11d0edff8ea7936294bc1b220a0456bbeb2eb1f7 __seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd.c ][ ca needs huge amounts of work and i should remember what needs to be done soon also i should reverify 16_in.c to make sure it can work with other code of id engine] going to port rest of code to borland c some time so we can use the core components of id engine here [going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now] i fixed a bad bug on building the code initionally ^^; --- diff --git a/makefile b/makefile index 306538e0..0b4e1f97 100755 --- a/makefile +++ b/makefile @@ -359,6 +359,7 @@ mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h 16_mm.$(OBJ): $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h 16_pm.$(OBJ): $(SRCLIB)/16_pm.c $(SRCLIB)/16_pm.h 16_ca.$(OBJ): $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h +16_us.$(OBJ): $(SRCLIB)/16_us.c 16_dbg.$(OBJ): $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h midi.$(OBJ): $(SRCLIB)/midi.c $(SRCLIB)/midi.h 16_head.$(OBJ):$(SRCLIB)/16_head.c $(SRCLIB)/16_head.h @@ -429,7 +430,7 @@ backupconfig: .symbolic @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)/git_modu.les @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)/git_igno.re -initconfig: +initconfig: .symbolic @$(COPYCOMMAND) $(GITCONFIGDIR)/git_con.fig .git/config @$(COPYCOMMAND) $(GITCONFIGDIR)/git_modu.les .gitmodules @$(COPYCOMMAND) $(GITCONFIGDIR)/git_igno.re .gitignore diff --git a/src/lib/16_us.c b/src/lib/16_us.c index a164d2b4..ec2b3b28 100755 --- a/src/lib/16_us.c +++ b/src/lib/16_us.c @@ -1,4 +1,11 @@ -#if 0 +/*#include "src/lib/16_in.h" +static word far* clockw= (word far*) 0x046C; // 18.2hz clock + +#define CtlPanelSX 1 +#define CtlPanelSY 1 +#define CtlPanelEX 1 +#define CtlPanelEY 1 +#define TickBase 1 #define PaddleMinX (CtlPanelSX + 3) #define PaddleMaxX (CtlPanelEX - 15) @@ -11,18 +18,18 @@ void USL_DrawPongScore(word k,word c) { - fontcolor = HiliteColor; - PrintY = py = CtlPanelSY + 4; - px = CtlPanelSX + 6; - VWB_Bar(px,py,42,6,BackColor); - USL_DrawString("YOU:"); - PrintX = px; - US_PrintUnsigned(k); - px = CtlPanelSX + 108; - VWB_Bar(px,py,50,6,BackColor); - USL_DrawString("COMP:"); - PrintX = px; - US_PrintUnsigned(c); + //++++fontcolor = HiliteColor; + //++++PrintY = py = CtlPanelSY + 4; + //++++px = CtlPanelSX + 6; + //++++VWB_Bar(px,py,42,6,BackColor); + //++++USL_DrawString("YOU:"); + //++++PrintX = px; + //++++US_PrintUnsigned(k); + //++++px = CtlPanelSX + 108; + //++++VWB_Bar(px,py,50,6,BackColor); + //++++USL_DrawString("COMP:"); + //++++PrintX = px; + //++++US_PrintUnsigned(c); } void @@ -37,8 +44,9 @@ USL_PlayPong(void) kscore,cscore, speedup; int bdx,bdy; - longword balltime,waittime; + word balltime,waittime; CursorInfo cursorinfo; + word TimeCount = *clockw; kx = cx = PaddleMinX + ((PaddleMaxX - PaddleMinX) / 2); bx = by = bdx = bdy = 0; @@ -79,11 +87,11 @@ USL_PlayPong(void) cx -= 1; } - VWB_Bar(BallMinX,BallMinY - 1, - BallMaxX - BallMinX + 5,BallMaxY - BallMinY + 7, - BackColor); - VWB_DrawSprite(cx,CPaddleY,PADDLESPR); - VWB_DrawSprite(kx,KPaddleY,PADDLESPR); + //++++VWB_Bar(BallMinX,BallMinY - 1, + // BallMaxX - BallMinX + 5,BallMaxY - BallMinY + 7, + // BackColor); + //++++VWB_DrawSprite(cx,CPaddleY,PADDLESPR); + //++++VWB_DrawSprite(kx,KPaddleY,PADDLESPR); if (ball) { if @@ -92,7 +100,7 @@ USL_PlayPong(void) || (((bx + bdx) >> 2) < BallMinX) ) { - SD_PlaySound(BALLBOUNCESND); + //++++SD__PlaySound(BALLBOUNCESND); bdx = -bdx; } bx += bdx; @@ -102,7 +110,7 @@ USL_PlayPong(void) killball = true; lastscore = false; cscore++; - SD_PlaySound(COMPSCOREDSND); + //++++SD__PlaySound(COMPSCOREDSND); USL_DrawPongScore(kscore,cscore); if (cscore == 21) { @@ -116,7 +124,7 @@ USL_PlayPong(void) killball = true; lastscore = true; kscore++; - SD_PlaySound(KEENSCOREDSND); + //++++SD__PlaySound(KEENSCOREDSND); USL_DrawPongScore(kscore,cscore); if (kscore == 21) { @@ -140,7 +148,7 @@ USL_PlayPong(void) { rx = cx; revdir = true; - SD_PlaySound(COMPPADDLESND); + //++++SD__PlaySound(COMPPADDLESND); } else if ( @@ -156,7 +164,7 @@ USL_PlayPong(void) } rx = kx; revdir = true; - SD_PlaySound(KEENPADDLESND); + //++++SD__PlaySound(KEENPADDLESND); } if (revdir) { @@ -167,7 +175,7 @@ USL_PlayPong(void) revdir = false; } } - VWB_DrawSprite(x,y,(x & 1)? BALL1PIXELTOTHERIGHTSPR : BALLSPR); + //++++VWB_DrawSprite(x,y,(x & 1)? BALL1PIXELTOTHERIGHTSPR : BALLSPR); } else if (TimeCount >= balltime) { @@ -179,10 +187,10 @@ USL_PlayPong(void) bx = (BallMinX + ((BallMaxX - BallMinX) / 2)) << 2; by = (BallMinY + ((BallMaxY - BallMinY) / 2)) << 2; } - VW_UpdateScreen(); + //++++VW_UpdateScreen(); while (waittime == TimeCount) ; // DEBUG - do adaptiveness - } while ((LastScan != sc_Escape) && !done); + } while ((inpu.LastScan != sc_Escape) && !done); IN_ClearKeysDown(); } @@ -193,13 +201,12 @@ USL_PongCustom(UserCall call,struct UserItem far *item) if (call != uic_SetupCard) return(false); - VWB_DrawPic(0,0,CP_MENUSCREENPIC); - VWB_DrawPic(CtlPanelSX + 56,CtlPanelSY,CP_PADDLEWARPIC); - VWB_Hlin(CtlPanelSX + 3,CtlPanelEX - 3,CtlPanelSY + 12,HiliteColor ^ BackColor); - VWB_Hlin(CtlPanelSX + 3,CtlPanelEX - 3,CtlPanelEY - 7,HiliteColor ^ BackColor); + //++++VWB_DrawPic(0,0,CP_MENUSCREENPIC); + //++++VWB_DrawPic(CtlPanelSX + 56,CtlPanelSY,CP_PADDLEWARPIC); + //++++VWB_Hlin(CtlPanelSX + 3,CtlPanelEX - 3,CtlPanelSY + 12,HiliteColor ^ BackColor); + //++++VWB_Hlin(CtlPanelSX + 3,CtlPanelEX - 3,CtlPanelEY - 7,HiliteColor ^ BackColor); USL_PlayPong(); return(true); } - -#endif +*/