# HG changeset patch # User LordOfWar # Date 2009-07-05 19:55:01 # Node ID 387c6b396ee576c12a6b427718f77b11e0b4a4d0 # Parent 43a343738d88844cb2c9d537f86198648d94c3c3 finished status report generator to count the number of frames completed and update the int variable in the blendjob structure. Still need to add code to count the number of frames assigned and the percent done. How do you round an interger to 2 decimal places? moved possibility to secondary upload location to blendjob structure from the frameset structure... cause its not gonna change in between frames... it would just waste a ton of memory. Still need to add more comments to the status report generator. diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -57,6 +57,12 @@ struct { int total_frames; // how many frames are in the animation struct frameset **frameset; // What exactly is this now? hehe + + + // For secondary upload location... + char url; + char login_name; + char login_pass; } blendjob[max]; // -- Matthew's handywork -- @@ -65,11 +71,6 @@ struct { int frame_num; // frame number to render char slave_name; // user that frame is assigned to int frame_status; // status of frame, 0= unassigned, 1= taken, 2= done - - // For secondary upload location... - char url; - char login_name; - char login_pass; } frameset[frame_count]; // Frame count is the frame number if the animation starts on zero... but animations start at frame 1 // Using this method to save memory, because if animation starts on a high frame number, it would waste a lot of RAM on empty structures // -- end of Matthew's handywork -- @@ -338,13 +339,20 @@ void status_report_generator(){ hcfjob+1; // adds 1 to the highest consecutively finished job while(num1 <= highest_jobnum){ - if(blendjob[num1].frameset[num2].priority != 0){ + if(blendjob[num1].frameset[num2].priority != 0){ // If the job is not done, scan it + + int finished_frames = 0; // variable that counts the completed frames while(num2 <= blendjob[jobnum].total_frames){ - int finished_frames = 0; if(blendjob[jobnum].frameset[num2]) finished_frames++; + + num2++; } } + + blendjob[num1].completed_frames = finished_frames; + + num1++; } }