2020-05-31 09:42:40 +01:00
|
|
|
; L0311.asm
|
2020-05-31 04:23:06 +01:00
|
|
|
; Generated 10.20.2000 by mlevel
|
|
|
|
; Modified 10.20.2000 by Abe Pralle
|
|
|
|
|
2020-06-15 06:19:36 +01:00
|
|
|
INCLUDE "Source/Defs.inc"
|
|
|
|
INCLUDE "Source/Levels.inc"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
FIRST_HOLE EQU 25
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
SECTION "Level0311Section",ROMX
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
L0311_Contents::
|
|
|
|
DW L0311_Load
|
|
|
|
DW L0311_Init
|
|
|
|
DW L0311_Check
|
|
|
|
DW L0311_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Load
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0311_Load:
|
|
|
|
DW ((L0311_LoadFinished - L0311_Load2)) ;size
|
|
|
|
L0311_Load2:
|
|
|
|
call ParseMap
|
|
|
|
|
|
|
|
;alter yellow palette to purple w/black
|
|
|
|
ld a,FADEBANK
|
|
|
|
ld bc,6
|
|
|
|
ld de,gamePalette + 5*8 + 2
|
|
|
|
ld hl,((.purpleBlackPalette-L0311_Load2)+levelCheckRAM)
|
|
|
|
call MemCopy
|
|
|
|
ret
|
|
|
|
|
|
|
|
.purpleBlackPalette
|
|
|
|
DW $4008,$5192,$0000
|
|
|
|
|
|
|
|
L0311_LoadFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Map
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0311_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L0311_tower.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Init
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0311_Init:
|
|
|
|
DW ((L0311_InitFinished - L0311_Init2)) ;size
|
|
|
|
L0311_Init2:
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0311_InitFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Check
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0311_Check:
|
|
|
|
DW ((L0311_CheckFinished - L0311_Check2)) ;size
|
|
|
|
L0311_Check2:
|
|
|
|
call ((.checkFalling-L0311_Check2)+levelCheckRAM)
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkFalling
|
|
|
|
ld a,[timeToChangeLevel]
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
|
|
|
|
ld a,[exitTileIndex]
|
|
|
|
cp FIRST_HOLE
|
|
|
|
ret c
|
|
|
|
|
|
|
|
ld hl,((.fallSound-L0311_Check2)+levelCheckRAM)
|
|
|
|
call PlaySound
|
|
|
|
ld a,15
|
|
|
|
call Delay
|
|
|
|
ret
|
|
|
|
|
|
|
|
.fallSound
|
|
|
|
DB 1,$7e,$80,$f5,$00,$86
|
|
|
|
|
|
|
|
L0311_CheckFinished:
|
|
|
|
PRINTT "0311 Script Sizes (Load/Init/Check) (of $500): "
|
|
|
|
PRINTV (L0311_LoadFinished - L0311_Load2)
|
|
|
|
PRINTT " / "
|
|
|
|
PRINTV (L0311_InitFinished - L0311_Init2)
|
|
|
|
PRINTT " / "
|
|
|
|
PRINTV (L0311_CheckFinished - L0311_Check2)
|
|
|
|
PRINTT "\n"
|
|
|
|
|