#Thanks for the message!
9 messages in this thread
Jonas,
Thanks for the message you left me yesterday. It has been a while since I've
been on CompuServe. Here's a quick question (now that I'm here):
I am about to deliver a PXP bundle titled Turbo Charger. This code is
complete using the IPAS SDK r2. If I plan to make it 'bulletproof' should I
stick with that or is it safe for me to port to r3 for delivery before r3 is
'non-beta'?
Later,
doug
Doug,
you don't have much time ( only 100's of minutes left ).
If it's done, maybe you should start selling it and
convert it over ASAP. If the docs and example *.prj's
are ready sell 'em. FWIW.
jonas[adesk]
Jonas,
>> 'only 100's of minutes left'
Is that when we might see SDKr3? Cool. I have another question for you, I
found some unexplained types in the FaceIO (sorry I don't have
my docs here) but flags is an unsigned long.
anyway gotto go.
doug
Doug,
<< unexplained types..>>
can you elaborate a bit??..
jonas[adesk]
Jonas,
Yeah, I guess I could be a bit more clear (I was in a rush…)
(from memory, docs at home…)
typedef struct {
unsigned int face;
int a, b, c;
unsigned long flags; // these are the ones I was talking about
unsigned long sm_groups;
unsigned int material; // this is another one
} FaceIO;
flags only needs 3 bits of information to store the possible info:
1 | 2 | 4 to set the visibility of each edge: AB BC CA
but an unsigned long type carries 32 bits. I could use a char or an
unsigned char (8 bits) and have room to spare.
also the material is an unsigned int (16 bits) but the valid range is 0-255 (8
bits with an unsigned char). Will there be more materials available at any
given time in the future? (if so it would make sense to stick with an unsigned
int in this case)
anyway I wasn't trying to complain but was curious as to whether I can use the
shorter types and save memory and time in my routines.
(I will finally have a modem at home this weekend, so I will be better able to
ask questions from the docs.)
thanks,
doug
Yo,
Remember you're in a 32 bit environment. Your statements:
>> an unsigned int (16 bits)
>> an unsigned long type carries 32 bits.
are off by one left shift. An unsigned int is a 32 bit entity. An unsigned
long is a 64 bit entity. Not that this invalidate anything you say, in fact it
even makes your points stronger. It's just that you're still thinking in a 16
bits world.
thanks for correcting my err! me dint meen too luuk stoopid, but do
you know of any reason for me not to use the shorter types? even bit
fields for the flags?
Jonas,
Sorry about the message cut short there…
The flags variable in the FaceIO type is an unsigned long (32 bits),
the only valid values for that are 1 | 2 | 4, only 3 bits, shouldn't an
unsigned char be used instead? Just curious but there are more of these types
of, well, wasted space, and I was wondering if there was actually more data in
those vars than is documented. Basically, can I use the shorter types in my
code without worrying?
Just curious…
doug
Doug:
>> I am about to deliver a PXP bundle titled Turbo Charger.
Great news! I am the keeper of the list of IPAS routines by 3rd parties called
IPAS.TXT in library 9 here. Please send me some info in the format of that
file and I'd be happy to include it when you start shipping!!
Greg Pyros