home *** CD-ROM | disk | FTP | other *** search
- 'Photo
- PRG formatted GEOS file V1.0
- CONVERTED WITH GEOSHELL V2.2
- Write Image V2.1
- geoWrite V2.1
- ;*************************************
- ; Photo
- ; this is developed for use with
- ; GeoBasic. This routine may be
- ; loaded into memory at 30976 and
- ; then CALL 30976,a,x,y to display
- ; the current photo scrap from the
- ; disk. x and y should be loaded
- ; with the upper left corner location
- ; where the bitmap should be displayed.
- ;*************************************
- .if Pass1
- .noeqin
- .noglbl
- .include geosSym
- .include geosMac
- .glbl
- .eqin
- .endif
- .psect
- Photo:
- jsr FindPhotoScrap
- PopB r1H
- PopB r1L
- beq 10$
- jsr GetNxtBitmapByte
- sta bitmapWidth
- jsr GetNxtBitmapByte
- sta bitmapHeight+0
- jsr GetNxtBitmapByte
- sta bitmapHeight+1
- lda #40
- sbc r1L
- sta r2L
- cmp bitmapWidth
- bcc 65$
- MoveB bitmapWidth,r2L
- LoadB r11H,#0
- beq 68$ ;branch always.
- lda bitmapWidth
- sbc r2L
- sta r11H
- lda bitmapHeight+1
- bne 70$
- lda #200
- sbc r1H
- cmp bitmapHeight+0
- bcc 70$
- lda bitmapHeight+0
- sta r2H
- jsr ReloadR0
- LoadB r11L,#0
- sta r12L
- sta r12H
- LoadW r13,#GetBitmapByte
- LoadW r14,#ReloadR0
- jsr BitOtherClip
- ldx #0
- FindPhotoScrap:
- LoadW r6,#photoName
- jsr FindFile
- bne 90$
- Move
- FindPhotoScrap:
- LoadW r6,#photoName
- jsr FindFile
- bne 90$
- MoveB dirEntryBuf+1,saveR1L
- MoveB dirEntryBuf+2,saveR1H
- LoadB saveR5+0,#0
- sta saveR5+1
- photoName:
- .byte "Photo Scrap",0
- ReloadR0:
- LoadW r0,#bitmapBuffer
- GetBitmapByte:
- jsr GetNxtBitmapByte
- ldy #0
- sta (r0),y
- GetNxtBitmapByte:
- PushW r1
- PushW r4
- PushW r5
- MoveB saveR1L,r1L
- MoveB saveR1H,r1H
- LoadW r4,#diskBlkBuf
- MoveW saveR5,r5
- jsr ReadByte
- sta bitmapByte
- MoveB r1L,saveR1L
- MoveB r1H,saveR1H
- MoveW r5,saveR5
- PopW r5
- PopW r4
- PopW r1
- lda bitmapByte
- .ramsect
- saveR1L:
- .block 1
- saveR1H:
- .block 1
- saveR5:
- .block 2
- bitmapWidth:
- .block 1
- bitmapHeight:
- .block 2
- bitmapByte:
- .block 1
- bitmapBuffer:
- .block 134
-