new state flag system, more story
This commit is contained in:
parent
a9dfc15130
commit
459235117d
|
@ -14,7 +14,7 @@ car :touch
|
|||
|
||||
:noname
|
||||
0 player.state DRIVING f!
|
||||
:| chuck.state @ CHUCK-HOME = if e_chuck yield then
|
||||
:| CHUCK-HOME state@ if e_chuck yield then
|
||||
player.driving? not if car yield then
|
||||
done |; ' entities redefine
|
||||
|
||||
|
@ -33,6 +33,7 @@ touch-next 6 21 2= dup
|
|||
pete say" Nobody home, I guess."
|
||||
jeanne say" Go away before I call the\cops, Pete!"
|
||||
pete say" Oh.\I guess she's still mad."
|
||||
JEANNE-ANGRY setstate
|
||||
else
|
||||
pete say" Jeanne hates me enough already\without driving through her\front door!"
|
||||
then
|
||||
|
|
1
jorth.c
1
jorth.c
|
@ -446,6 +446,7 @@ void f_comma() {
|
|||
}
|
||||
|
||||
void f_allot() {
|
||||
memset(HERE, 0, TOP().u);
|
||||
HERE = CELL_OFFSET(HERE, TOP().u);
|
||||
DROP(1);
|
||||
}
|
||||
|
|
53
petehous.jor
53
petehous.jor
|
@ -9,10 +9,55 @@ 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
|
||||
e_phone :touch phone
|
||||
:| s" [don't pick up]" :| pete say" Hmm... no answer." |; yield
|
||||
s" Hey Pete, what's up?" :| pete say" Not much, old friend!" |; yield
|
||||
done |; choose ;entity
|
||||
e_phone :touch phone :|
|
||||
|
||||
s" [don't pick up]"
|
||||
:| pete say" Hmm... no answer." |; yield
|
||||
|
||||
s" Hey Pete, what's up?"
|
||||
:| pete say" Not much, old friend!"
|
||||
0 begin phone :|
|
||||
JEANNE-ANGRY state@ CHUCK-GONE state@ not and if
|
||||
s" I hear Jeanne's awful mad\at you!"
|
||||
:| pete say" Ohh, she'll come round."
|
||||
phone say" What'd you do, anyway?"
|
||||
pete say" Me?! What makes you think I\did anything?"
|
||||
phone say" Come on, Pete, how long\have we known each other?"
|
||||
pete say" Haw haw haw! Well, it's a\pretty good story..."
|
||||
say" I was taking Chuck out for a\midnight ride, see..."
|
||||
phone say" *sigh* You didn't even think\of asking, did you."
|
||||
pete say" Hell no! He's my horse!"
|
||||
phone say" Chuck hasn't been your horse\for years, Pete. That's what\happens when you sell them."
|
||||
pete say" Quit moralizing and let me tell\my story. So there I was,\riding on the trail..."
|
||||
say" We get to the clearing, and\I look up at the stars."
|
||||
say" It's the clearest night\you've ever seen in your life."
|
||||
say" Just as I'm looking up,\I see something."
|
||||
phone say" 'Something'?"
|
||||
pete say" I have seen my share of\airplanes and shooting stars.\This was not that."
|
||||
say" I'm not saying it was aliens..."
|
||||
phone say" ... but it was aliens."
|
||||
pete say" I'm not saying it!\You said it."
|
||||
say" Anyway, I get off Chuck and\lie down on the grass, to\get a better look, see?"
|
||||
say" Maybe have a pull or two of\whiskey, while I'm watching\the sky."
|
||||
say" I guess I must've dozed off,\because next thing I know\it's morning and Chuck's gone."
|
||||
phone say" You LOST him??"
|
||||
pete say" I figured he just went home!\But when I went to Jeanne's,\he wasn't there."
|
||||
phone say" You lost him."
|
||||
pete say" He's a smart old goat,\just like me. He'll\turn up soon."
|
||||
CHUCK-GONE setstate
|
||||
|; yield
|
||||
then
|
||||
CHUCK-GONE state@ if
|
||||
s" You found Chuck yet?"
|
||||
:| pete say" I'm sure he'll turn up soon!\Sheesh, get off my back." |; yield
|
||||
then
|
||||
|
||||
s" Goodbye, Pete." :| pete say" Goodbye!" drop 1 |; yield
|
||||
done |; choose
|
||||
dup until drop
|
||||
|; yield
|
||||
|
||||
done |; choose ;entity
|
||||
|
||||
:noname
|
||||
reset-level
|
||||
|
|
2
road.jor
2
road.jor
|
@ -4,7 +4,7 @@
|
|||
|
||||
:noname
|
||||
1 player.state DRIVING f!
|
||||
:| chuck.state @ CHUCK-HOME = if chuck yield then
|
||||
:| CHUCK-HOME state@ if chuck yield then
|
||||
done |; ' entities redefine
|
||||
:|
|
||||
touch-begin E leaving? dup
|
||||
|
|
16
state.jor
16
state.jor
|
@ -1,12 +1,20 @@
|
|||
0 const CHUCK-GONE
|
||||
1 const CHUCK-SEARCH
|
||||
0 const JEANNE-ANGRY
|
||||
1 const CHUCK-GONE
|
||||
2 const CHUCK-FOLLOW
|
||||
3 const CHUCK-HOME
|
||||
var chuck.state
|
||||
|
||||
3 const LAST-STATE
|
||||
array state LAST-STATE 8 / 1 + allot
|
||||
|
||||
: statef ( f -- v f ) dup 8 % 1 swap << swap 8 / state + swap ;
|
||||
: state! ( b f -- ) statef f! ;
|
||||
: state@ ( b f -- ) statef f@ ;
|
||||
: setstate 1 swap state! ;
|
||||
: clearstate 0 swap state! ;
|
||||
|
||||
16 18 W ' {horse} defentity p_chuck
|
||||
:noname
|
||||
:| player yield
|
||||
chuck.state @ CHUCK-FOLLOW = if p_chuck yield then
|
||||
CHUCK-FOLLOW state@ if p_chuck yield then
|
||||
done |; ' party redefine
|
||||
; ' onload redefine
|
|
@ -10,7 +10,7 @@ car :touch
|
|||
:noname
|
||||
0 player.state DRIVING f!
|
||||
|
||||
:| chuck.state @ CHUCK-SEARCH = if e_chuck yield then
|
||||
:| CHUCK-GONE state@ if e_chuck yield then
|
||||
player.driving? not if car yield then
|
||||
done |; ' entities redefine
|
||||
|
||||
|
@ -21,7 +21,7 @@ touch-begin S leaving? dup
|
|||
else player move-entity 13 7 road.jor queue-level
|
||||
then
|
||||
then
|
||||
chuck.state @ CHUCK-SEARCH = if
|
||||
CHUCK-GONE state@ if
|
||||
touch-next 37 60 2= dup
|
||||
if
|
||||
pete say" Oh for the love of..."
|
||||
|
|
Loading…
Reference in a new issue