'Dark House demo test
'UniKorn ProDucKions 2020
MFI_Loader "DarkHouse.MFI"
i%% = 2
'scale factors 1.22x by 1.12y
' IF MouseTest(_MOUSEX, _MOUSEY) = 64 THEN 'see if the mouse is over the figurine
CASE 64 'right side figurine j%% = j%% + 1
IF j%%
= 6 THEN i%%
= i%%
+ 1: j%%
= 0 MouseOverFlag%% = TRUE 'flag the fact that the mouse is over animation
j%% = j%% + 1
IF j%%
= 6 THEN i%%
= i%%
+ 1: j%%
= 0 _PUTIMAGE (815, 304)-STEP(126, 199), DoorRT
(i%%
), Mix
'play animation MouseOverFlag%% = TRUE 'flag the fact that the mouse is over animation
ELSE 'play door opening animation j%% = j%% + 1
IF j%%
= 25 THEN i%%
= i%%
+ 1: j%%
= 0 IF i%%
= 6 THEN i%%
= 2: OpenDoorFlag%%
= FALSE
_PUTIMAGE (815, 304)-STEP(126, 199), DoorRTOpen
(i%%
), Mix
'play animation MouseOverFlag%% = TRUE 'flag the fact that the mouse is over animation
OpenDoorFlag%% = TRUE: j%% = 0: i%% = 1
j%% = j%% + 1
IF j%%
= 6 THEN i%%
= i%%
+ 1: j%%
= 0 _PUTIMAGE (0, 306)-STEP(124, 197), DoorLT
(i%%
), Mix
'play animation MouseOverFlag%% = TRUE 'flag the fact that the mouse is over animation
Mouseovereflag%% = FALSE 'disable flag for mouse over
' IF MouseOverFlag%% AND _MOUSEBUTTON(1) THEN
' IF NOT PlaySoundFlag%% THEN _SNDPLAY SFX(0): PlaySoundFlag%% = TRUE
' END IF
GET #1, , c~%%
'retrieve number of files FOffset&(I~%%) = FOffset&(I~%%) + 1
L1 = LoadGFX(FOffset(1), Size(1)) '_LOADIMAGE("scenes\haunted_house_by_arty_stock.png", 32)
FOR i%%
= 0 TO 5 'loading figurine F(i%%) = LoadGFX(FOffset(2 + i%%), Size(2 + i%%)) '_LOADIMAGE("scenes\animations\Rt_Stair_figure_000.bmp", 32)
SFX(0) = LoadSFX(FOffset(8), Size(8)) '_SNDOPEN("AudioFX\Human\Female\Screams\Screams.wav")
FOR i%%
= 0 TO 5 'loading Right side Door DoorRT(i%%) = LoadGFX(FOffset(9 + i%%), Size(9 + i%%)) '_LOADIMAGE("scenes\animations\Rt_Stair_figure_000.bmp", 32)
FOR i%%
= 0 TO 5 'loading left side Door DoorLT(i%%) = LoadGFX(FOffset(15 + i%%), Size(15 + i%%)) '_LOADIMAGE("scenes\animations\Rt_Stair_figure_000.bmp", 32)
FOR i%%
= 1 TO 5 'loading Right side Door opening DoorRTOpen(i%%) = LoadGFX(FOffset(20 + i%%), Size(20 + i%%)) '_LOADIMAGE("scenes\animations\Rt_Stair_figure_000.bmp", 32)
SFX(1) = LoadSFX(FOffset(26), Size(26)) 'door opening creak
FUNCTION LoadFFX&
(Foff&
, Size&
, Fize%%
) LoadFFX&
= _LOADFONT("temp.dat", Fize%%
, "monospace")