DECLARE SUB continue (lives%)
DECLARE SUB go ()
DECLARE SUB loadbg (bg$)
DECLARE SUB del ()
DECLARE SUB talk (tk$)
DECLARE SUB story (s%)
DECLARE SUB game (level%)
DECLARE SUB initiate (f%, x%, y%)
DECLARE SUB ai (f%, i%)
DECLARE SUB collision (f%)
DECLARE SUB animate (f%)
DECLARE SUB set2 (a1%, a2%, a3%, a4%, a5%, a6%, a7%, a8%, a9%, a10%, a11%, a12%, a13%, a14%, a15%, a16%, a17%, a18%, a19%, a20%)
DECLARE SUB set (a1%, a2%, a3%, a4%, a5%, a6%, a7%, a8%, a9%, a10%, a11%, a12%, a13%, a14%, a15%, a16%, a17%, a18%, a19%, a20%)
'$DYNAMIC
DECLARE SUB loadgfx (f%, A$, a2$)
' $INCLUDE: 'sakuru.bi'


TYPE graph
right AS INTEGER
left  AS INTEGER
END TYPE

TYPE rowdy
punch AS INTEGER
kick AS INTEGER
block AS INTEGER
left AS INTEGER
right AS INTEGER
jump AS INTEGER
count AS INTEGER
countk AS INTEGER
col AS INTEGER
kind AS INTEGER
anim AS STRING * 5
dir AS STRING * 1
frame AS INTEGER
x AS INTEGER
y AS INTEGER
z AS INTEGER
life AS INTEGER
power AS INTEGER
END TYPE

DIM SHARED anim(1 TO 20)
DIM SHARED collide(1 TO 20)

DIM SHARED fighter(1 TO 10) AS rowdy
DIM SHARED graphics(1 TO 20) AS graph

'stopmidi

bg1% = AllExpMem(240000)
bg3% = AllExpMem(65000)


KBHon

FOR i% = 1 TO 20
graphics(i%).right = AllExpMem(307200)
graphics(i%).left = AllExpMem(307200)
Future.DefineEMSArray 63, 63, graphics(i%).right
Future.DefineEMSArray 63, 63, graphics(i%).left
NEXT i%

set320x200 8

fliplay 0, "logo.flc"

future.loadgif "end", 1, 1

12
del
del
del
del
set320x200 8
future.fillbox 0, 0, 320, 200, 2
future.print 30, 60, "one player only(sorry...)", 15, -1
future.print 30, 100, "press space to start", 15, -1

future.print 30, 180, "press esc to exit game", 15, -1

g% = 0

LoadWAV "begin.wav", 8000
musictimer! = TIMER


WHILE g% = 0
IF GetKey(57) THEN g% = 1
IF GetKey(1) THEN GOTO 13
IF GetKey(2) THEN
joy% = 1
END IF
IF TIMER - musictimer! >= 6.01 THEN
LoadWAV "begin.wav", 8000
musictimer! = TIMER
END IF

WEND


loadgfx 1, "kunio.gif", "kunio2.gif"
loadgfx 2, "riki.gif", "riki2.gif"
loadgfx 3, "enemya.gif", "enemya2.gif"
loadgfx 4, "enemyb.gif", "enemyb2.gif"
loadgfx 5, "bossa.gif", "bossa2.gif"
loadgfx 6, "bossb.gif", "bossb2.gif"
loadgfx 7, "enemyc.gif", "enemyc2.gif"
loadgfx 8, "enemyd.gif", "enemyd2.gif"
loadgfx 9, "bossc.gif", "bossc2.gif"
loadgfx 10, "bossd.gif", "bossd2.gif"
loadgfx 11, "enemye.gif", "enemye2.gif"
loadgfx 12, "misuzu.gif", "misuzu2.gif"
loadgfx 13, "godai.gif", "godai2.gif"
loadgfx 14, "keisuke.gif", "keisuke2.gif"



set640x400 8

loadbg "bg2"

Future.CLS 0

set320x200 8
fighter(1).x = 10
fighter(1).z = 120
fighter(1).anim = "idle "
fighter(1).dir = "r"
fighter(1).kind = 1
fighter(1).life = 500
fighter(1).power = 10


go
GOTO 12

13

kbhoff


FOR i% = 1 TO 20
DeallExpMem graphics(i%).right
DeallExpMem graphics(i%).left
NEXT i%


DeallExpMem bg1%
DeallExpMem bg3%

ReSetScreen
'PRINT (d# - s#) / (TIMER - s#), fighter(1).x, fighter(2).x, fighter(3).x
PRINT scrol%, fighter(1).count, count%
SLEEP
stopandreset
SYSTEM
'stopmidi

REM $STATIC
SUB ai (f%, i%)

RANDOMIZE TIMER

in% = (RND * 10) + 1

'first enemies start

IF fighter(f%).kind >= 3 AND fighter(f%).kind <= 4 OR fighter(f%).kind >= 8 AND fighter(f%).kind <= 12 OR fighter(f%).kind = 14 THEN

IF ABS(fighter(i%).z - fighter(f%).z) > 6 THEN

IF fighter(f%).anim = "idle " OR LEFT$(fighter(f%).anim, 4) = "walk" THEN
IF in% <= 2 THEN IF fighter(i%).z < fighter(f%).z THEN up% = 1 ELSE down% = 1
IF in% <= 1 THEN IF ABS(fighter(i%).x - fighter(f%).x) < 35 THEN IF fighter(i%).x < fighter(f%).x THEN right% = 1 ELSE left% = 1
IF ABS(fighter(i%).x - fighter(f%).x) > 100 THEN
IF in% <= 2 THEN
IF fighter(f%).anim = "idle " THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF LEFT$(fighter(f%).anim, 4) = "walk" THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
END IF
END IF
END IF


IF fighter(f%).anim = "run  " THEN
IF in% <= 3 THEN IF fighter(f%).z < fighter(i%).z THEN up% = 1 ELSE down% = 1
IF in% <= 2 THEN
IF fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "l" THEN right% = 1
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "r" THEN left% = 1
END IF
END IF

END IF






IF ABS(fighter(i%).z - fighter(f%).z) < 6 THEN

IF fighter(f%).anim = "idle " OR LEFT$(fighter(f%).anim, 4) = "walk" THEN
IF in% <= 1 THEN IF fighter(i%).z < fighter(f%).z THEN up% = 1 ELSE down% = 1
IF ABS(fighter(i%).x - fighter(f%).x) < 99 AND ABS(fighter(i%).x - fighter(f%).x) > 5 THEN
IF in% <= 3 THEN IF ABS(fighter(f%).x - fighter(i%).x) > 25 THEN IF fighter(i%).x > fighter(f%).x THEN right% = 1 ELSE left% = 1
IF fighter(i%).anim = "hitu " OR fighter(i%).anim = "hitb " OR fighter(i%).anim = "hitb2" OR LEFT$(fighter(i%).anim, 4) = "down" OR fighter(i%).anim = "thron" OR LEFT$(fighter(i%).anim, 4) = "grab" OR LEFT$(fighter(i%).anim, 3) = "pin  " OR fighter( _
i%).anim = "getup" THEN
ELSE
IF in% > 3 AND in% < 8 THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF in% >= 4 AND in% <= 5 AND ABS(fighter(f%).x - fighter(i%).x) < 40 THEN punch% = 1
IF in% >= 6 AND in% <= 7 AND ABS(fighter(f%).x - fighter(i%).x) < 40 THEN punch% = 1
END IF
END IF

IF ABS(fighter(i%).x - fighter(f%).x) > 100 THEN
IF in% <= 2 THEN
IF fighter(f%).anim = "idle " THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF LEFT$(fighter(f%).anim, 4) = "walk" THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
END IF
END IF
END IF


IF fighter(f%).anim = "run  " THEN
IF in% <= 3 THEN IF fighter(f%).z < fighter(i%).z THEN up% = 1 ELSE down% = 1
IF in% <= 2 THEN
IF fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "l" THEN right% = 1
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "r" THEN left% = 1
END IF
IF in% >= 4 THEN IF (fighter(f%).x - fighter(i%).x) < 40 THEN punch% = 1
END IF


END IF

END IF


'first enemies end

IF fighter(f%).kind = 5 OR fighter(f%).kind = 6 OR fighter(f%).kind = 7 THEN

IF ABS(fighter(i%).z - fighter(f%).z) > 6 THEN

IF fighter(f%).anim = "idle " OR LEFT$(fighter(f%).anim, 4) = "walk" THEN
IF in% <= 2 THEN IF fighter(i%).z < fighter(f%).z THEN up% = 1 ELSE down% = 1
IF in% <= 1 THEN IF ABS(fighter(i%).x - fighter(f%).x) < 35 THEN IF fighter(i%).x < fighter(f%).x THEN right% = 1 ELSE left% = 1
IF ABS(fighter(i%).x - fighter(f%).x) > 100 THEN
IF in% <= 2 THEN
IF fighter(f%).anim = "idle " THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF LEFT$(fighter(f%).anim, 4) = "walk" THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
END IF
END IF
END IF


IF fighter(f%).anim = "run  " THEN
IF in% <= 3 THEN IF fighter(f%).z < fighter(i%).z THEN up% = 1 ELSE down% = 1
IF in% <= 2 THEN
IF fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "l" THEN right% = 1
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "r" THEN left% = 1
END IF
END IF

END IF






IF ABS(fighter(i%).z - fighter(f%).z) < 6 THEN

IF fighter(f%).anim = "idle " OR LEFT$(fighter(f%).anim, 4) = "walk" THEN

IF (fighter(f%).x - fighter(i%).x) > 60 AND (fighter(f%).x - fighter(i%).x) < 80 AND in% > 7 THEN
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "l" OR fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "r" THEN
block% = 1
END IF


END IF

IF in% <= 1 THEN IF fighter(i%).z < fighter(f%).z THEN up% = 1 ELSE down% = 1
IF ABS(fighter(i%).x - fighter(f%).x) < 99 AND ABS(fighter(i%).x - fighter(f%).x) > 5 THEN
IF in% <= 3 THEN IF ABS(fighter(f%).x - fighter(i%).x) > 25 THEN IF fighter(i%).x > fighter(f%).x THEN right% = 1 ELSE left% = 1
IF fighter(i%).anim = "hitu " OR fighter(i%).anim = "hitb " OR fighter(i%).anim = "hitb2" OR LEFT$(fighter(i%).anim, 4) = "down" OR fighter(i%).anim = "thron" OR LEFT$(fighter(i%).anim, 4) = "grab" OR LEFT$(fighter(i%).anim, 3) = "pin  " OR fighter( _
i%).anim = "getup" THEN
ELSE
IF in% > 3 AND in% < 8 THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF in% >= 4 AND in% <= 5 AND ABS(fighter(f%).x - fighter(i%).x) < 40 THEN punch% = 1
IF in% >= 6 AND in% <= 7 AND ABS(fighter(f%).x - fighter(i%).x) < 40 THEN punch% = 1
END IF

IF fighter(i%).anim = "down " AND in% > 4 THEN
IF fighter(f%).x > fighter(i%).x THEN
right% = 1
left% = 0
ELSE
left% = 1
right% = 0
END IF
END IF


END IF

IF ABS(fighter(i%).x - fighter(f%).x) > 100 THEN
IF in% <= 2 THEN
IF fighter(f%).anim = "idle " THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
IF LEFT$(fighter(f%).anim, 4) = "walk" THEN IF fighter(f%).x > fighter(i%).x THEN left% = 1 ELSE right% = 1
END IF
END IF
END IF


IF fighter(f%).anim = "run  " THEN
IF in% <= 3 THEN IF fighter(f%).z < fighter(i%).z THEN up% = 1 ELSE down% = 1
IF in% <= 2 THEN
IF fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "l" THEN right% = 1
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "r" THEN left% = 1
END IF
IF (fighter(f%).x - fighter(i%).x) > 60 AND (fighter(f%).x - fighter(i%).x) < 80 AND in% > 7 THEN
IF fighter(f%).x > fighter(i%).x AND fighter(f%).dir = "l" OR fighter(f%).x < fighter(i%).x AND fighter(f%).dir = "r" THEN
block% = 1
END IF

END IF
IF in% >= 4 THEN
IF (fighter(f%).x - fighter(i%).x) < 40 THEN
IF fighter(i%).anim = "down " AND in% >= 8 THEN kick% = 1
IF NOT fighter(i%).anim = "down " THEN punch% = 1
END IF
END IF
END IF

IF fighter(f%).anim = "grab " THEN IF in% <= 5 THEN punch% = 1
IF fighter(f%).anim = "grabd" OR fighter(f%).anim = "pind " THEN IF in% <= 5 THEN punch% = 1

IF fighter(f%).anim = "block" THEN
block% = 1
jump% = 1
END IF



END IF





END IF















IF right% = 1 THEN fighter(f%).right = fighter(f%).right + 1 ELSE fighter(f%).right = 0
IF left% = 1 THEN fighter(f%).left = fighter(f%).left + 1 ELSE fighter(f%).left = 0
IF punch% = 1 THEN fighter(f%).punch = fighter(f%).punch + 1 ELSE fighter(f%).punch = 0
IF kick% = 1 THEN fighter(f%).kick = fighter(f%).kick + 1 ELSE fighter(f%).kick = 0
IF jump% = 1 THEN fighter(f%).jump = fighter(f%).jump + 1 ELSE fighter(f%).jump = 0
IF block% = 1 THEN fighter(f%).block = fighter(f%).block + 1 ELSE fighter(f%).block = 0

IF fighter(f%).anim = "idle " OR LEFT$(fighter(f%).anim, 4) = "walk" THEN
IF fighter(f%).punch <= 1 THEN
IF punch% = 1 THEN 'a
IF fighter(f%).countk = 0 THEN fighter(f%).anim = "tack1"
IF fighter(f%).countk = 1 THEN fighter(f%).anim = "tack2"
IF fighter(f%).countk = 2 THEN fighter(f%).anim = "tack1"
IF fighter(f%).countk >= 3 THEN
fighter(f%).anim = "tack3"
fighter(f%).count = 0
fighter(f%).countk = 0
END IF
fighter(f%).frame = 0
END IF
END IF
IF fighter(f%).kick <= 1 THEN
IF kick% = 1 THEN 'S
IF fighter(f%).countk = 0 THEN fighter(f%).anim = "tack4"
IF fighter(f%).countk = 1 THEN fighter(f%).anim = "tack4"
IF fighter(f%).countk >= 2 THEN
fighter(f%).anim = "tack5"
fighter(f%).count = 0
fighter(f%).countk = 0
END IF
fighter(f%).frame = 0
END IF
END IF
IF jump% = 1 THEN 'Z
fighter(f%).anim = "jump "
fighter(f%).frame = 0
END IF

IF right% = 1 AND jump% = 1 THEN
fighter(f%).dir = "r"
fighter(f%).anim = "jumpf"
fighter(f%).frame = 0
END IF

IF left% = 1 AND jump% = 1 THEN
fighter(f%).dir = "l"
fighter(f%).anim = "jumpf"
fighter(f%).frame = 0
END IF


IF block% = 1 THEN 'X
fighter(f%).anim = "block"
fighter(f%).frame = 0
END IF

IF kick% = 1 AND down% = 1 AND fighter(f%).kick <= 1 THEN 'S
fighter(f%).anim = "stomp"
fighter(f%).frame = 0
END IF

IF punch% = 1 AND down% = 1 AND fighter(f%).punch <= 1 THEN 'S
fighter(f%).anim = "getd "
fighter(f%).frame = 0
END IF



END IF

IF fighter(f%).anim = "walk " THEN

IF left% = 1 AND fighter(f%).left <= 1 AND fighter(f%).dir = "l" THEN
fighter(f%).dir = "l"
fighter(f%).anim = "run  "
fighter(f%).frame = 0
END IF
IF right% = 1 AND fighter(f%).right <= 1 AND fighter(f%).dir = "r" THEN
fighter(f%).dir = "r"
fighter(f%).anim = "run  "
fighter(f%).frame = 0
END IF

END IF

IF fighter(f%).anim = "idle " THEN
IF up% = 1 THEN
fighter(f%).z = fighter(f%).z - 2
fighter(f%).anim = "walk2"
fighter(f%).frame = 0
END IF
IF down% = 1 THEN
fighter(f%).z = fighter(f%).z + 2
fighter(f%).anim = "walk2"
fighter(f%).frame = 0
END IF

IF left% = 1 THEN
fighter(f%).dir = "l"
fighter(f%).anim = "walk "
fighter(f%).frame = 0
END IF
IF right% = 1 THEN
fighter(f%).dir = "r"
fighter(f%).anim = "walk "
fighter(f%).frame = 0
END IF

END IF

IF fighter(f%).anim = "walk " OR fighter(f%).anim = "run  " OR fighter(f%).anim = "walk2" THEN
IF up% = 1 THEN fighter(f%).z = fighter(f%).z - 2
IF down% = 1 THEN fighter(f%).z = fighter(f%).z + 2
END IF

IF fighter(f%).anim = "jump " THEN

IF kick% = 1 THEN 'S
fighter(f%).anim = "jump1"
END IF

IF kick% = 1 AND down% = 1 THEN 'S
fighter(f%).anim = "jump2"
END IF

END IF

IF fighter(f%).anim = "jumpf" OR fighter(f%).anim = "jumps" THEN

IF kick% = 1 THEN 'S
fighter(f%).anim = "jump3"
END IF

IF kick% = 1 AND down% = 1 THEN 'S
fighter(f%).anim = "jump4"
END IF

END IF

IF fighter(f%).anim = "block" THEN
IF block% = 1 THEN
ELSE
fighter(f%).anim = "idle "
fighter(f%).frame = 0
END IF

IF left% = 1 AND fighter(f%).dir = "r" THEN
fighter(f%).anim = "back "
fighter(f%).frame = 0
fighter(f%).x = fighter(f%).x - 8
END IF
IF right% = 1 AND fighter(f%).dir = "l" THEN
fighter(f%).anim = "back "
fighter(f%).frame = 0
fighter(f%).x = fighter(f%).x + 8
END IF

IF punch% = 1 THEN
fighter(f%).anim = "spec2"
fighter(f%).frame = 0
END IF
IF kick% = 1 THEN
fighter(f%).anim = "spec3"
fighter(f%).frame = 0
END IF
IF jump% = 1 THEN
fighter(f%).anim = "spec1"
fighter(f%).frame = 0
END IF


END IF

IF fighter(f%).anim = "run  " THEN
IF punch% = 1 THEN
fighter(f%).anim = "tack3"
fighter(f%).frame = 0
END IF
IF kick% = 1 THEN
fighter(f%).anim = "punt "
fighter(f%).frame = 0
END IF

IF right% = 1 THEN
IF fighter(f%).dir = "r" THEN
fighter(f%).x = fighter(f%).x + 3
ELSE
fighter(f%).anim = "idle "
fighter(f%).frame = 0
END IF
END IF

IF left% = 1 THEN
IF fighter(f%).dir = "l" THEN
fighter(f%).x = fighter(f%).x - 3
ELSE
fighter(f%).anim = "idle "
fighter(f%).frame = 0
END IF
END IF

IF jump% = 1 THEN 'Z
fighter(f%).anim = "jumps"
fighter(f%).frame = 0
END IF

IF block% = 1 THEN 'X
fighter(f%).anim = "block"
fighter(f%).frame = 0
END IF


END IF


IF fighter(f%).anim = "grab " THEN

IF punch% = 1 AND fighter(f%).punch <= 1 THEN
fighter(f%).anim = "grabt"
fighter(f%).frame = 0
END IF

IF up% = 1 THEN
fighter(f%).anim = "throw"
fighter(f%).frame = 0
END IF

END IF


IF fighter(f%).anim = "pin  " THEN

IF punch% = 1 AND fighter(f%).punch <= 1 THEN
fighter(f%).anim = "pint "
fighter(f%).frame = 0
END IF

IF up% = 1 THEN
fighter(f%).anim = "getup"
fighter(f%).frame = 0
END IF

END IF

IF fighter(f%).anim = "down " OR fighter(f%).anim = "pind " OR fighter(f%).anim = "grabd" THEN
IF punch% = 1 AND fighter(f%).punch <= 1 THEN fighter(f%).count = fighter(f%).count - 2
END IF

IF fighter(f%).anim = "spec3" THEN
IF left% = 1 THEN fighter(f%).x = fighter(f%).x - 2
IF right% = 1 THEN fighter(f%).x = fighter(f%).x + 2
END IF



END SUB

SUB animate (f%)

IF fighter(f%).anim = "getup" AND fighter(f%).frame = 2 THEN
IF fighter(f%).kind = 1 OR fighter(f%).kind = 2 OR fighter(f%).kind = 6 OR fighter(f%).kind = 12 THEN
fighter(f%).count = 14
fighter(f%).countk = 25
END IF
END IF

IF fighter(f%).anim = "down " OR fighter(f%).anim = "idle " OR fighter(f%).anim = "walk " THEN fighter(f%).y = 0

IF fighter(f%).kind <= 2 THEN
IF fighter(f%).frame = 1 THEN
IF LEFT$(fighter(f%).anim, 4) = "tack" THEN fighter(f%).frame = 2
IF fighter(f%).anim = "hit1 " OR fighter(f%).anim = "hit2 " THEN fighter(f%).frame = 2
END IF
END IF

IF fighter(f%).kind = 5 THEN
IF LEFT$(fighter(f%).anim, 4) = "tack" AND fighter(f%).frame = 1 THEN fighter(f%).frame = 2
IF fighter(f%).anim = "spec1" THEN fighter(f%).anim = "spec4"
END IF

IF fighter(f%).kind = 6 THEN
IF LEFT$(fighter(f%).anim, 4) = "tack" AND fighter(f%).frame = 1 THEN fighter(f%).frame = 3
IF LEFT$(fighter(f%).anim, 4) = "spec" OR fighter(f%).anim = "back " THEN fighter(f%).anim = "spec5"
END IF

IF fighter(f%).kind = 7 THEN
IF LEFT$(fighter(f%).anim, 4) = "tack" AND fighter(f%).frame = 1 THEN fighter(f%).frame = 2
IF LEFT$(fighter(f%).anim, 4) = "spec" OR fighter(f%).anim = "back " THEN fighter(f%).anim = "spec5"
END IF


IF fighter(f%).kind = 2 THEN
IF fighter(f%).anim = "spec1" THEN fighter(f%).anim = "spec6"
IF fighter(f%).anim = "spec3" THEN fighter(f%).anim = "spec7"
END IF

IF fighter(f%).kind = 9 OR fighter(f%).kind = 10 THEN
IF LEFT$(fighter(f%).anim, 4) = "spec" OR fighter(f%).anim = "back " THEN fighter(f%).anim = "spec8"
IF fighter(f%).anim = "hit1 " AND fighter(f%).frame = 1 THEN
RANDOMIZE TIMER
d% = INT(RND * 6)
IF d% = 1 THEN
fighter(f%).anim = "spec8"
fighter(f%).frame = 1
END IF
END IF
END IF

IF fighter(f%).kind = 12 THEN
IF fighter(f%).anim = "tack3" OR fighter(f%).anim = "punt " OR fighter(f%).anim = "tack5" THEN fighter(f%).anim = "spe10"
IF fighter(f%).anim = "tack1" OR fighter(f%).anim = "tack2" OR fighter(f%).anim = "tack4" THEN fighter(f%).anim = "spec9"
IF fighter(f%).anim = "grab " THEN fighter(f%).anim = "spe11"
IF fighter(f%).anim = "grabd" THEN fighter(f%).anim = "pushg"
IF fighter(f%).anim = "pind " THEN fighter(f%).anim = "pushd"
END IF

fighter(f%).col = 0

IF fighter(f%).anim = "dizzy" THEN
set 33, 33, 34, 34, 33, 33, 34, 34, 33, 33, 34, 34, 33, 33, 34, 34, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "scare" THEN
set 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "sitl " THEN
set 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 0, 32
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "order" THEN
set 64, 64, 65, 65, 64, 64, 65, 65, 65, 64, 64, 65, 65, 65, 64, 64, 65, 0, 0, 32
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "sit  " THEN
set 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0, 32
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "club " THEN
set 63, 63, 64, 65, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "look2" THEN
set 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "look " THEN
set 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "idle " THEN
set 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "walk " THEN
set 2, 2, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
IF fighter(f%).kind <= 2 OR fighter(f%).kind = 5 THEN
set2 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
ELSE
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF
END IF

IF fighter(f%).anim = "walk2" THEN
set 2, 2, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
IF fighter(f%).kind <= 2 OR fighter(f%).kind = 5 THEN
set2 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
ELSE
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

END IF

IF fighter(f%).anim = "getd " THEN
set 2, 2, 59, 59, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF



IF fighter(f%).anim = "run  " THEN
set 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "jump " THEN
set 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "jumpf" THEN
set 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "jump1" THEN
set 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 1
set2 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0
END IF

IF fighter(f%).anim = "jumps" THEN
set 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "jump2" THEN
set 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 1
set2 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0
END IF

IF fighter(f%).anim = "jump3" THEN
set 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 1
set2 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0
END IF

IF fighter(f%).anim = "jump4" THEN
set 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 1
set2 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0
END IF


IF fighter(f%).anim = "tack1" THEN
set 11, 11, 12, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "tack2" THEN
set 14, 14, 15, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "tack3" THEN
set 17, 17, 18, 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "tack4" THEN
set 20, 20, 21, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "tack5" THEN
set 23, 23, 24, 24, 25, 25, 24, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "back " THEN
set 26, 26, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "stomp" THEN
set 28, 28, 29, 30, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec1" THEN
set 8, 9, 31, 32, 33, 32, 31, 32, 33, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec2" THEN
set 34, 34, 34, 35, 36, 35, 36, 35, 36, 35, 36, 35, 36, 35, 36, 35, 19, 19, 0, 1
set2 0, 0, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 4, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec3" THEN
set 8, 9, 37, 38, 37, 38, 37, 38, 37, 38, 37, 38, 37, 38, 37, 38, 9, 8, 0, 1
set2 0, 0, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec4" THEN
set 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec5" THEN
set 8, 8, 9, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 9, 9, 8, 0, 33
IF fighter(f%).kind = 6 THEN set2 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0
IF fighter(f%).kind = 7 THEN set2 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec6" THEN
set 31, 32, 31, 32, 31, 32, 31, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec7" THEN
set 8, 8, 8, 37, 38, 37, 38, 37, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 3, 5, 3, 5, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec8" THEN
set 31, 31, 32, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spec9" THEN
set 31, 31, 32, 32, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 1, 1, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spe10" THEN
set 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "spe11" THEN
set 44, 44, 45, 46, 45, 46, 45, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 9, 0, 9, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).anim = "block" THEN
set 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 0, 0, 0, 0, 0, 19
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "open " THEN
set 39, 39, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "punt " THEN
set 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "hit1 " THEN
set 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "hit2 " THEN
set 52, 52, 52, 52, 52, 52, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "hit3 " THEN
set 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "hitb " OR fighter(f%).anim = "hitu " THEN
set 54, 54, 54, 54, 55, 55, 55, 55, 56, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "hitb2" THEN
set 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 56, 56, 0, 0, 0, 0, 25
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "down " THEN
set 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 0, 25
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "downh" THEN
set 57, 57, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "getup" THEN
IF NOT fighter(f%).kind = 12 THEN set 57, 57, 49, 49, 40, 40, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
IF fighter(f%).kind = 12 THEN set 35, 35, 36, 36, 37, 37, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "grab " THEN
set 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 28
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "grabt" THEN
set 45, 45, 46, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28
set2 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "grabd" THEN
set 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 0, 29
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "grabh" THEN
set 60, 60, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "slide" THEN
set 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 0, 25
set2 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0
END IF

IF fighter(f%).anim = "throw" THEN
set 47, 47, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "thron" THEN
set 60, 60, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 56, 56, 0, 0, 0, 0, 25
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pushg" THEN
set 62, 62, 62, 62, 62, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
set2 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pushd" THEN
set 61, 61, 61, 61, 61, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26
set2 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pin  " THEN
set 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0, 30
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pint " THEN
set 49, 49, 50, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30
set2 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pind " THEN
set 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 0, 31
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF

IF fighter(f%).anim = "pinh " THEN
set 57, 57, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31
set2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
END IF


IF fighter(f%).frame > 0 THEN IF anim(fighter(f%).frame) = 0 THEN anim(fighter(f%).frame) = 1

future.fillbox fighter(f%).x + 16, fighter(f%).z + 62, fighter(f%).x + 46, fighter(f%).z + 60, 17
future.fillbox fighter(f%).x + 18, fighter(f%).z + 63, fighter(f%).x + 43, fighter(f%).z + 63, 17
future.fillbox fighter(f%).x + 18, fighter(f%).z + 59, fighter(f%).x + 43, fighter(f%).z + 59, 17
IF fighter(f%).countk = 25 THEN
IF fighter(f%).count = 13 OR fighter(f%).count = 11 OR fighter(f%).count = 9 OR fighter(f%).count = 7 OR fighter(f%).count = 5 OR fighter(f%).count = 3 OR fighter(f%).count = 1 THEN
ELSE
IF fighter(f%).dir = "r" THEN Future.EMSArrayPut fighter(f%).x, fighter(f%).z + fighter(f%).y, graphics(fighter(f%).kind).right, anim(fighter(f%).frame)
IF fighter(f%).dir = "l" THEN Future.EMSArrayPut fighter(f%).x, fighter(f%).z + fighter(f%).y, graphics(fighter(f%).kind).left, anim(fighter(f%).frame)
END IF
END IF

IF NOT fighter(f%).countk = 25 THEN
IF fighter(f%).dir = "r" THEN Future.EMSArrayPut fighter(f%).x, fighter(f%).z + fighter(f%).y, graphics(fighter(f%).kind).right, anim(fighter(f%).frame)
IF fighter(f%).dir = "l" THEN Future.EMSArrayPut fighter(f%).x, fighter(f%).z + fighter(f%).y, graphics(fighter(f%).kind).left, anim(fighter(f%).frame)
END IF

fighter(f%).col = collide(fighter(f%).frame)

IF anim(fighter(f%).frame + 1) = 0 OR fighter(f%).frame = 20 THEN
IF anim(20) = 1 THEN
fighter(f%).anim = "idle "
fighter(f%).frame = 0
END IF
IF anim(20) = 2 THEN
fighter(f%).anim = "walk "
fighter(f%).frame = 0
END IF
IF anim(20) = 3 THEN
fighter(f%).anim = "run  "
fighter(f%).frame = 0
END IF
IF anim(20) = 4 THEN
fighter(f%).anim = "jump "
fighter(f%).frame = 0
END IF
IF anim(20) = 5 THEN
fighter(f%).anim = "jumpf"
fighter(f%).frame = 0
END IF
IF anim(20) = 6 THEN
fighter(f%).anim = "jump1"
fighter(f%).frame = 0
END IF
IF anim(20) = 7 THEN
fighter(f%).anim = "jump2"
fighter(f%).frame = 0
END IF


IF anim(20) = 8 THEN
fighter(f%).anim = "tack1"
fighter(f%).frame = 0
END IF

IF anim(20) = 9 THEN
fighter(f%).anim = "tack2"
fighter(f%).frame = 0
END IF

IF anim(20) = 10 THEN
fighter(f%).anim = "tack3"
fighter(f%).frame = 0
END IF

IF anim(20) = 11 THEN
fighter(f%).anim = "tack4"
fighter(f%).frame = 0
END IF

IF anim(20) = 12 THEN
fighter(f%).anim = "tack5"
fighter(f%).frame = 0
END IF

IF anim(20) = 13 THEN
fighter(f%).anim = "back "
fighter(f%).frame = 0
END IF

IF anim(20) = 14 THEN
fighter(f%).anim = "stomp"
fighter(f%).frame = 0
END IF

IF anim(20) = 15 THEN
fighter(f%).anim = "spec1"
fighter(f%).frame = 0
END IF

IF anim(20) = 16 THEN
fighter(f%).anim = "spec2"
fighter(f%).frame = 0
END IF

IF anim(20) = 17 THEN
fighter(f%).anim = "spec3"
fighter(f%).frame = 0
END IF

IF anim(20) = 18 THEN
fighter(f%).anim = "block"
fighter(f%).frame = 0
END IF

IF anim(20) = 19 THEN
fighter(f%).anim = "open "
fighter(f%).frame = 0
END IF

IF anim(20) = 20 THEN
fighter(f%).anim = "punt "
fighter(f%).frame = 0
END IF

IF anim(20) = 21 THEN
fighter(f%).anim = "hit1 "
fighter(f%).frame = 0
END IF

IF anim(20) = 22 THEN
fighter(f%).anim = "hit2 "
fighter(f%).frame = 0
END IF

IF anim(20) = 23 THEN
fighter(f%).anim = "hit3 "
fighter(f%).frame = 0
END IF

IF anim(20) = 24 THEN
fighter(f%).anim = "hitb "
fighter(f%).frame = 0
END IF


IF anim(20) = 25 THEN
fighter(f%).frame = 0
'IF fighter(f%).countk = 11 THEN
'fighter(f%).anim = "getup"
'fighter(f%).frame = 0
'fighter(f%).count = 0
'fighter(f%).countk = 0
'END IF
IF fighter(f%).anim = "downh" AND fighter(f%).count <= 0 THEN fighter(f%).anim = "getup" ELSE fighter(f%).anim = "down "
IF fighter(f%).count <= 0 AND fighter(f%).anim = "down " AND NOT fighter(f%).countk = 11 THEN
fighter(f%).countk = 11
fighter(f%).count = 40
IF f% = 1 THEN fighter(f%).count = 29
END IF

END IF

IF anim(20) = 26 THEN
fighter(f%).anim = "getup"
fighter(f%).frame = 0
END IF


IF anim(20) = 27 THEN
fighter(f%).anim = "hitu "
fighter(f%).frame = 0
END IF

IF anim(20) = 28 THEN
fighter(f%).anim = "grab "
fighter(f%).frame = 0
END IF

IF anim(20) = 29 THEN
fighter(f%).anim = "grabd"
fighter(f%).frame = 0
END IF

IF anim(20) = 30 THEN
fighter(f%).anim = "pin  "
fighter(f%).frame = 0
END IF

IF anim(20) = 31 THEN
fighter(f%).anim = "pind "
fighter(f%).frame = 0
END IF

IF anim(20) = 32 THEN
fighter(f%).anim = "sit  "
fighter(f%).frame = 0
END IF

IF anim(20) = 33 THEN
fighter(f%).anim = "dizzy"
fighter(f%).frame = 0
END IF


END IF


IF fighter(f%).anim = "tack3" THEN xdif% = 3

IF fighter(f%).anim = "tack5" THEN
IF fighter(f%).frame >= 3 AND fighter(f%).frame <= 4 THEN
ydif% = -6
xdif% = 3
END IF
IF fighter(f%).frame >= 6 AND fighter(f%).frame <= 9 THEN ydif% = 6
END IF

IF fighter(f%).anim = "spec1" THEN
IF fighter(f%).frame < 5 THEN ydif% = -3 ELSE ydif% = 3
IF fighter(f%).frame = 9 THEN fighter(f%).y = -3
xdif% = 3
END IF

IF fighter(f%).anim = "spec3" THEN
IF fighter(f%).frame <= 3 THEN ydif% = -3
IF fighter(f%).frame = 17 THEN ydif% = 9
END IF

IF fighter(f%).anim = "punt " THEN xdif% = 4

IF fighter(f%).anim = "walk " THEN xdif% = 4
IF fighter(f%).anim = "run  " THEN xdif% = 8

IF LEFT$(fighter(f%).anim, 4) = "jump" THEN
IF fighter(f%).frame <= 10 THEN ydif% = ydif% - 6
IF fighter(f%).frame >= 12 THEN ydif% = 10
END IF

IF fighter(f%).anim = "jumpf" OR fighter(f%).anim = "jump3" OR fighter(f%).anim = "jump4" THEN xdif% = 7

IF fighter(f%).anim = "jumps" THEN xdif% = 10


IF fighter(f%).anim = "hitb " OR fighter(f%).anim = "hitu " THEN xdif% = -7

IF fighter(f%).anim = "hitu " THEN IF fighter(f%).frame <= 4 THEN ydif% = -10 ELSE IF fighter(f%).frame <= 8 THEN ydif% = 10

IF fighter(f%).anim = "thron" THEN
IF fighter(f%).frame <= 5 THEN ydif% = -12
IF fighter(f%).frame >= 10 THEN ydif% = 12
END IF

IF fighter(f%).anim = "spec4" AND fighter(f%).frame > 3 THEN xdif% = 8

IF fighter(f%).anim = "spec5" AND fighter(f%).frame > 3 AND fighter(f%).kind = 6 THEN xdif% = 12
IF fighter(f%).anim = "spec5" AND fighter(f%).frame > 3 AND fighter(f%).kind = 7 THEN xdif% = 4

IF fighter(f%).anim = "hitb2" OR fighter(f%).anim = "slide" OR fighter(f%).anim = "thron" THEN xdif% = -15

IF fighter(f%).anim = "spec8" OR fighter(f%).anim = "spec9" THEN IF fighter(f%).frame = 3 THEN xdif% = 5

IF fighter(f%).anim = "spe10" THEN xdif% = 8 - fighter(f%).frame

'IF LEFT$(fighter(f%).anim, 4) = "tack" AND fighter(f%).frame = 1 THEN loadwav "d:\nekketsu\swing1.wav", 8000
'IF LEFT$(fighter(f%).anim, 3) = "hit" AND fighter(f%).frame = 1 OR fighter(f%).anim = "pinh " AND fighter(f%).frame = 1 OR fighter(f%).anim = "grabh" AND fighter(f%).frame = 1 THEN loadwav "d:\nekketsu\hit1.wav", 8000
'IF fighter(f%).anim = "hitu " AND fighter(f%).frame = 9 THEN loadwav "d:\nekketsu\crash.wav", 8000

IF fighter(f%).anim = "block" AND fighter(f%).count > 0 THEN xdif% = -3

IF fighter(f%).dir = "r" THEN fighter(f%).x = fighter(f%).x + xdif% ELSE fighter(f%).x = fighter(f%).x - xdif%
fighter(f%).y = fighter(f%).y + ydif%





END SUB

SUB collision (f%)


IF fighter(f%).col > 0 THEN

FOR i% = 1 TO 10

hit% = 0

IF i% = f% AND i% = 10 THEN EXIT FOR
IF i% = f% THEN i% = f% + 1
IF fighter(i%).kind > 0 AND NOT fighter(i%).countk = 25 THEN

IF fighter(f%).col <= 5 OR fighter(f%).col = 14 THEN
IF fighter(f%).col < 5 OR fighter(f%).col = 14 THEN
IF fighter(f%).dir = "r" AND ABS(fighter(f%).z - fighter(i%).z) <= 6 AND fighter(f%).x + 40 > fighter(i%).x AND fighter(f%).x < fighter(i%).x OR fighter(f%).dir = "l" AND ABS(fighter(f%).z - fighter(i%).z) <= 6 AND fighter(f%).x - 40 < fighter(i%).x _
 AND fighter(f%).x > fighter(i%).x THEN connect% = 1
END IF

IF fighter(f%).col = 5 THEN
IF fighter(f%).dir = "l" AND ABS(fighter(f%).z - fighter(i%).z) <= 6 AND fighter(f%).x + 40 > fighter(i%).x AND fighter(f%).x < fighter(i%).x OR fighter(f%).dir = "r" AND ABS(fighter(f%).z - fighter(i%).z) <= 6 AND fighter(f%).x - 40 < fighter(i%).x _
 AND fighter(f%).x > fighter(i%).x THEN connect% = 1
END IF


IF connect% = 1 THEN

IF fighter(i%).anim = "hitu " OR fighter(i%).anim = "hitb " OR fighter(i%).anim = "hitb2" OR LEFT$(fighter(i%).anim, 4) = "down" OR fighter(i%).anim = "thron" OR fighter(i%).anim = "getup" OR fighter(i%).anim = "block" THEN

IF fighter(i%).anim = "block" THEN fighter(i%).count = 3

ELSE

IF fighter(f%).col >= 2 AND fighter(f%).col <= 5 THEN
IF fighter(f%).x > fighter(i%).x THEN fighter(i%).dir = "r"
IF fighter(f%).x < fighter(i%).x THEN fighter(i%).dir = "l"
END IF


IF fighter(f%).col = 1 THEN

fighter(i%).frame = 0
fighter(i%).anim = "hit1 "

fighter(f%).count = 10
fighter(f%).countk = fighter(f%).countk + 1

fighter(i%).count = 8 + (fighter(i%).countk * 2)
fighter(i%).countk = fighter(i%).countk + 1

IF fighter(i%).countk = 1 THEN fighter(i%).anim = "hit2 "
IF fighter(i%).countk = 2 THEN fighter(i%).anim = "hit1 "
IF fighter(i%).countk = 3 THEN fighter(i%).anim = "hit3 "
IF fighter(i%).countk = 4 THEN fighter(i%).anim = "hitb "

IF fighter(i%).y < 0 THEN
fighter(i%).anim = "hitb "
fighter(i%).frame = 0
fighter(i%).y = 0
END IF

hit% = 2


END IF

IF fighter(f%).col = 14 THEN

fighter(i%).frame = 0
fighter(i%).anim = "hit1 "

fighter(i%).count = 8 + (fighter(i%).countk * 2)
fighter(i%).countk = fighter(i%).countk + 1

IF fighter(i%).countk = 1 THEN fighter(i%).anim = "hit2 "
IF fighter(i%).countk = 2 THEN fighter(i%).anim = "hit1 "
IF fighter(i%).countk = 3 THEN fighter(i%).anim = "hit2 "
IF fighter(i%).countk = 4 THEN
fighter(i%).anim = "hit1 "
fighter(i%).count = 0
END IF
IF fighter(i%).y < 0 THEN
fighter(i%).anim = "hitb "
fighter(i%).frame = 0
fighter(i%).y = 0
END IF

hit% = 1

END IF


IF fighter(f%).col = 2 THEN
fighter(i%).frame = 0
fighter(i%).anim = "hitb "
hit% = 6
END IF

IF fighter(f%).col = 3 THEN
fighter(i%).frame = 0
fighter(i%).anim = "hitb2"
hit% = 8
END IF

IF fighter(f%).col = 4 THEN
fighter(i%).frame = 0
fighter(i%).anim = "hitu "
hit% = 4
END IF

IF fighter(f%).col = 5 THEN
fighter(i%).frame = 0
fighter(i%).anim = "hitu "
hit% = 5
END IF

END IF

END IF

END IF


IF fighter(f%).col >= 6 AND fighter(f%).col <= 7 THEN
IF ABS(fighter(f%).z - fighter(i%).z) <= 3 AND ABS(fighter(f%).x - fighter(i%).x) <= 40 THEN connect% = 1


IF connect% = 1 THEN

IF fighter(f%).col = 7 THEN
IF fighter(f%).x > fighter(i%).x THEN fighter(i%).dir = "r"
IF fighter(f%).x < fighter(i%).x THEN fighter(i%).dir = "l"
END IF


IF fighter(f%).col = 6 AND fighter(i%).anim = "down " AND fighter(f%).y <= 0 AND fighter(f%).y > -7 THEN
fighter(i%).frame = 0
fighter(i%).anim = "downh"
hit% = 1
END IF

IF fighter(f%).col = 7 AND fighter(i%).anim = "down " AND fighter(f%).y <= 0 AND fighter(f%).y > -7 THEN
IF fighter(f%).dir = "r" AND fighter(i%).x > fighter(f%).x OR fighter(f%).dir = "l" AND fighter(i%).x < fighter(f%).x THEN
fighter(i%).frame = 0
fighter(i%).anim = "slide"
hit% = 7
END IF
END IF

END IF

END IF


IF fighter(f%).col = 8 THEN
IF fighter(f%).dir = "r" AND ABS(fighter(f%).z - fighter(i%).z) <= 5 AND fighter(f%).x + 25 > fighter(i%).x AND fighter(f%).x < fighter(i%).x OR fighter(f%).dir = "l" AND ABS(fighter(f%).z - fighter(i%).z) <= 5 AND fighter(f%).x - 25 < fighter(i%).x _
 AND fighter(f%).x > fighter(i%).x THEN connect% = 1
IF connect% = 1 THEN
fighter(i%).count = 40
fighter(i%).countk = 0
IF fighter(i%).anim = "hit3 " THEN
fighter(f%).anim = "grab "
fighter(f%).frame = 0
fighter(i%).anim = "grabd"
fighter(i%).frame = 0
fighter(i%).z = fighter(f%).z - 1
IF fighter(i%).x > fighter(f%).x THEN fighter(i%).x = fighter(f%).x + 25 ELSE fighter(i%).x = fighter(f%).x - 25
EXIT SUB
END IF

END IF
END IF


IF fighter(f%).col = 9 OR fighter(f%).col = 10 THEN
IF ABS(fighter(i%).x - fighter(f%).x) = 25 AND fighter(i%).z = fighter(f%).z - 1 THEN connect% = 1
IF connect% = 1 THEN


IF fighter(f%).col = 10 THEN
IF fighter(f%).x > fighter(i%).x THEN fighter(i%).dir = "l"
IF fighter(f%).x < fighter(i%).x THEN fighter(i%).dir = "r"
END IF


IF fighter(f%).col = 9 THEN
fighter(i%).frame = 0
fighter(i%).anim = "grabh"
fighter(i%).countk = fighter(i%).countk + 1
IF fighter(i%).countk = 4 THEN
fighter(f%).anim = "idle "
fighter(f%).frame = 0
fighter(i%).anim = "hitb "
fighter(i%).frame = 0
hit% = 3
END IF
hit% = 1
END IF

IF fighter(f%).col = 10 THEN
fighter(i%).frame = 0
fighter(i%).anim = "thron"
hit% = 5
END IF
END IF


END IF


IF fighter(f%).col = 11 THEN
IF ABS(fighter(f%).z - fighter(i%).z) <= 3 AND ABS(fighter(f%).x - fighter(i%).x) <= 40 AND fighter(i%).anim = "down " THEN connect% = 1
IF connect% = 1 THEN
fighter(f%).anim = "pin  "
fighter(f%).frame = 0
fighter(i%).anim = "pind "
fighter(i%).frame = 0
fighter(i%).count = 35
IF fighter(i%).x > fighter(f%).x THEN fighter(i%).x = fighter(f%).x + 20 ELSE fighter(i%).x = fighter(f%).x - 20
IF fighter(i%).x > fighter(f%).x THEN
fighter(f%).dir = "r"
fighter(i%).dir = "l"
ELSE
fighter(i%).dir = "r"
fighter(f%).dir = "l"
END IF

fighter(i%).x = fighter(f%).x
fighter(f%).z = fighter(i%).z + 1
EXIT SUB
END IF
END IF


IF fighter(f%).col = 12 THEN
IF ABS(fighter(i%).x - fighter(f%).x) = 0 AND fighter(f%).z = fighter(i%).z + 1 THEN connect% = 1

IF connect% = 1 THEN

IF fighter(f%).col = 12 THEN
IF fighter(f%).x > fighter(i%).x THEN fighter(i%).dir = "r"
IF fighter(f%).x < fighter(i%).x THEN fighter(i%).dir = "l"
END IF

fighter(i%).anim = "pinh "
fighter(i%).frame = 0
hit% = 1
END IF


END IF


IF fighter(f%).col = 13 THEN
IF ABS(fighter(i%).x - fighter(f%).x) = 0 AND fighter(f%).z = fighter(i%).z - 1 THEN connect% = 1
IF connect% = 1 THEN
fighter(f%).anim = "getup"
fighter(f%).frame = 0
fighter(i%).anim = "hitu "
fighter(i%).frame = 0
hit% = 2
END IF

END IF

END IF



fighter(i%).life = fighter(i%).life - (fighter(f%).power * hit%)
IF col% = 1 THEN fighter(i%).y = 0

connect% = 0

NEXT i%

END IF

END SUB

SUB continue (lives%)

SHARED cont%

fighter(1).x = 10
fighter(1).z = 120
fighter(1).anim = "idle "
fighter(1).dir = "r"
fighter(1).kind = 1
fighter(1).life = 500
fighter(1).power = 10

FOR i% = 2 TO 10
fighter(i%).kind = 0
NEXT i%

future.loadgif "hotblood", 320, 200

IF lives% > 0 THEN future.print 200, 100, "lives: ", 15, -1

IF lives% = 8 THEN future.print 260, 100, "8", 15, -1
IF lives% = 7 THEN future.print 260, 100, "7", 15, -1
IF lives% = 6 THEN future.print 260, 100, "6", 15, -1
IF lives% = 5 THEN future.print 260, 100, "5", 15, -1
IF lives% = 4 THEN future.print 260, 100, "4", 15, -1
IF lives% = 3 THEN future.print 260, 100, "3", 15, -1
IF lives% = 2 THEN future.print 260, 100, "2", 15, -1
IF lives% = 1 THEN future.print 260, 100, "1", 15, -1
IF lives% = 0 THEN future.print 200, 100, "game over", 15, -1

IF lives% > 0 THEN
future.print 100, 150, "press esc to end game.", 15, -1
future.print 100, 160, "press space to continue.", 15, -1
END IF

f% = 0
WHILE f% = 0
IF GetKey(1) THEN f% = 1
IF GetKey(57) THEN f% = 2
WEND


IF f% = 1 THEN cont% = 1
IF f% = 2 THEN cont% = 2
IF lives% = 0 THEN cont% = 1


END SUB

SUB del

so! = 0
dera! = 0
dera! = TIMER

100
so! = TIMER
IF so! - dera! > .08 THEN  ELSE GOTO 100

END SUB

SUB game (level%)

SHARED joy%


IF level% < 5 OR level% = 8 OR level% = 9 THEN
LoadWAV "rcr.wav", 8000
musictimer# = TIMER
END IF

IF level% = 6 OR level% = 7 OR level% = 10 OR level% = 11 THEN
LoadWAV "start.wav", 8000
musictimer# = TIMER
tim# = TIMER
END IF

SHARED bg1%, bg3%, scrol%, win%, count%

d# = TIMER
s# = TIMER


IF level% = 1 THEN
count% = 5
END IF

IF level% = 2 THEN count% = 0

IF level% = 3 THEN
count% = 6
END IF

IF level% = 4 THEN count% = 0

IF level% = 6 THEN count% = 16

IF level% = 7 THEN count% = 0

IF level% = 8 THEN count% = 4

IF level% = 9 THEN count% = 4

IF level% = 10 THEN count% = 0

IF level% = 11 THEN count% = 0

WHILE NOT GetKey(1)



IF count% = 1 THEN future.print 100, 20, "1", 15, -1
IF count% = 2 THEN future.print 100, 20, "2", 15, -1
IF count% = 3 THEN future.print 100, 20, "3", 15, -1
IF count% = 4 THEN future.print 100, 20, "4", 15, -1
IF count% = 5 THEN future.print 100, 20, "5", 15, -1
IF count% = 6 THEN future.print 100, 20, "6", 15, -1
IF count% = 7 THEN future.print 100, 20, "7", 15, -1
IF count% = 8 THEN future.print 100, 20, "8", 15, -1

IF level% <= 4 OR level% = 8 OR level% = 9 THEN
IF TIMER - musictimer# >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer# = TIMER
END IF
END IF

IF level% = 6 OR level% = 7 OR level% = 10 OR level% = 11 THEN
IF TIMER - musictimer# >= 56.3 THEN
LoadWAV "start.wav", 8000
musictimer# = TIMER
END IF
END IF



IF level% = 8 OR level% = 9 THEN
zlow% = 65
zhigh% = 132

IF new% = 1 THEN
IF count% > 0 THEN
IF level% = 8 THEN new% = 8
IF level% = 9 THEN new% = 11
END IF
IF new% > 1 THEN
IF scrol% >= -100 THEN initiate new%, 620 + scrol%, 80 ELSE initiate new%, -30 + scrol%, 80
END IF

END IF


END IF




IF level% = 7 OR level% = 10 OR level% = 11 THEN
zlow% = 72
zhigh% = 132
END IF




IF level% = 6 THEN
zlow% = 72
zhigh% = 132

IF new% = 1 THEN
IF count% = 9 OR count% = 11 OR count% = 13 OR count% = 15 THEN new% = 3
IF count% = 10 OR count% = 12 OR count% = 14 OR count% = 16 THEN new% = 4
IF count% = 7 OR count% = 5 OR count% = 3 OR count% = 1 THEN new% = 3
IF count% = 8 OR count% = 6 OR count% = 4 OR count% = 2 THEN new% = 4
IF new% > 1 THEN
IF scrol% >= -100 THEN initiate new%, 620 + scrol%, 80 ELSE initiate new%, -30 + scrol%, 80
END IF

END IF


END IF



IF level% = 4 THEN
zlow% = 69
zhigh% = 100
END IF

IF level% = 3 THEN
zlow% = 69
zhigh% = 100

IF new% = 1 THEN
IF count% = 7 OR count% = 5 OR count% = 3 OR count% = 1 THEN new% = 3
IF count% = 8 OR count% = 6 OR count% = 4 OR count% = 2 THEN new% = 4
IF new% > 1 THEN
IF scrol% >= -100 THEN initiate new%, 620 + scrol%, 80 ELSE initiate new%, -30 + scrol%, 80
END IF

END IF


END IF

IF level% = 2 THEN
zlow% = 65
zhigh% = 132
END IF

IF level% = 1 THEN
zlow% = 65
zhigh% = 132

IF new% = 1 THEN
IF count% = 7 OR count% = 5 OR count% = 3 OR count% = 1 THEN new% = 3
IF count% = 8 OR count% = 6 OR count% = 4 OR count% = 2 THEN new% = 4
IF new% > 1 THEN
IF scrol% >= -100 THEN initiate new%, 620 + scrol%, 80 ELSE initiate new%, -30 + scrol%, 80
END IF

END IF


END IF


IF count% <= 0 THEN
l% = 0
FOR i% = 2 TO 10
IF fighter(i%).kind > 0 THEN l% = 1
NEXT i%
IF l% = 0 THEN
win% = 1
EXIT SUB
END IF

END IF


IF fighter(1).kind = 0 OR level% = 6 AND 360 - (TIMER - tim#) <= 0 THEN
win% = 0
EXIT SUB
END IF



new% = 0

d# = d# + 1
setpage 1
viewpage 0

SetMaskColor 0

right% = 0
left% = 0
punch% = 0
kick% = 0
up% = 0
down% = 0
jump% = 0
block% = 0

IF GetKey(30) THEN punch% = 1
IF GetKey(31) THEN kick% = 1
IF GetKey(44) THEN jump% = 1
IF GetKey(45) THEN block% = 1
IF GetKey(77) THEN right% = 1
IF GetKey(75) THEN left% = 1
IF GetKey(80) THEN down% = 1
IF GetKey(72) THEN up% = 1


IF right% = 1 THEN fighter(1).right = fighter(1).right + 1 ELSE fighter(1).right = 0
IF left% = 1 THEN fighter(1).left = fighter(1).left + 1 ELSE fighter(1).left = 0
IF punch% = 1 THEN fighter(1).punch = fighter(1).punch + 1 ELSE fighter(1).punch = 0
IF kick% = 1 THEN fighter(1).kick = fighter(1).kick + 1 ELSE fighter(1).kick = 0
IF jump% = 1 THEN fighter(1).jump = fighter(1).jump + 1 ELSE fighter(1).jump = 0
IF block% = 1 THEN fighter(1).block = fighter(1).block + 1 ELSE fighter(1).block = 0

IF fighter(1).anim = "idle " OR LEFT$(fighter(1).anim, 4) = "walk" THEN
IF fighter(1).punch <= 1 THEN
IF punch% = 1 THEN 'a
IF fighter(1).countk = 0 THEN fighter(1).anim = "tack1"
IF fighter(1).countk = 1 THEN fighter(1).anim = "tack2"
IF fighter(1).countk = 2 THEN fighter(1).anim = "tack1"
IF fighter(1).countk >= 3 THEN
fighter(1).anim = "tack3"
fighter(1).count = 0
fighter(1).countk = 0
END IF
fighter(1).frame = 0
END IF
END IF
IF fighter(1).kick <= 1 THEN
IF kick% = 1 THEN 'S
IF fighter(1).countk = 0 THEN fighter(1).anim = "tack4"
IF fighter(1).countk = 1 THEN fighter(1).anim = "tack4"
IF fighter(1).countk >= 2 THEN
fighter(1).anim = "tack5"
fighter(1).count = 0
fighter(1).countk = 0
END IF
fighter(1).frame = 0
END IF
END IF
IF jump% = 1 THEN 'Z
fighter(1).anim = "jump "
fighter(1).frame = 0
END IF

IF right% = 1 AND jump% = 1 THEN
fighter(1).dir = "r"
fighter(1).anim = "jumpf"
fighter(1).frame = 0
END IF

IF left% = 1 AND jump% = 1 THEN
fighter(1).dir = "l"
fighter(1).anim = "jumpf"
fighter(1).frame = 0
END IF


IF block% = 1 THEN 'X
fighter(1).anim = "block"
fighter(1).frame = 0
END IF

IF kick% = 1 AND down% = 1 AND fighter(1).kick <= 1 THEN 'S
fighter(1).anim = "stomp"
fighter(1).frame = 0
END IF

IF punch% = 1 AND down% = 1 AND fighter(1).punch <= 1 THEN 'S
fighter(1).anim = "getd "
fighter(1).frame = 0
END IF



END IF

IF fighter(1).anim = "walk " THEN

IF left% = 1 AND fighter(1).left <= 1 AND fighter(1).dir = "l" THEN
fighter(1).dir = "l"
fighter(1).anim = "run  "
fighter(1).frame = 0
END IF
IF right% = 1 AND fighter(1).right <= 1 AND fighter(1).dir = "r" THEN
fighter(1).dir = "r"
fighter(1).anim = "run  "
fighter(1).frame = 0
END IF

END IF

IF fighter(1).anim = "idle " THEN
IF up% = 1 THEN
fighter(1).z = fighter(1).z - 2
fighter(1).anim = "walk2"
fighter(1).frame = 0
END IF
IF down% = 1 THEN
fighter(1).z = fighter(1).z + 2
fighter(1).anim = "walk2"
fighter(1).frame = 0
END IF

IF left% = 1 THEN
fighter(1).dir = "l"
fighter(1).anim = "walk "
fighter(1).frame = 0
END IF
IF right% = 1 THEN
fighter(1).dir = "r"
fighter(1).anim = "walk "
fighter(1).frame = 0
END IF

END IF

IF fighter(1).anim = "walk " OR fighter(1).anim = "run  " OR fighter(1).anim = "walk2" THEN
IF up% = 1 THEN fighter(1).z = fighter(1).z - 2
IF down% = 1 THEN fighter(1).z = fighter(1).z + 2
END IF

IF fighter(1).anim = "jump " THEN

IF kick% = 1 THEN 'S
fighter(1).anim = "jump1"
END IF

IF kick% = 1 AND down% = 1 THEN 'S
fighter(1).anim = "jump2"
END IF

END IF

IF fighter(1).anim = "jumpf" OR fighter(1).anim = "jumps" THEN

IF kick% = 1 THEN 'S
fighter(1).anim = "jump3"
END IF

IF kick% = 1 AND down% = 1 THEN 'S
fighter(1).anim = "jump4"
END IF

END IF

IF fighter(1).anim = "block" THEN
IF block% = 1 THEN
ELSE
fighter(1).anim = "idle "
fighter(1).frame = 0
END IF

IF left% = 1 AND fighter(1).dir = "r" THEN
fighter(1).anim = "back "
fighter(1).frame = 0
fighter(1).x = fighter(1).x - 8
END IF
IF right% = 1 AND fighter(1).dir = "l" THEN
fighter(1).anim = "back "
fighter(1).frame = 0
fighter(1).x = fighter(1).x + 8
END IF

IF punch% = 1 THEN
fighter(1).anim = "spec2"
fighter(1).frame = 0
END IF
IF kick% = 1 THEN
fighter(1).anim = "spec3"
fighter(1).frame = 0
END IF
IF jump% = 1 THEN
fighter(1).anim = "spec1"
fighter(1).frame = 0
END IF


END IF

IF fighter(1).anim = "run  " THEN
IF punch% = 1 THEN
fighter(1).anim = "tack3"
fighter(1).frame = 0
END IF
IF kick% = 1 THEN
fighter(1).anim = "punt "
fighter(1).frame = 0
END IF

IF right% = 1 THEN
IF fighter(1).dir = "r" THEN
fighter(1).x = fighter(1).x + 3
ELSE
fighter(1).anim = "idle "
fighter(1).frame = 0
END IF
END IF

IF left% = 1 THEN
IF fighter(1).dir = "l" THEN
fighter(1).x = fighter(1).x - 3
ELSE
fighter(1).anim = "idle "
fighter(1).frame = 0
END IF
END IF

IF jump% = 1 THEN 'Z
fighter(1).anim = "jumps"
fighter(1).frame = 0
END IF

IF block% = 1 THEN 'X
fighter(1).anim = "block"
fighter(1).frame = 0
END IF


END IF


IF fighter(1).anim = "grab " THEN

IF punch% = 1 AND fighter(1).punch <= 1 THEN
fighter(1).anim = "grabt"
fighter(1).frame = 0
END IF

IF up% = 1 THEN
fighter(1).anim = "throw"
fighter(1).frame = 0
END IF

END IF


IF fighter(1).anim = "pin  " THEN

IF punch% = 1 AND fighter(1).punch <= 1 THEN
fighter(1).anim = "pint "
fighter(1).frame = 0
END IF

IF up% = 1 THEN
fighter(1).anim = "getup"
fighter(1).frame = 0
END IF

END IF

IF fighter(1).anim = "pind " OR fighter(1).anim = "grabd" THEN
IF punch% = 1 AND fighter(1).punch <= 1 THEN fighter(1).count = fighter(1).count - 1
IF fighter(1).count <= 0 THEN fighter(1).count = 0
END IF

IF fighter(1).anim = "spec3" THEN
IF left% = 1 THEN fighter(1).x = fighter(1).x - 2
IF right% = 1 THEN fighter(1).x = fighter(1).x + 2
END IF

IF fighter(1).anim = "sit  " THEN
IF punch% = 1 THEN
fighter(1).anim = "order"
fighter(1).frame = 1
END IF
IF left% = 1 OR down% = 1 OR up% = 1 OR kick% = 1 OR block% = 1 OR jump% = 1 THEN
fighter(1).anim = "idle "
fighter(1).frame = 1
END IF
IF right% = 1 THEN
fighter(1).anim = "sitl "
fighter(1).frame = 1
END IF

END IF

IF GetKey(1) THEN GOTO 2


future.emsput scrol%, 0, bg1%


FOR d% = 1 TO 10
IF fighter(d%).kind > 2 THEN ai d%, 1
NEXT d%

IF fighter(1).x > 240 THEN
sc% = ABS(fighter(1).x - 240)
scrol% = scrol% - sc%
FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x - sc%
NEXT i%
END IF

IF fighter(1).x < 30 THEN
sc% = ABS(30 - fighter(1).x)
scrol% = scrol% + sc%
FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x + sc%
NEXT i%
END IF

IF scrol% > 0 THEN

FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x - ABS(scrol%)
NEXT i%

scrol% = 0

END IF

IF scrol% < -320 THEN

FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x + ABS(scrol% + 320)
NEXT i%

scrol% = -320

END IF


FOR i% = 1 TO 10
IF fighter(i%).kind > 0 AND fighter(i%).life <= 0 THEN
IF NOT fighter(i%).anim = "down " AND NOT fighter(i%).anim = "hitu " THEN
fighter(i%).y = 0
fighter(i%).anim = "hitu "
END IF
IF i% > 1 AND fighter(i%).anim = "down " THEN
count% = count% - 1
new% = 1
END IF
IF fighter(i%).anim = "down " THEN fighter(i%).kind = 0
END IF
NEXT i%


FOR i% = 1 TO 10
fighter(i%).frame = fighter(i%).frame + 1
fighter(i%).count = fighter(i%).count - 1
IF fighter(i%).count <= 0 THEN
fighter(i%).count = 0
'IF fighter(i%).countk = 11 THEN
'fighter(i%).anim = "getup"
'fighter(i%).frame = 1
'END IF
fighter(i%).countk = 0
IF fighter(i%).anim = "grabd" THEN
fighter(i%).anim = "pushg"
fighter(i%).frame = 1
END IF

IF fighter(i%).anim = "pind " THEN
fighter(i%).anim = "pushd"
fighter(i%).frame = 1
END IF

IF fighter(i%).anim = "down " THEN
fighter(i%).anim = "getup"
fighter(i%).frame = 1
END IF


END IF
IF fighter(i%).z < zlow% THEN fighter(i%).z = zlow%
IF fighter(i%).z > zhigh% THEN fighter(i%).z = zhigh%
NEXT i%



FOR n% = 60 TO 135
FOR d% = 1 TO 10
IF fighter(d%).z = n% AND fighter(d%).kind > 0 THEN animate d%
'0 320
IF d% > 1 THEN
IF fighter(d%).x < -10 + scrol% THEN fighter(d%).x = -10 + scrol%
IF fighter(d%).x > 600 + scrol% THEN fighter(d%).x = 600 + scrol%
END IF

'IF fighter(d%).anim = "run  " OR fighter(d%).anim = "idle " OR LEFT$(fighter(d%).anim, 4) = "walk" OR LEFT$(fighter(d%).anim, 4) = "jump" THEN
IF fighter(1).x > 280 THEN fighter(1).x = 280
IF fighter(1).x < -30 THEN fighter(1).x = -30
'END IF
NEXT d%
NEXT n%

future.fillbox 40, 10, 40 + (fighter(1).life / 8), 20, 100
future.box 40, 10, 40 + (500 / 8), 20, 109

IF level% = 6 THEN
future.print 140, 30, "TIME", 15, -1
future.fillbox 130, 40, 130 + ((360 - (TIMER - tim#)) / 6), 50, 80
future.box 130, 40, 190, 50, 15
END IF

FOR i% = 1 TO 10
collision i%
NEXT i%

        SetMaskColor -1
Future.EMSGet 0, 0, 320, 200, bg3%
            
        viewpage 1
        setpage 0
        future.emsput 0, 0, bg3%
        viewpage 0


del
WEND



2

kbhoff

FOR i% = 1 TO 20
DeallExpMem graphics(i%).right
DeallExpMem graphics(i%).left
NEXT i%


DeallExpMem bg1%
DeallExpMem bg3%

ReSetScreen
'PRINT (d# - s#) / (TIMER - s#), fighter(1).x, fighter(2).x, fighter(3).x
PRINT scrol%, fighter(1).count, count%
SLEEP
stopandreset
SYSTEM



END SUB

SUB go

SHARED joy%

lives% = 8
SHARED win%, cont%

1000
cont% = 0
story 1
game 1
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 1000
END IF
2000
cont% = 0
story 2
game 2
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 2000
END IF

3000
cont% = 0
story 3
game 3
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 3000
END IF

4000
cont% = 0
story 4
game 4
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 4000
END IF
5000
story 5
6000
cont% = 0
story 6
game 6
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 6000
END IF

7000
cont% = 0
story 7
game 7
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 7000
END IF

8000
cont% = 0
story 8
game 8
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 8000
END IF

9000
cont% = 0
story 9
game 9
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 9000
END IF

10000
cont% = 0
story 10
game 10
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 10000
END IF

11000
cont% = 0
story 11
game 11
IF win% = 0 THEN
lives% = lives% - 1
continue lives%
IF cont% = 1 THEN EXIT SUB
IF cont% = 2 THEN GOTO 11000
END IF

story 12


END SUB

SUB initiate (f%, x%, y%)

FOR i% = 2 TO 10
IF fighter(i%).kind = 0 THEN
fighter(i%).kind = f%
EXIT FOR
END IF
NEXT i%

IF i% > 0 AND i% <= 10 THEN fighter(i%).kind = f%

IF fighter(i%).kind = 3 OR fighter(i%).kind = 4 THEN
fighter(i%).life = 300
fighter(i%).power = 3
END IF

IF fighter(i%).kind = 5 THEN
fighter(i%).life = 760
fighter(i%).power = 5
END IF

IF fighter(i%).kind = 6 THEN
fighter(i%).life = 800
fighter(i%).power = 6
END IF


IF fighter(i%).kind = 7 THEN
fighter(i%).life = 500
fighter(i%).power = 5
END IF

IF fighter(i%).kind = 8 THEN
fighter(i%).life = 400
fighter(i%).power = 5
END IF

IF fighter(i%).kind = 9 THEN
fighter(i%).life = 700
fighter(i%).power = 7
END IF

IF fighter(i%).kind = 10 THEN
fighter(i%).life = 600
fighter(i%).power = 6
END IF

IF fighter(i%).kind = 11 THEN
fighter(i%).life = 350
fighter(i%).power = 5
END IF

IF fighter(i%).kind = 12 THEN
fighter(i%).life = 1500
fighter(i%).power = 10
END IF

IF fighter(i%).kind = 14 THEN
fighter(i%).life = 1
fighter(i%).power = 1
END IF



fighter(i%).x = x%
fighter(i%).z = y%
fighter(i%).y = 0
fighter(i%).anim = "idle "
fighter(i%).frame = 1


END SUB

SUB loadbg (bg$)

SHARED bg1%

set640x400 8
setpage 0
viewpage 1
future.loadgif bg$, 640, 200

Future.EMSGet 0, 0, 640, 200, bg1%

set320x200 8
viewpage 0
setpage 0
future.loadgif "hotblood", 1, 1

END SUB

SUB loadgfx (f%, A$, a2$)
STATIC ace%
IF ace% = 0 THEN set640x480 8
IF ace% = 0 THEN setpage 0
IF ace% = 0 THEN future.loadgif "hotblood", 640, 480
ace% = 1
IF f% = 14 THEN ace% = 0
setpage 1
viewpage 0
future.loadgif A$, 640, 480

FOR i% = 1 TO 10
Future.EMSArrayGet (((63 * i%) - 62) + (i% - 1)), 1, graphics(f%).right, i%
NEXT i%
 
FOR i% = 11 TO 20
Future.EMSArrayGet (((63 * (i% - 10)) - 62) + (i% - 11)), 65, graphics(f%).right, i%
NEXT i%

FOR i% = 21 TO 30
Future.EMSArrayGet (((63 * (i% - 20)) - 62) + (i% - 21)), 129, graphics(f%).right, i%
NEXT i%

FOR i% = 31 TO 40
Future.EMSArrayGet (((63 * (i% - 30)) - 62) + (i% - 31)), 193, graphics(f%).right, i%
NEXT i%

FOR i% = 41 TO 50
Future.EMSArrayGet (((63 * (i% - 40)) - 62) + (i% - 41)), 257, graphics(f%).right, i%
NEXT i%

FOR i% = 51 TO 60
Future.EMSArrayGet (((63 * (i% - 50)) - 62) + (i% - 51)), 321, graphics(f%).right, i%
NEXT i%
FOR i% = 61 TO 70
Future.EMSArrayGet (((63 * (i% - 60)) - 62) + (i% - 61)), 385, graphics(f%).right, i%
NEXT i%

future.loadgif a2$, 640, 480

FOR i% = 1 TO 10
Future.EMSArrayGet (((63 * i%) - 62) + (i% - 1)), 1, graphics(f%).left, 11 - i%
NEXT i%

FOR i% = 11 TO 20
Future.EMSArrayGet (((63 * (i% - 10)) - 62) + (i% - 11)), 65, graphics(f%).left, 31 - i%
NEXT i%

FOR i% = 21 TO 30
Future.EMSArrayGet (((63 * (i% - 20)) - 62) + (i% - 21)), 129, graphics(f%).left, 51 - i%
NEXT i%

FOR i% = 31 TO 40
Future.EMSArrayGet (((63 * (i% - 30)) - 62) + (i% - 31)), 193, graphics(f%).left, 71 - i%
NEXT i%

FOR i% = 41 TO 50
Future.EMSArrayGet (((63 * (i% - 40)) - 62) + (i% - 41)), 257, graphics(f%).left, 91 - i%
NEXT i%

FOR i% = 51 TO 60
Future.EMSArrayGet (((63 * (i% - 50)) - 62) + (i% - 51)), 321, graphics(f%).left, 111 - i%
NEXT i%
FOR i% = 61 TO 70
Future.EMSArrayGet (((63 * (i% - 60)) - 62) + (i% - 61)), 385, graphics(f%).left, 131 - i%
NEXT i%



END SUB

SUB set (a1%, a2%, a3%, a4%, a5%, a6%, a7%, a8%, a9%, a10%, a11%, a12%, a13%, a14%, a15%, a16%, a17%, a18%, a19%, a20%)

anim(1) = a1%
anim(2) = a2%
anim(3) = a3%
anim(4) = a4%
anim(5) = a5%
anim(6) = a6%
anim(7) = a7%
anim(8) = a8%
anim(9) = a9%
anim(10) = a10%
anim(11) = a11%
anim(12) = a12%
anim(13) = a13%
anim(14) = a14%
anim(15) = a15%
anim(16) = a16%
anim(17) = a17%
anim(18) = a18%
anim(19) = a19%
anim(20) = a20%


END SUB

SUB set2 (a1%, a2%, a3%, a4%, a5%, a6%, a7%, a8%, a9%, a10%, a11%, a12%, a13%, a14%, a15%, a16%, a17%, a18%, a19%, a20%)

collide(1) = a1%
collide(2) = a2%
collide(3) = a3%
collide(4) = a4%
collide(5) = a5%
collide(6) = a6%
collide(7) = a7%
collide(8) = a8%
collide(9) = a9%
collide(10) = a10%
collide(11) = a11%
collide(12) = a12%
collide(13) = a13%
collide(14) = a14%
collide(15) = a15%
collide(16) = a16%
collide(17) = a17%
collide(18) = a18%
collide(19) = a19%
collide(20) = a20%
END SUB

SUB story (s%)

SHARED joy%

SHARED bg1%, bg3%, scrol%

IF s% <= 5 OR s% = 9 OR s% = 11 THEN LoadWAV "rcr.wav", 8000
musictimer! = TIMER

IF s% = 7 OR s% = 8 OR s% = 10 OR s% = 12 THEN LoadWAV "start.wav", 8000
musictimer! = TIMER




fighter(1).y = 0
t% = 1

IF s% = 1 OR s% = 2 OR s% = 3 THEN
loadbg "bg2"
END IF

IF s% = 4 OR s% = 5 THEN
loadbg "bg1"
END IF

IF s% = 6 OR s% = 7 THEN
loadbg "bg3"
END IF

IF s% = 8 OR s% = 10 OR s% = 12 THEN
loadbg "bg6"
END IF
IF s% = 9 THEN
loadbg "bg4"
END IF
IF s% = 11 THEN
loadbg "bg5"
END IF




5

setpage 1
viewpage 0

SetMaskColor 0


FOR i% = 1 TO 10
IF fighter(i%).kind > 0 THEN fighter(i%).frame = fighter(i%).frame + 1
NEXT i%


IF s% = 12 THEN


future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 56.3 AND t% < 999 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF


IF t% = 1 THEN
fighter(1).anim = "look "
fighter(1).dir = "l"
fighter(1).frame = 1
initiate 2, 330, fighter(1).z
initiate 5, 330, fighter(1).z
initiate 3, -60, fighter(1).z
FOR i% = 2 TO 4
fighter(i%).dir = "r"
fighter(i%).anim = "idle "
fighter(i%).frame = 1
NEXT i%
fighter(2).dir = "l"
fighter(3).dir = "l"
END IF

IF t% <= 100 THEN
IF fighter(1).x >= 40 THEN fighter(1).anim = "walk "
IF fighter(1).x < 40 THEN
fighter(1).anim = "idle "
t% = 100
END IF
END IF

IF t% = 101 THEN fighter(1).dir = "r"

IF t% >= 101 AND t% <= 131 THEN fighter(3).anim = "walk "
IF t% = 101 THEN fighter(4).frame = 1
IF t% >= 120 AND t% <= 130 THEN fighter(4).anim = "walk "
IF t% = 120 THEN fighter(4).frame = 1
IF t% = 147 THEN
fighter(1).anim = "back "
fighter(1).frame = 1
END IF

IF t% >= 162 AND t% <= 180 THEN
IF t% = 162 THEN fighter(2).frame = 1
fighter(3).anim = "walk2"
fighter(3).x = fighter(3).x + 1
END IF
IF t% >= 162 AND t% <= 177 THEN
IF t% = 162 THEN fighter(2).frame = 1
fighter(2).anim = "walk "
END IF

IF t% = 178 THEN fighter(2).anim = "tack3"

IF t% > 200 THEN fighter(3).anim = "down "
IF t% <= 350 THEN
IF t% >= 210 THEN fighter(2).anim = "walk "
IF t% >= 300 THEN
fighter(1).anim = "walk "
fighter(1).dir = "l"
IF t% = 300 THEN fighter(1).frame = 1
END IF
END IF

IF t% = 1000 THEN
fighter(3).kind = 0
fighter(4).kind = 0
END IF

IF t% >= 1000 AND t% <= 1499 THEN
fighter(1).anim = "look "
IF t% = 1000 THEN
fighter(1).x = 200 - 320
fighter(1).z = 100
fighter(1).dir = "r"
fighter(2).x = 133 - 320
fighter(2).z = 69
fighter(2).anim = "sit  "
fighter(2).dir = "r"
fighter(2).frame = 1
loadbg "bg1"
stopandreset
scrol% = -320
END IF

fighter(1).anim = "look "
IF t% <= 1319 THEN
scrol% = scrol% + 1
fighter(1).x = fighter(1).x + 1
fighter(2).x = fighter(2).x + 1
END IF
END IF

IF t% = 1500 THEN
set640x480 8
future.loadgif "end", 640, 480
END IF


IF t% >= 1500 THEN
f% = 0
WHILE f% = 0
IF GetKey(57) OR GetKey(1) THEN f% = 1
WEND
EXIT SUB
END IF

END IF


IF s% = 11 THEN

future.emsput scrol%, 0, bg1%
                              
IF TIMER - musictimer! >= 101.17 AND t% <= 160 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF TIMER - musictimer! >= 56.3 AND t% >= 161 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF


IF t% = 1 THEN
scrol% = 0
fighter(1).kind = 2
fighter(1).x = 60
fighter(1).z = 130
fighter(1).life = 500
fighter(1).frame = 1
fighter(1).dir = "l"
fighter(1).anim = "idle "
initiate 3, -60, 75
fighter(2).anim = "idle "
fighter(2).frame = 1
fighter(2).dir = "r"
END IF

IF t% > 30 AND t% <= 53 THEN
fighter(2).anim = "walk "
END IF

IF t% = 61 THEN
fighter(1).anim = "look "
fighter(1).frame = 1
END IF

IF t% = 70 THEN
fighter(2).anim = "scare"
fighter(2).frame = 1
fighter(1).frame = 1
END IF

IF t% = 85 THEN
fighter(2).anim = "run  "
fighter(2).frame = 1
END IF

IF t% = 90 THEN fighter(1).dir = "r"
IF t% = 115 THEN
fighter(1).anim = "run  "
fighter(1).frame = 1
END IF

IF t% >= 115 AND t% <= 140 THEN fighter(1).z = fighter(1).z - 1

IF t% = 160 THEN
loadbg "bg6"
fighter(1).kind = 1
fighter(1).x = 260
fighter(1).z = 100
fighter(1).dir = "l"
fighter(1).anim = "look "
fighter(1).frame = 1
scrol% = -120
fighter(2).kind = 0
initiate 12, -60, 100

LoadWAV "start.wav", 8000
musictimer! = TIMER


END IF

IF t% > 190 AND t% <= 220 THEN
fighter(2).anim = "walk "
IF t% = 191 THEN fighter(2).frame = 1
END IF


IF t% = 230 THEN EXIT SUB
END IF

IF s% = 10 THEN

future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 56.3 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF

IF t% = 1 THEN
scrol% = -320
fighter(1).kind = 1
fighter(1).life = 500
fighter(1).dir = "l"
fighter(1).x = 290
fighter(1).z = 100
fighter(1).frame = 1
fighter(1).anim = "look "
END IF

IF t% > 30 AND t% <= 100 THEN
scrol% = scrol% + 3
fighter(1).x = fighter(1).x + 2
END IF

IF t% = 100 THEN
initiate 6, -40, 100
initiate 7, -80, 80
initiate 7, -110, 120
fighter(2).dir = "r"
fighter(2).frame = 1
fighter(3).dir = "r"
fighter(3).frame = 1
fighter(4).dir = "r"
fighter(4).frame = 1
END IF

IF t% > 100 AND t% <= 140 THEN
FOR i% = 2 TO 4
fighter(i%).anim = "walk "
NEXT i%
END IF

IF t% = 150 THEN EXIT SUB

END IF


IF s% = 9 THEN

future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF t% = 1 THEN
initiate 13, -60, fighter(1).z
fighter(1).kind = 2
fighter(2).dir = "l"
fighter(2).frame = 1
fighter(2).anim = "idle "
fighter(1).dir = "l"
END IF

IF t% = 20 THEN
fighter(2).anim = "slide"
fighter(2).frame = 1
END IF
IF t% > 50 THEN
fighter(1).anim = "run  "
fighter(1).dir = "l"
END IF

IF fighter(1).x < 0 AND t% > 55 THEN
loadbg "bg5"
fighter(2).kind = 0
initiate 10, 100, 100
initiate 11, 20, 70
initiate 11, 40, 130
initiate 11, 160, 110
fighter(1).x = 270
scrol% = -320
EXIT SUB
END IF






END IF

IF s% = 8 THEN

future.emsput scrol%, 0, bg1%

IF t% <= 210 THEN
IF TIMER - musictimer! >= 56.3 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF
END IF

IF t% >= 210 THEN

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF t% = 211 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
fighter(2).kind = 0
fighter(1).kind = 2
fighter(1).life = 500
fighter(1).dir = "r"
fighter(1).frame = 1
fighter(1).anim = "idle "
fighter(1).x = 30
fighter(1).z = 98
initiate 13, 10, 79
fighter(2).anim = "idle "
fighter(2).frame = 1
fighter(2).dir = "r"
scrol% = 0
initiate 9, 400, 100
initiate 8, 450, 70
initiate 8, 430, 120
initiate 8, 470, 85
FOR i% = 3 TO 6
fighter(i%).anim = "idle "
fighter(i%).frame = 1
fighter(i%).dir = "l"
NEXT i%
END IF

IF t% <= 305 THEN
fighter(1).anim = "walk"
fighter(2).anim = "walk"
scrol% = scrol% - 2
FOR i% = 1 TO 6
fighter(i%).x = fighter(i%).x - 2
NEXT i%
END IF

IF t% = 350 THEN
initiate 10, -100, 100
initiate 11, -130, 70
initiate 11, -110, 120
initiate 11, -70, 69
FOR i% = 7 TO 10
fighter(i%).anim = "idle "
fighter(i%).frame = 1
fighter(i%).dir = "r"
NEXT i%
END IF

IF t% >= 351 AND t% <= 420 THEN
fighter(1).dir = "l"
fighter(2).dir = "l"
scrol% = scrol% + 2
FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x + 2
NEXT i%
END IF

IF t% >= 441 AND t% <= 520 THEN
IF t% > 450 THEN
fighter(1).dir = "r"
fighter(1).anim = "walk "
END IF
IF t% > 485 THEN
FOR i% = 3 TO 6
fighter(i%).anim = "walk "
fighter(i%).dir = "r"
NEXT i%
END IF
fighter(2).dir = "l"
scrol% = scrol% - 2
FOR i% = 1 TO 10
fighter(i%).x = fighter(i%).x - 2
NEXT i%
END IF



END IF








IF t% = 1 THEN
fighter(1).kind = 1
fighter(1).anim = "look "
fighter(1).frame = 1
initiate 14, fighter(2).x, fighter(1).z
IF fighter(2).x = 0 THEN
fighter(2).x = 160
fighter(2).dir = "r"
END IF
END IF

IF t% <= 50 THEN
IF fighter(2).x < 30 AND scrol% < 0 THEN
scrol% = scrol% + 2
fighter(1).x = fighter(1).x + 2
fighter(2).x = fighter(2).x + 2
END IF
IF fighter(2).x > 290 AND scrol% > -320 THEN
scrol% = scrol% - 2
fighter(1).x = fighter(1).x - 2
fighter(2).x = fighter(2).x - 2
END IF

IF fighter(2).x > 30 AND fighter(2).x < 290 THEN t% = 50

END IF

IF t% > 50 AND t% < 150 THEN
IF fighter(1).x < fighter(2).x - 30 THEN
fighter(1).anim = "walk "
fighter(1).dir = "r"
END IF
IF fighter(1).x > fighter(2).x + 30 THEN
fighter(1).anim = "walk "
fighter(1).dir = "l"
END IF

IF fighter(1).x > fighter(2).x - 30 AND fighter(1).x < fighter(2).x + 30 THEN
t% = 150
END IF


END IF

IF t% = 151 THEN
IF fighter(1).x > fighter(2).x THEN fighter(1).dir = "l" ELSE fighter(1).dir = "r"
fighter(1).anim = "punt "
fighter(1).frame = 1
END IF

IF t% <= 150 THEN
fighter(2).anim = "down "
fighter(2).frame = 1
END IF

IF t% <= 530 AND t% >= 510 THEN
fighter(2).anim = "hit3 "
fighter(2).frame = 1
IF t% = 515 THEN
FOR i% = 7 TO 10
fighter(i%).anim = "run  "
NEXT i%
END IF
END IF

IF t% = 534 THEN
fighter(2).kind = 0
fighter(7).kind = 0
fighter(8).kind = 0
fighter(9).kind = 0
fighter(10).kind = 0
loadbg "bg4"
fighter(1).x = 160
fighter(1).z = 100
fighter(3).x = 270
fighter(3).z = 100
fighter(4).x = 10
fighter(4).z = 70
fighter(5).x = 210
fighter(5).z = 70
fighter(6).x = 110
fighter(6).z = 130
scrol% = 0
EXIT SUB
END IF

END IF



IF s% = 7 THEN

future.emsput scrol%, 0, bg1%

IF t% <= 30 OR t% > 197 THEN
IF TIMER - musictimer! >= 56.3 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF
END IF

IF t% >= 31 AND t% <= 197 THEN
IF t% = 31 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
fighter(1).kind = 2
fighter(1).life = 500
fighter(1).x = -60
scrol% = -320
fighter(1).dir = "r"
fighter(1).anim = "walk "
fighter(1).frame = 1
fighter(1).z = 80
END IF

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF t% = 37 THEN
initiate 13, 320, 75
fighter(2).dir = "l"
fighter(2).frame = 1
END IF

IF t% <= 80 THEN fighter(1).anim = "walk "

IF t% > 38 AND t% <= 70 THEN fighter(2).anim = "walk "

IF t% = 85 THEN fighter(2).dir = "r"
IF t% = 92 THEN fighter(2).dir = "l"
IF t% = 97 THEN fighter(2).dir = "r"
IF t% = 100 THEN fighter(2).dir = "l"
IF t% > 130 THEN fighter(1).anim = "walk "
IF t% = 130 THEN fighter(1).frame = 1

IF t% > 160 THEN fighter(2).dir = "r"
IF t% = 173 THEN fighter(2).frame = 1
IF t% <= 180 AND t% >= 173 THEN fighter(2).anim = "walk "
IF t% = 185 THEN
fighter(2).anim = "hit3 "
fighter(2).frame = 1
END IF
IF t% = 197 THEN fighter(2).kind = 0
END IF


IF t% >= 198 THEN

IF t% = 198 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
initiate 14, -60, 100
fighter(2).dir = "r"
fighter(2).frame = 1
fighter(1).kind = 1
fighter(1).x = 260
fighter(1).z = 100
fighter(1).dir = "l"
fighter(1).anim = "look "
scrol% = -120
END IF

IF t% > 220 AND t% <= 245 THEN fighter(2).anim = "walk "

IF t% = 246 THEN fighter(2).anim = "look2 "


END IF

IF t% = 1 THEN
fighter(1).anim = "look "
fighter(1).frame = 1
fighter(1).kind = 1
END IF
IF t% <= 25 THEN fighter(1).anim = "look "

IF t% = 260 THEN EXIT SUB

END IF












IF s% = 6 THEN

future.emsput scrol%, 0, bg1%

IF t% = 120 THEN
IF s% = 6 THEN LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF

IF t% > 200 THEN
IF TIMER - musictimer! >= 56.3 THEN
LoadWAV "start.wav", 8000
musictimer! = TIMER
END IF
END IF

IF t% = 220 THEN
initiate 3, -50, 100
initiate 4, -50, 70
initiate 3, 320, 100
initiate 4, 320, 70
FOR i% = 2 TO 5
fighter(i%).anim = "idle "
fighter(i%).frame = 1
fighter(i%).dir = "r"
NEXT i%
END IF

IF t% = 1 THEN
fighter(1).kind = 1
fighter(1).life = 500
fighter(1).x = 250
fighter(1).z = 100
fighter(1).dir = "r"
fighter(1).frame = 1
scrol% = -320
END IF


IF t% <= 80 THEN fighter(1).anim = "look "

IF t% = 50 THEN fighter(1).dir = "l"

IF t% > 81 AND t% <= 190 THEN
fighter(1).anim = "walk "
IF t% = 82 THEN fighter(1).frame = 1
scrol% = scrol% + 2
fighter(1).x = fighter(1).x + 1
END IF

IF t% = 196 THEN fighter(1).dir = "r"


IF t% = 250 THEN EXIT SUB


END IF



IF s% = 5 THEN
future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF t% = 1 THEN
fighter(1).kind = 2
initiate 6, fighter(2).x, fighter(2).z
fighter(2).dir = "l"
IF fighter(2).z = 0 THEN
fighter(2).x = 200
fighter(2).z = 90
END IF
IF fighter(1).z > 100 THEN fighter(1).z = 90
fighter(2).anim = "down "
fighter(2).frame = 1
fighter(1).frame = 1
END IF

IF t% < 100 THEN

IF fighter(2).x > 260 AND scrol% > -320 THEN
scrol% = scrol% - 1
fighter(2).x = fighter(2).x - 2
END IF

IF fighter(2).x < 60 AND scrol% < 0 THEN
scrol% = scrol% + 1
fighter(2).x = fighter(2).x + 2
END IF

IF fighter(1).z > fighter(2).z THEN fighter(1).z = fighter(1).z - 1
IF fighter(1).z < fighter(2).z THEN fighter(1).z = fighter(1).z + 1


fighter(2).anim = "down "
IF fighter(1).x > fighter(2).x - 30 THEN
fighter(1).anim = "walk "
fighter(1).dir = "l"
END IF

IF fighter(1).x < fighter(2).x - 30 THEN
fighter(1).anim = "walk "
fighter(1).dir = "r"
END IF
IF fighter(1).x >= fighter(2).x - 30 AND fighter(1).x <= fighter(2).x - 27 THEN
fighter(1).dir = "r"
fighter(1).anim = "idle "
END IF
END IF


IF t% = 120 THEN
fighter(1).anim = "punt "
fighter(1).frame = 1
END IF

IF t% > 135 AND t% <= 300 THEN
fighter(1).dir = "l"
IF t% = 135 THEN fighter(1).frame = 1
fighter(1).anim = "walk "
IF scrol% > -320 THEN
scrol% = scrol% - 3
fighter(1).x = fighter(1).x - 3
END IF
IF scrol% > 320 THEN scrol% = 320
END IF

IF t% = 150 THEN fighter(2).kind = 0

IF t% = 300 THEN
fighter(1).x = 133 + scrol%
fighter(1).z = 69
fighter(1).anim = "sit  "
fighter(1).dir = "r"
fighter(1).frame = 1
END IF

IF t% > 300 THEN
IF scrol% < 0 THEN
scrol% = scrol% + 2
fighter(1).x = fighter(1).x + 2
END IF
IF scrol% >= -10 THEN
IF NOT fighter(1).anim = "order" THEN fighter(1).frame = 1
fighter(1).anim = "order"
END IF
IF fighter(1).anim = "order" AND fighter(1).frame > 12 THEN EXIT SUB
END IF

END IF

IF s% = 4 THEN
future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

IF t% = 1 THEN
fighter(1).kind = 2
IF fighter(1).z > 100 THEN fighter(1).z = 90
initiate 6, 320, fighter(1).z
fighter(2).frame = 1
fighter(1).frame = 1
END IF


IF t% <= 50 THEN

fighter(1).dir = "l"

IF fighter(1).x > 40 THEN fighter(1).anim = "walk "
END IF


IF t% >= 36 AND t% <= 51 THEN
IF t% = 36 THEN fighter(2).frame = 1
fighter(2).anim = "walk "
fighter(2).dir = "l"
END IF

IF t% = 52 THEN fighter(1).dir = "r"

IF t% = 70 THEN EXIT SUB

END IF


IF s% = 3 THEN



future.emsput scrol%, 0, bg1%

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF


IF t% = 1 THEN
initiate 5, fighter(2).x, fighter(2).z
IF fighter(2).z = 0 THEN
fighter(2).x = 180
fighter(2).z = 100
fighter(2).dir = "l"
END IF
initiate 3, -60, fighter(1).z
fighter(3).frame = 1
END IF

IF t% < 100 THEN
IF fighter(2).x > 260 AND scrol% > -320 THEN
scrol% = scrol% - 1
fighter(2).x = fighter(2).x - 2
END IF

IF fighter(2).x < 60 AND scrol% < 0 THEN
scrol% = scrol% + 1
fighter(2).x = fighter(2).x + 2
END IF


IF fighter(1).x > 20 THEN
fighter(1).dir = "l"
fighter(1).anim = "walk "
END IF

IF fighter(1).x < 17 THEN
fighter(1).dir = "r"
fighter(1).anim = "walk "
END IF

IF fighter(1).x <= 20 AND fighter(1).x >= 17 THEN
fighter(1).dir = "r"
t% = 100
END IF
END IF

IF t% < 140 THEN fighter(2).anim = "down "
IF t% >= 131 AND t% <= 160 THEN
fighter(2).anim = "look "
fighter(2).frame = 1
END IF
IF t% = 161 THEN
fighter(2).anim = "getup"
END IF
IF t% = 170 THEN
fighter(2).anim = "look2"
fighter(2).frame = 1
END IF
IF t% > 135 AND t% < 155 THEN
fighter(3).anim = "walk "
fighter(3).dir = "r"
IF t% = 135 THEN fighter(3).frame = 1
END IF
IF t% = 155 THEN
fighter(3).anim = "club "
fighter(3).frame = 1
END IF

IF t% = 169 THEN
IF fighter(2).x > fighter(1).x THEN fighter(2).dir = "l" ELSE fighter(2).dir = "r"
END IF

IF t% = 185 THEN
loadbg "bg1"
fighter(1).kind = 2
fighter(1).life = 500
scrol% = 0
fighter(1).x = 133
fighter(1).z = 69
fighter(1).anim = "sit  "
fighter(1).dir = "r"
fighter(1).frame = 1
fighter(2).kind = 0
fighter(3).kind = 0
END IF

IF t% = 193 THEN
fighter(1).anim = "order"
fighter(1).frame = 1
END IF

IF t% = 250 THEN
initiate 5, 370, 86
initiate 3, 450, 79
initiate 4, 420, 89
initiate 3, 510, 100
initiate 4, 480, 99
FOR i% = 2 TO 6
fighter(i%).dir = "l"
NEXT i%
END IF

IF t% >= 250 AND t% <= 300 OR t% > 370 AND t% < 420 OR t% >= 490 AND t% <= 540 THEN
scrol% = scrol% - 5
FOR i% = 1 TO 6
fighter(i%).x = fighter(i%).x - 5
NEXT i%
END IF

IF t% >= 310 AND t% <= 360 OR t% >= 430 AND t% <= 480 THEN
scrol% = scrol% + 5
FOR i% = 1 TO 6
fighter(i%).x = fighter(i%).x + 5
NEXT i%
END IF


IF t% = 300 THEN
fighter(2).anim = "look2"
fighter(2).frame = 1
END IF

IF t% = 350 OR t% = 460 THEN
fighter(1).anim = "sitl "
fighter(1).frame = 1
END IF

IF t% = 380 OR t% = 480 THEN
fighter(1).anim = "order"
fighter(1).frame = 1
END IF

IF t% = 545 THEN
fighter(2).anim = "run  "
fighter(2).frame = 1
END IF

IF t% = 580 THEN
fighter(2).anim = "idle "
fighter(2).z = fighter(1).z
fighter(2).x = -60
END IF

IF t% = 590 THEN
fighter(2).anim = "hitb2"
fighter(2).frame = 1
END IF

IF t% = 630 THEN
fighter(2).anim = "getup"
fighter(2).frame = 1
END IF

IF t% = 640 OR t% = 650 OR t% = 660 OR t% = 670 THEN fighter(2).dir = "l"
IF t% = 645 OR t% = 655 OR t% = 665 OR t% = 675 THEN fighter(2).dir = "r"

IF t% = 690 THEN
fighter(2).dir = "r"
fighter(2).anim = "run  "
fighter(2).frame = 1
END IF

IF t% = 729 THEN fighter(2).kind = 0

IF t% = 730 THEN
FOR i% = 1 TO 6
fighter(i%).frame = 1
NEXT i%
EXIT SUB
END IF

       


END IF

IF s% = 2 THEN

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF

future.emsput scrol%, 0, bg1%

IF t% = 1 THEN
initiate 5, 340, 110
fighter(2).dir = "l"
fighter(2).frame = 1
fighter(1).frame = 1
END IF

fighter(2).dir = "l"
IF t% < 100 THEN
fighter(1).dir = "r"
fighter(1).anim = "walk2"
IF fighter(1).x > 160 AND fighter(1).x > 162 THEN fighter(1).x = fighter(1).x - 2
IF fighter(1).x < 160 AND fighter(1).x < 162 THEN fighter(1).x = fighter(1).x + 2
IF fighter(1).z > 110 THEN fighter(1).z = fighter(1).z - 1
IF fighter(1).z < 110 THEN fighter(1).z = fighter(1).z + 1
IF fighter(1).x >= 160 AND fighter(1).x <= 162 THEN t% = 100
END IF

IF t% > 100 AND t% < 130 THEN fighter(2).anim = "walk "

IF t% = 140 THEN
fighter(2).anim = "look2"
fighter(2).frame = 1
END IF

IF t% = 160 THEN
EXIT SUB
fighter(2).frame = 1
END IF

END IF




IF s% = 1 THEN

IF TIMER - musictimer! >= 101.17 THEN
LoadWAV "rcr.wav", 8000
musictimer! = TIMER
END IF


future.emsput scrol%, 0, bg1%

IF t% = 1 THEN
scrol% = -100
initiate 2, 410, 69
initiate 5, 340, 100
initiate 4, -100, 86
initiate 3, 390, 130
initiate 4, -80, 130
initiate 3, 400, 80

fighter(1).dir = "l"
fighter(2).dir = "r"
fighter(3).dir = "l"
fighter(4).dir = "r"
fighter(5).dir = "l"
fighter(6).dir = "r"
fighter(7).dir = "l"

fighter(1).x = 450
fighter(1).z = 81
END IF

IF t% <= 100 THEN
fighter(1).dir = "l"
fighter(2).dir = "l"
fighter(1).anim = "walk "
fighter(2).anim = "walk "
scrol% = scrol% + 1
END IF

IF t% = 103 THEN
fighter(2).anim = "look "
fighter(2).frame = 1
END IF

IF t% = 122 THEN fighter(2).dir = "r"

IF t% = 140 THEN fighter(2).dir = "l"

IF t% >= 140 AND t% <= 150 THEN
fighter(1).anim = "walk "
fighter(2).anim = "walk "
IF t% = 140 THEN
fighter(1).frame = 1
fighter(1).frame = 1
END IF
END IF

IF t% > 126 AND t% <= 155 THEN fighter(3).anim = "walk "

IF t% = 163 THEN
fighter(1).dir = "r"
fighter(2).dir = "r"
END IF

IF t% > 190 AND t% < 235 THEN
fighter(4).anim = "walk "
fighter(5).anim = "walk "
fighter(6).anim = "walk "
fighter(7).anim = "walk "
END IF

IF t% > 200 AND t% < 220 THEN
fighter(1).anim = "walk "
fighter(2).anim = "walk "
fighter(1).z = fighter(1).z + 1
fighter(2).z = fighter(2).z + 1
IF t% = 201 THEN
fighter(1).frame = 1
fighter(2).frame = 1
END IF
END IF

IF t% >= 260 AND t% < 268 THEN
fighter(2).dir = "l"
fighter(2).anim = "walk "
IF t% = 260 THEN fighter(2).frame = 1
IF fighter(2).z < fighter(4).z THEN fighter(2).z = fighter(2).z - 1
END IF

IF t% = 281 THEN
fighter(2).anim = "tack3"
fighter(2).frame = 1
END IF
IF t% = 295 THEN
fighter(2).anim = "run  "
fighter(2).frame = 1
END IF
IF t% = 300 THEN
fighter(2).anim = "punt "
fighter(2).frame = 1
END IF

IF t% = 300 THEN
FOR i% = 1 TO 7
fighter(i%).dir = "l"
NEXT i%
fighter(4).dir = "r"
END IF
IF t% = 320 THEN fighter(2).dir = "r"
IF t% >= 330 THEN
fighter(2).dir = "l"
fighter(2).anim = "walk "
IF t% = 330 THEN fighter(2).frame = 1
END IF

IF t% = 335 THEN
fighter(1).dir = "r"
fighter(6).dir = "r"
END IF

IF t% = 360 THEN fighter(2).kind = 0
IF t% = 360 THEN fighter(4).kind = 0

IF t% > 355 THEN
fighter(3).dir = "r"
fighter(3).anim = "run  "
IF t% = 356 THEN fighter(3).frame = 1
END IF

IF t% = 379 THEN fighter(3).kind = 0
IF t% = 380 THEN
fighter(5).frame = 1
fighter(6).frame = 1
fighter(7).frame = 1
EXIT SUB
END IF

END IF

FOR n% = 60 TO 135
FOR d% = 1 TO 10
IF fighter(d%).z = n% AND fighter(d%).kind > 0 THEN animate d%
NEXT d%
NEXT n%

FOR i% = 1 TO 10
collision i%
NEXT i%


t% = t% + 1

        SetMaskColor -1
Future.EMSGet 0, 0, 320, 200, bg3%
           
        viewpage 1
        setpage 0
        future.emsput 0, 0, bg3%
        viewpage 0

IF s% = 1 THEN
IF t% = 110 THEN talk "Riki: ......."
IF t% = 115 THEN talk "Yu...  Ru...  Da..."
IF t% = 120 THEN talk "I don't know this one."
IF t% = 125 THEN talk "Kunio, do you know who this is?"
IF t% = 130 THEN talk "Kunio: no."
IF t% = 158 THEN talk "Yuruda: I'm Yuruda!"
IF t% = 165 THEN talk "Yuruda: And you two are on my turf!"
IF t% = 170 THEN talk "Riki: ??? who?"
IF t% = 175 THEN talk "Yuruda: I understand if you don't  know me."
IF t% = 180 THEN talk "I'm the new leader of this area!"
IF t% = 185 THEN talk "I've already gotten rid of Ryuuta  and Daiki..."
IF t% = 190 THEN talk "so I suggest you give up now and   save me the trouble of"
IF t% = 195 THEN talk "beating you two senseless!!"
IF t% = 200 THEN talk "Kunio: you dare challenge us?"
IF t% = 235 THEN talk "Yuruda: That's right! look around!"
IF t% = 240 THEN talk "You're completely surrounded! you    have no hope of escape!"
IF t% = 250 THEN talk "Riki: ......"
IF t% = 255 THEN talk "surrounded?"
IF t% = 319 THEN talk "Yuruda: !!!"
IF t% = 325 THEN talk "Riki: Kunio. I'm going to get      something to eat."
IF t% = 340 THEN talk "Yuruda: Ha Ha! your friend           abandoned you!"
IF t% = 345 THEN talk "Now you have no chance!!"
IF t% = 350 THEN talk "Kunio: ....."
END IF

IF s% = 2 THEN
IF t% = 135 THEN talk "Yuruda: What!!"
IF t% = 140 THEN talk " you beat them all?!! "
IF t% = 145 THEN talk "I'm surprised.... but I know I can get you with my killer technique!"
IF t% = 150 THEN talk "Kunio: ......."
IF t% = 155 THEN talk "Yuruda: I'm the number one rowdy       here! Let's go!"
END IF

IF s% = 3 THEN
IF t% = 103 THEN talk "Yuruda: .... wait...."
IF t% = 105 THEN talk "Kunio: What is it?"
IF t% = 110 THEN talk "Yuruda: I want to make you an offer..."
IF t% = 115 THEN talk "Kunio: ...."
IF t% = 120 THEN talk "Yuruda: I haven't... shown you...  my final technique..."
IF t% = 125 THEN talk "it will... guarantee my control of this ... area..."
IF t% = 130 THEN talk "Kunio: what is it?"
IF t% = 135 THEN talk "Yuruda: name your price... I will  give you as much money as you want."
IF t% = 140 THEN talk "Kunio: Don't insult me."
IF t% = 145 THEN talk "Yuruda: What?!"
IF t% = 150 THEN talk "Kunio: I will beat on your face    until you leave this area!!!"
IF t% = 170 THEN talk "Yuruda: Ha Ha!! you think you're   worthy of me?!! I'll show you how"
IF t% = 175 THEN talk "pathetic you are!!"
IF t% = 186 THEN future.fillbox 0, 0, 320, 200, 16
IF t% = 186 THEN talk "meanwhile.... 30 minutes later"
IF t% = 302 THEN talk "Yuruda: Hey!"
IF t% = 304 THEN talk "I thought I'd find you here!"
IF t% = 306 THEN talk "you can never hope to escape my     menace!!"
IF t% = 420 THEN talk "Yuruda:don't think you can ignore   me!"
IF t% = 425 THEN talk "your friend already learned his       lesson!"
IF t% = 540 THEN talk "Yuruda:Don't ignore me!!"
IF t% = 680 THEN talk "Yuruda: Don't think so light of me!"
IF t% = 685 THEN talk "I bought a new fighter that can     even take on you!!!"
IF t% = 687 THEN talk "right now, your friend Kunio is      "
IF t% = 689 THEN talk "learning what happens when you mess with me!"
IF t% = 690 THEN talk "....."
END IF

IF s% = 4 THEN
IF t% = 51 THEN talk "Katsu: wait."
IF t% = 55 THEN talk "Yuruda paid me good money to be his   new number one ace."
IF t% = 60 THEN talk "let me show you what I can do."
END IF

IF s% = 5 THEN
IF t% = 102 THEN talk "Riki: Where's Kunio?"
IF t% = 107 THEN talk "Katsu: ....Yuruda..is making an ...."
IF t% = 112 THEN talk "example... out .. of him..."
IF t% = 117 THEN talk "Riki: ...."
IF t% > 300 AND fighter(1).anim = "order" AND fighter(1).frame = 12 THEN
future.fillbox 0, 0, 320, 200, 16
stopandreset
talk "meanwhile.... "
END IF
END IF

IF s% = 6 THEN
IF t% = 195 THEN talk "Kunio: ...... what is this?"
IF t% = 200 THEN fliplay 0, "open.flc"
IF t% = 205 THEN talk "Yuruda: This is your doom!!"
IF t% = 210 THEN talk "No one gets away with hurting me!"
IF t% = 215 THEN talk "I will not rest until you are      humiliated!"
IF t% = 220 THEN talk "for your first test! you have six  minutes to take on 20 men!"
IF t% = 225 THEN talk "welcome to hell!"
END IF

IF s% = 7 THEN
IF t% = 5 THEN talk "Yuruda: Very good!"
IF t% = 10 THEN talk "but that was just the warm up! now  things will get tough!"
IF t% = 15 THEN talk "Tonight! 3 special guests are       arriving!"
IF t% = 20 THEN talk "They will teach you not to mess     with me!"
IF t% = 30 THEN
loadbg "bg1"
future.fillbox 0, 0, 320, 200, 16
stopandreset
talk "meanwhile.... "
END IF

IF t% = 75 THEN talk "Godai: Riki...."
IF t% = 80 THEN talk "did you hear? Kunio is missing!"
IF t% = 85 THEN talk "Riki:so. don't worry about it."
IF t% = 101 THEN talk "Godai: some new people are running around saying they took him out!"
IF t% = 106 THEN talk "Ryuuta and Daiki heard about this. they'll come looking for you"
IF t% = 110 THEN talk "and try to get rid of you so that    they can take over the area!"
IF t% = 115 THEN talk " Riki:so. don't worry about it."
IF t% = 120 THEN talk "we'll be able to handle them."
IF t% = 186 THEN talk "Godai: we?"
IF t% = 190 THEN talk "....."
IF t% = 195 THEN talk "but I don't want to fight..."

IF t% = 197 THEN
loadbg "bg6"
future.fillbox 0, 0, 320, 200, 16
stopandreset
talk "at night.... "
END IF

IF t% = 205 THEN talk "Yuruda: the wait is over!"
IF t% = 210 THEN talk "I don't think you will be able to  overcome this new opponent!"
IF t% = 215 THEN talk "he is a devastating foe! his name    strikes fear into everyone!!"
IF t% = 216 THEN talk "or so I'm told..."
IF t% = 220 THEN talk "He is Keisuke!!! The SUPER FIGHTER!!!"
IF t% = 250 THEN talk "I've never heard of you, Kunio.      consider it an honor to be"
IF t% = 255 THEN talk "beaten by me."
END IF

IF s% = 8 THEN
IF t% = 52 THEN talk "Kunio:...what was that?"
IF t% = 180 THEN talk "Kunio: idiot..."
IF t% = 200 THEN talk "Yuruda: ...."
IF t% = 210 THEN
loadbg "bg5"
future.fillbox 0, 0, 320, 200, 16
stopandreset
talk "once again.... meanwhile.... "
END IF

IF t% = 315 THEN talk "Ryuuta: hey, Riki."
IF t% = 318 THEN talk "Riki: ..."
IF t% = 321 THEN talk "Ryuuta: Kunio's gone. I will be the new menace that will control these"
IF t% = 323 THEN talk "streets. "
IF t% = 328 THEN talk "Riki: didn't Yuruda finish you off?"
IF t% = 333 THEN talk "Ryuuta:HaHa. I beat on him and     after, I took his money!"
IF t% = 338 THEN talk "And now I need only deal with you!"
IF t% = 343 THEN talk "Riki: Fool! do not think light of  me!"
IF t% = 348 THEN talk "Me and Godai will smear your face  across the ground!"
IF t% = 350 THEN talk "Godai: ...."
IF t% = 425 THEN talk "Daiki: but can you take on both of us?!"
IF t% = 430 THEN talk "Riki: ....."
IF t% = 435 THEN talk "Godai! you deal with Daiki! I will   deal will with Ryuuta!"
END IF


IF s% = 9 THEN
IF t% = 50 THEN talk "Riki: ... Bastard"
END IF

IF s% = 10 THEN
IF t% = 110 THEN talk "Yuruda: ....."
IF t% = 115 THEN talk "this challenge won't be so easy!"
IF t% = 140 THEN talk "Katsu: your friend is very good."
IF t% = 145 THEN talk "I will not take you so lightly"
IF t% = 150 THEN talk "please let us show you what we can do."
END IF

IF s% = 11 THEN

IF t% = 20 THEN talk "Riki: .... that's finished. but how      will I find Kunio?"
IF t% = 180 THEN talk "Yuruda: Here it is! your final     opponent!"
IF t% = 185 THEN talk "You've been lucky so far! but      your   luck ends here!"
IF t% = 190 THEN talk "you have no chance of beating      her!"
IF t% = 210 THEN talk "Kunio: Misuzu?!"
IF t% = 220 THEN talk "Misuzu: Weight is the greatest       beauty."
IF t% = 225 THEN talk "let me show you the true power of    my love!!"

END IF

IF s% = 12 THEN
IF t% = 102 THEN talk "Yuruda: wait."
IF t% = 127 THEN talk "how can you never lose?!"
IF t% = 132 THEN talk "Kunio: ....."
IF t% = 137 THEN talk "Yuruda: I give up."
IF t% = 142 THEN talk " I'm sorry."
IF t% = 145 THEN talk "Kunio: ....."
IF t% = 160 THEN talk "Yuruda: ....uh ... uh.."
IF t% = 205 THEN talk "Riki: Hey, Kunio."
IF t% = 210 THEN talk "Kunio: hey."

IF t% >= 350 AND t% <= 960 THEN
future.print 160, 180 + (350 - t%), "The End", 14, -1
future.print 1, 200 + (350 - t%), "original Music and character designs:", 14, -1
future.print 140, 220 + (350 - t%), "Technos Japan", 14, -1
future.print 120, 240 + (350 - t%), "Stolen idea: Rezo", 14, -1
future.print 120, 260 + (350 - t%), "Game graphics: Rezo", 14, -1
future.print 120, 280 + (350 - t%), "Game story: Rezo", 14, -1
future.print 7, 300 + (350 - t%), "Katsu ,Yuruda, and Keisuke by Rezo", 14, -1
future.print 120, 320 + (350 - t%), "Special thanks to:", 14, -1
future.print 130, 340 + (350 - t%), "Technos Japan", 14, -1
future.print 70, 360 + (350 - t%), "for creating this series", 14, -1
future.print 60, 380 + (350 - t%), "and giving me options besides", 14, -1
future.print 140, 400 + (350 - t%), "Final Fight.", 14, -1
future.print 10, 420 + (350 - t%), "and for making games on the NES that", 14, -1
future.print 10, 440 + (350 - t%), "are greater than what we have now", 14, -1
future.print 10, 460 + (350 - t%), "Hopefully this game isn't a", 14, -1
future.print 10, 480 + (350 - t%), "bastardization of the series", 14, -1
future.print 10, 500 + (350 - t%), "also special thanx to the other", 14, -1
future.print 10, 520 + (350 - t%), "fans of the series I've come across", 14, -1
future.print 10, 540 + (350 - t%), "both of them.", 14, -1
future.print 10, 560 + (350 - t%), "especially to 'Kikesoler' who", 14, -1
future.print 10, 580 + (350 - t%), "didn't get mad when I outbid him", 14, -1
future.print 100, 600 + (350 - t%), "for Shin", 14, -1
future.print 10, 620 + (350 - t%), "and sent him an email asking what", 14, -1
future.print 100, 640 + (350 - t%), "the game was.", 14, -1
future.print 10, 660 + (350 - t%), "and to 'Defineemsarray'", 14, -1
future.print 10, 680 + (350 - t%), "Future library's #1 command!", 14, -1
future.print 10, 700 + (350 - t%), "......", 14, -1
future.print 10, 720 + (350 - t%), "alright... .credits are done.", 14, -1
future.print 10, 740 + (350 - t%), "hope you had fun.", 14, -1
END IF


END IF

del
GOTO 5

END SUB

SUB talk (tk$)

SHARED joy%

t1$ = LEFT$(tk$, 35)
t2$ = MID$(tk$, 36, LEN(tk$))

future.fillbox 0, 170, 320, 200, 15
future.fillbox 2, 172, 318, 198, 1

future.print 4, 173, t1$, 15, -1
future.print 4, 183, t2$, 15, -1

f% = 0

FOR i% = 1 TO 10
del
NEXT i%


WHILE f% < 1
IF GetKey(57) THEN f% = 1
WEND




END SUB

