2020-05-31 09:42:40 +01:00
|
|
|
; L1012.asm library
|
2020-05-31 04:23:06 +01:00
|
|
|
; Generated 04.10.2001 by mlevel
|
|
|
|
; Modified 04.10.2001 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
|
|
|
|
|
|
|
STATE_NORMAL EQU 1
|
|
|
|
STATE_READBOOK EQU 2
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
SECTION "Level1012Section",ROMX
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
dialog:
|
2020-05-31 09:42:40 +01:00
|
|
|
L1012_hero_readbook_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L1012_hero_readbook.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
L1012_Contents::
|
|
|
|
DW L1012_Load
|
|
|
|
DW L1012_Init
|
|
|
|
DW L1012_Check
|
|
|
|
DW L1012_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Load
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L1012_Load:
|
|
|
|
DW ((L1012_LoadFinished - L1012_Load2)) ;size
|
|
|
|
L1012_Load2:
|
|
|
|
call ParseMap
|
|
|
|
ret
|
|
|
|
|
|
|
|
L1012_LoadFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Map
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L1012_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L1012_library.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Init
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L1012_Init:
|
|
|
|
DW ((L1012_InitFinished - L1012_Init2)) ;size
|
|
|
|
L1012_Init2:
|
|
|
|
STDSETUPDIALOG
|
|
|
|
ret
|
|
|
|
|
|
|
|
L1012_InitFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Check
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L1012_Check:
|
|
|
|
DW ((L1012_CheckFinished - L1012_Check2)) ;size
|
|
|
|
L1012_Check2:
|
|
|
|
call ((.checkAtBook-L1012_Check2)+levelCheckRAM)
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkAtBook
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_READBOOK
|
|
|
|
ret z
|
|
|
|
|
|
|
|
ld hl,((.checkHeroAtBook-L1012_Check2)+levelCheckRAM)
|
|
|
|
xor a
|
|
|
|
call CheckEachHero
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkHeroAtBook
|
|
|
|
ld c,a
|
|
|
|
call GetFirst
|
|
|
|
call GetCurZone
|
|
|
|
cp 2
|
|
|
|
jr z,.atBook
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.atBook
|
|
|
|
call MakeIdle
|
|
|
|
ld de,((.afterDialog-L1012_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
call SetSpeakerFromHeroIndex
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L1012_hero_readbook_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtBottom
|
|
|
|
|
|
|
|
.afterDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
call MakeNonIdle
|
|
|
|
ld a,STATE_READBOOK
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
ld a,1
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
L1012_CheckFinished:
|
2022-01-08 03:29:25 +00:00
|
|
|
PRINT "1012 Script Sizes (Load/Init/Check) (of $500): "
|
|
|
|
PRINT (L1012_LoadFinished - L1012_Load2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L1012_InitFinished - L1012_Init2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L1012_CheckFinished - L1012_Check2)
|
|
|
|
PRINT "\n"
|
2020-05-31 04:23:06 +01:00
|
|
|
|