home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / baswiz19.zip / BW$BAS.ZIP / G2PUT.BAS < prev    next >
BASIC Source File  |  1993-01-29  |  1KB  |  32 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        BASWIZ  Copyright (c) 1990-1993  Thomas G. Hanlin III         |
  4. '   |                                                                      |
  5. '   |                      The BASIC Wizard's Library                      |
  6. '   |                                                                      |
  7. '   +----------------------------------------------------------------------+
  8.  
  9.    DECLARE FUNCTION GetBit0% (BYVAL ASeg%, BYVAL AOfs%, BitNr&)
  10.    DECLARE SUB G2Color (BYVAL Foregnd%, BYVAL Backgnd%)
  11.    DECLARE SUB G2GetColor (Foregnd%, Backgnd%)
  12.    DECLARE SUB G2Plot (BYVAL X%, BYVAL Y%)
  13.  
  14.    DEFINT A-Z
  15.  
  16. SUB G2Put (StartX, StartY, Image())
  17.    G2GetColor Fore, Back
  18.    L = LBOUND(Image)
  19.    DX = Image(L)
  20.    DY = Image(L + 1)
  21.    AWide = ((DX + 7) AND &HFFF8)
  22.    ASeg = VARSEG(Image(L + 2))
  23.    AOfs = VARPTR(Image(L + 2))
  24.    FOR Y = 0 TO DY - 1
  25.       FOR X = 0 TO DX - 1
  26.          G2Color GetBit0(ASeg, AOfs, Y * AWide + (X XOR 7)), 0
  27.          G2Plot X + StartX, Y + StartY
  28.       NEXT
  29.    NEXT
  30.    G2Color Fore, Back
  31. END SUB
  32.