Code: Select all
If InitSprite() = 0 Or InitKeyboard() = 0 Or OpenScreen(640, 480, 16, "Space") = 0
MessageRequester("Failed", "Unable to initialise", #PB_MessageRequester_Ok)
End
EndIf
RandomSeed(0)
Restore alien6
Read width
Read hight
result = CreateImage(#PB_Any, width, hight)
StartDrawing(ImageOutput(result))
DrawingMode(1)
For b = 0 To hight - 1
For a = 0 To width - 1
Read num
CallDebugger
Debug num
If num = 1
Box(a * 2, b * 2, 2, 2, RGB(160,160,160))
EndIf
Next
Next
DrawImage(result, 50, 100)
StopDrawing()
FlipBuffers(0)
Delay(2000)
DataSection
alien6:
Data.l 16,10
Data.l 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0
Data.l 0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0
Data.l 1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1
Data.l 1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,1
Data.l 0,0,1,1,1,1,1,0,0,1,1,1,1,1,0,0
Data.l 0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0
Data.l 0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0
Data.l 0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0
Data.l 0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0
Data.l 1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0
EndDataSection
Thanks,
Kevin.