Search found 5312 matches

by counting_pine
Aug 09, 2018 11:38
Forum: General
Topic: Has anyone written a freebasic SuperEagle scaler?
Replies: 4
Views: 205

Re: Has anyone written a freebasic SuperEagle scaler?

If you want a pure FB version, then you could translate https://github.com/grom358/hqx/blob/master/src/hq2x.c - the code looks long, but it looks easy to translate - I can't see anything that would be difficult to write in FB. EDIT: in the other thread we learned that a 64MB RGBtoYUV table is needed...
by counting_pine
Aug 09, 2018 11:31
Forum: General
Topic: Has anyone written a freebasic SuperEagle scaler?
Replies: 4
Views: 205

Re: Has anyone written a freebasic SuperEagle scaler?

http://games.freebasic.net/forum/index.php?topic=40.0 links to a zip file containing an hq2x library.
But it looks like the library itself has no source code available, and only works for 16-bit image buffers.
by counting_pine
Aug 03, 2018 13:21
Forum: General
Topic: bug in format
Replies: 10
Views: 352

Re: bug in format

Agreed - there's no real reason (from a user perspective) to have a non-zero exponent for zero. Would you mind opening an issue at https://github.com/freebasic/fbc/issues?
by counting_pine
Jul 31, 2018 13:04
Forum: General
Topic: Error: expected "="
Replies: 4
Views: 229

Re: Error: expected "="

This error can also be seen in the default FB dialect, but only if the variable is declared: test1 '' Variable not declared dim test2 as integer test2 '' Expected '=' At a guess, I would say that when FB sees a single variable on a line, it tries (and fails) to parse it as many kinds of statement - ...
by counting_pine
Jul 27, 2018 14:28
Forum: Tips and Tricks
Topic: FB MemCopy() statement (without CRT includes)
Replies: 44
Views: 1345

Re: FB MemCopy() statement (without CRT includes)

Why is FB so damn complicated? ... Weird... A simple example works fine for me: #include "crt.bi" dim as zstring*10 zs = "1234", zd = "ABCD" print zs, zd memcpy(@zd, @zs, 4) print zs, zd Maybe there's something elsewhere in the code that's breaking calling conventions ...
by counting_pine
Jul 27, 2018 13:33
Forum: General
Topic: Big Endian -> Little Endian
Replies: 17
Views: 396

Re: Big Endian -> Little Endian

Just to say, with Endian-specific code, it’s probably best to abstract out the byte swapping and only use it in code that reads/writes the values from/to the code. This is the only part of the code that needs to be Endian-specific. That way, you can work in your native Endian format, whichever it ma...
by counting_pine
Jul 25, 2018 19:37
Forum: Tips and Tricks
Topic: C-like for() statement using macros
Replies: 14
Views: 594

Re: C-like for() statement using macros

Hey, thanks Pritchard, that’s a pretty neat extension of the idea. I didn’t think of that.
It’s interesting to see what the preprocessor can be capable of.
by counting_pine
Jul 25, 2018 19:31
Forum: General
Topic: old gradient trick
Replies: 3
Views: 211

Re: old gradient trick

I quite like that monochrome gradient effect. It would be interesting to see how it might scale to three or more colours.
There is room for some optimisation. You loop over x in the outer loop, which means you could cache the ‘x / winx’ value every column.
by counting_pine
Jul 22, 2018 14:26
Forum: Community Discussion
Topic: Sourceforge vs. GetHub Hosting
Replies: 15
Views: 719

Re: Sourceforge vs. GetHub Hosting

Does it tell you why it can’t connect to https://sourceforge.net?
by counting_pine
Jul 22, 2018 13:28
Forum: Community Discussion
Topic: Sourceforge vs. GetHub Hosting
Replies: 15
Views: 719

Re: Sourceforge vs. GetHub

What I can say is that sourceforge is blocked on my tablet because of the built-in browser that can not read ssl. Does it say why it doesn’t like Sourceforge’s HTTPS? Many sites, including freebasic.net, will now force you to connect with SSL, so you would also have difficulties with those. Any usa...
by counting_pine
Jul 19, 2018 12:40
Forum: Tips and Tricks
Topic: C-like for() statement using macros
Replies: 14
Views: 594

C-like for() statement using macros

This is a 'CFOR' macro that on use, runs the 'start' statement and sets up a while loop. It also creates a corresponding 'CNEXT_' macro - which is used for running the 'step' and marking the end of the loop. Unfortunately you cannot nest CFOR statements, because CNEXT_ can only hold one definition. ...
by counting_pine
Jul 18, 2018 12:39
Forum: General
Topic: Undefined reference to `PNG_LoadFile@16'
Replies: 26
Views: 757

Re: Bug in freebasic 1.05 compiler

There is a bug in the freebasic compiler. There are 9 declare functions in pblib2.bi And yet the compiler only complains about one of them. declare function PNG_LoadFile stdcall alias "PNG_LoadFile" (byval pPNGInfo as PNGINFO ptr, byval lpFileName as string) as integer The compiler says &...
by counting_pine
Jul 17, 2018 12:40
Forum: Linux
Topic: Detect Drive
Replies: 10
Views: 357

Re: Detect Drive

If the problem is simply in determining where the device is mounted, you could try parsing /proc/mounts for the drive. I don't know if you can guarantee that your USB device will be detected as /dev/sdb though - or that the main partition will be sdb1. If you are running systemd (e.g. a recent Ubunt...
by counting_pine
Jul 15, 2018 21:02
Forum: General
Topic: How do I convert TTF fonts to anti-aliased bitmap fonts?
Replies: 4
Views: 293

Re: How do I convert TTF fonts to anti-aliased bitmap fonts?

It looks like a few attempts have been made to convert TrueType fonts to ones that can specifically be printed with FB's Draw String. I've dug up a couple of past forum threads: https://freebasic.net/forum/viewtopic.php?f=2&t=23343 https://freebasic.net/forum/viewtopic.php?f=3&t=21916 Are th...
by counting_pine
Jul 09, 2018 12:56
Forum: Beginners
Topic: Another program icon via command line
Replies: 66
Views: 1877

Re: Another program icon via command line

This may be a silly question, but is the icon (or at least the bitmap data for each size) stored in "cleartext" in the exe file, such that you can change the icon just by writing the icon data to the right area of the file?

Go to advanced search