Skip to content

Commit

Permalink
Tweak file numbers to account for the persistent sprite files. Move l…
Browse files Browse the repository at this point in the history
…evel names from script00.s to logo.s. This allows game start code to be moved fully to script00. Fix initializing a fourth persistent NPC with rubbish data.
  • Loading branch information
cadaver committed Jan 22, 2016
1 parent 1e2066b commit a11f679
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 173 deletions.
2 changes: 1 addition & 1 deletion aligneddata.s
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ keyRowBit: dc.b $fe,$fd,$fb,$f7,$ef,$df,$bf,$7f
timeMaxTbl: dc.b 99,60,60,50
plrDmgModifyTbl:dc.b 4,6,8,12

; Levelobject table (not saved)
; Levelobject table (not saved), also reused by the savegame-list

saveList:
lvlObjX: ds.b MAX_LVLOBJ,0
Expand Down
2 changes: 1 addition & 1 deletion file.s
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ F_MAIN = $01
F_LEVEL = $02
F_CHARSET = $12
F_MUSIC = $21
F_SPRITE = $2e
F_SPRITE = $2b
F_SCRIPT = $50
F_LOGO = $5e
F_UPGRADE = $5f
Expand Down
48 changes: 24 additions & 24 deletions hessian.seq
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ emptysave.bin 61
emptysave.bin 62
emptysave.bin 63
emptysave.bin 64
script02.pak 52
level00.pak 02
charset00.pak 12
level01.pak 03
Expand Down Expand Up @@ -51,37 +50,38 @@ music11.pak 2C
music12.pak 2D
boot.prg HESSIAN
loader.prg 00
sprplayerb.pak 31
sprplayerba.pak 32
sprplayert.pak 33
sprplayerta.pak 34
sprscientist.pak 35
sprsmallrobots.pak 36
sprmediumrobots.pak 37
sprcombatrobot.pak 38
sprhazards.pak 39
sprhazards2.pak 3A
sprrotordrone.pak 3B
sprhacker.pak 3C
sprguard.pak 3D
spranimals.pak 3E
sprlargespider.pak 3F
sprlargewalker.pak 40
sprheavyguard.pak 41
sprsecuritychief.pak 42
sprlargetank.pak 43
sprhighwalker.pak 44
sprserver.pak 45
sprhazmat.pak 46
sprplayerb.pak 2E
sprplayerba.pak 2F
sprplayert.pak 30
sprplayerta.pak 31
sprscientist.pak 32
sprsmallrobots.pak 33
sprmediumrobots.pak 34
sprcombatrobot.pak 35
sprhazards.pak 36
sprhazards2.pak 37
sprrotordrone.pak 38
sprhacker.pak 39
sprguard.pak 3A
spranimals.pak 3B
sprlargespider.pak 3C
sprlargewalker.pak 3D
sprheavyguard.pak 3E
sprsecuritychief.pak 3F
sprlargetank.pak 40
sprhighwalker.pak 41
sprserver.pak 42
sprhazmat.pak 43
music00.pak 21
script01.pak 51
script02.pak 52
script03.pak 53
script04.pak 54
upgrade.pak 5F
script05.pak 55
script06.pak 56
script07.pak 57
text00.pak 47
text00.pak 44
text01.pak 48
text02.pak 49
text03.pak 4A
Expand Down
60 changes: 30 additions & 30 deletions hessiand81.seq
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,36 @@ write music09.pak @8:2a
write music10.pak @8:2b
write music11.pak @8:2c
write music12.pak @8:2d
write sprplayerb.pak @8:31
write sprplayerba.pak @8:32
write sprplayert.pak @8:33
write sprplayerta.pak @8:34
write sprscientist.pak @8:35
write sprsmallrobots.pak @8:36
write sprmediumrobots.pak @8:37
write sprcombatrobot.pak @8:38
write sprhazards.pak @8:39
write sprhazards2.pak @8:3a
write sprrotordrone.pak @8:3b
write sprhacker.pak @8:3c
write sprguard.pak @8:3d
write spranimals.pak @8:3e
write sprlargespider.pak @8:3f
write sprlargewalker.pak @8:40
write sprheavyguard.pak @8:41
write sprsecuritychief.pak @8:42
write sprlargetank.pak @8:43
write sprhighwalker.pak @8:44
write sprserver.pak @8:45
write sprhazmat.pak @8:46
write text00.pak @8:47
write text01.pak @8:48
write text02.pak @8:49
write text03.pak @8:4a
write text04.pak @8:4b
write text05.pak @8:4c
write text06.pak @8:4d
write text07.pak @8:4e
write sprplayerb.pak @8:2e
write sprplayerba.pak @8:2f
write sprplayert.pak @8:30
write sprplayerta.pak @8:31
write sprscientist.pak @8:32
write sprsmallrobots.pak @8:33
write sprmediumrobots.pak @8:34
write sprcombatrobot.pak @8:35
write sprhazards.pak @8:36
write sprhazards2.pak @8:37
write sprrotordrone.pak @8:38
write sprhacker.pak @8:39
write sprguard.pak @8:3a
write spranimals.pak @8:3b
write sprlargespider.pak @8:3c
write sprlargewalker.pak @8:3d
write sprheavyguard.pak @8:3e
write sprsecuritychief.pak @8:3f
write sprlargetank.pak @8:40
write sprhighwalker.pak @8:41
write sprserver.pak @8:42
write sprhazmat.pak @8:43
write text00.pak @8:44
write text01.pak @8:45
write text02.pak @8:46
write text03.pak @8:47
write text04.pak @8:48
write text05.pak @8:49
write text06.pak @8:4a
write text07.pak @8:4b
write script00.pak @8:50
write script01.pak @8:51
write script02.pak @8:52
Expand Down
43 changes: 39 additions & 4 deletions logo.s
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ txtInstructions3:
dc.b "RUNSTOP PAUSE MENU",0
dc.b 0


txtMainMenu: dc.b 0
dc.b $80+13,"START NEW GAME",0
dc.b 0
Expand All @@ -65,6 +64,42 @@ txtOptions: dc.b $80+12,"SKILL",0
dc.b 0
dc.b $80+12,"BACK",0

if * > screen2+SCROLLROWS*40
err
endif
org chars+$700

levelNamesTbl: dc.b 0,$28,$00,levelWarehouses-levelNames
dc.b 0+$80,levelCourtyard-levelNames
dc.b 1,$00,$18,levelCarPark-levelNames
dc.b 1+$80,levelCourtyard-levelNames
dc.b 2+$80,levelServiceTunnels-levelNames
dc.b 3+$80,levelEntrance-levelNames
dc.b 4+$80,levelServiceTunnels-levelNames
dc.b 5+$80,levelSecurityCenter-levelNames
dc.b 6+$80,levelUpperLabs-levelNames
dc.b 7+$80,levelUnderground-levelNames
dc.b 8+$80,levelLowerLabs-levelNames
dc.b 9+$80,levelSecurityCenter-levelNames
dc.b 10+$80,levelNetherTunnel-levelNames
dc.b 11,$50,$00,levelBioDome-levelNames
dc.b 11+$80,levelCourtyard-levelNames
dc.b 12+$80,levelThroneSuite-levelNames
dc.b 13+$80,levelServerVault-levelNames
dc.b 14+$80,levelUnderground-levelNames
dc.b 15+$80,levelOldTunnels-levelNames

org chars+$740

levelNames:
levelWarehouses:dc.b "WAREHOUSE",0
levelCourtyard: dc.b "COURTYARD",0
levelCarPark: dc.b "PARKING GARAGE",0
levelServiceTunnels:dc.b "SERVICE TUNNELS",0
levelEntrance: dc.b "ENTRANCE",0
levelSecurityCenter:dc.b "SECURITY CENTER",0
levelUpperLabs: dc.b "UPPER LABS",0
levelUnderground:dc.b "UNDERGROUND",0
levelLowerLabs: dc.b "LOWER LABS",0
levelNetherTunnel:dc.b "NETHER TUNNEL",0
levelBioDome: dc.b "BIO-DOME",0
levelThroneSuite:dc.b "THRONE SUITE",0
levelServerVault:dc.b "SERVER VAULT",0
levelOldTunnels: dc.b "OLD TUNNELS",0
3 changes: 1 addition & 2 deletions script.s
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ EP_DESTROYCOMBATROBOTSABOTEUR = $0111
EP_HACKER3 = $0112
EP_HACKER4 = $0113

EP_GAMESTART = $0200
EP_MOVESPIDER = $0200
EP_SCIENTIST1 = $0201
EP_SCIENTIST2 = $0202
EP_RADIOUPPERLABSENTRANCE = $0203
Expand All @@ -40,7 +40,6 @@ EP_OPENWALL = $020f
EP_MOVEACID = $0210
EP_RADIOCAVES = $0211
EP_MOVEBAT = $0212
EP_MOVESPIDER = $0213

EP_RADIOLOWERLABS = $0300
EP_HACKERAMBUSH = $0301
Expand Down
100 changes: 62 additions & 38 deletions script00.s
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ logoStart = chars
logoScreen = chars+608
logoColors = chars+608+168
titleTexts = chars+608+168*2
levelNamesTbl = chars+$700
levelNames = chars+$740

START_LEVEL = $00 ;Warehouse
START_X = $6680
Expand Down Expand Up @@ -554,9 +556,60 @@ IP_GiveAllLoop: pha
cmp #ITEM_LAST+1
bcc IP_GiveAllLoop
endif
lda #<EP_GAMESTART ;Exec initial script to setup persistent NPC states etc.
ldx #>EP_GAMESTART
jmp ExecScript
ldx #$02 ;3 persistent NPCs to initialize
IP_NPCLoop: jsr GetLevelActorIndex
lda npcX,x
sta lvlActX,y
lda npcY,x
sta lvlActY,y
lda npcF,x
sta lvlActF,y
lda npcT,x
sta lvlActT,y
lda npcWpn,x
sta lvlActWpn,y
lda npcOrg,x
sta lvlActOrg,y
dex
bpl IP_NPCLoop
lda #<EP_SCIENTIST2 ;Initial NPC scripts to drive the plot forward
ldx #>EP_SCIENTIST2
sta actScriptEP
stx actScriptF
if SKIP_PLOT > 0
if SKIP_PLOT2 > 0
lda #PLOT_HIDEOUTAMBUSH
jsr SetPlotBit
lda #<EP_HACKERAMBUSH
ldx #>EP_HACKERAMBUSH
else
lda #<EP_HACKER3
ldx #>EP_HACKER3
endif
else
lda #<EP_HACKER
ldx #>EP_HACKER
endif
sta actScriptEP+2
stx actScriptF+2
ldx #(MAX_CODES)*3-1
IP_CodeLoop: if CODE_CHEAT > 0
lda #$00
else
jsr Random
and #$0f
cmp #$0a
bcs IP_CodeLoop
endif
sta codes,x
dex
bpl IP_CodeLoop
lda codes+MAX_CODES*3-1 ;Make the last (nether tunnels) code initially
ora #$80 ;impossible to enter, even by guessing
sta codes+MAX_CODES*3-1
jsr FindPlayerZone ;Need to get starting level's charset so that save is named properly
jsr SaveCheckpoint ;Save first in-memory checkpoint immediately
jmp CenterPlayer

; Save options if modified

Expand Down Expand Up @@ -999,40 +1052,11 @@ optionMaxValue: dc.b 3,1,1
cheatString: dc.b KEY_K, KEY_V, KEY_L, KEY_T
cheatIndex: dc.b 0

levelNamesTbl: dc.b 0,$28,$00,levelWarehouses-levelNames
dc.b 0+$80,levelCourtyard-levelNames
dc.b 1,$00,$18,levelCarPark-levelNames
dc.b 1+$80,levelCourtyard-levelNames
dc.b 2+$80,levelServiceTunnels-levelNames
dc.b 3+$80,levelEntrance-levelNames
dc.b 4+$80,levelServiceTunnels-levelNames
dc.b 5+$80,levelSecurityCenter-levelNames
dc.b 6+$80,levelUpperLabs-levelNames
dc.b 7+$80,levelUnderground-levelNames
dc.b 8+$80,levelLowerLabs-levelNames
dc.b 9+$80,levelSecurityCenter-levelNames
dc.b 10+$80,levelNetherTunnel-levelNames
dc.b 11,$50,$00,levelBioDome-levelNames
dc.b 11+$80,levelCourtyard-levelNames
dc.b 12+$80,levelThroneSuite-levelNames
dc.b 13+$80,levelServerVault-levelNames
dc.b 14+$80,levelUnderground-levelNames
dc.b 15+$80,levelOldTunnels-levelNames

levelNames:
levelWarehouses:dc.b "WAREHOUSE",0
levelCourtyard: dc.b "COURTYARD",0
levelCarPark: dc.b "PARKING GARAGE",0
levelServiceTunnels:dc.b "SERVICE TUNNELS",0
levelEntrance: dc.b "ENTRANCE",0
levelSecurityCenter:dc.b "SECURITY CENTER",0
levelUpperLabs: dc.b "UPPER LABS",0
levelUnderground:dc.b "UNDERGROUND",0
levelLowerLabs: dc.b "LOWER LABS",0
levelNetherTunnel:dc.b "NETHER TUNNEL",0
levelBioDome: dc.b "BIO-DOME",0
levelThroneSuite:dc.b "THRONE SUITE",0
levelServerVault:dc.b "SERVER VAULT",0
levelOldTunnels: dc.b "OLD TUNNELS",0
npcX: dc.b $39,$38,$17
npcY: dc.b $28,$28,$30
npcF: dc.b $30+AIMODE_TURNTO,$10+AIMODE_TURNTO,$30+AIMODE_TURNTO
npcT: dc.b ACT_SCIENTIST2, ACT_SCIENTIST3,ACT_HACKER
npcWpn: dc.b $00,$00,$00
npcOrg: dc.b 1+ORG_GLOBAL,1+ORG_GLOBAL,4+ORG_GLOBAL

checkscriptend
Loading

0 comments on commit a11f679

Please sign in to comment.