Author Topic: problems working on basic animation suport  (Read 1015 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
problems working on basic animation suport
I have been trying to get the beginings of an animation suport and for some reason I can't get the properties string to parse without crashing
I tried replaceing the string with a constant but it still crashes at this line
subsystemp->ai_rotation->min = (float)atof("90");
made changes to set_subsystem_info in modelread.cpp
so far this is all I've done (also made changes to the necisary structure)
Code: [Select]

// CASE OF AI ROTATION
else if ( (p = strstr(props, "$ai")) != NULL) {
get_user_prop_value(p+3, buf);
subsystemp->flags |= MSS_FLAG_AI_ROTATE;
//reading early animation suport-Bobboau
if(!stricmp("dock",buf)){
mprintf(("model has AI animation, %s", buf));
if((p = strstr(props, "$up")) != NULL){
get_user_prop_value(p+3, buf);
mprintf((" up"));
subsystemp->ai_rotation->min = (float)(atof("90"));
}
if((p = strstr(props, "$down")) != NULL){
mprintf(("down"));
get_user_prop_value(p+5, buf);
subsystemp->ai_rotation->max = (float)atof("0");
}
// if((p = strstr(props, "$time")) != NULL){
// mprintf(("time"));
// get_user_prop_value(p+5, buf);
subsystemp->ai_rotation->time = (int)(turn_time * 1000);
// }
mprintf(("animation values, %f %f %d", subsystemp->ai_rotation->min, subsystemp->ai_rotation->max, subsystemp->ai_rotation->time));
}
// get parameters - ie, speed / dist / other ??
// time to activate
// condition
}


ok it seems to be something with the data structure it's going into..

agg never mind, I foget it was a pointer :mad:
ignor this thread for the time being, I'm sure I'll need some help later on
« Last Edit: November 09, 2002, 12:31:58 am by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together