IonicWind Software

IWBasic => IWB3.x Bug Reports => Topic started by: GWS on April 25, 2016, 10:38:25 PM

Title: 2D Example - Clock - not working
Post by: GWS on April 25, 2016, 10:38:25 PM
Hi,

I don't understand this.  In IWB the program crashes - In EBasic, it runs OK.

The source code has been chenged slightly.  Since the original version did not have the Autodefine "off" statement, the sprite variables in IWB have been preceded by the type POINTER.  This is OK, although I normally would place that definition amongst the DEF's at the start of the program.

Loading the sprites is done by:

spr1 = LoadSprite(GETSTARTPATH()+"back.jpg")

.. a bit of Sapero fetish with empty brackets ..  ;)

spr1 = LoadSprite(GETSTARTPATH+"back.jpg")

should be fine.

In IWB the program still crashes.

But if you compile it with Debug - then press F9 to start the program - it will run successfully  :o

I don't see where this is going wrong. 

Best wishes, :)

Graham



Title: Re: 2D Example - Clock - not working
Post by: LarryMc on April 26, 2016, 01:34:26 AM
Quote from: GWS on April 25, 2016, 10:38:25 PM
spr1 = LoadSprite(GETSTARTPATH()+"back.jpg")
You're absolutely correct; the "()" are not needed with this builtin command.

Quote from: GWS on April 25, 2016, 10:38:25 PM
In IWB the program still crashes.

But if you compile it with Debug - then press F9 to start the program - it will run successfully  :o

I don't see where this is going wrong. 
Are you using IWBasic3.x? It doesn't have a working debugger?

But, to the point of why the program crashes in IWBasic;
After playing with it for a while I determined that it is caused by using the @TRANSROTOZOOM (or @ROTOZOOM) flag with
the SpriteDrawMode command.  I don't have the source code so I can't tell you why right now.  But something got changed in the switch over back when.  Maybe LarryS will add it to his list of items to look into.
Title: Re: 2D Example - Clock - not working
Post by: GWS on April 26, 2016, 02:35:21 AM
Hi Larry,

Yep, I've just set up Version 3.03 ..  ;D

I compiled the clock program for Windows with the Debug option ticked .. I assume that created a debugable exe.

Then I pressed F9 to start debug with an 'active single' - it confirmed an exe existed - and it worked  ;D

Puzzling isn't it ..  :)

Graham
Title: Re: 2D Example - Clock - not working
Post by: LarryMc on April 26, 2016, 03:27:34 AM
3.03 has the skeleton of a debugger that I was working on in it.  I inadvertently left the buttons active when I issued the release.