Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on October 15, 2002, 02:24:48 am
-
add
int numframes[MAX_MODEL_TEXTURES]; // number o frames-Bobboau
int fps[MAX_MODEL_TEXTURES]; // frames per second-Bobboau
int is_ani[MAX_MODEL_TEXTURES]; // flag for weather this texture is an ani-Bobboau
to the polymodel structure in model.h
in the case ID_TXTR of read_model_file
replace (the bold part is what is replaced)
if ( strstr(tmp_name, "thruster") || strstr(tmp_name, "invisible") || strstr(tmp_name, "warpmap") ) { //added warp map for subspace rift rendering-Bobboau
// Don't load textures for thruster animations or invisible textures
pm->textures[i] = -1;
[b]} else {
pm->textures[i] = bm_load( tmp_name );
}[/b]
with
} else {
pm->textures[i] = bm_load( tmp_name );
if (pm->textures[i]<0) { //if I couldn't find the PCX see if there is an ani-Bobboau
nprintf(("couldn't find %s.pcx",tmp_name));
pm->is_ani[i] = 1; //this is an animated texture
pm->textures[i] = bm_load_animation(tmp_name, &pm->numframes[i], &pm->fps[i], 1);
if(pm->textures[i]<0){
Warning( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", tmp_name, pm->filename );
pm->textures[i] = -1;
pm->is_ani[i] = 0; //this isn't an animated texture after all
nprintf((" or %s.ani\n",tmp_name));
}else{
mprintf(("but I did find %s.ani, ", tmp_name));
mprintf(("with %d frames, ", pm->numframes[i]));
mprintf(("and a rate of %d\n", pm->fps[i]));
}
}
}
and
were in model_interp_tmappoly it says
texture = pm->textures[w(p+40)];//here is were it picks the texture to render for ani-Bobboau
replace with
if (pm->is_ani[w(p+40)]){
texture = pm->textures[w(p+40)] + ((timestamp() / (int)(pm->fps[w(p+40)])) % pm->numframes[w(p+40)]);//here is were it picks the texture to render for ani-Bobboau
}else{
texture = pm->textures[w(p+40)];//here is were it picks the texture to render for normal-Bobboau
}
that was easier than it should have been, after I set my mind to it it took all of about fifteen minutes to get working (note I haven't tested this in game, only the tech room, I may need to page this in still)
and the exe is in my latest revision of TBP open (http://freespace.volitionwatch.com/blackwater/TBPopen.zip)
(if you don't want to mess with the TBP stuff just extract the exe)
-
just tested it in game, and it seems to work,
yup
-
oooooooooooooooooooooooooooooooooooooooooooh!
Damn, i'm not even at home for two more weeks, can't try that :mad:
-
Bobbau, can i assume that these new features will be integrated in the next fs2 open exe?
Or does TBP has it's own source code modifications?
-
well this is my sorce code mod, untill I can get CVS, I'm just gona have to tell those who know how to use it what I did,
and TBP isn't even officaly suporting any of the stuff I'm doing, yet
-
Oh, ok...
Wish that someone makes something less eyecandy but at least of the same importance, like improving campaign management with mission variables import and true dynamic mission tree support...
-
btw, can we have some piccies? map a manticore with the thruster ani for exemple :)
-
Bob, cvs is seriously easy.
Did you get my e-mail about it?
-
I got the E-mail, never got around to reading it though.. I think I'll do that tonight, anyone got a private IRC and knowleg on how to operate CVS
and anyone who downloaded the thing I pointed to and you can't seem to get it to work try it again, my FTP thing wasn't doing what it should have been doing
-
pics please...
-
well this really seems to be a greate thing:)
-
We have a dedicated IRC server.
irc.maxgaming.net:6667 #fs2source
look for EdGardner-MGT (me)
-
it's too early right now, ether tonight or tomaro, I'm only up becase my brother needs someone to watch him get on the bus... wich he just did, I'm going back to sleep...
-
k, lemme know, I am (almost) always on that server.
-
alright, I give up.
-
well you can't realy take a still image of an animated texture, it sort of looses something in the translation
-
still I can get an idea of it. never mind anyway.
-
take 2 and show us the difference
-
Hmm... I see... Has this been integrated into the source code?
-
yup, though nobody ever tested it for me,
hint hint
-
See, with this someone could model the advert-blimp from Blade Runner, complete with animated screens.
"A new life awaits in the off-world colonies..." :D
-
you could always capture a breif sample of the game, heres what you need.
-a video card that can support multiple screens, with eighter composit or svideo out
-a vcr
- a blank tape
-a video capture card
-some svideo or composite cable
-video editing software
hook your vcr to your video card (if your card only lets you run one output at a time, then go find a spare tv right now and hook it to your vcr) and set your video to output to your composit/svideo out.
load freespace with code tweaks
punch record
play game, shoot up tweaked manticore
exit game
wire your vcr to your video capture card and capture the part of the tape you want to show off, capture it to an avi (or directly to a gif if your software lets you) and convert it to gif.
put gif on web and show off cool burning manticore
**** im bored, work sucks!