Skip to content

Commit b7a0d4c

Browse files
committed
refactor(trek): drop dead N() array + disp_quadrant_cell$ return buffer
N(3) was dimmed but never indexed. disp_quadrant_cell$ prints internally now (no return value), so the $ only allocated an unused string buffer; drop it to a plain void function. Frees ~49B BSS (pet headroom) and clears two cc65 unused-symbol warnings.
1 parent 84b3e05 commit b7a0d4c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/trek-portable.bas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CMD_DICT=-1
2727
InitColours()
2828

2929
' COURSE_VEC(9,2) = nav keypad deltas; DEVICE_DAMAGE(8) / DEVICE_NAME$(8) = ship systems
30-
dim GALAXY(8,8),COURSE_VEC(9,2),K(3,3),N(3),VISITED_GALAXY(8,8),DEVICE_DAMAGE(8),DEVICE_NAME$(8),QUAD(8,8)
30+
dim GALAXY(8,8),COURSE_VEC(9,2),K(3,3),VISITED_GALAXY(8,8),DEVICE_DAMAGE(8),DEVICE_NAME$(8),QUAD(8,8)
3131
InitDeviceNames()
3232

3333
' ** DISTANCE CALCULATION **
@@ -496,7 +496,7 @@ function ManeuverPOWER()
496496
return
497497
end function
498498

499-
function disp_quadrant_cell$(this_row, this_col)
499+
function disp_quadrant_cell(this_row, this_col)
500500
if (this_row < 1 or this_row > 8) or (this_col < 1 or this_col > 8) then
501501
print "=:=:=";
502502
else
@@ -528,11 +528,11 @@ function Lrs()
528528

529529
' LONG RANGE SCAN LOOP
530530
for scan_row = QUADRANT_Y-1 to QUADRANT_Y+1
531-
disp_quadrant_cell$(scan_row, QUADRANT_X-1)
531+
disp_quadrant_cell(scan_row, QUADRANT_X-1)
532532
print " | ";
533-
disp_quadrant_cell$(scan_row, QUADRANT_X)
533+
disp_quadrant_cell(scan_row, QUADRANT_X)
534534
print " | ";
535-
disp_quadrant_cell$(scan_row, QUADRANT_X+1)
535+
disp_quadrant_cell(scan_row, QUADRANT_X+1)
536536
print "\n";
537537
next scan_row
538538

0 commit comments

Comments
 (0)