• Welcome to PowerBasic Museum 2020-A.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Recent posts

#1
C++ programming (SDK style) / C - Unions
Last post by Patrice Terrier - February 01, 2020, 10:28:20 AM
TIP (from Michael Lobko-Lobanovsky)
A c/C++ union is a special data type that allows to store different data types in the same memory location.
You can define a union with many members like in the example below

struct BINBOOL {
    union {
        struct {
            unsigned bGiration: 1; // type name: size in bits = initialization
            unsigned bUseFPS: 1;
            unsigned bAnimate: 1;
            unsigned bRotation: 1;
            unsigned bIsLerping: 1;
            unsigned bSyncAudio: 1;
            unsigned bUnused: 26; // currently unused
        };
        unsigned reDraw;
    }; // initialization
};
static BINBOOL gB;

This give us 32 bit (0 or 1) that we could use as boolean flags

and rather than using this complex if comparison:

if (gB.bGiration || gB.bUseFPS || gB.bAnimate || gB.bRotation || gB.bIsLerping || gB.bSyncAudio) {
    Redraw();
}


we can just use this short syntax, and fastest comparison.

if (gB.reDraw) ( Redraw(); )

and the whole size of BINBOOL is only 4-bytes.
#2
C++ programming (SDK style) / Re: ObjectReader64 Visual Stud...
Last post by Patrice Terrier - January 31, 2020, 08:06:01 PM
Thank you Pierre,

since almost 2 weeks i am totaly unable to code anything, or to create new 3D models, because i was so upset by the degradation of my friend's health.
#3
C++ programming (SDK style) / Re: ObjectReader64 Visual Stud...
Last post by Pierre Bellisle - January 31, 2020, 07:12:12 PM
Mes condoléances Patrice,
Il restera imbriqué dans ton code...
#4
C++ programming (SDK style) / Michael Lobko-Lobanovsky
Last post by Patrice Terrier - January 31, 2020, 03:49:16 PM
Today my friend has passed  :'(
http://www.objreader.com/index.php?topic=296.msg5921#new

Mike and I, have worked close together to create the current ObjReader version.
Things will never be the same without my partner...

#5
C++ programming (SDK style) / Star surfer
Last post by Patrice Terrier - January 24, 2020, 10:20:15 AM
Here is another video showhing ObjReader64 version 2.85 playing a static animation.
video

I call this art programming ;)

#6
Brians Board / Re: PluriBASIC 64bit compilati...
Last post by Brian Alvarez - January 23, 2020, 07:58:57 PM
Dont thank me yet... it doesnt seem like i will be able to go according to the plan. We are less than halfway the goal. I am kind of scared to quit my job like this. :(
#7
Brians Board / Re: PluriBASIC 64bit compilati...
Last post by Anthon Com - January 23, 2020, 06:24:14 AM
Thank you Brian  ;D

For keeping PB alive
#8
Brians Board / Re: Any Good news regarding PB...
Last post by José Roca - January 22, 2020, 12:24:33 AM
> As we say here: "Chat échaudé craint l'eau froide"

It is almost identical to the Spanish saying: "Gato escaldado, del agua fría huye".
#9
Brians Board / Re: Any Good news regarding PB...
Last post by Patrice Terrier - January 21, 2020, 10:30:16 PM
Brian

As we say here: "Chat échaudé craint l'eau froide" (scalded cat fears cold water)
or if you prefer: "once bitten twice shy"

And time will tell who was right  :(

QuoteNah, seriously, I work closely with a friend who also works on PluriBASIC with me, and old PB'er
that acts as a back up for me as i do for him.
probably Elias Montoya ...
#10
Brians Board / Re: Any Good news regarding PB...
Last post by Brian Alvarez - January 21, 2020, 09:08:42 PM
 I understand.

However, i havent even hit my 40's so, i doubt you have to worry about me dying before you.  ;D

Nah, seriously, I work closely with a friend who also works on PluriBASIC with me, and old PB'er
that acts as a back up for me as i do for him.

Brian.