This commit is contained in:
Jeremy Penner 2019-12-01 21:39:46 -05:00
parent 812cdb20ba
commit 643645307b
7 changed files with 30 additions and 1 deletions

BIN
game.exe

Binary file not shown.

BIN
game.prj

Binary file not shown.

View file

@ -51,6 +51,7 @@ var jiles-old-draw
31 const ^S 31 const ^S
20 const ^T 20 const ^T
33 const ^F 33 const ^F
19 const ^R
46 const ^C 46 const ^C
47 const ^V 47 const ^V
73 const ^PgUp 73 const ^PgUp
@ -77,6 +78,7 @@ var copysrc
^C key-pressed if spriteindex @ copysrc ! then ^C key-pressed if spriteindex @ copysrc ! then
^V key-pressed if copysrc @ spriteindex @ paste-tile refresh then ^V key-pressed if copysrc @ spriteindex @ paste-tile refresh then
^F key-pressed if spriteindex @ flip-tile refresh then ^F key-pressed if spriteindex @ flip-tile refresh then
^R key-pressed if spriteindex @ vflip-tile refresh then
^PgDn key-pressed if 5 +sprite! then ^PgDn key-pressed if 5 +sprite! then
^PgUp key-pressed if -5 +sprite! then ^PgUp key-pressed if -5 +sprite! then
^UP key-pressed if -1 spriteindex @ nudge-sprite refresh then ^UP key-pressed if -1 spriteindex @ nudge-sprite refresh then

View file

@ -32,6 +32,13 @@ array tileflags
( storefront ) 0 b, ( storefront ) 0 b,
( space ) 0 b, ( space ) 0 b,
( space2 ) BOATABLE b, ( space2 ) BOATABLE b,
( ice ) WALKABLE b,
( ringstl ) WALKABLE b,
( ringstr ) WALKABLE b,
( ringsbl ) WALKABLE b,
( ringsbr ) WALKABLE b,
( hoglinev ) WALKABLE b,
( hoglineh ) WALKABLE b,
here tileflags - 1 - const MAXTILE here tileflags - 1 - const MAXTILE

View file

@ -18,7 +18,7 @@ touch-next 5 11 2= dup
touch-next 41 37 2= dup touch-next 41 37 2= dup
if move-player 5 11 tile>world player entity.pos! then if move-player 5 11 tile>world player entity.pos! then
touch-next 44 23 2= dup touch-next 44 23 2= dup
if pete say" It's...." say" home." then if pete say" It's...." say" home?" then
touch-last |; ' player-touch redefine touch-last |; ' player-touch redefine
s" space.map" load-map s" space.map" load-map

View file

@ -519,6 +519,25 @@ void f_fliptile() {
} }
} }
void f_vfliptile() {
unsigned int far *dst;
unsigned int far *gfx = editTarget == ET_SPRITE ? sprites : tiles;
unsigned int stride = editTarget == ET_SPRITE ? SPRITE_STRIDE : TILE_STRIDE;
unsigned int y;
unsigned int plane;
dst = &gfx[TOP().i * stride];
DROP(1);
for (plane = 0; plane < (editTarget == ET_SPRITE ? 5 : 4); plane ++) {
for (y = 0; y < 8; y ++) {
unsigned int tmp = dst[y];
dst[y] = dst[15 - y];
dst[15 - y] = tmp;
}
dst += 16;
}
}
void f_nudgesprite() { void f_nudgesprite() {
unsigned int far *dst = &sprites[TOP().i * SPRITE_STRIDE]; unsigned int far *dst = &sprites[TOP().i * SPRITE_STRIDE];
int direction = ST1().i < 0 ? -1 : 1; int direction = ST1().i < 0 ? -1 : 1;
@ -604,6 +623,7 @@ void game_f_init(char *exe, char *bootjor) {
CDEF("reloadtiles", f_reloadtiles); CDEF("reloadtiles", f_reloadtiles);
CDEF("paste-tile", f_pastetile); CDEF("paste-tile", f_pastetile);
CDEF("flip-tile", f_fliptile); CDEF("flip-tile", f_fliptile);
CDEF("vflip-tile", f_vfliptile);
CDEF("nudge-sprite", f_nudgesprite); CDEF("nudge-sprite", f_nudgesprite);
f_loadjor(bootjor); f_loadjor(bootjor);

BIN
tiles.gfx

Binary file not shown.