Search found 11984 matches

by fxm
Apr 14, 2024 11:23
Forum: General
Topic: Is this a bug in FreeBasic graphics?
Replies: 5
Views: 443

Re: Is this a bug in FreeBasic graphics?

How to optimize the size of image buffers: Screenres 640, 480, 32 Dim As Integer x, y, i x = 37: y = 37 Dim As Any Ptr DrawBall = ImageCreate( 75, 75, RGB(255, 255, 255)) '' 75*75 pixels from index : 0 to 74 CIRCLE DrawBall, (x, y), 37, RGB(0, 255, 0),,,,F ' Green '' circle from index : 37-37=0 to 3...
by fxm
Apr 14, 2024 7:36
Forum: General
Topic: Is this a bug in FreeBasic graphics?
Replies: 5
Views: 443

Re: Is this a bug in FreeBasic graphics?

Minimum code without 'Put' : Dim As Integer x = 40, y = 40 Screenres 640, 480, 32 For i As Integer = 1 To 140 ScreenLock CIRCLE (x, y), 37, RGB(0, 0, 0),,,,F '' erase the previous ball x += 4 '' move the ball 4 pixels at a time CIRCLE (x, y), 37, RGB(0, 255, 0),,,,F '' draw the ball ScreenUnlock Sle...
by fxm
Apr 14, 2024 5:30
Forum: General
Topic: Is this a bug in FreeBasic graphics?
Replies: 5
Views: 443

Re: Is this a bug in FreeBasic graphics?

With 'Put', the default method used to draw the image to the destination buffer is XOR.
To erase the ball, use rather:
put(x, y),EraseBall, Pset
by fxm
Apr 13, 2024 11:15
Forum: General
Topic: Property Definition does not allow STATIC
Replies: 6
Views: 412

Re: Property Definition does not allow STATIC

Alternatively, you can use a non-static member property (which accesses the static integer member) and call it on any instance opportunity, or on a null pointer or null reference to the 'Type' (provided the property body does not use 'This' ). Type Gobject Public: Declare Property Prop1(Byval I As ...
by fxm
Apr 12, 2024 11:51
Forum: General
Topic: Property Definition does not allow STATIC
Replies: 6
Views: 412

Re: Property Definition does not allow STATIC

Alternatively, you can use a non-static member property (which accesses the static integer member) and call it on any instance opportunity, or on a null pointer or null reference to the 'Type' (provided the property body does not use 'This' ). Type Gobject Public: Declare Property Prop1(Byval I As I...
by fxm
Apr 12, 2024 10:59
Forum: General
Topic: Property Definition does not allow STATIC
Replies: 6
Views: 412

Re: Property Definition does not allow STATIC

But this new feature seems to be not very easy, mainly because of a parser problem. Example of the parser syntax problem for STATIC PROPERTIES without index parameter: There is a syntax ambiguity between one of property result assignment syntaxes inside the get-property body and the set-property cal...
by fxm
Apr 12, 2024 5:29
Forum: General
Topic: Property Definition does not allow STATIC
Replies: 6
Views: 412

Re: Property Definition does not allow STATIC

A "feature request" is already filled in since 2013:
#279 Add the static properties feature
by fxm
Apr 11, 2024 5:13
Forum: Sources, Examples, Tips and Tricks
Topic: Simple 2D Ball Collision Demo
Replies: 9
Views: 612

Re: Simple 2D Ball Collision Demo

neil wrote: Apr 10, 2024 22:36 The FB Gfx lib: version won't compile because of this line.

Line 103 .x -= t1Sleep (1)
easy (stuttering):
.x -= t1
by fxm
Apr 08, 2024 14:20
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

No, it alsp works.
(have you refreshed your mff page?)

Check your fbc.exe:

Code: Select all

Print __FB_BUILD_DATE_ISO__
2024-04-07
by fxm
Apr 07, 2024 11:01
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

With the latest fixes, Put# now works with arrays again (thanks).

SARG wrote: Apr 07, 2024 8:37 Doing thing too fast before homework in the garden under a nice sun :-)
In the south perhaps?
by fxm
Apr 07, 2024 9:02
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 639
Views: 174940

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Yes.
Last night fixes (around 3:30am for us) arrived too late for the daily builds (around 2:00am for us).
We have to wait until next night.
by fxm
Apr 06, 2024 8:13
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

It is related to non-indexed arrays. This change was missed in PUT quirk handling and no tests in the test-suite yet exist. PUT has different rtlib support functions depending on the argument type fb_FilePut, fb_FilePutArray, fb_FilePutArrayLarge, plus some others; similar for GET. The wrong rtlib ...
by fxm
Apr 05, 2024 15:54
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

Xusinboy Bekchanov wrote: Apr 05, 2024 15:49 I also expect the same behavior on 32 and 64 bit without using LBound, UBound.
Yes all fbc versions 1.20.0 (32 and 64 bit) crashes on compilation.
by fxm
Apr 05, 2024 15:34
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

Xusinboy Bekchanov wrote: Apr 05, 2024 14:57 Hello, when compiling this example using compiler 1.20.0 dated 04/01/2024, it gives the error

Possible workaround for your code above (not tested):
Put #F,,PixelData(Lbound(PixelData)),Ubound(Pixeldata) - Lbound(PixelData) + 1
by fxm
Apr 05, 2024 15:32
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 267
Views: 23927

Re: Freebasic 1.20.0 Development

@ Jeff , Since fbc version 1.20.0, Put# warns then crashes on compilation with an array as data. See posts above. (there are several recent changes regarding the arrays. Maybe : fbc: fix non-index array assignments ) The documentation example also warns then crashes on compilation: ' Create an integ...