Fixed null ptr bug in party display.

This commit is contained in:
Martin Haye 2017-06-30 08:48:56 -07:00
parent e6c94eee6c
commit 3cc0fba61a
3 changed files with 8 additions and 3 deletions

View File

@ -79,11 +79,16 @@ relocate:
; special: clear most of the lower 48k and the ProDOS bank of the LC
bit setLcRW+lcBank1
bit setLcRW+lcBank1
tya
ldx #8
.clr1 stx .clrst1+2
stx .clrst2+2
ldy #0
tya
- sta 0,y ; help catch null ptr problems
iny
cpy #$20
bne -
tay
.clrst1 sta $800,y
.clrst2 sta $880,y
iny

View File

@ -495,7 +495,7 @@ def makeEnemyGroup(enemyFunc)#1
word p, enem, groupSize
p = mmgr(HEAP_ALLOC, TYPE_ENEMY_GROUP)
enem = enemyFunc()
p->b_enemyGroupRange = enem->b_enemyAttackRange + 30 // FIXME FOO - added 30 for testing only
p->b_enemyGroupRange = enem->b_enemyAttackRange
if enem=>r_groupSize == 0 // handle unique enemies
groupSize = 1
else

View File

@ -1479,7 +1479,7 @@ export def showParty()#0
// Display header (or LEVEL UP message)
p = global=>p_players
while !p->b_skillPoints
while p and !p->b_skillPoints
p = p=>p_nextObj
loop
if p