Search found 1340 matches

by jofers
Sep 16, 2008 15:26
Forum: Beginners
Topic: allegro 4.2?
Replies: 8
Views: 1749

I usually edit my posts right after I post them, sorry. One of those situations where you can only think of something better to say after you say it. As for the headers, I don't think so. Someone has to do it is the problem. If you want to translate it yourself, check out SWIG: http://www.freebasic....
by jofers
Sep 16, 2008 15:18
Forum: Windows
Topic: Vista "glossy text" effect
Replies: 3
Views: 1655

Yeah, I can't stand the CodeProject, they do everything within their own little format.

Here is a short C tutorial from the original documentation.
http://msdn.microsoft.com/en-us/library/bb688195(VS.85).aspx

The WinAPI is a pain in the butt, ain't it.
by jofers
Sep 16, 2008 15:11
Forum: Beginners
Topic: allegro 4.2?
Replies: 8
Views: 1749

I suppose you could, but Allegro is designed to be loaded by DLL. For big libraries, it's a waste to do it otherwise. That way, if you have 3 allegro copies running, only one set of code is in memory. As for allegro 4.2, I think 4.3 is out. Either way, updating headers is a problem since they have t...
by jofers
Sep 16, 2008 15:05
Forum: Beginners
Topic: fast one: bools and types?
Replies: 13
Views: 2155

In general, memory alignment on processors is 4 bytes. x86, to be compatible with older chips, emulates non-word alignment with micro-ops, but it has to load 2 integers and mask/shift them into one. So if you DIM 2 bytes in a row, they take up 8 bytes in memory anyway. However, having a strongly enf...
by jofers
Sep 16, 2008 14:29
Forum: Beginners
Topic: Wow. This is so cool
Replies: 16
Views: 4000

Drug companies license generics in developing nations at very cheap or free rates. They're not dumb, they know they won't make any money trying to sell them at the same prices there. I would include a draft, so you could manage your team over several seasons. You could also include injuries and free...
by jofers
Sep 15, 2008 12:59
Forum: Beginners
Topic: Text Mode
Replies: 9
Views: 2689

You're probably correct about some of that. I've only ever used it to draw text on the screen. You know, move(row,col) and addch(c). That works in a terminal window on both. And that's all I've ever needed out of a text console beyond what the c runtime provides.
by jofers
Sep 15, 2008 0:46
Forum: General
Topic: Speed of C emitted code
Replies: 31
Views: 5542

If I could pick an emitter I would say ARM or Java bytecode. Those are two very relevant architectures.
by jofers
Sep 15, 2008 0:28
Forum: Beginners
Topic: Text Mode
Replies: 9
Views: 2689

I hadn't heard of those problems, but I don't have any problems with the bottom right of the screen on windows or linux. Dunno about the keys, but I figures FB functions work just as well.
by jofers
Sep 14, 2008 9:47
Forum: Beginners
Topic: Text Mode
Replies: 9
Views: 2689

I wouldn't use the windows apis. They're not portable and they're not easy to use. Curses is cross-platform (the windows end uses pdcurses, no dll required). The example below draws a rectangle. #include "curses.bi" Sub fillRect(text As chtype, x As Integer, y As Integer, w As Integer,...
by jofers
Sep 11, 2008 16:24
Forum: General
Topic: Tricks?
Replies: 28
Views: 3300

That's fine, dude, didn't mean you personally. I'm just perplexed that this is supported:

Code: Select all

Let (a, b) = x

but this isn't:

Code: Select all

Let a = x
by jofers
Sep 11, 2008 16:08
Forum: General
Topic: Tricks?
Replies: 28
Views: 3300

Why would you take that out? That doesn't even make sense.
by jofers
Sep 11, 2008 15:58
Forum: General
Topic: Tricks?
Replies: 28
Views: 3300

Think of it mathematically. You don't have an "assignment operator", only an equality operator.

So instead you state the condition you want to be true and say "let this be true"

Code: Select all

Let a = 2

Microsoft just took out the let as a shortcut, but you can still assign your variables this way.
by jofers
Sep 11, 2008 15:34
Forum: General
Topic: parallel rnd seed
Replies: 9
Views: 1719

It wouldn't be difficult at all to add a similar system to how FB does threads (CreateRandom, DestroyRandom). I would do it if you want to append the compiler. However, Rnd already takes an integer argument. How do you disambiguate it to allow passing a handle to a random object? A third argument ge...
by jofers
Sep 10, 2008 17:12
Forum: General
Topic: parallel rnd seed
Replies: 9
Views: 1719

If you want to maintain parallel seeds, try implementing your own random generator. This one is pretty cheesy, but it's short and just an example: Type GenRnd Seed As Integer Declare Function Get() As Double a As Const Integer = 16807 m As Const Integer = 2147483647 q As Const Integer = 1277...
by jofers
Sep 09, 2008 13:37
Forum: General
Topic: lib with no header?
Replies: 6
Views: 1057

The headers for each library are the same as in C. Here is the documentation for PlaySound, a WinMM function: http://msdn.microsoft.com/en-us/library/ms712879(VS.85).aspx Header: Declared in Mmsystem.h; include Windows.h. Library: Use Winmm.lib. Also, remember that MS libraries don't use the "libxxx...

Go to advanced search