Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself

This commit is contained in:
Jeremy Penner 2023-10-15 21:33:10 -04:00
parent 314ee8b476
commit 6c97377f2f
15 changed files with 29 additions and 16 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -36,7 +36,7 @@ s" A simple textmode graphics demo advertising the game development collective\c
defembed dirtrect.com
s" assemble.com"
s" I think this is an 8086 assembler, but I don't have any documentation for\it and it doesn't use a standard syntax. Some kind of Forth system?"
s" This claims to be some kind of combination Forth system / 8086 assembler??\I don't know Forth and I don't have any documentation for it, and it\doesn't use a standard assembly syntax, so your guess is as good as mine."
defembed assemble.com
(
@ -63,6 +63,7 @@ s" Maze Crazy 3D - Explore a fascinating maze filled with twists and turns\in 3
nl 1+ next drop ;
: select-file
black bg! white fg!
x" Type the number of a file, or Q to return to the menu: " inputch
dup [ key q lit ] = if drop ' rick-menu return then
[ key 1 lit ] - dup 0 >= over rick-filelist count < and if

BIN
swine.com

Binary file not shown.

View file

@ -389,11 +389,22 @@ array title-text t", SWINE MEEPER"
blue bg! yellow fg! clear
17 3 textxy! title-text draw-spaced-text ;
4 ' draw-title defmenu title-menu
' start s" Start Game" 0 defitem
' difficulty-menu s" Difficulty" 1 defitem
' theme-menu s" Themes" 2 defitem
' leave s" Quit" 3 defitem
import embed.jrt
array instructiontext { s" swine.txt" embed }
: instructions
lgray bg! blue fg! clear
2 1 textxy!
instructiontext dup embed-data swap @ for each
i b@ dup 32 >= if draw-char else 10 = if 2 texty 1+ textxy! then then
next wait-key drop ;
5 ' draw-title defmenu title-menu
' start s" Start Game" 0 defitem
' instructions s" Instructions" 1 defitem
' difficulty-menu s" Difficulty" 2 defitem
' theme-menu s" Themes" 3 defitem
' leave s" Quit" 4 defitem
' main :chain textmode reseed! hidecursor title-menu textmode ;

View file

@ -1,18 +1,15 @@
S * W * I * N * E M * E * E * P * E * R
Waddles, your trusty pig, is ready to go on the hunt for truffles! Leash him
up and make your way through the grove. But be warned! Digging too close can
cause damage to the truffles' mycelia, which can take years to recover from!
HOW TO PLAY:
Select a square with the arrow keys, and press the space bar or enter to dig.
Waddles will tell you how many truffles are nearby by marking the square with
a number. This is the number of neighbouring squares (including diagonals)
that have truffles.
HOW TO PLAY: Select a square with the arrow keys, and press the space bar or
enter to dig. Waddles will tell you how many truffles are nearby by marking
the square with a number. This is the number of neighbouring squares
(including diagonals) that have truffles.
If you select a square with no truffles nearby, the neighbouring squares will
automatically be cleared out. If you select a square with a truffle, it's
game over!
If you select a square with no truffles nearby, the neighbouring squares
will automatically be cleared out. If you select a square with a truffle,
it's game over!
You can use the "F" key to flag and unflag a square as containing a truffle
without digging there. If you select a square that has already been dug up,

Binary file not shown.

View file

@ -489,6 +489,8 @@ dbg" flow control words and misc."
:t :init initscripts @ here initscripts ! , ] ;
: :INIT [ t& initscripts lit ] dup @t swap target swap !t w>t ] compt ;
:INIT 0 inptr @ b! ; ( ensure input buffer starts empty )
:t doinit initscripts @
[ target ] dup BZ_ [ patchpt ] dup cell + >r @ GOTO_ [ swap w>t ]
[ patch!t ] drop ;

BIN
zipmin.com Executable file

Binary file not shown.

Binary file not shown.

View file

@ -180,6 +180,8 @@ dbg" boot"
MOV BP 0x00 #
NEXT
here s", zipstub.min" s" zipmin.com" writeenv
} import common.jrt {
T] init execute

BIN
zipstub.min Executable file

Binary file not shown.

Binary file not shown.