2020-05-31 09:42:40 +01:00
|
|
|
; L0103.asm east farm
|
2020-05-31 04:23:06 +01:00
|
|
|
; Generated 08.27.2000 by mlevel
|
|
|
|
; Modified 08.27.2000 by Abe Pralle
|
|
|
|
|
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
|
|
|
|
|
|
|
WATERINDEX EQU 12
|
|
|
|
VAR_WATER EQU 0
|
|
|
|
|
|
|
|
STATE_NORMAL EQU 1
|
|
|
|
STATE_TALKED1 EQU 2
|
|
|
|
STATE_TALKED2 EQU 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
SECTION "Level0103Section",ROMX
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
dialog:
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_shootinfast_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_shootinfast.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_wrangling_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_wrangling.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_bs_where_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_bs_where.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_forest_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_forest.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_bs_figures_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_bs_figures.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_learn_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_learn.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_honey_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_honey.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_hero_honeyresponse_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_hero_honeyresponse.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_gethoney_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_gethoney.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_snakebitekit_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_snakebitekit.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
L0103_seenyoubefore_gtx:
|
2020-06-15 01:47:17 +01:00
|
|
|
INCBIN "Data/Dialog/Talk/L0103_seenyoubefore.gtx"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
L0103_Contents::
|
|
|
|
DW L0103_Load
|
|
|
|
DW L0103_Init
|
|
|
|
DW L0103_Check
|
|
|
|
DW L0103_Map
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Load
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0103_Load:
|
|
|
|
DW ((L0103_LoadFinished - L0103_Load2)) ;size
|
|
|
|
L0103_Load2:
|
|
|
|
call ParseMap
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0103_LoadFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Map
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0103_Map:
|
2020-05-31 09:42:40 +01:00
|
|
|
INCBIN "Data/Levels/L0103_green.lvl"
|
2020-05-31 04:23:06 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Init
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0103_Init:
|
|
|
|
DW ((L0103_InitFinished - L0103_Init2)) ;size
|
|
|
|
L0103_Init2:
|
|
|
|
ld a,[bgTileMap + WATERINDEX]
|
|
|
|
ld [levelVars + VAR_WATER],a
|
|
|
|
|
|
|
|
STDSETUPDIALOG
|
|
|
|
|
|
|
|
ld bc,classCowboy
|
|
|
|
ld de,classCowboyTalker
|
|
|
|
call ChangeFirstClass
|
|
|
|
|
|
|
|
ld a,STATE_NORMAL
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
ld a,BANK(cowboy_gbm)
|
|
|
|
ld hl,cowboy_gbm
|
|
|
|
call InitMusic
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0103_InitFinished:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; Check
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
L0103_Check:
|
|
|
|
DW ((L0103_CheckFinished - L0103_Check2)) ;size
|
|
|
|
L0103_Check2:
|
|
|
|
call ((.animateWater-L0103_Check2)+levelCheckRAM)
|
|
|
|
call ((.checkDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
ret
|
|
|
|
|
|
|
|
.checkDialog
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_TALKED2
|
|
|
|
ret nc
|
|
|
|
|
|
|
|
.dialogOkay
|
|
|
|
ld a,[dialogNPC_speakerIndex]
|
|
|
|
or a
|
|
|
|
ret z
|
|
|
|
|
|
|
|
call MakeIdle
|
|
|
|
|
|
|
|
ldio a,[mapState]
|
|
|
|
cp STATE_TALKED1
|
|
|
|
jr z,.talkAboutHoney
|
|
|
|
|
|
|
|
ld a,[dialogNPC_heroIndex]
|
|
|
|
ld c,a
|
|
|
|
call SetSpeakerFromHeroIndex
|
|
|
|
|
|
|
|
ld a,HERO_BS_FLAG
|
|
|
|
call ClassIndexIsHeroType
|
|
|
|
jr z,.shortVersion
|
|
|
|
|
|
|
|
ld bc,ITEM_BSSHOOTFAST
|
|
|
|
call HasInventoryItem
|
|
|
|
jr nz,.shortVersion
|
|
|
|
|
|
|
|
ld bc,ITEM_WRANGLING
|
|
|
|
call HasInventoryItem
|
|
|
|
jr nz,.giveUpgrade
|
|
|
|
|
|
|
|
;About wrangling iron
|
|
|
|
ld de,((.afterUpgradeDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_wrangling_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
;Where's the wrangling iron?
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_bs_where_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogHero
|
|
|
|
|
|
|
|
;under a bee hive
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_forest_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
;Typical
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_bs_figures_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogHero
|
|
|
|
jr .afterUpgradeDialog
|
|
|
|
|
|
|
|
.giveUpgrade
|
|
|
|
ld de,((.afterLearnDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
;How to shoot fast
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_learn_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
.afterLearnDialog
|
|
|
|
ld hl,bsUpgrades
|
|
|
|
set UPGRADE_BSSHOOTFAST,[hl]
|
|
|
|
|
|
|
|
ld bc,ITEM_BSSHOOTFAST
|
|
|
|
call AddInventoryItem
|
|
|
|
|
|
|
|
ld bc,ITEM_WRANGLING
|
|
|
|
call RemoveInventoryItem
|
|
|
|
jr .afterUpgradeDialog
|
|
|
|
|
|
|
|
.shortVersion
|
|
|
|
ld de,((.afterUpgradeDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
;"Jeb is my name"
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_shootinfast_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
.afterUpgradeDialog
|
|
|
|
call ClearDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
|
|
|
|
call MakeNonIdle
|
|
|
|
ld a,STATE_TALKED1
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld [dialogNPC_speakerIndex],a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.talkAboutHoney
|
|
|
|
ld bc,ITEM_SNAKEBITEKIT
|
|
|
|
call HasInventoryItem
|
|
|
|
jr nz,.hasSnakeBiteKit
|
|
|
|
|
|
|
|
ld bc,ITEM_HONEY
|
|
|
|
call HasInventoryItem
|
|
|
|
jr nz,.hasHoney
|
|
|
|
|
|
|
|
ld de,((.afterHoneyDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
;I love honey
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_honey_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
;Hero's response to honey lover
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_hero_honeyresponse_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogHero
|
|
|
|
|
|
|
|
;Get me some honey
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_gethoney_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
jr .afterHoneyDialog
|
|
|
|
|
|
|
|
.hasSnakeBiteKit
|
|
|
|
ld de,((.afterHoneyDialog-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
;seen you before
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_seenyoubefore_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
jr .afterHoneyDialog
|
|
|
|
|
|
|
|
.hasHoney
|
|
|
|
ld de,((.giveKit-L0103_Check2)+levelCheckRAM)
|
|
|
|
call SetDialogSkip
|
|
|
|
|
|
|
|
;give snake bite kit
|
2020-05-31 09:42:40 +01:00
|
|
|
ld de,L0103_snakebitekit_gtx
|
2020-05-31 04:23:06 +01:00
|
|
|
call ShowDialogNPC
|
|
|
|
|
|
|
|
.giveKit
|
|
|
|
ld bc,ITEM_HONEY
|
|
|
|
call RemoveInventoryItem
|
|
|
|
|
|
|
|
ld bc,ITEM_SNAKEBITEKIT
|
|
|
|
call AddInventoryItem
|
|
|
|
|
|
|
|
.afterHoneyDialog
|
|
|
|
call ClearDialog
|
|
|
|
call ClearDialogSkipForward
|
|
|
|
|
|
|
|
call MakeNonIdle
|
|
|
|
ld a,STATE_TALKED2
|
|
|
|
ldio [mapState],a
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld [dialogNPC_speakerIndex],a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.animateWater
|
|
|
|
ldio a,[updateTimer]
|
|
|
|
swap a
|
|
|
|
and %11
|
|
|
|
ld hl,levelVars + VAR_WATER
|
|
|
|
add [hl]
|
|
|
|
ld [bgTileMap + WATERINDEX],a
|
|
|
|
ret
|
|
|
|
|
|
|
|
L0103_CheckFinished:
|
2022-01-08 03:29:25 +00:00
|
|
|
PRINT "0103 Script Sizes (Load/Init/Check) (of $500): "
|
|
|
|
PRINT (L0103_LoadFinished - L0103_Load2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L0103_InitFinished - L0103_Init2)
|
|
|
|
PRINT " / "
|
|
|
|
PRINT (L0103_CheckFinished - L0103_Check2)
|
|
|
|
PRINT "\n"
|
2020-05-31 04:23:06 +01:00
|
|
|
|