Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define fbc -s gui
- #include "fbgfx.bi"
- screenres 32*8,32*8
- open "mygroup__win311.grp" for binary access read as #1
- 'open "mygroup__win2k.grp" for binary access read as #1
- var iSz = lof(1)
- dim as ubyte ptr pg = allocate(iSz)
- get #1,,*pg,iSz
- close #1
- var pICO = ImageCreate(32,32)
- static as ulong tPal(15) = { _
- &h00000000, &h00800000, &h00008000, &h00808000, _
- &h00000080, &h00800080, &h00008080, &h00808080, _
- &h00c0c0c0, &h00ff0000, &h0000ff00, &h00ffff00, _
- &h000000ff, &h00ff00ff, &h0000ffff, &h00ffffff }
- for CNT as integer = 0 to 15
- var p = cast(ubyte ptr,@tPal(CNT))
- palette CNT, p[2], p[1], p[0]
- next CNT
- ' palette?
- var iOff = &h128
- #if 0
- for C as integer = 0 to 15
- palette C,pg[iOff+C*4+2],pg[iOff+C*4+1],pg[iOff+C*4+0]
- next C
- #endif
- 'planar per line 4bpp
- iOff = &hF7
- for Y as integer = 0 to 31
- for P as integer = 0 to 3
- for X as integer = 0 to 31 step 8
- var Pix = pg[iOff]: iOff += 1
- for C as integer = 0 to 7
- if (Pix and (1 shl C)) then
- pset pICO,(X+7-C,Y),point(X+7-C,Y,pICO) or (1 shl P)
- end if
- next C
- next X
- next P
- next Y
- ' mask
- iOff = &h77
- for Y as integer = 0 to 31
- for X as integer = 0 to 31 step 8
- var Pix = pg[iOff]: iOff += 1
- for C as integer = 0 to 7
- if (Pix and (1 shl C)) then
- pset pICO,(X+7-C,Y),13
- end if
- next C
- next X
- next Y
- for Y as integer = 0 to 31
- for X as integer = 0 to 31
- line(X*8,Y*8)-(X*8+7,Y*8+7),point(X,Y,pICO),bf
- next X
- next Y
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement