Bugfixes + cheat support
* hide footer before re-enabling player movement * close boss key file once loaded!
This commit is contained in:
parent
f86798a26d
commit
3de0b6fb83
34
cheat.jor
Executable file
34
cheat.jor
Executable file
|
@ -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
|
BIN
entity.jim
BIN
entity.jim
Binary file not shown.
BIN
footer.jim
BIN
footer.jim
Binary file not shown.
4
game.jor
4
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
|
||||
|
|
BIN
lev00001.jim
BIN
lev00001.jim
Binary file not shown.
BIN
lev00002.jim
BIN
lev00002.jim
Binary file not shown.
BIN
lev00003.jim
BIN
lev00003.jim
Binary file not shown.
BIN
lev00004.jim
BIN
lev00004.jim
Binary file not shown.
BIN
lev00005.jim
BIN
lev00005.jim
Binary file not shown.
BIN
lev00006.jim
BIN
lev00006.jim
Binary file not shown.
BIN
neuttowr.exe
BIN
neuttowr.exe
Binary file not shown.
BIN
neuttowr.prj
BIN
neuttowr.prj
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue