Search found 446 matches

by Thrawn89
Mar 22, 2011 4:12
Forum: General
Topic: NanoHost is alive!
Replies: 26
Views: 9468

Turns out I never got around to porting it to C++. I decided to instead support windows piping. This means that you can write an AI in any language as long as it can generate a native windows exe. It automatically loads in every *_AI.exe file in the AI folder and battling is the same. The only other...
by Thrawn89
Aug 16, 2009 6:51
Forum: Linux
Topic: X11 Reference Problems (NOT -lX11 Issue)
Replies: 4
Views: 3260

Thank you for your reply again. The package ended up being broken. I compiled and installed xorg with the dev libraries and created links in fb/lib/linux. Now everything works. I'm using Damn Small Linux on a 32bit system, with the latest fb release package (20.x?) yes it is the standalone version. ...
by Thrawn89
Aug 13, 2009 16:41
Forum: Linux
Topic: X11 Reference Problems (NOT -lX11 Issue)
Replies: 4
Views: 3260

Thank you Garvan, I have the dev versions installed. I even created links in freebasic/lib/linux. Getting the same errors. Forget packages is there anything I can do manually? root@ttyp1[linux]# ls -la drwxrwxr-x 2 root root 4096 Aug 13 12:36 . drwxrwxr-x 3 root root 4096 Aug 13 02:09 .. -rwxr-xr-x ...
by Thrawn89
Feb 23, 2009 20:19
Forum: General
Topic: NanoHost is alive!
Replies: 26
Views: 9468

I'll probably be modifying how it works internally as I'm porting it to improve upon it. I'll send out the C++ source when I'm done if anyone wants to report that back into FB for you guys be my guest.

Thrawn
by Thrawn89
Feb 23, 2009 14:39
Forum: General
Topic: C Pointers help
Replies: 4
Views: 1191

dataptr[x] is equivalent to *(dataptr + x). When you put brackets at the end of the pointer you are incrementing that pointer by the data type size you're pointing to multiplied by the number in the brackets, then you deference it. Basically if you have a sequence of integers stored consecutively. T...
by Thrawn89
Feb 23, 2009 14:30
Forum: General
Topic: NanoHost is alive!
Replies: 26
Views: 9468

I know I'm resurfacing an old thread but the link is broken. If you could send me your latest version I'll appreciate it. I'm looking to port this project into C++/SDL to help some high school students I'm mentoring have fun while learning how to program in C++. Thank you. Thrawn PS. For the tourney...
by Thrawn89
Oct 15, 2007 16:48
Forum: General
Topic: 3D rotation around point?
Replies: 6
Views: 2120

If you want to take Richard's code to 3d you would: 'Rotate a triangle about a centre 'Adapted from Richard's and Rel's code 'Thrawn89 ScreenRes 800, 600, 32 Dim As Double xcenter = 400 Dim As Double ycenter = 300 Dim As Integer i Dim As Double x(1 To 4), y(1 To 4), z(1 To 4)...
by Thrawn89
Oct 15, 2007 0:42
Forum: General
Topic: 3D rotation around point?
Replies: 6
Views: 2120

So it is, but if you use his method for deriving the 3d formula you come up with: NewY = Y + cos(ThetaX) NewZ = Z + sin(ThetaX) Y = NewY Z = NewZ NewZ = Z + cos(ThetaY) NewX = X + sin(ThetaY) X = NewX NewX = X + cos(ThetaZ) NewY = Y + sin(ThetaZ) Rotat...
by Thrawn89
Oct 15, 2007 0:31
Forum: General
Topic: Threading Woes
Replies: 2
Views: 1320

Threading Woes

For some reason the pointer mp being passed to ThreadClass.Timeout() is being corrupted or something, more specifically: The second ThreadCreate() call enters the Timeout() first. mp for this call is correct Then the first call to ThreadCreate() enters the Timeout(). mp ends up equalling the handle ...
by Thrawn89
Oct 14, 2007 23:45
Forum: General
Topic: 3D rotation around point?
Replies: 6
Views: 2120

Some excellent tutorials are provided by Relsoft http://www.petesqbsite.com/sections/tutorials/tuts/relsoft3d/Chapter2/Chapter2.htm Thrawn EDIT: For ease here's the equation he comes out with, he also provides an optimized method, you should really read his whole 3D series. Here's the full 3d rotati...
by Thrawn89
Oct 14, 2007 5:27
Forum: General
Topic: Dereferencing Pointers
Replies: 7
Views: 1928

Thanks, I don't think what I wrote was clear however. This member sub does not know, nor care what type p is referencing. The function the funct param references can identify what type the parameter is, and will cast it for use there. All this sub is trying to do is pass the data along. Is it possib...
by Thrawn89
Oct 14, 2007 4:42
Forum: General
Topic: Dereferencing Pointers
Replies: 7
Views: 1928

You're joking... There's actually a typeof function? *shakes head, tries* EDIT: Ok, it worked, however it will not work where I am using it... Sub ThreadClass.setTimeout(funct As Any Ptr, ByVal p As Any Ptr, ByVal millisecs As Integer) Dim As Integer i = createNew() ThreadArray[i].mi...
by Thrawn89
Oct 14, 2007 4:08
Forum: General
Topic: Dereferencing Pointers
Replies: 7
Views: 1928

You are right, that is what I am looking for.

However, what if you don't know the type?

Is there a possible workaround for this?
by Thrawn89
Oct 14, 2007 2:02
Forum: General
Topic: Dereferencing Pointers
Replies: 7
Views: 1928

Dereferencing Pointers

Let's say I have two different points, each pointing to an identically large size of memory. How can I store the contents in one pointer into the contents of the other pointer? Ex. Dim As Integer a = 10 Dim As Integer Ptr pa = @a Dim As Any Ptr pb = Allocate(Len(a)) *pb = *pa fbc thr...
by Thrawn89
Oct 12, 2007 1:55
Forum: General
Topic: Function pointers
Replies: 6
Views: 1996

So is the 1984 behavior a bug, feature, or user-error?

And before we go too much into this, is there a timeout function already implemented in a library or something?

Go to advanced search