2020-05-31 09:42:40 +01:00
|
|
|
;L0000.asm hive
|
2020-05-31 04:23:06 +01:00
|
|
|
;Abe Pralle 3.4.2000
|
|
|
|
|
2020-06-15 06:19:36 +01:00
|
|
|
INCLUDE "Source/Defs.inc"
|
|
|
|
INCLUDE "Source/Levels.inc"
|
|
|
|
INCLUDE "Source/Items.inc"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
STATE_NORMAL EQU 1
|
|
|
|
STATE_HONEYTAKEN EQU 2
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
SECTION "LevelsSection0000",ROMX,BANK[MAP0ROM]
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
dialog:
|
2020-05-31 09:42:40 +01:00
|
|
|
L0000_hero_honey_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0000_hero_honey.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
L0000_Contents::
|
|
|
|
DW L0000_Load
|
|
|
|
DW L0000_Init
|
|
|
|
DW L0000_Check
|
|
|
|
DW L0000_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; landing
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0000_Load:
|
|
|
|
DW ((L0000_LoadFinished - L0000_Load2)) ;size
|
|
|
|
L0000_Load2:
|
|
|
|
call ParseMap
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0000_LoadFinished:
|
|
|
|
|
|
|
|
L0000_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L0000_hive.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;gtx_intro: INCBIN "Data/Dialog/Landing/intro.gtx"
|
|
|
|
;gtx_intro2: INCBIN "Data/Dialog/Landing/intro2.gtx"
|
|
|
|
;gtx_finished: INCBIN "Data/Dialog/Landing/finished.gtx"
|
|
|
|
;gtx_finished2: INCBIN "Data/Dialog/Landing/finished2.gtx"
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0000_Init:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
DW ((L0000_InitFinished - L0000_Init2)) ;size
|
|
|
|
L0000_Init2:
|
|
|
|
call State0To1
|
|
|
|
|
|
|
|
STDSETUPDIALOG
|
|
|
|
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_HONEYTAKEN
|
|
|
|
jr nz,.done
|
|
|
|
|
|
|
|
;remove honey from map
|
|
|
|
ld a,MAPBANK
|
|
|
|
ldio [$ff70],a
|
|
|
|
xor a
|
|
|
|
ld [$d146],a
|
|
|
|
|
|
|
|
.done
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0000_InitFinished:
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0000_Check:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
DW ((L0000_CheckFinished - L0000_Check) - 2) ;size
|
|
|
|
L0000_Check2:
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_HONEYTAKEN
|
|
|
|
jr z,.done
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld hl,((.checkFoundHoney-L0000_Check2)+levelCheckRAM)
|
|
|
|
call CheckEachHero
|
|
|
|
.done
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkFoundHoney
|
|
|
|
ld c,a
|
|
|
|
call GetFirst
|
|
|
|
call GetCurZone
|
|
|
|
cp 2
|
|
|
|
jr z,.foundHoney
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.foundHoney
|
|
|
|
;found honey
|
|
|
|
ld de,((.afterDialog-L0000_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
call MakeIdle
|
|
|
|
|
|
|
|
call SetSpeakerFromHeroIndex
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0000_hero_honey_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtBottom
|
|
|
|
.afterDialog
|
|
|
|
call ClearDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
call MakeNonIdle
|
|
|
|
|
|
|
|
ld bc,ITEM_HONEY
|
|
|
|
call AddInventoryItem
|
|
|
|
|
|
|
|
;remove honey from map
|
|
|
|
ld a,MAPBANK
|
|
|
|
ldio [$ff70],a
|
|
|
|
xor a
|
|
|
|
ld [$d146],a
|
|
|
|
|
|
|
|
ld a,STATE_HONEYTAKEN
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
ld a,1
|
|
|
|
ret
|
|
|
|
L0000_CheckFinished:
|
|
|
|
|
|
|
|
|
2022-01-08 03:29:25 +00:00
|
|
|
PRINT " 0000 Level Check Size: "
|
|
|
|
PRINT (L0000_CheckFinished - L0000_Check2)
|
|
|
|
PRINT "/$500 bytes"
|
2020-05-31 04:23:06 +01:00
|
|
|
|