diff --git a/boot.jim b/boot.jim index 0866cef..434879e 100755 Binary files a/boot.jim and b/boot.jim differ diff --git a/cheat.jim b/cheat.jim new file mode 100755 index 0000000..57ca716 Binary files /dev/null and b/cheat.jim differ diff --git a/cheat.jor b/cheat.jor new file mode 100755 index 0000000..1cd6785 --- /dev/null +++ b/cheat.jor @@ -0,0 +1,34 @@ +: current-cheatchar ( p -- c ) + dup @ swap cell + @ + b@ ; +: cheat create 0 , latest wordname , , + does> ( c p -- ) + >r r@ current-cheatchar = if + 1 r@ +! + r@ current-cheatchar 0 = if + 0 r@ ! + r@ 2 cells + @ execute + then + else + 0 r@ ! + then rdrop ; + +:noname :| + disk :| + s" I don't wanna cheat" ' noop yield + s" Jump to level 1" :| hide-footer 1 queue-level |; yield + s" Jump to level 2" :| hide-footer 2 queue-level |; yield + s" Jump to level 3" :| hide-footer 3 queue-level |; yield + s" Jump to level 4" :| hide-footer 4 queue-level |; yield + s" Jump to level 5" :| hide-footer 5 queue-level |; yield + s" Jump to level 6" :| hide-footer 6 queue-level |; yield + done |; choose + |; sched ; cheat NTCHEAT + +array letterkeys +30 b, 48 b, 46 b, 32 b, 18 b, 33 b, 34 b, 35 b, 23 b, 36 b, 37 b, 38 b, 50 b, +49 b, 24 b, 25 b, 16 b, 19 b, 31 b, 20 b, 22 b, 47 b, 17 b, 45 b, 21 b, 44 b, + +: letter-typed + 0 0 26 for letterkeys i + b@ key-released if drop i 65 + then next ; + +:noname letter-typed dup if NTCHEAT else drop then ; ' cheat-tick redefine diff --git a/debug.jim b/debug.jim index 792623c..fc1194d 100755 Binary files a/debug.jim and b/debug.jim differ diff --git a/defs.jim b/defs.jim index 3f80771..f2b2256 100755 Binary files a/defs.jim and b/defs.jim differ diff --git a/end.jim b/end.jim index ffef3ad..67d52eb 100755 Binary files a/end.jim and b/end.jim differ diff --git a/entity.jim b/entity.jim index 235beff..32c07e2 100755 Binary files a/entity.jim and b/entity.jim differ diff --git a/footer.jim b/footer.jim index 350d4b4..f9e008e 100755 Binary files a/footer.jim and b/footer.jim differ diff --git a/game.jim b/game.jim index c115ea9..d2a0264 100755 Binary files a/game.jim and b/game.jim differ diff --git a/game.jor b/game.jor index 2cb2864..2e98d1d 100755 --- a/game.jor +++ b/game.jor @@ -1,4 +1,5 @@ ( T I C K ) +defer cheat-tick defer party defer entities var objects @@ -248,6 +249,7 @@ defer reset-level userword player-tick boss-tick quit-tick + cheat-tick ticking-objects @ if ticking-objects @ links @@ -513,5 +515,5 @@ Gord @ const gord-listener gord-follow? if Gord yield then done |; ' party redefine :| ' mode-wait ' tick redefine |; ' any-job-started redefine - :| ' mode-move ' tick redefine hide-footer |; ' all-jobs-complete redefine + :| hide-footer ' mode-move ' tick redefine |; ' all-jobs-complete redefine ; ' onload redefine diff --git a/input.jim b/input.jim index b18a51e..cb0a60a 100755 Binary files a/input.jim and b/input.jim differ diff --git a/jiles.jim b/jiles.jim index 1954fed..1ccf54c 100755 Binary files a/jiles.jim and b/jiles.jim differ diff --git a/job.jim b/job.jim index a49b418..ffd89e0 100755 Binary files a/job.jim and b/job.jim differ diff --git a/lev00001.jim b/lev00001.jim index 85f14d4..79a3331 100755 Binary files a/lev00001.jim and b/lev00001.jim differ diff --git a/lev00002.jim b/lev00002.jim index 0b94e8d..05d53d4 100755 Binary files a/lev00002.jim and b/lev00002.jim differ diff --git a/lev00003.jim b/lev00003.jim index 3c5c825..fa7ce74 100755 Binary files a/lev00003.jim and b/lev00003.jim differ diff --git a/lev00004.jim b/lev00004.jim index 37b9c1c..fa4c90c 100755 Binary files a/lev00004.jim and b/lev00004.jim differ diff --git a/lev00005.jim b/lev00005.jim index e91484f..2da9ccf 100755 Binary files a/lev00005.jim and b/lev00005.jim differ diff --git a/lev00006.jim b/lev00006.jim index cfae883..a0af44d 100755 Binary files a/lev00006.jim and b/lev00006.jim differ diff --git a/level.jim b/level.jim index bc92900..cac1dbb 100755 Binary files a/level.jim and b/level.jim differ diff --git a/map.jim b/map.jim index 2a4364a..9d79897 100755 Binary files a/map.jim and b/map.jim differ diff --git a/neuttowr.exe b/neuttowr.exe index 8d1f1d0..6371cd3 100755 Binary files a/neuttowr.exe and b/neuttowr.exe differ diff --git a/neuttowr.prj b/neuttowr.prj index 372c9d0..740aac2 100755 Binary files a/neuttowr.prj and b/neuttowr.prj differ diff --git a/sound.jim b/sound.jim index ea73221..8f97265 100755 Binary files a/sound.jim and b/sound.jim differ diff --git a/start.jor b/start.jor index ead3e8d..d952465 100755 --- a/start.jor +++ b/start.jor @@ -6,6 +6,7 @@ s" job.jor" loadfile s" level.jor" loadfile s" game.jor" loadfile + s" cheat.jor" loadfile ; execute task :noname activate blah begin draw suspend again ; execute diff --git a/state.jim b/state.jim index e9059bf..40d3b27 100755 Binary files a/state.jim and b/state.jim differ diff --git a/testbed.c b/testbed.c index 4244f88..2bacf8b 100755 --- a/testbed.c +++ b/testbed.c @@ -241,6 +241,7 @@ void showtextscreen(char* filename) { f = fopen(filename, "rb"); freadfar(f, MK_FP(0xb800, 0), 4000); gotoxy(1, 24); + fclose(f); } void shownag() { vid_cleanup(); @@ -318,6 +319,11 @@ void f_keyWasPressed() { consumeKey(k); } +void f_keyWasReleased() { + int k = TOP().i; + TOP().i = keyWasReleased(k); +} + void f_keyIsDown() { TOP().i = keyIsDown(TOP().i); } @@ -823,6 +829,7 @@ void game_f_init(char *exe, char *bootjor) { CDEF("seremit", f_seremit); CDEF("key-pressed", f_keyWasPressed); CDEF("key-down", f_keyIsDown); + CDEF("key-released", f_keyWasReleased); CDEF("key-start", kbd_init); CDEF("key-end", kbd_cleanup); CDEF("draw-sprite", f_drawSprite); diff --git a/timer.jim b/timer.jim index 8605ca2..de642c4 100755 Binary files a/timer.jim and b/timer.jim differ diff --git a/title.jim b/title.jim index 73c2cb0..bc6dd01 100755 Binary files a/title.jim and b/title.jim differ