2020-05-31 09:42:40 +01:00
|
|
|
; L0509.asm big desert
|
2020-05-31 04:23:06 +01:00
|
|
|
; Generated 09.06.2000 by mlevel
|
|
|
|
; Modified 09.06.2000 by Abe Pralle
|
|
|
|
|
|
|
|
INCLUDE "Source/defs.inc"
|
|
|
|
INCLUDE "Source/levels.inc"
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
2020-05-31 05:07:40 +01:00
|
|
|
SECTION "Level0509Section",ROMX
|
2020-05-31 04:23:06 +01:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
L0509_Contents::
|
|
|
|
DW L0509_Load
|
|
|
|
DW L0509_Init
|
|
|
|
DW L0509_Check
|
|
|
|
DW L0509_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Load
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0509_Load:
|
|
|
|
DW ((L0509_LoadFinished - L0509_Load2)) ;size
|
|
|
|
L0509_Load2:
|
|
|
|
call ParseMap
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0509_LoadFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Map
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0509_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L0509_bigdesert.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Init
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
WATERINDEX EQU 22
|
|
|
|
|
|
|
|
VAR_WATER EQU 0
|
|
|
|
|
|
|
|
L0509_Init:
|
|
|
|
DW ((L0509_InitFinished - L0509_Init2)) ;size
|
|
|
|
L0509_Init2:
|
|
|
|
ld a,[bgTileMap + WATERINDEX]
|
2020-05-31 04:46:09 +01:00
|
|
|
ld [levelVars + VAR_WATER],a
|
2020-05-31 04:23:06 +01:00
|
|
|
ld a,ENV_DIRT
|
|
|
|
call SetEnvEffect
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0509_InitFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Check
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0509_Check:
|
|
|
|
DW ((L0509_CheckFinished - L0509_Check2)) ;size
|
|
|
|
L0509_Check2:
|
|
|
|
call ((.animateWater-L0509_Check2)+levelCheckRAM)
|
|
|
|
ret
|
|
|
|
|
|
|
|
.animateWater
|
|
|
|
ldio a,[updateTimer]
|
2020-05-31 04:46:09 +01:00
|
|
|
swap a
|
|
|
|
and %11
|
|
|
|
ld hl,levelVars + VAR_WATER
|
|
|
|
add [hl]
|
|
|
|
ld [bgTileMap + WATERINDEX],a
|
|
|
|
ret
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
L0509_CheckFinished:
|
|
|
|
PRINTT "0509 Script Sizes (Load/Init/Check) (of $500): "
|
|
|
|
PRINTV (L0509_LoadFinished - L0509_Load2)
|
|
|
|
PRINTT " / "
|
|
|
|
PRINTV (L0509_InitFinished - L0509_Init2)
|
|
|
|
PRINTT " / "
|
|
|
|
PRINTV (L0509_CheckFinished - L0509_Check2)
|
|
|
|
PRINTT "\n"
|
|
|
|
|