Search found 9942 matches

by fxm
Nov 23, 2020 17:07
Forum: Beginners
Topic: Mouse problem
Replies: 6
Views: 1431

Re: Mouse problem

Starting from your code: #include "fbgfx.bi" Using FB screenres 640,480,32 dim as integer mousex,mousey,mouse,mousebutton do mouse=getmouse(mousex,mousey,,mousebutton) screenlock cls if mouse=0 then circle (mousex,mousey),50,color RGB (255,0,255) end if screenunlock sleep 1, 1 loop until m...
by fxm
Nov 23, 2020 9:19
Forum: General
Topic: When to use Integer and when not to
Replies: 5
Views: 104

Re: When to use Integer and when not to

xlucas wrote:- If you need the same amount of bits for your variable as the bus width in your platform, then you already have an optimal case and don't need an Integer

???
So, what datatype do you declare in this case?
by fxm
Nov 21, 2020 10:01
Forum: Game Dev
Topic: Problem with Fog-of-War
Replies: 16
Views: 349

Re: Problem with Fog-of-War

@ITomi: you can't modify the end of loop counter in a for sub tiledelete() for t as integer=0 to numoffogtiles-1 print t: sleep 10 if afogtile(t).xplace>=playerx-64 and afogtile(t).xplace<=playerx+8+64 and afogtile(t).yplace>=playery-64 and afogtile(t).yplace<=playery+8+64 then for c as integer=t t...
by fxm
Nov 20, 2020 21:17
Forum: General
Topic: Crash in recursion
Replies: 3
Views: 105

Re: Crash in recursion

Other remark: Inversely: If -Cos(x) > -Sin(y - n / 2) Then Return f(x * x - y, y * y - x, n + 3) ' works but: If -Sin(y - n / 2) < -Cos(x) Then Return f(x * x - y, y * y - x, n + 3) ' crashes It looks like a rounding problem which differs depen...
by fxm
Nov 20, 2020 19:00
Forum: General
Topic: Antivirus hurt by functions pasting text on clipboard - sometimes
Replies: 12
Views: 213

Re: Antivirus hurt by functions pasting text on clipboard - sometimes

perhaps at the time of the execution of the crashing part of code ( 'SetClipboardData(CF_TEXT,Chars)' ). Why would it be a crashing part? Do you mean the code is broken? It's possible but then why not the KristoherWindsor's one? Does it handle the process more properly? As 'Char...
by fxm
Nov 20, 2020 10:39
Forum: General
Topic: Antivirus hurt by functions pasting text on clipboard - sometimes
Replies: 12
Views: 213

Re: Antivirus hurt by functions pasting text on clipboard - sometimes

https://i.postimg.cc/W1cp1PmM/Sans-titre.png 'Un programme malveillant actif a été détecté' : This therefore leaves us to suppose that the detection of a potential virus took place during the execution of the program, perhaps at the time of the execution of the crashing part of code ( '...
by fxm
Nov 19, 2020 12:15
Forum: General
Topic: Split 8bit in 4bit
Replies: 26
Views: 513

Re: Split 8bit in 4bit

General remark on the proposed macros It is a good practice when defining a macro that its parameters are always inside parentheses to avoid operator precedence problems if passing as argument not a variable or a simple literal but an expression (with also operators). Same rule in case of mono-line...
by fxm
Nov 18, 2020 19:01
Forum: General
Topic: Split 8bit in 4bit
Replies: 26
Views: 513

Re: Split 8bit in 4bit

Are you confusing bit and byte deliberately in your code comment?
by fxm
Nov 18, 2020 15:55
Forum: General
Topic: Split 8bit in 4bit
Replies: 26
Views: 513

Re: Split 8bit in 4bit

Advanced object structure issued from paul doe's structure: Type Byte8bitSplit Public: Declare Constructor (Byval b As Byte = 0) Declare Operator Let (Byval b As Byte) Declare Operator [] (Byval n As Integer) As Byte Private: Union Dim As Byte value Type Dim As Byte lo : 4 Dim As Byte hi : 4 End Typ...
by fxm
Nov 15, 2020 17:27
Forum: Documentation
Topic: Threadsafe RANDOMIZE and RND
Replies: 54
Views: 1563

Re: Threadsafe RANDOMIZE and RND

- ProPgHeaderFiles → fxm [added 'fbio.bi', 'fbthread.bi' and 'fbmath.bi' to the FreeBASIC header file list]
- ProPgPrebuiltLibraries → fxm [added 'fbio.bi', 'fbthread.bi' and 'fbmath.bi' to the FreeBASIC header file list]
by fxm
Nov 15, 2020 16:10
Forum: Documentation
Topic: Threadsafe RANDOMIZE and RND
Replies: 54
Views: 1563

Re: Threadsafe RANDOMIZE and RND

I'm not going to worry too much about documenting the new generators in fbmath.bi until the constructors for seeding get added. So for now if it is mentioned in the wiki can note that it is a WIP. If we stick to the FreeBASIC header files, they are only grouped and listed (with a very brief descrip...
by fxm
Nov 15, 2020 12:57
Forum: Documentation
Topic: Threadsafe RANDOMIZE and RND
Replies: 54
Views: 1563

Re: Threadsafe RANDOMIZE and RND

I think the best definition would be to say that:
RANDOMIZE and RND are thread-safe, but not thread-specific.

(unlike gfxlib2 graphics keywords which are both)
by fxm
Nov 15, 2020 6:54
Forum: Documentation
Topic: Threadsafe RANDOMIZE and RND
Replies: 54
Views: 1563

Re: Threadsafe RANDOMIZE and RND

@Jeff, You said "RANDOMIZE has become thread safe" : - Does this mean that one thread (with its own RND calls) can work with one algorithm and another thread (with its own RND calls) can work with another algorithm, independently of each other? - I don't see how we can do this with just a ...
by fxm
Nov 14, 2020 19:12
Forum: Documentation
Topic: INPUT edit capacity
Replies: 4
Views: 136

Re: INPUT edit capacity

fxm wrote:In any case it works like that under Windows.
both for command window and graphics window.
by fxm
Nov 14, 2020 14:03
Forum: Documentation
Topic: Wiki improvements
Replies: 544
Views: 98466

Re: Wiki improvements

These 2 subjects are outside my skill coderJeff's advice to fill in this page: For external graphics file formats topic: what is supported by BLOAD & BSAVE. To be cross platform, the QB/BMP formats that can be loaded/saved are hard coded in the rtlib. So, this is will be a description of what i...

Go to advanced search