2020-05-31 09:42:40 +01:00
|
|
|
; L0003.asm green pastures big sheep pen
|
2020-05-31 04:23:06 +01:00
|
|
|
; Generated 08.26.2000 by mlevel
|
|
|
|
; Modified 08.26.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
|
|
|
|
|
|
|
BLUE_INDEX EQU 49
|
|
|
|
|
|
|
|
STATE_NORMAL EQU 1
|
|
|
|
STATE_TALKED1 EQU 2
|
|
|
|
STATE_TALKED2 EQU 3
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
SECTION "Level0003Section",ROMX
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
dialog:
|
2020-05-31 09:42:40 +01:00
|
|
|
L0003_wolves_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0003_wolves.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0003_shootfast_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0003_shootfast.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0003_hero_jeb_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0003_hero_jeb.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0003_nevermind_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0003_nevermind.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0003_aboutjeb_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0003_aboutjeb.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
L0003_Contents::
|
|
|
|
DW L0003_Load
|
|
|
|
DW L0003_Init
|
|
|
|
DW L0003_Check
|
|
|
|
DW L0003_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Load
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0003_Load:
|
|
|
|
DW ((L0003_LoadFinished - L0003_Load2)) ;size
|
|
|
|
L0003_Load2:
|
|
|
|
call ParseMap
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0003_LoadFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Map
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0003_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L0003_green.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Init
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0003_Init:
|
|
|
|
DW ((L0003_InitFinished - L0003_Init2)) ;size
|
|
|
|
L0003_Init2:
|
|
|
|
STDSETUPDIALOG
|
|
|
|
|
|
|
|
ld bc,classCowboy
|
|
|
|
ld de,classCowboyTalker
|
|
|
|
call ChangeFirstClass
|
|
|
|
|
|
|
|
ld a,BLUE_INDEX
|
|
|
|
ld [dialogBalloonClassIndex],a
|
|
|
|
ld a,%0011
|
|
|
|
call DisableDialogBalloons
|
|
|
|
|
|
|
|
ld a,STATE_NORMAL
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
ld a,BANK(cowboy_gbm)
|
|
|
|
ld hl,cowboy_gbm
|
|
|
|
call InitMusic
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0003_InitFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Check
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0003_Check:
|
|
|
|
DW ((L0003_CheckFinished - L0003_Check2)) ;size
|
|
|
|
L0003_Check2:
|
|
|
|
call ((.checkDialog-L0003_Check2)+levelCheckRAM)
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkDialog
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_TALKED2
|
|
|
|
jr c,.dialogOkay
|
|
|
|
|
|
|
|
ld a,$ff
|
|
|
|
call DisableDialogBalloons
|
|
|
|
ret
|
|
|
|
|
|
|
|
.dialogOkay
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
|
|
|
|
call MakeIdle
|
|
|
|
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_TALKED1
|
|
|
|
jr z,.talkAboutJeb
|
|
|
|
|
|
|
|
ld de,((.afterWolfDialog-L0003_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
ld a,[dialogNPC_heroIndex]
|
|
|
|
ld c,a
|
|
|
|
call SetSpeakerFromHeroIndex
|
|
|
|
|
|
|
|
;Warn about wolves
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
ld c,a
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0003_wolves_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtTop
|
|
|
|
call ClearDialog
|
|
|
|
|
|
|
|
.afterWolfDialog
|
|
|
|
call ClearDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
|
|
|
|
call MakeNonIdle
|
|
|
|
ld a,STATE_TALKED1
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld [dialogNPC_speakerIndex],a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.talkAboutJeb
|
|
|
|
ld de,((.afterJebDialog-L0003_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
ld a,[dialogNPC_heroIndex]
|
|
|
|
ld c,a
|
|
|
|
call SetSpeakerFromHeroIndex
|
|
|
|
|
|
|
|
;Out here ya gotta shoot fast
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
ld c,a
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0003_shootfast_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtTop
|
|
|
|
call ClearDialog
|
|
|
|
|
|
|
|
;Jeb?
|
|
|
|
ld a,[dialogNPC_heroIndex]
|
|
|
|
ld c,a
|
|
|
|
call SetSpeakerFromHeroIndex
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0003_hero_jeb_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtBottom
|
|
|
|
call ClearDialog
|
|
|
|
|
|
|
|
ld a,HERO_BS_FLAG
|
|
|
|
call ClassIndexIsHeroType
|
|
|
|
jr z,.notBS
|
|
|
|
|
|
|
|
;nevermind
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
ld c,a
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0003_aboutjeb_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtTop
|
|
|
|
jr .afterJebDialog
|
|
|
|
|
|
|
|
.notBS
|
|
|
|
;nevermind
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
ld c,a
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0003_nevermind_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogAtTop
|
|
|
|
|
|
|
|
.afterJebDialog
|
|
|
|
call ClearDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
|
|
|
|
call MakeNonIdle
|
|
|
|
ld a,STATE_TALKED2
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld [dialogNPC_speakerIndex],a
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0003_CheckFinished:
|
2022-01-08 03:29:25 +00:00
|
|
|
PRINT "0003 Script Sizes (Load/Init/Check) (of $500): "
|
|
|
|
PRINT (L0003_LoadFinished - L0003_Load2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L0003_InitFinished - L0003_Init2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L0003_CheckFinished - L0003_Check2)
|
|
|
|
PRINT "\n"
|
2020-05-31 04:23:06 +01:00
|
|
|
|