The original plan was to load in two normal 17k screen images and store them in memory and then call either up when required, replacing the 16 lines of BASIC for the street scene.. (the lines in question which cover DRAW and MOVE commands take up 3k in total) while still using the BASIC sprite of the cowboy. The screen image would also replace a map, also done in BASIC.
Compressing the screens would be a good idea. Would have to investigate how it would work.
Thanks
If the drawing is continuous (for example one line follows another and so on), then all that information can go into DATA. AA had an example of this in
Issue 102 with Clur Hodgson drawing a Space Rocket and Star, then FILLing it all in. Apart from the FILLing, that routine inspired me to create one in Assembly, which reduces the size of the code again as well as run quite fast, the only trouble is the DATA has to get stored in memory.
EDIT: Following up on that example I mentioned, I converted their program to assembly. Not all of it was using Loops either such as the Top of the Tail Fin, but was able to easily add code to draw that in in-between the drawing of the Rocket and Big Star. Code size 196 bytes.
;; Draw loop in Assembly
org &4000 ;; This routine can go almost anywhere
ld hl,rocketx
ld (adrxpos),hl ;; point xpos data of rocket to address pointer
ld hl,rockety
ld (adrypos),hl ;; point ypos data of rocket to address pointer
ld a,1
call &bbde ;; graphics pen 1
ld hl,150
ex hl,de
ld hl,60
call &bbc0 ;; move 150,60 - position of rocket
ld b,6 ;; number of times to loop - FOR m=1 TO 6
call draw_loop ;; draw rocket body
ld hl,100
ex hl,de
ld hl,150
call &bbc0 ;; move 100,150 - position of top fin
ld hl,70
ex hl,de
ld hl,190
call &bbf6 ;; draw 70,190
ld hl,170
ex hl,de
ld hl,190
call &bbf6 ;; draw 170,190
ld hl,500
ex hl,de
ld hl,360
call &bbc0 ;; move 500,360 - position of big star
ld hl,bigstarx
ld (adrxpos),hl ;; point xpos data of big star to address pointer
ld hl,bigstary
ld (adrypos),hl ;; point ypos data of big star to address pointer
ld b,10 ;; for m=1 TO 10
call draw_loop ;; draw big star
ret ;; return to BASIC
.draw_loop ;; The main loop
ld hl,(adrypos) ;; Address contents which points to image data for ypos goes into HL
ld e,(hl) ;; \
inc hl ;; - Contents of HL which is ypos data (16bit number) goes into DE
ld d,(hl) ;; /
ex de,hl ;; That information (ypos data) needs to go into HL register
push hl ;; But I need to protect that information so I can use HL.
ld hl,(adrxpos) ;; Address contents which points to image data for xpos goes into HL
ld e,(hl) ;; \
inc hl ;; - The same process now happens for xpos data (16bit number) going into DE
ld d,(hl) ;; /
pop hl ;; I can now restore that ypos data back into HL...
push bc ;; ...though I need to protect the loop counter.
call &bbf6 ;; GRA LINE ABSOLUTE, Entry: HL = y-coordinate, DE = x-coordinate
;; Exit: AF, BC, DE & HL corrupt.
pop bc ;; Restore loop counter.
ld hl,(adrxpos) ;; \
inc hl ;; - This moves address pointer for xpos to the following address & stores it.
inc hl ;; - Because 16bit data is being used, HL is incremented twice.
ld (adrxpos),hl ;; /
ld hl,(adrypos) ;; \
inc hl ;; - And the same thing applies for the address pointer for ypos data.
inc hl ;; - And again 16bit data is used.
ld (adrypos),hl ;; /
djnz draw_loop ;; If loop counter hasn't being reached,
;; loop counter is decreased by 1 until B = 0.
;; The following address pointer will then be used.
ret ;; Returns to BASIC (if called from there).
.adrxpos
defw 0
.adrypos
defw 0
.rocketx
defw 300,340,250,100,170,230
.rockety
defw 160,240,240,150,20,110
.bigstarx
defw 530,570,540,540,500,450,460,420,470,500
.bigstary
defw 320,310,280,230,250,230,280,310,320,360