Hey there! Been "off-line" for a bit, but have recently been
afforded the opportunity to pick back up on the LightWave 3D
SDK "C to PB" conversion process after a 6-month hiatus. I've
gotten several hundred functions & UDTs already converted from
before, and now remember why I set this particular piece of code
aside...
Instead of clouding this message with my best-guesses as to what
in the snarf this is trying to accomplish, I thought I'd post
just the original 'C' UDT type-struct here, and post my
"guess(es)" shortly in a response.
Normally a UDT would be defined in a Type/EndType block, and in
this case containing a number of pointers, but the first line and
the "orphaned" pointers (ie;"const char *" translated to "<???>
AS ASCIIZ PTR" are really making my brain hurt!
Where I am right now, I could convince myself that part, if not
all of this may a funky sort of "type-mismatched" union, but I've
been looking at these few lines for so long, that I've lost the
ability to tell the forest from the trees. For argument's sake,
take it as given that the "info/error/warning/yesno/ttl/etc."
pointers have already been established elsewhere in the code.
One thing I should mention is that the plugin SDK files are
ultimately compiled into a .dll file (extention changed to .p)
If anyone has some insight into what this is "saying" (psudo-code's
just fine!), I'd really appreciate the input!
As this progresses to a point where it is presentable, I will
make the converted SDK available to any and all interested.
Thanks in advance for your suggestions!
----- 'C' Source ------
/****
* Message Functions. This block of functions is returned as the
* "Info Messages 2" global service. They display various info
* and other confirmation dialogs to the user.
* The return codes are as follows:
* OKCancel ok(1) cancel(0)
* YesNo yes(1) no(0)
* YesNoCancel yes(2) no(1) cancel(0)
* YesNoAll yesAll(3) yes(2) no(1) cancel(0)
****
*/
#define LWMESSAGEFUNCS_GLOBAL "Info Messages 2"
typedef struct st_LWMessageFuncs {
void (*info) (const char *, const char *);
void (*error) (const char *, const char *);
void (*warning) (const char *, const char *);
int (*okCancel) (const char *ttl, const char *, const char *);
int (*yesNo) (const char *ttl, const char *, const char *);
int (*yesNoCan) (const char *ttl, const char *, const char *);
int (*yesNoAll) (const char *ttl, const char *, const char *);
} LWMessageFuncs;
------------------
Scott Martindale
[email protected]
------------------
Scott Martindale
[email protected]
[This message has been edited by Scott J. Martindale (edited December 29, 2001).]
afforded the opportunity to pick back up on the LightWave 3D
SDK "C to PB" conversion process after a 6-month hiatus. I've
gotten several hundred functions & UDTs already converted from
before, and now remember why I set this particular piece of code
aside...
Instead of clouding this message with my best-guesses as to what
in the snarf this is trying to accomplish, I thought I'd post
just the original 'C' UDT type-struct here, and post my
"guess(es)" shortly in a response.
Normally a UDT would be defined in a Type/EndType block, and in
this case containing a number of pointers, but the first line and
the "orphaned" pointers (ie;"const char *" translated to "<???>
AS ASCIIZ PTR" are really making my brain hurt!
Where I am right now, I could convince myself that part, if not
all of this may a funky sort of "type-mismatched" union, but I've
been looking at these few lines for so long, that I've lost the
ability to tell the forest from the trees. For argument's sake,
take it as given that the "info/error/warning/yesno/ttl/etc."
pointers have already been established elsewhere in the code.
One thing I should mention is that the plugin SDK files are
ultimately compiled into a .dll file (extention changed to .p)
If anyone has some insight into what this is "saying" (psudo-code's
just fine!), I'd really appreciate the input!
As this progresses to a point where it is presentable, I will
make the converted SDK available to any and all interested.
Thanks in advance for your suggestions!
----- 'C' Source ------
/****
* Message Functions. This block of functions is returned as the
* "Info Messages 2" global service. They display various info
* and other confirmation dialogs to the user.
* The return codes are as follows:
* OKCancel ok(1) cancel(0)
* YesNo yes(1) no(0)
* YesNoCancel yes(2) no(1) cancel(0)
* YesNoAll yesAll(3) yes(2) no(1) cancel(0)
****
*/
#define LWMESSAGEFUNCS_GLOBAL "Info Messages 2"
typedef struct st_LWMessageFuncs {
void (*info) (const char *, const char *);
void (*error) (const char *, const char *);
void (*warning) (const char *, const char *);
int (*okCancel) (const char *ttl, const char *, const char *);
int (*yesNo) (const char *ttl, const char *, const char *);
int (*yesNoCan) (const char *ttl, const char *, const char *);
int (*yesNoAll) (const char *ttl, const char *, const char *);
} LWMessageFuncs;
------------------
Scott Martindale
[email protected]
------------------
Scott Martindale
[email protected]
[This message has been edited by Scott J. Martindale (edited December 29, 2001).]
Comment