Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:33 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Possible MMBasic Windows Sprite Hide Safe Bug

Author Message
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 02:07pm 29 Oct 2023
Copy link to clipboard 
Print this post

Hello

I'm having the "Error in line XX: Not showing" error when trying to hide sprites safely. The error does not happen if I use sprite hide. Maybe it is a possible bug?

The code is running on the MMBasic for Windows V5.07.03

I isolated the code that causes the error.


dim s=1,i,o=20

mode 7,12 ' 320x240

page write 2: cls
load png "km_tileset.png"
page write 0: cls

for i=1 to 6
   sprite read i, 0, 128, 16, 16, 2
next

do
   o=20
   for i=1 to 6
       if s then
           sprite show i, o, 20, 0
       else
           ' sprite hide I <= This one works fine, the next line doesn't
           sprite hide safe i
       end if
       inc o, 20
       pause(500)
   next
   s=not s

   pause(500)
loop


The tiles file:

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 07:27pm 29 Oct 2023
Copy link to clipboard 
Print this post

Please can you post the tiles file as a zip
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 08:36pm 29 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  Please can you post the tiles file as a zip


Please, let me know if you need any other file or info.

km_tileset.zip
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 04:29pm 02 Nov 2023
Copy link to clipboard 
Print this post

The bug is there on the CMM2 as well. It appears it only relates to layer 0. If you set the layer to 1 it works OK - now I just need to find out why

sprite show i, o, 20, 1
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 06:53pm 02 Nov 2023
Copy link to clipboard 
Print this post

  matherp said  The bug is there on the CMM2 as well. It appears it only relates to layer 0. If you set the layer to 1 it works OK - now I just need to find out why

sprite show i, o, 20, 1


Thank you matherp
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024