Goksteroo Senior Member
 Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Posted: 05:12am 19 Nov 2023 |
|
|
|
I've been writing a adventure programme for a long time and I'm still stuck on my display routines. I intend to use 6 windows on a screen that update/scroll/etc independently using several resized pages to print to and then BLIT that screen to the appropriate area on the main screen. It all works as intended but for one little problem that I can't solve.... artifacts on the main screen when the BLIT command is used. It's not program breaker but it looks ugly and not correct behaviour. I have not seen this in other programmes that I use the BLIT command in - eg in Mazist when BLIT is used to overlay the zoomed area on the main screen.
Are the artifacts a programming error on my part, an error (or unintentional side effect) of using the BLIT command, or something on my system. The artifacts become more apparent if the pause command is shortened and it looks like the programme has crashed if you have it very low or commented out (it has not as the full screen is displayed if you press the SPACE bar to exit the programme).
I'm sure I asked about this situation many months ago but didn't receive any solution/explanation of the behaviour - I do want to finish this programme though, and being stumped has had me not progress in its development for a very long time.
Here is my text programme.....mode -16 option default integer option base 1
colour rgb(red),rgb(black) text 920,0,"Windows Test",C,3,6,rgb(red),rgb(black) font 3
'set up window/pages 'wx(x)=horizontal size, wy(x)=vertical size, px(x)=x pos on screen 0, py(x)=y pos on screen 0 'a$(x) test text 'c(x) colour to print text 'hp(x) and vp(x) saves and sets cursor position 'bc(x) box colour 'bt - Box thickness, bo - box offset
dim wx(6),wy(6),px(6),py(6),a$(6),hp(6),vp(6) dim c(6),bc(6),bt(6),bo(6)
for x= 1 to 6 read wx(x),wy(x),px(x),py(x),c(x),bc(x),bt(x),bo(x),a$(x) page resize x,wx(x),wy(x) hp(x)=0 vp(x)=0 page write x cls page write 0 box px(x)-bo(x),py(x)-bo(x),wx(x)+2*bo(x),wy(x)+2*bo(x),bt(x),bc(x) next x
do for x=1 to 6 page write x colour c(x) print @(hp(x),vp(x))a$(x);space$(rnd*10); hp(x)=mm.info(hpos) vp(x)=mm.info(vpos)
page write 0 blit 0,0,px(x),py(x),wx(x),wy(x),x next x
'pause 148 'edit this for faster/slower scrolling text '10 is t=interesting - lots of artifact '1 is "What the hell!!" - nearly all artifact 'til SPACE is pressed
loop until inkey$=" "
wins: data 1392,576,500,176,rgb(white),rgb(green),1,10,"WOOP DE DOOOO!!!! It appears to be working as I wanted it to.... now for functions to make it all easy! " data 416,264,20,176,rgb(green),rgb(white),2,4,"How about that!! I didn't think it'd work.... but it does!!! " data 416,264,20,488,rgb(pink),rgb(orange),1,6,"Some more stuff to take up space in that little rectangle..... " data 416,264,20,800,rgb(blue),rgb(gold),3,4,"I don't want anything printed here, but if I did that then I wouldn't know if the routine was working.... " data 928,264,500,800,rgb(cyan),rgb(blue),2,8," Oooooo.... and now for the other big window... impressive? NO??? WTF!!! I'm impressed! " data 416,264,1480,800,rgb(gold),rgb(red),3,7,"19z48g 1494fnb 1968x4f41 149479 4fdt 14448cg (random typing here!) "
Thanks for your time. Geoff |