home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / crack136 / crackart / scrapacc / acc_scrp.lst < prev   
File List  |  1992-09-13  |  2KB  |  53 lines

  1. '
  2. '
  3. ' SCRAP-Buffer-Beispiel-Accessory/-Programm für CRACK ART
  4. '
  5. '
  6. $m3000                          ! Minimum memory consumption
  7. ap_id&=APPL_INIT()
  8. IF ap_id&
  9.   me_id&=MENU_REGISTER(ap_id&,"  READ SRAP")
  10.   DO
  11.     ~EVNT_MESAG(0)
  12.     IF MENU(1)=40               ! Accessory wurde aufgerufen
  13.       @main
  14.     ENDIF
  15.   LOOP
  16. ELSE                            ! Aufruf als Prgramm
  17.   @main
  18. ENDIF
  19. '
  20. END
  21. '
  22. > PROCEDURE main
  23.   buffer$=STRING$(10,0)
  24.   IF SCRP_READ(buffer$)<>0          ! kann SCRAP-Buffer ausgelesen werden?
  25.     IF LEFT$(buffer$,2)="CA"        ! CRACK ART-Kennung vorhanden?
  26.       '
  27.       scrapadr%=VAL("&H"+RIGHT$(buffer$,8))     ! strukturadresse auslesen
  28.       '
  29.       alert$="| Structure Adr: "+HEX$(scrapadr%,8)+" |"
  30.       ALERT 3,alert$,1," OK ",i&
  31.       '
  32.       alert$="| Number of Screens: "+STR$(DPEEK(scrapadr%))+" | Current Screen:    "+STR$(DPEEK(scrapadr%+2))+"|"
  33.       ALERT 3,alert$,1," OK ",i&
  34.       '
  35.       ALERT 2,"| Invert Current Workscreen |",1,"Invert|Cancel",i&
  36.       IF i&=1                                       ! Bildschirm invertieren
  37.         adr%=LPEEK(scrapadr%+4)                     ! Bildschirmadresse
  38.         DEFMOUSE 2                                  ! Busy Bee
  39.         FOR i&=0 TO 7999                            ! 8000 Langworte
  40.           LPOKE adr%,LPEEK(adr%) XOR &HFFFFFFFF     ! invertieren
  41.           ADD adr%,4                                ! Adresse erhöhen
  42.         NEXT i&
  43.         DEFMOUSE 0                                  ! Mauspfeil
  44.       ENDIF
  45.       '
  46.     ELSE
  47.       ALERT 1,"| No CRACK ART | SCRAP-Entry! |",1,"Cancel",i&
  48.     ENDIF
  49.   ELSE
  50.     ALERT 1,"| SCRAP_READ Error! |",1,"Cancel",i&
  51.   ENDIF
  52. RETURN
  53.