12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTE R 10-SHAPING UP 113DRAW 2 AT 130 ,120DRAW 2 AT 140 ,120DRAW 3 AT 150 ,120DRAW 4 AT 156, 120The fourth line puts the address of the <strong>apple</strong> shape table in locations 232and 233, then the fifth line DRAWs from that table. Line number 6 thenplaces the address of the APPLE TEXT table in the proper locations so thatthe remaining commands DRAW from it. Location $4©©© is $©© and $4© inlo-byte/hi-byte fo rm, and $4© = 64.You can see how simple it is to put "text" on the Hi-Res screen, and <strong>al</strong>soto DRAW from two or more shape tables which are stored in memory atthe same time.Since things seem to be going so smoothly, l<strong>et</strong>' s make them a bit morecomplex. Key in and run the program in Listing 1©-5. To save time, wesuggest that you dispense with the 29 REM statements.10 REM BACKGROUND DEMO20 REM30 REM40 REM INITIALIZE50 PRINT CHR$(4) ; "BLOAD APPLESHAPE"60 SCALE = 170 POKE 232,0 : POKE 233 ,380 FOR I = 0 TO 7: READ CLR$(I) : NEXT I90 VTAB 24100 REM110 REM120 REM BEGIN LOOPS TO130 REM VARY BACKGROUND140 REM AND SHAPE COLORS150 REM160 FOR Cl = 1 TO 7170 FOR C2 = 0 TO 6180 IF Cl = C2 GOTO 210190 PRINT CLR$(C2) ;" OVER " ;CLR$ (C1)200 GOSUB 280210 NEXT C2,C1220 END230 REM240 DATA BLACK1, GREEN,VIOLET,WHITE1,BLACK2, 0RANGE ,BLUE , WHITE2250 REM260 REM DRAWING ROUTINE270 REM280 HGR290 FLAG 0 : REM FIRST PASS

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!