Search found 2281 matches

by angros47
Mar 11, 2024 15:43
Forum: Windows
Topic: Interpretation
Replies: 9
Views: 611

Re: Interpretation

I remember it, it was mentioned on PetesQBSite years ago, I intervened too: http://www.petesqbsite.com/phpBB3/viewtopic.php?p=39070#p39070 It is an open source program, written in javascript (with some WASM and TypeScript). It can be downloaded for free here: https://github.com/IshikawaMasashi/QBasi...
by angros47
Mar 07, 2024 18:38
Forum: Windows
Topic: Interpretation
Replies: 9
Views: 611

Re: Interpretation

I managed to integrate a basic interpreter inside FreeBasic programs:

viewtopic.php?t=29109

But that interpreter is not FreeBasic, it is a different basic dialect
by angros47
Mar 05, 2024 18:04
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

I think worth investigating because I'm not sure at the moment; the compiler sometimes uses constructions internally involving`*(@(expression))` where it's probably expected that it doesn't immediately convert types. Another approach would be to at least warn (or even error) about things that certa...
by angros47
Mar 05, 2024 1:05
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

I have a simple suggestion: wouldn't be possible to return the address of a fixed length string not as a string pointer (it wouldn't work, since it would not contain the terminator, nor the string descriptor), but as an Unsigned Byte pointer? After all, a fixed length string with no zero at the end ...
by angros47
Feb 28, 2024 17:23
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

I wonder, will the update fix this bug too?
viewtopic.php?t=31753
by angros47
Feb 27, 2024 18:30
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

This doesn't affect me so whatever, but I'm gonna be honest: Well, that's the point: finding out whom would be affected... or if anyone would ever be affected. potentially throwing your entire current user base under the bus and changing the ABI for some potential future code or mythical people who...
by angros47
Feb 27, 2024 0:44
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

I must also add another consideration: like I said before, the change might introduce incompatibilities in case an UDT containing fixed length strings is saved in a file, and then such file is read by the same program, compiled with the newer version. But the same incompatibility currently exists if...
by angros47
Feb 26, 2024 22:05
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

A string is not just for printing. It can also be used to store other kinds of data (think about the strings used to control the DRAW command). Also, in regular strings the CHR(0) is allowed, and so it was in original QBASIC (where CHR$(0) was also used for special commands, like cursor keys) I thin...
by angros47
Feb 26, 2024 10:26
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

Another question: will be possible to use null bytes inside a fixed length string? Currently, if I recall correctly, it's not possible, because it would be mistaken for a string terminator. With the new version, would it become possible? This alone would justify it, even outside of user defined types
by angros47
Feb 26, 2024 9:55
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

Actually, that issue depends on how string pointers are supposed to work: for a null terminated string, a pointer should refer to the first byte of the string, but for regular string,a pointer is supposed to refer to the string descriptor. Fixed length strings have no descriptor, since the compiler ...
by angros47
Feb 25, 2024 22:18
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20492

Re: Freebasic 1.20.0 Development

Interesting choice. I thing it might be a good idea, the main question is: should that change affect all dialects, or only -lang QB? In fact, as far as I know most APIs expect strings, inside UDTs, with the terminating zero, also, storing the string without the zero and doing a copy on the fly intro...
by angros47
Feb 25, 2024 0:16
Forum: General
Topic: Uncompressed Game Graphics
Replies: 4
Views: 416

Re: Uncompressed Game Graphics

I remind you that PNG is a compressed format. If you want to store uncompressed images, bitmap is the format, and yes, it's bulky. I suppose the reason you don't want to use jpeg format is the loss in quality that comes with it: this happens because jpeg is a so-called lossy compression format. Like...
by angros47
Feb 24, 2024 23:11
Forum: Sources, Examples, Tips and Tricks
Topic: Just for fun: color illusion
Replies: 1
Views: 185

Just for fun: color illusion

Run this program, and when it displays a circle, stare at the cross in the middle. Don't move your eyes away from it. When the screen will become white, for a moment you will see a yellow circle screenres 800,600,32 line (0,0)-(800,600),rgb(255,255,0),bf circle (400,300),150,rgb(0,0,255),,,,f color ...
by angros47
Feb 20, 2024 16:46
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 306233

Re: MiniB3d for FreeBasic

I think you already achieved the best you could, with the default fixed function pipeline. The reason it doesn't look nice is that light is computed per vertex: basically, a surface is rendered as a group of triangles, for each triangle the incidence it is computed how the light affect each of the t...
by angros47
Feb 12, 2024 22:53
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 306233

Re: MiniB3d for FreeBasic

True, because for C and C++ true is 1.
The reason is that in C/C++ a true/false is a boolean type, so a single bit, 0 or 1. In BASIC True is defined as NOT FALSE, and since FALSE is defined as 0, TRUE is defined as all bits enabled, so -1

The same applies to CreateCone