jeanne sprite

This commit is contained in:
Jeremy Penner 2019-07-01 12:31:00 -04:00
parent 761ef1751a
commit d4dca89ef9
5 changed files with 16 additions and 5 deletions

View file

@ -68,6 +68,8 @@ array frames
( 3: mary stand ) 17 20 22 24 frame
( 4: mary walk ) 19 21 23 25 frame
( 5: car lights ) 29 27 26 28 frame
( 6: jeanne stand ) 30 32 34 36 frame
( 7: jeanne walk ) 31 33 35 37 frame
: sprindex ( dir frame ) 2 << frames + + b@ ;
: defstatic ( frame -- ) create b, does> b@ sprindex ;
@ -89,4 +91,6 @@ array frames
16 defsingle {horse}
3 defstatic {mary}
3 4 2 5 defanim {mary-walk}
6 defstatic {jeanne}
6 7 2 5 defanim {jeanne-walk}
18 defsingle {phone}

BIN
game.exe

Binary file not shown.

View file

@ -36,13 +36,17 @@ var player.prevdir
: player.driving? player.state DRIVING f@ ;
: :playerwalk create , , does>
player.state MOVING f@ not if cell + then @ execute ;
' {mary} ' {mary-walk} :playerwalk {pmary}
' {pete-stand} ' {pete-walk} :playerwalk {ppete}
' {jeanne} ' {jeanne-walk} :playerwalk {pjeanne}
: {player}
player.driving? if {car-drive}
else player.state MOVING f@ if
player.state ISMARY f@ if {mary-walk} else {pete-walk} then
else
player.state ISMARY f@ if {mary} else {pete-stand} then
then then ;
else player.state ISMARY f@ if {pmary} else {ppete} then
then ;
: player.canmove? ( x y -- )
player.state NOCLIP f@ not if
@ -159,11 +163,14 @@ var glitchlevel
draw-footer ;
16 18 W ' {horse} defentity p_chuck
16 18 W ' {pjeanne} defentity p_jeanne
:noname
reset-level
MODE-MOVE @ ' tick redefine
' full-draw ' draw redefine
:| player yield
ISMARY player.state f@ if p_jeanne yield then
CHUCK-FOLLOW flag@ if p_chuck yield then
done |; ' party redefine

BIN
game.prj

Binary file not shown.

Binary file not shown.