##echo "$pee"
git add .
. ./boop.sh "$pee"
-. ./builq.sh
+. ./wbuild.sh
+##. ./builq.sh slow compile ww
--- /dev/null
+// header file for sprite sheet. AUTO GENERATED, do not edit
+//
+// source PCX: ../ptmp.pcx
+// sheet script: ptmp.sht
+// palette file: ptmp.pal
+
+#define _ptmp_PRSBFCW0 10U
+#define _ptmp_PRSBFCW1 11U
+#define _ptmp_PRSBFCW2 12U
+#define _ptmp_PRSBLCW0 20U
+#define _ptmp_PRSBLCW1 21U
+#define _ptmp_PRSBLCW2 22U
+#define _ptmp_PRSBRCW0 30U
+#define _ptmp_PRSBRCW1 31U
+#define _ptmp_PRSBRCW2 32U
+#define _ptmp_PRSBACW0 40U
+#define _ptmp_PRSBACW1 41U
+#define _ptmp_PRSBACW2 42U
+
+// end list
--- /dev/null
+# player.PCX demo sprite sheet compiler script
+# (C) 2016 Jonathan Campbell
+
+# *spritesheet declares the section used by the sprite sheet cutting tool
+#
+# Sprites are declared by name (which becomes the .VRL file) at the + in the form:
+# +NAME@ID
+#
+# Sprite names are meant for temporary use when compiling the sprite sheet into VRLs.
+# At some point a longer name might be provided for use in your code.
+# This will fill the CURRENT WORKING DIRECTORY with .VRL files as directed when you
+# run PCXSSCUT, make sure your makefile does this in a temporary directory when
+# you integrate into your build and that your cleanup commands delete these files,
+# and that your .gitignore does not attempt to commit these files.
+
+# this format is a bit crap, but we'll improve it as needed. be patient.
+
+# begin spritesheet section
+*spritesheet
+
+# ---------------- player, walking, blue shirt with white cross. Frame 2/3 could be used for standing still
+
+# player, forward, frame 1/3
++PRSBFCW0@10
+xy=0,0
+wh=24,32
+# player, forward, frame 2/3
++PRSBFCW1@11
+xy=24,0
+wh=24,32
+# player, forward, frame 3/3
++PRSBFCW2@12
+xy=48,0
+wh=24,32
+
+# player, left, frame 1/3
++PRSBLCW0@20
+xy=0,32
+wh=24,32
+# player, left, frame 2/3
++PRSBLCW1@21
+xy=24,32
+wh=24,32
+# player, left, frame 3/3
++PRSBLCW2@22
+xy=48,32
+wh=24,32
+
+# player, right, frame 1/3
++PRSBRCW0@30
+xy=0,64
+wh=24,32
+# player, right, frame 2/3
++PRSBRCW1@31
+xy=24,64
+wh=24,32
+# player, right, frame 3/3
++PRSBRCW2@32
+xy=48,64
+wh=24,32
+
+# player, away, frame 1/3
++PRSBACW0@40
+xy=0,96
+wh=24,32
+# player, away, frame 2/3
++PRSBACW1@41
+xy=24,96
+wh=24,32
+# player, away, frame 3/3
++PRSBACW2@42
+xy=48,96
+wh=24,32
--- /dev/null
+// header file for sprite sheet. AUTO GENERATED, do not edit
+//
+// sheet script: ptmp.sht
+
+// sprite sheet (sprite IDs)
+#define _ptmp_PRSBFCW0_sprite 10U
+#define _ptmp_PRSBFCW1_sprite 11U
+#define _ptmp_PRSBFCW2_sprite 12U
+#define _ptmp_PRSBLCW0_sprite 20U
+#define _ptmp_PRSBLCW1_sprite 21U
+#define _ptmp_PRSBLCW2_sprite 22U
+#define _ptmp_PRSBRCW0_sprite 30U
+#define _ptmp_PRSBRCW1_sprite 31U
+#define _ptmp_PRSBRCW2_sprite 32U
+#define _ptmp_PRSBACW0_sprite 40U
+#define _ptmp_PRSBACW1_sprite 41U
+#define _ptmp_PRSBACW2_sprite 42U
+// animation list (animation IDs)
+
+// end list
00:20:21 joncampbell123 | yes. │\r
00:20:29 sparky4_derpy4 | scroll16 needs a bunch of work │\r
00:20:29 joncampbell123 | the less you declare on the stack, the less stack the function needs.\r
+\r
+\r
+\r
+\r
+\r
+\r
+[15:03] joncampbell123m Think of it this way\r
+[15:03] joncampbell123m If something moves or changes frame\r
+[15:04] joncampbell123m then a rectangular region around the sprite needs to be redrawn\r
+[15:05] joncampbell123m So you collect update regions together\r
+[15:06] joncampbell123m based on performance vs overlap\r
+[15:06] joncampbell123m combine the rectangles together and redraw the screen they cover\r
+[15:07] joncampbell123m the simplest way is to compute a rectangle that covers them all\r
+[15:07] joncampbell123m then redraw that.\r
+[15:08] joncampbell123m Then optimize the code from there how you handle it\r
#EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
PDIR=..$(DIRSEP)
SRC=src$(DIRSEP)
+DATADIR=data$(DIRSEP)
+SPRI=$(DATADIR)$(DIRSEP)spri$(DIRSEP)
SRCLIB=$(SRC)lib$(DIRSEP)
JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
NYANLIB=$(SRCLIB)nyan$(DIRSEP)
AFLAGS=-mh -0 -d1
16FLAGS=-fh=16.hed
BAKAPIFLAGS=-fh=bakapi.hed
-SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k40000#55808#60000#32768
+SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#55808#60000
DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
ZFLAGS=-zk0 -zc -zp8 $(WCLQ) ## -zm
CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo -i$(DOSLIB)##wwww
#testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe
EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
-all: $(EXEC) joytest.exe
+all: $(EXEC) joytest.exe vrs
#$(16LIBOBJS) => 16.lib bug....
#
@$(REMOVECOMMAND) *.MAP
@$(REMOVECOMMAND) *.map
@$(REMOVECOMMAND) *.err
- @cd $(DOSLIB)
+ #@cd $(DOSLIB)
#@./buildall.sh clean
- @cd $(PDIR)$(PDIR)$(PDIR)
+ #@cd $(PDIR)$(PDIR)$(PDIR)
# @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
# @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
# @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
@cd 16$(DIRSEP)xw_
@wmake -h -f makefile all
@cd $(PDIR)$(PDIR)
+
+vrs: .symbolic
+ @cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga
+ #@make clean
+ @make all
+ @mv pcx2vrl ../../../../../
+ @mv pcxsscut ../../../../../
+ @mv vrl2vrs ../../../../../
+ @mv vrsdump ../../../../../
+ @cd ../../../../../
--- /dev/null
+#! /bin/bash
+cd data/spri
+../../pcxsscut -s "$1".sht -hc "$1".h -hp _"$1"_ -i ../"$1".pcx -p "$1".pal -tc 0x"$2" -y
+../../vrl2vrs -s "$1".sht -hc "$1"s.h -hp _"$1"_ -o "$1".vrs
+cd ../../
global_game_variables_t gvar;\r
player_t player[MaxPlayers];\r
//extern struct inconfig inpu;\r
- testkeyin=0;\r
+ testkeyin=1;\r
testcontrolnoisy=0;\r
- testctrltype=1;\r
+ testctrltype=0;\r
IN_Startup();\r
IN_Default(0,&player,ctrl_Joystick1);\r
//while(!IN_KeyDown(sc_Escape))\r
if (INL_KeyHook && !special)\r
INL_KeyHook();\r
//#ifdef TESTKEYIN\r
- if(testkeyin > 0) printf("%c [0x%x %u] %u\n", c, k, k, inpu.Keyboard[k]);\r
+ if(testkeyin > 0) printf("%c %u [0x%x %u] %u\n", c, c, k, k, inpu.Keyboard[k]);\r
//endif\r
outp(0x20,0x20);\r
}\r
-Subproject commit 3c110fd249406b11b5301568b7c69d961fb91e79
+Subproject commit 05fc315e3b435866873be945a61f672f62f9199d
// Use the bios to get the current video mode\r
//\r
\r
-long/*FIXME: why long? "long" is 32-bit datatype, VGA modes are 8-bit numbers. */\r
+byte/*FIXME: why long? "long" is 32-bit datatype, VGA modes are 8-bit numbers. */\r
vgaGetMode()\r
{\r
return int10_getmode();\r
void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)\r
{\r
word i;\r
- dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */\r
+ dword far*ptr=(dword far*)vga_state.vga_graphics_ram;//VGA; /* used for faster screen clearing */\r
struct vga_mode_params cm;\r
int CRTParmCount;\r
\r
/* mode switching, page, and plane functions */
void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv);
void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv);
-long vgaGetMode();
+byte vgaGetMode();
void modexLeave();
void modexsetBaseXMode();
page_t modexDefaultPage(page_t *p);