gfx cleanup, bad random fm instrument generator
This commit is contained in:
parent
b1a71e3e35
commit
7d4ba8e802
|
@ -94,3 +94,4 @@ array frames
|
|||
6 defstatic {jeanne}
|
||||
6 7 2 5 defanim {jeanne-walk}
|
||||
18 defsingle {phone}
|
||||
38 defsingle {fridge}
|
||||
|
|
|
@ -9,7 +9,7 @@ array preview 128 allot
|
|||
|
||||
: color! >r dup r@ @ = if drop else r@ ! refresh then rdrop ;
|
||||
|
||||
: +sprite! spriteindex spritecount +!cycle refresh ;
|
||||
: +sprite! spriteindex spritecount +!cycle spriteindex @ . refresh ;
|
||||
|
||||
: draw-palette 0 0x11 for i 79 i 3 << drawfatbox next ;
|
||||
|
||||
|
|
8
jopl.c
8
jopl.c
|
@ -1,4 +1,6 @@
|
|||
#include <dir.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "jorth.h"
|
||||
#include "adlib.h"
|
||||
#include "kbd.h"
|
||||
|
@ -73,6 +75,10 @@ void f_seremit() {
|
|||
DROP(1);
|
||||
}
|
||||
|
||||
void f_random() {
|
||||
TOP().i = random(TOP().i);
|
||||
}
|
||||
|
||||
void do_repl(char *exe) {
|
||||
adlib_init();
|
||||
|
||||
|
@ -89,6 +95,7 @@ void do_repl(char *exe) {
|
|||
CDEF("key-debounce", kbd_debounce);
|
||||
CDEF("key-pressed", f_keyWasPressed);
|
||||
CDEF("key-down", f_keydown);
|
||||
CDEF("rnd", f_random);
|
||||
f_loadfile("jopl.jor");
|
||||
ontick = f_lookupcp("ontick");
|
||||
timer_setcallback(timer_callback);
|
||||
|
@ -145,6 +152,7 @@ void keything() {
|
|||
}
|
||||
int main(int argc, char *argv[]) {
|
||||
// keything();
|
||||
randomize();
|
||||
do_repl(argv[0]);
|
||||
return 0;
|
||||
}
|
8
jopl.jor
8
jopl.jor
|
@ -93,6 +93,11 @@ array semitones
|
|||
fgetc ar-alg adlib!
|
||||
close ;
|
||||
|
||||
: rndbyte 256 rnd dup . ;
|
||||
: rndop rndbyte rndbyte rndbyte rndbyte rndbyte s" loadop " type loadop ;
|
||||
: rndinst s" op1 " type op1 rndop s" op2 " type op2 rndop
|
||||
rndbyte s" ar-alg adlib! " type cr ar-alg adlib! ;
|
||||
|
||||
: panic 9 -1 for i voice ! noteoff next ;
|
||||
|
||||
var songticks
|
||||
|
@ -293,7 +298,8 @@ var stopkeys
|
|||
: jamkeys
|
||||
stoponesc voicekeys
|
||||
' noteon onkeynote
|
||||
41 key-pressed if noteoff then ;
|
||||
41 key-pressed if noteoff then
|
||||
88 key-pressed if rndinst then ;
|
||||
|
||||
: jam ' jamkeys dokeys ;
|
||||
|
||||
|
|
2
jorth.h
2
jorth.h
|
@ -1,6 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#define MEM_SIZE 16384
|
||||
#define MEM_SIZE 24576
|
||||
#define STACK_SIZE 64
|
||||
#define RSTACK_SIZE 64
|
||||
|
||||
|
|
|
@ -4,11 +4,14 @@
|
|||
15 5 N ' {chair} defentity chair
|
||||
7 6 N ' {pete-bed} defentity bed
|
||||
10 9 N ' {phone} defentity e_phone
|
||||
18 3 N ' {fridge} defentity fridge
|
||||
|
||||
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
|
||||
fridge :touch pete say" Should get some more beer soon." ;entity
|
||||
|
||||
e_phone :touch phone :|
|
||||
|
||||
s" [don't pick up]"
|
||||
|
@ -75,7 +78,7 @@ done |; choose ;entity
|
|||
|
||||
:noname
|
||||
reset-level
|
||||
:| table yield chair yield bed yield e_phone yield done |; ' entities redefine
|
||||
:| table yield chair yield bed yield e_phone yield fridge yield done |; ' entities redefine
|
||||
:|
|
||||
touch-begin 16 10 2= dup if
|
||||
move-player 12 8 pete.jor queue-level
|
||||
|
@ -85,8 +88,6 @@ then touch-next 11 4 2= dup if
|
|||
pete say" I'm already dressed."
|
||||
then touch-next 16 3 2= dup if
|
||||
pete say" The sink's full of nasty dishes.\I'm not touching them."
|
||||
then touch-next 18 3 2= dup if
|
||||
pete say" Should get some more beer soon."
|
||||
then touch-last |; ' player-touch redefine
|
||||
|
||||
s" petehous.map" load-map
|
||||
|
|
BIN
petehous.map
BIN
petehous.map
Binary file not shown.
BIN
sprite.gfx
BIN
sprite.gfx
Binary file not shown.
Loading…
Reference in a new issue