Search found 5488 matches

by counting_pine
Apr 22, 2019 13:18
Forum: General
Topic: Programming/math "puzzle" for you, guys
Replies: 57
Views: 4234

Re: Programming/math "puzzle" for you, guys

Thanks for your update, xlucas. It's good to know this is a formally studied type of sequence, and there's at least one method of reliably generating them. I made a version based on the sample Python code on the Wikipedia page. The alphabet and the subsequence length are adjustable as constants: con...
by counting_pine
Apr 11, 2019 15:51
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

Thanks, this is looking better. It occurs to me that full Circles are drawn differently from partial ones - the former uses the Bresenham algorithm, while the latter use an unsophisticated Sin/Cos based approach. (It would be great to fix this some time..) But as far as I know, full circles shouldn'...
by counting_pine
Apr 11, 2019 14:27
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

Thanks fxm. Now I look back at my words, probably it's enough to say "not recommended", rather than "strongly advised against". I think the recommendation should go on Paint's page only - my personal feeling is that it's not needed to talk specifically about Paint on the Line/Cir...
by counting_pine
Apr 10, 2019 14:52
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

The documentation notes should be specific that the problem occurs in conjunction with GFX_ALPHA_PRIMITIVES. It would be better to phrase the problem as overdraw, chaing the resulting colour of affected pixels. It should try not to make any implication that it will behave in these ways, only that th...
by counting_pine
Apr 09, 2019 13:02
Forum: Windows
Topic: PALETTE USING and SCREEN bug on newer windows OS
Replies: 5
Views: 409

Re: PALETTE USING and SCREEN bug on newer windows OS

Thanks. I just generated a quick greyscale palette with for i as integer = 0 to 255: palette i, i,i,i: next i It looks like your Screen 18 is set to go fullscreen, that might make a difference. It would probably be a good idea to go fullscreen on both or neither, to confirm whether that's the proble...
by counting_pine
Apr 09, 2019 12:57
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

I don't know.. On the one hand, the cause for this problem was not obvious, and baffled multiple people. On the other hand, it feels like a lot of text just to say, in effect, "warning: blended borders will be blended". Really, the problem here is that boxes are drawn twice at the corners,...
by counting_pine
Apr 07, 2019 21:39
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

using opaqueness: It only takes one pixel overlap in a perimeter to leak, because this pixel will be a different colour Using line()-(),b overlaps at each corner. Nice discovery, dodicat! I've put a note about this in the bug report: 896 Unfortunately fixing the box drawing to prevent this double-b...
by counting_pine
Apr 07, 2019 21:34
Forum: Tips and Tricks
Topic: Replicating QB's box-drawing algorithm
Replies: 0
Views: 210

Replicating QB's box-drawing algorithm

When drawing a line or box in QB, an optional 'style' parameter can be used. This contains a 16-bit repeating pattern, that controls which pixels of the line are set. A box is made up of up to four lines. With no style, it can only be drawn one way (just a solid border), but when there is a style, i...
by counting_pine
Apr 06, 2019 23:05
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

Isn't a bug something, which should draw "topmost attention"? (aka: has top priority) I'm aware that this is, to a certain extent, depending on who reports it, because many don't check their code, for syntactical correctness, etc. causing ' false positives '. (not enough research, before ...
by counting_pine
Apr 06, 2019 21:06
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

I'd agree with you that capitalisation is sensible and correct to use if you're using an acronym, keyword, constant, etc. that is supposed to be capitalised. But unnecessary emphasis can alter the tone of a post, particularly when its purpose is to draw attention to a fault. Regarding the example co...
by counting_pine
Apr 06, 2019 16:22
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 1433

Re: fbGFX: BUG in Paint statement

Thanks for the report. I'd prefer though if you didn't capitalise the word "bug". It just comes across as shouting. Your example code has a subtle problem: the red border changes colour if it's partially transparent, so isn't actually equal to the border colour. But if I fix that - using t...
by counting_pine
Apr 05, 2019 18:56
Forum: Documentation
Topic: Where is printexpressionlist defined?
Replies: 7
Views: 303

Re: Where is printexpressionlist defined?

Yeah, in most cases, I expect people will not want to mix formatted and unformatted output in a single Print expression, but the possibility is there if anyone wants to do that. In practice, maybe it's not a feature worth having, since makes the documentation a little more complex, and possibly mean...
by counting_pine
Apr 04, 2019 15:16
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 491

Re: Conclusion : Need help on converting C code

You have dkl from the FB development team to thank for fbfrog. *str++ = *dest++ better like that ( str=dest ; dest+=1; str+=1;) Don't forget to dereference: '*str = *dst' A couple more thoughts occur to me: - (a,b) can be translated to FB (if you really have to!) as 'iif(a,b,b)', as long as 'a' retu...
by counting_pine
Apr 03, 2019 12:40
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 491

Re: Need help on converting C code

I had another go at translating. Here is the code with indentation: if (! ( ( bits= bits&0x7fffffff? ( resbits=bits, bits+bits ) : ( src+=4, resbits=*((Ulong *)(src-4)), (resbits<<1)+1 ) ), resbits>>31 ) ) { goto uselastofs; } That means it can be translated to something like: if (bits & 0x7...
by counting_pine
Apr 02, 2019 13:13
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 491

Re: Need help on converting C code

What horrible code! Unfortunately it won't translate directly to a single FB expression. Maybe the first thing to do would be to translate it several separate lines of C, which can then be ported.. - (b=c) is an expression that assigns c to b, then returns b. - (a,b) evaluates a, then evaluates b, t...

Go to advanced search