Add some furniture to Pete's house and a horse to the pasture

This commit is contained in:
Jeremy Penner 2019-03-16 17:03:24 -04:00
parent 41fefa5885
commit a010ec5911
12 changed files with 18 additions and 1 deletions

Binary file not shown.

View file

@ -43,6 +43,7 @@ array frames
: sprindex ( dir frame ) 2 << frames + + b@ ; : sprindex ( dir frame ) 2 << frames + + b@ ;
: defstatic ( frame -- ) create b, does> b@ sprindex ; : defstatic ( frame -- ) create b, does> b@ sprindex ;
: defsingle ( sprindex -- ) create b, does> swap drop b@ ;
: defanim ( frame... framecount ticks-per-frame -- ) : defanim ( frame... framecount ticks-per-frame -- )
create b, dup b, 0 for b, next create b, dup b, 0 for b, next
does> ( dir a -- ) does> ( dir a -- )
@ -53,3 +54,7 @@ array frames
0 defstatic {car} 0 defstatic {car}
1 defstatic {pete-stand} 1 defstatic {pete-stand}
1 2 2 5 defanim {pete-walk} 1 2 2 5 defanim {pete-walk}
13 defsingle {pete-table}
14 defsingle {chair}
15 defsingle {pete-bed}
16 defsingle {horse}

Binary file not shown.

BIN
game.jim

Binary file not shown.

BIN
map.jim

Binary file not shown.

BIN
pete.jim

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +1,17 @@
( P E T E ' S H O U S E ) ( P E T E ' S H O U S E )
16 5 N ' {pete-table} defentity table
15 5 N ' {chair} defentity chair
7 6 N ' {pete-bed} defentity bed
table :touch pete say" Yesterday's breakfast is still\on the table."
say" Maybe the day before's too." ;entity
chair :touch pete say" I've had my morning coffee\already." ;entity
bed :touch pete say" I'm not tired yet." ;entity
:noname :noname
reset-level reset-level
:| player yield table yield chair yield bed yield 0 |; ' entities redefine
:| :|
touch-begin 16 10 2= dup if touch-begin 16 10 2= dup if
player move-entity 12 8 pete.jor queue-level player move-entity 12 8 pete.jor queue-level

BIN
road.jim

Binary file not shown.

View file

@ -1,9 +1,11 @@
( O V E R W O R L D ) ( O V E R W O R L D )
24 4 N ' {horse} defentity chuck
:noname :noname
reset-level reset-level
1 player.state DRIVING f! 1 player.state DRIVING f!
:| player yield chuck yield 0 |; ' entities redefine
:| :|
touch-begin E leaving? dup touch-begin E leaving? dup
if pete say" It's 100 miles to the next town." then if pete say" It's 100 miles to the next town." then

Binary file not shown.

BIN
timer.jim

Binary file not shown.