|
2 registered members (USER0328, Quad),
5,448
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
problem on returning frame names by engine
#229807
09/30/08 16:15
09/30/08 16:15
|
Joined: Jul 2008
Posts: 27 Italy, Sicilia, Palermo
Azrael85
OP
Newbie
|
OP
Newbie
Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
|
i'm trying to script a model viewer that get by the model loaded all the animation names, but in the documentation i have found only the way to know wich frame is playing as int. reading the mdl documentation i've found this:
typedef struct {
long type; // 0 for byte-packed positions, and 2 for word-packed positions
mdl_trivertx_t bboxmin,bboxmax; // bounding box of the frame
char name[16]; // name of frame, used for animation
mdl_trivertx_t vertex[numverts]; // array of vertices, either byte or short packed
} mdl_frame_t;
i would know how to return this char name[16]; // name of frame, used for animation at runtime in lite-c,if someone could giveme a hint or some suggestion it will be great. thanks,and sorry for the bad english, i'm italian. bye
Last edited by Azrael85; 10/01/08 12:38.
|
|
|
Re: problem on returning frame names by engine
[Re: Azrael85]
#229892
10/01/08 12:41
10/01/08 12:41
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
If you can get a pointer to the mdl_frame_t structure for your chosen model, use this. mdl_frame_t* ThisFrame = ???; //however you get your frame, I dont know how.
STRING* FrameName = str_create(ThisFrame.name); Hope this is what you meant and helps.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: problem on returning frame names by engine
[Re: EvilSOB]
#229897
10/01/08 13:16
10/01/08 13:16
|
Joined: Jul 2008
Posts: 27 Italy, Sicilia, Palermo
Azrael85
OP
Newbie
|
OP
Newbie
Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
|
If you can get a pointer to the mdl_frame_t structure for your chosen model, use this. mdl_frame_t* ThisFrame = ???; //however you get your frame, I dont know how.
STRING* FrameName = str_create(ThisFrame.name); Hope this is what you meant and helps. thanks for your answer!! is just that, how can i get a pointer to mdl_frame_t structure? the engine says undeclared identifier on "mdl_frame_t*" i have read how you can create a pointer to a struct but is not working 
|
|
|
Re: problem on returning frame names by engine
[Re: Azrael85]
#229900
10/01/08 13:36
10/01/08 13:36
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Sorry, I havent been able to find any way of accessing the frames directly myself.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|