Fade transitions

This commit is contained in:
Devine Lu Linvega 2023-02-25 13:11:34 -08:00
parent 0552e96800
commit 5dca0da5d1
4 changed files with 101 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -64,6 +64,35 @@
(
@|sprites )
@gradient-icns [
ffff ffff ffff ffff
bfff ffff ffff ffff
bbff ffff bbff ffff
bbff eeff bbff eeff
aaff aaff aaff aaff
aa77 aadd aa77 aadd
aa55 aa55 aa55 aa55
44aa 11aa 44aa 11aa
00aa 00aa 00aa 00aa
0088 0022 0088 0022
0000 0022 0000 0022
0000 0000 0000 0002
0000 0000 0000 0000 ]
&reverse [
0000 0000 0000 0000
0000 0000 0000 0002
0000 0022 0000 0022
0088 0022 0088 0022
00aa 00aa 00aa 00aa
44aa 11aa 44aa 11aa
aa55 aa55 aa55 aa55
aa77 aadd aa77 aadd
aaff aaff aaff aaff
bbff eeff bbff eeff
bbff ffff bbff ffff
bfff ffff ffff ffff
ffff ffff ffff ffff ]
@patt-icns [
&1 30c0 030c 30c0 030c
&2 1122 4488 1122 4488

View File

@ -55,6 +55,7 @@
&timer $1
@event
&timer $1
@curtain $1
( save )
@game-state ( ver. ) $1
@player &pos $1 &dir $1 &char $1 &room $2
@ -170,7 +171,7 @@ JMP2r
#ff .ghost STZ
.spell/necomedre set-character
;lobby/2 #0c00 enter-room
;neco/warp #0c00 enter-room
;on-mouse-debug .Mouse/vector DEO2
@ -1136,9 +1137,56 @@ JMP2r
draw-events
draw-steps
draw-spellbook
draw-curtain
!debug
@draw-curtain ( -- )
.curtain LDZ #80 GTH ?draw-curtain-rev
.curtain LDZ #00 EQUk ?&skip
#0000 .Screen/x DEO2
.Screen/height DEI2 .Screen/y DEO2
&l
;gradient-icns/reverse #40 draw-fillrow
;gradient-icns/reverse #45 draw-fillrow
.Screen/y DEI2k #0008 SUB2 ROT DEO2
INC GTHk ?&l
&skip
POP2
JMP2r
@draw-curtain-rev ( -- )
#0000 .Screen/x DEO2
#ffa0 .Screen/y DEO2
#28 .curtain LDZ ADD #00
&l
;gradient-icns #40 draw-fillrow
;gradient-icns #45 draw-fillrow
.Screen/y DEI2k #0008 ADD2 ROT DEO2
INC GTHk ?&l
&skip
POP2
JMP2r
@draw-fillrow ( color -- )
,&color STR
,&sprite STR2
[ LIT2 c5 -Screen/auto ] DEO
#0000 .Screen/x DEO2
.Screen/width DEI2 #03 SFT2 SWP
&w
[ LIT2 &sprite $2 ] .Screen/addr DEO2
[ LIT2 &color $1 -Screen/sprite ] DEO
INC GTHk ?&w
POP2
JMP2r
@draw-fill ( patt* color -- )
,&color STR .Screen/addr DEO2
@ -1587,13 +1635,15 @@ BRK
&f2 ( -- )
[ LIT2 02 -player/dir ] LDZ AND #04 ORA set-dir
;theme/clear set-theme
;fx/break-up ;animate/position/fx STA2
( ;theme/clear set-theme )
#00 ;fx/break-fadeout/f STA
;fx/break-fadeout ;animate/position/fx STA2
.character/r/x LDZ2 #ffe0 ;&f3 #03 !animate/position
&f3 ( -- )
[ LIT2 &target $2 ] set-room
;fx/break-down ;animate/position/fx STA2
#00 ;fx/break-fadeout/f STA
;fx/break-fadein ;animate/position/fx STA2
#0c0c
set-pos
get-coordinates-plain ;&f4 #03 !animate/position
@ -2219,6 +2269,22 @@ JMP2r
JMP2r
@fx/break-fadeout ( -- )
[ LIT &f $1 ] INCk ,&f STR
.curtain STZ
fx/break-up
JMP2r
@fx/break-fadein ( -- )
[ LIT &f $1 ] DUP #01 SUB ,&f STR
.curtain STZ
fx/break-down
JMP2r
@fx/break-up ( -- )
#f0
@ -2231,6 +2297,8 @@ JMP2r
JMP2r
@fx/break-down ( -- )
#e0