View Single Post
Old 28 March 2018, 15:36   #1
peceha
Registered User

peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 42
Posts: 132
WBlit or GetaShape - one of them makes me nervous

Hi,
today I started playing with something I gave up more than a month ago (because I couldn't get my graphics display correctly).

Look at that code:
Code:
WbToScreen 0
ShowScreen 0
WBStartup

BitMap 0,800,600,2
LoadBitMap 0,"ram:whitePicture.iff"

cnt.w=0
For x.w=0 To 9
  GetaShape cnt,x*16,0,16,16
  cnt+1
Next x

wFlags.l=$2|$4|$8|$400
Window 0,0,16,190,190,wFlags,"test",0,0

cnt.w=0
For y.w=0 To 7
  For x.w=0 To 9
    WBlit cnt,8+x*16,8+y*16
    cnt+1
    If cnt>9 Then cnt=0
  Next x
Next y

Repeat
  ev.l=WaitEvent
  If ev=$200
    Free Window 0
    End
  EndIf
Forever
The picture it points to is just a blank IFF filled with white color.
Every time I run that code I get different results (and no matter what color is set to background in picture's palette)

Below you can see just 3 different results (my WB is running in 4 colors, the whitePicture.IFF is saved in 4 colors with WB palette):
Everytime something else - all it should be is just one solid white square (10*16)x(8*16) pixels big
.

What am I doing wrong?
Thanks.

Last edited by peceha; 29 March 2018 at 07:59.
peceha is offline  
 
Page generated in 0.04074 seconds with 11 queries