Split out scene, audio fix.

This commit is contained in:
stevenhowes
2021-02-07 15:35:17 +00:00
parent 1a4dce4d49
commit dbc3945d16
2 changed files with 13 additions and 10 deletions
Binary file not shown.
+13 -10
View File
@@ -16,17 +16,15 @@ PROCtitle
PROCfinal_gfx_setup PROCfinal_gfx_setup
PROCmain PROCmain_scene1
END END
DEF PROCtitle DEF PROCtitle
MODE 4
CLS CLS
PROCdraw_sprite("intro_25",320,256) PROCdraw_sprite("intro_25",320,256)
KEY$ = GET$ KEY$ = GET$
SCREENMODE% = 25
IF KEY$ = "1" THEN IF KEY$ = "1" THEN
SCREENMODE% = 32 SCREENMODE% = 32
ENDIF ENDIF
@@ -39,6 +37,11 @@ DEF PROCtitle
ENDPROC ENDPROC
DEF PROCinitial_gfx_setup DEF PROCinitial_gfx_setup
SCREENMODE% = 4
MODE SCREENMODE%
sprite_area% = FNload_sprites("Spr") sprite_area% = FNload_sprites("Spr")
ENDPROC ENDPROC
@@ -60,17 +63,19 @@ DEF PROCfinal_gfx_setup
REM Position text cursor at graphics location REM Position text cursor at graphics location
VDU 5 VDU 5
ENDPROC ENDPROC
DEF PROCaudio_setup DEF PROCaudio_setup
VOICE 1,"Percussion-Noise" VOICES 2
VOICE 1,"WaveSynth-Beep"
VOICE 2,"Percussion-Noise"
ENDPROC ENDPROC
DEF PROCmain DEF PROCmain_scene1
REM Current graphics buffer REM Current graphics buffer
Scr% = 1 Scr% = 1
DIM PlayerLocation%(1) DIM PlayerLocation%(1)
PlayerLocation%(X) = SCREENGFXWIDTH%/2 PlayerLocation%(X) = SCREENGFXWIDTH%/2
PlayerLocation%(Y) = SCREENGFXHEIGHT%/PlayerYHeightDivide% PlayerLocation%(Y) = SCREENGFXHEIGHT%/PlayerYHeightDivide%
@@ -125,8 +130,6 @@ DEF PROCmain
SpeckLocations%(Speck%,Y) = RND(SCREENGFXHEIGHT%) SpeckLocations%(Speck%,Y) = RND(SCREENGFXHEIGHT%)
NEXT Speck% NEXT Speck%
REPEAT REPEAT
REM Store current time and last time REM Store current time and last time
LastCents% = Cents% LastCents% = Cents%
@@ -186,7 +189,7 @@ DEF PROCplayer_ship_handle_damage
PlayerExplodeNextFrame% = TIME + 4 PlayerExplodeNextFrame% = TIME + 4
IF PlayerSprite$ = "player_ship" THEN IF PlayerSprite$ = "player_ship" THEN
DieEnd% = TIME + 150 DieEnd% = TIME + 150
SOUND 1,-5,0,50 SOUND 2,-5,0,50
ENDIF ENDIF
CASE PlayerSprite$ OF CASE PlayerSprite$ OF
WHEN "player_ship": PlayerSprite$ = "explode_shp1" WHEN "player_ship": PlayerSprite$ = "explode_shp1"
@@ -209,7 +212,7 @@ DEF PROCenemy_ship_handle_damage
FOR Enemy%=0 TO MaxEnemies% - 1 FOR Enemy%=0 TO MaxEnemies% - 1
IF EnemyHealth%(Enemy%) <= 0 THEN IF EnemyHealth%(Enemy%) <= 0 THEN
IF EnemySprites$(Enemy%) = "durno_ship2" THEN IF EnemySprites$(Enemy%) = "durno_ship2" THEN
SOUND 1,-5,0,50 SOUND 2,-5,0,50
ENDIF ENDIF
IF TIME > EnemyExplodeNextFrame%(Enemy%) THEN IF TIME > EnemyExplodeNextFrame%(Enemy%) THEN
EnemyExplodeNextFrame%(Enemy%) = TIME + 4 EnemyExplodeNextFrame%(Enemy%) = TIME + 4