diff --git a/boot.jim b/boot.jim index 89d4d5c..bc057ef 100755 Binary files a/boot.jim and b/boot.jim differ diff --git a/debug.jim b/debug.jim index c86128c..2655b4d 100755 Binary files a/debug.jim and b/debug.jim differ diff --git a/defs.jim b/defs.jim index 38e2556..7619871 100755 Binary files a/defs.jim and b/defs.jim differ diff --git a/end.jim b/end.jim index 980c156..860992a 100755 Binary files a/end.jim and b/end.jim differ diff --git a/entity.jim b/entity.jim index 49e55bc..bd3cd37 100755 Binary files a/entity.jim and b/entity.jim differ diff --git a/footer.jim b/footer.jim index e10884e..bd5c460 100755 Binary files a/footer.jim and b/footer.jim differ diff --git a/game.jim b/game.jim index 8c174c6..46e4b03 100755 Binary files a/game.jim and b/game.jim differ diff --git a/game.jor b/game.jor index 2ee9597..31b940b 100755 --- a/game.jor +++ b/game.jor @@ -165,6 +165,9 @@ defer on-gord-sit then ; var hack-handled : hacked 1 hack-handled ! ; +: hack-override? ( e -- e b ) + dup EVHACK = if hacked drop EVNOP 1 else 0 then ; + : activate-libb haslibb? if Libb entity-present? not if :| 0 hack-handled ! diff --git a/input.jim b/input.jim index 8fc9249..96c32dc 100755 Binary files a/input.jim and b/input.jim differ diff --git a/jiles.jim b/jiles.jim index 4448960..f30a81b 100755 Binary files a/jiles.jim and b/jiles.jim differ diff --git a/job.jim b/job.jim index 4bff4a5..59df784 100755 Binary files a/job.jim and b/job.jim differ diff --git a/kbd.c b/kbd.c index 2ac4678..e7f6e55 100755 --- a/kbd.c +++ b/kbd.c @@ -35,12 +35,29 @@ static void interrupt kbd_isr() { enable(); } -unsigned char kbd_wait() { +unsigned char kbd_wait_raw() { kbd_triggered = 0; while (!kbd_triggered) {} return kbd_triggered; } +static unsigned char kbd_any() { + unsigned char key; + kbd_debounce(); + for (key = 0; key < 128; key ++) { + if (keybuf[key] != KEY_OFF) { + return key; + } + } + return 0xff; +} +unsigned char kbd_wait() { + unsigned char found = kbd_any(); + for (; found != 0xff; found = kbd_any()) {} + for (; found == 0xff; found = kbd_any()) {} + return found; +} + void kbd_init() { if (oldKbdISR == NULL) { memset(keybuf, 0, 128); diff --git a/kbd.h b/kbd.h index 6061ef5..d3c7d2b 100755 --- a/kbd.h +++ b/kbd.h @@ -17,7 +17,8 @@ unsigned char kbd_wait(); #define keyIsDown(k) (keybuf[k] & KEY_SIGNAL) #define keyWasPressed(k) ((keybuf[k] & 0x0f) == KEY_PRESSED) -#define consumeKey(k) (keybuf[k] = keyWasPressed(k) ? KEY_DOWN : keybuf[k]) +#define consumeKey(k) (keybuf[k] = keyWasPressed(k) ? \ + KEY_DOWN | (keybuf[k] & KEY_SIGNAL ) : keybuf[k]) #define keyWasReleased(k) ((keybuf[k] & 0x0f) == KEY_RELEASED) #define K_ESC 1 diff --git a/lev00006.jim b/lev00006.jim index e57c409..6cd86f0 100755 Binary files a/lev00006.jim and b/lev00006.jim differ diff --git a/lev00006.jor b/lev00006.jor index 50727e9..5c059bf 100755 --- a/lev00006.jor +++ b/lev00006.jor @@ -69,7 +69,7 @@ var pady-introduced 18 1 defrexx r1 3 1 door d1 -17 1 door d2 +16 1 door d2 4 11 door d3 10 9 door d4 16 11 door d5 @@ -87,18 +87,18 @@ defer term-loop : ret-if-on ( e -- ) dup computer-on? if rdrop else drop then ; : first-on ( -- e ) - c1 ret-if-on c2 ret-if-on c3 ret-if-on c4 ret-if-on c5 ret-if-on - c6 ret-if-on c7 ret-if-on c8 ret-if-on c9 ret-if-on cx ret-if-on 0 ; + c1 ret-if-on cx ret-if-on c2 ret-if-on c3 ret-if-on c4 ret-if-on + c5 ret-if-on c6 ret-if-on c7 ret-if-on c8 ret-if-on c9 ret-if-on 0 ; defer cmp-next-on : next-on ( e -- e ) :| over = if drop ' ret-if-on ' cmp-next-on redefine then |; ' cmp-next-on redefine - c1 cmp-next-on c2 cmp-next-on c3 cmp-next-on c4 cmp-next-on c5 cmp-next-on - c6 cmp-next-on c7 cmp-next-on c8 cmp-next-on c9 cmp-next-on cx cmp-next-on + c1 cmp-next-on cx cmp-next-on c2 cmp-next-on c3 cmp-next-on c4 cmp-next-on + c5 cmp-next-on c6 cmp-next-on c7 cmp-next-on c8 cmp-next-on c9 cmp-next-on first-on ; :noname responder next-on ; ' term-loop redefine 5197 ' d1 3 2 keypad k1 --1 ' d2 17 2 keypad k2 ( must be hacked ) +-1 ' d2 16 2 keypad k2 ( must be hacked ) 2757 ' d3 4 10 keypad k3 7777 ' d5 16 10 keypad k5 @@ -110,7 +110,11 @@ defer cmp-next-on LEV_END 13 12 exitdoor dx ' dx 14 12 scanner sx -c1 :noname dup chain-listener EVACT = if +c1 :noname hack-override? if + libb say" just a bunch of boring\source code." + libb say" bill didn't leave anything\really juicy here where\other people could get at it." +then +dup chain-listener EVACT = if term say" .:: welcome to farquaad ::.\please select your choice:" 0 begin :| s" about farquaad" :| @@ -118,7 +122,7 @@ c1 :noname dup chain-listener EVACT = if term say" don't mess with it!!!" |; yield s" s3cr3t c0d3z" :| term say" get out lamer" |; yield - s" boss key" :| term say" press f9 to activate" |; yield + s" boss key" :| term say" press f9 to activate\at any time" |; yield s" open pod bay doors" :| term say" i can't do that dave" |; yield s" log off" :| term say" good riddance" drop 1 |; yield done |; choose @@ -141,7 +145,7 @@ c3 :noname dup chain-listener EVACT = if else term say" The passcode is 5197." then - term say" Subject: re: RE: Server's down\Uhhh the firewall blocked\the passcode?" + term say" Subject: re: RE: Server's down\Uhhh the firewall is blocking\the passcode?" term say" Subject: re: RE: Server's down\AUGH FINE I rebooted it." then ; @@ -150,41 +154,80 @@ c4 :noname term say" bill's workstation\keep out dipshits" then dup EVTOUCH = if isneut? if - haslibb? not if - with-libb - libb say" well, well, well.\what have we here?" - libb say" > /version" - neut say" < NEUT v0.71.4rc12" - neut say" > IDENTIFY_PROGRAM.EXE" - libb say" < libb v2.718282" - libb say" oh, a nosy little fella." - neut say" NOT A FELLA." - libb say" perhaps you and i could\help each other." - neut say" WE ARE ASSISTING ALL WHO\ARE IN NEED." - libb say" i've been watching the\network. it's kind of what\i do." - libb say" you and your programmer,\you're escaping, aren't\you?" - neut say" THE BUILDING IS UNSAFE.\WE ARE HELPING." - libb say" i want out, neut." - libb say" i hate being cooped up in\this locked-down corporate\hellhole of a network." - libb say" you're going to take me\with you." - neut say" THIS COURSE OF ACTION\ALSO SEEMS POTENTIALLY\UNSAFE." - libb say" that wasn't a threat, neut.\that was a fact." - libb say" you can't get out of here\without me." - libb say" i can disable keypads.\i can reprogram terminals.\i can HELP, neut." - hide-footer 10 sleep - neut say" IT NEVER HURTS TO HELP." - libb say" that's the spirit." - neut say" > UPLOAD.EXE /LIBB" - libb say" aww yiss." - libb say" press z when you need me\to mess with something." - then -then then chain-listener ; + haslibb? not if + with-libb + libb say" well, well, well.\what have we here?" + libb say" > /version" + neut say" < NEUT v0.71.4rc12" + neut say" > IDENTIFY_PROGRAM.EXE" + libb say" < libb v2.718282" + libb say" oh, a nosy little fella." + neut say" NOT A FELLA." + libb say" perhaps you and i could\help each other." + neut say" WE ARE ASSISTING ALL WHO\ARE IN NEED." + libb say" i've been watching the\network. it's kind of what\i do." + libb say" you and your programmer,\you're escaping, aren't\you?" + neut say" THE BUILDING IS UNSAFE.\WE ARE HELPING." + libb say" i want out, neut." + libb say" i hate being cooped up in\this locked-down corporate\hellhole of a network." + libb say" you're going to take me\with you." + neut say" THIS COURSE OF ACTION\ALSO SEEMS POTENTIALLY\UNSAFE." + libb say" that wasn't a threat, neut.\that was a fact." + libb say" you can't get out of here\without me." + libb say" i can disable keypads.\i can reprogram terminals.\i can HELP, neut." + hide-footer 10 sleep + neut say" IT NEVER HURTS TO HELP." + libb say" that's the spirit." + neut say" > UPLOAD.EXE /LIBB" + libb say" aww yiss." + libb say" press z when you need me\to mess with something." + then + then then + hack-override? if + libb say" i brought everything good\along with me, don't worry." + then chain-listener ; c5 :noname dup chain-listener EVACT = if - + gord say" A weird looking spreadsheet..." + gord say" Oh wait, I pressed a key and\it disappeared. Someone using\the boss key to hide" + gord say" that they're reading the entire\archive of User Friendly comic\strips." then ; -c6 :noname dup chain-listener EVACT = if +c6 :noname hack-override? if + libb say" hehehe, that was a fun one." +then +dup chain-listener EVACT = if + term say" Subject: Card scanners?\Looks like the scanners are\on the fritz again..." + term say" I scanned my keycard to get\into the office and the door\wouldn't close!" + term say" Someone's gotta fix that ASAP,\it's a serious security problem!" + term say" Subject: re: Card scanners?\I can take a quick look, I\might have an idea as to" + term say" what's going on.\ -- Bill" +then ; + +c7 :noname hack-override? if + libb say" you know the switch is right\there on the wall, right?" +then +dup EVTOUCH = if isprog? not if + b2 switch-on? if + term say" WorkSecure (tm) v2.0\AUTHORIZED PERSONNEL ONLY" + term say" Actively neutralizing:\1 threat(s)" + else + jaye say" Looks like the power is cut." + then + drop EVNOP +then then chain-listener ; + +c8 :noname dup chain-listener EVACT = if + term say" Subject: Password security\A reminder to all developers\about security best practice:" + term say" DO NOT WRITE DOWN PASSWORDS!\We pay significant license fees\for encrypted password" + term say" managers for all employees!\Use it to generate and store\secure passwords!" + jaye say" There's a sticky note attached\to the monitor that says\'7777'." +then ; + +c9 :noname hack-override? if + libb say" he's just being dramatic." +then +dup chain-listener EVACT = if term say" Subject: Experiment\Hey folks, can you all do me a\huge favour?" term say" There was a small bug in my\code (yes, it happens!) and a\program I was working on" term say" made a few too many copies of\itself. Can everyone check to\see if you have a process" @@ -193,18 +236,6 @@ c6 :noname dup chain-listener EVACT = if term say" It could seriously mess with\your system.\ -- Bill" then ; -c7 :noname dup chain-listener EVTOUCH = if isprog? not if - term say" WorkSecure (tm) v2.0\AUTHORIZED PERSONNEL ONLY" - term say" Actively neutralizing:\1 threat(s)" -then then ; - -c8 :noname dup chain-listener EVACT = if - term say" Subject: Password security\A reminder to all developers\about security best practice:" - term say" DO NOT WRITE DOWN PASSWORDS!\We pay significant license fees\for encrypted password" - term say" managers for all employees!\Use it to generate and store\secure passwords!" - gord say" There's a sticky note attached\to the monitor that says\'7777'." -then ; - cx :noname dup EVTOUCH = if isprog? not if b1 switch-on? not if jaye say" This is the sign-in terminal\used by visitors." jaye say" It's not turning on for some\reason." diff --git a/lev00006.map b/lev00006.map index 12d2eed..eefba59 100755 Binary files a/lev00006.map and b/lev00006.map differ diff --git a/level.jim b/level.jim index 6676a9e..ba17c8c 100755 Binary files a/level.jim and b/level.jim differ diff --git a/map.jim b/map.jim index ae25799..3d4e69d 100755 Binary files a/map.jim and b/map.jim differ diff --git a/neuttowr.exe b/neuttowr.exe index a31649d..85bcbfd 100755 Binary files a/neuttowr.exe and b/neuttowr.exe differ diff --git a/neuttowr.prj b/neuttowr.prj index f026e86..3d04d55 100755 Binary files a/neuttowr.prj and b/neuttowr.prj differ diff --git a/state.jim b/state.jim index 65365c7..2b1bba7 100755 Binary files a/state.jim and b/state.jim differ diff --git a/timer.jim b/timer.jim index fabfa89..61a2743 100755 Binary files a/timer.jim and b/timer.jim differ