'Battle Mechanics Animation Department Ver .001
'DATE 7/7/20
'Beta Screening at QB64-Con 2020 XD
DIM SHARED Mix&
, BeachBattleLayer&
, SeaBattleLayer&
, WingedEye&
, BatFrame%%
MFI_Loader "BattleSample.MFI"
ON TIMER(BatTime&
, .125) ChangeFrame
_SNDVOL Ambi&
, .2 'back ground ambience volume _SNDVOL Battle&
, .75 'battle music volume _SNDSETPOS Battle&
, 15 'jump here at start of battle _DELAY .75 'lets make sure everything is loaded and going first TIMER(BatTime&
) ON 'LOOK MOM IT MOVES BY ITSELF!
'change the REMed out line to see each type of water battle background screen animation
' SeaBattleBackground
BeachBattleBackground
SUB BeachBattleBackground
Frame%% = 0
Wavein%% = -1
Waveout%% = 0
_PUTIMAGE (64, 328)-STEP(511, 95), BeachBattleLayer&
, Mix&
, (0, 144 + (48 * Frame%%
))-STEP(255, 47) Display_Bat
IF Count%%
< 15 THEN 'each frame of animation stays for 16 frames of time Count%% = Count%% + 1
Count%% = 0
IF Frame%%
< 6 THEN Frame%%
= Frame%%
+ 1 ELSE Wavein%%
= 0: Waveout%%
= -1 IF Frame%%
> 0 THEN Frame%%
= Frame%%
- 1 ELSE Wavein%%
= -1: Waveout%%
= 0
'-----------------------------Sea Battle Background Animation-----------------------------
Frame%% = 0
_PUTIMAGE (64, 256)-STEP(511, 175), SeaBattleLayer&
, Mix&
, (0, 104 + (88 * Frame%%
))-STEP(255, 87) Display_Bat
IF Count%%
< 11 THEN 'each frame of animation stays for 12 frames of time Count%% = Count%% + 1
Count%% = 0
IF Frame%%
< 8 THEN Frame%%
= Frame%%
+ 1 ELSE Frame%%
= 0
BatFrame%% = BatFrame%% - 1
BatFrame%% = BatFrame%% + 1
IF BatFrame%%
= 3 THEN Flap%%
= TRUE
IF BatFrame%%
= 0 THEN Flap%%
= FALSE
GET #1, , c~%%
'retrieve number of files FOffset&(I~%%) = FOffset&(I~%%) + 1
WingedEye& = LoadGFX(FOffset(1), Size(1)) 'winged eye monster sprite sheet sample
BeachBattleLayer& = LoadGFX(FOffset(2), Size(2)) 'beach battle background animation sheet
SeaBattleLayer& = LoadGFX(FOffset(3), Size(3)) 'Sea battle background animation sheet
Battle& = LoadSFX(FOffset(4), Size(4)) 'Battle Theme
Ambi& = LoadSFX(FOffset(5), Size(5)) 'Ocean wave ambience
FUNCTION LoadFFX&
(Foff&
, Size&
, Fize%%
) LoadFFX&
= _LOADFONT("temp.dat", Fize%%
, "monospace")