diff --git a/code/decals/decals.cpp b/code/decals/decals.cpp index edca88269c..dbea84d0b8 100644 --- a/code/decals/decals.cpp +++ b/code/decals/decals.cpp @@ -1499,6 +1499,10 @@ bool shpere_tri_edge(vector* s_point, float rad, vertex vert[3]){ case 1: d = vm_vec_dist(s_point,&point_two); break; + default: + d = 0.0f; + Int3(); + break; } Assert(d > 0); diff --git a/code/missionui/missionshipchoice.cpp b/code/missionui/missionshipchoice.cpp index f2fd0b932c..d181bf2060 100644 --- a/code/missionui/missionshipchoice.cpp +++ b/code/missionui/missionshipchoice.cpp @@ -9,13 +9,16 @@ /* * $Logfile: /Freespace2/code/MissionUI/MissionShipChoice.cpp $ - * $Revision: 2.28 $ - * $Date: 2005-01-15 05:53:18 $ - * $Author: wmcoolmon $ + * $Revision: 2.29 $ + * $Date: 2005-01-28 11:39:17 $ + * $Author: Goober5000 $ * * C module to allow player ship selection for the mission * * $Log: not supported by cvs2svn $ + * Revision 2.28 2005/01/15 05:53:18 wmcoolmon + * Current version of the new techroom code -C + * * Revision 2.27 2004/12/14 14:46:13 Goober5000 * allow different wing names than ABGDEZ * --Goober5000 @@ -1957,7 +1960,7 @@ void ship_select_do(float frametime) int x = mouse_x + Ss_delta_x; int y = mouse_y + Ss_delta_y; - draw_model_icon(Ss_icons[Carried_ss_icon.ship_class].model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25, x, y, 32, 28, sip); + draw_model_icon(Ss_icons[Carried_ss_icon.ship_class].model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25f, x, y, 32, 28, sip); draw_brackets_square(x, y, x + 32, y + 28); //gr_shade(mouse_x + Ss_delta_x, mouse_y + Ss_delta_y, 32, 28); } @@ -2192,7 +2195,7 @@ void draw_ship_icon_with_number(int screen_offset, int ship_class) char buf[32]; int num_x,num_y; ss_icon_info *ss_icon; - color *color_to_draw; + color *color_to_draw = NULL; //shader *shader_to_use; @@ -2247,7 +2250,7 @@ void draw_ship_icon_with_number(int screen_offset, int ship_class) ship_info *sip = &Ship_info[ship_class]; gr_set_color_fast(color_to_draw); //gr_set_shader(shader_to_use); - draw_model_icon(ss_icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25, Ship_list_coords[gr_screen.res][screen_offset][0],Ship_list_coords[gr_screen.res][screen_offset][1], 32, 28, sip); + draw_model_icon(ss_icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25f, Ship_list_coords[gr_screen.res][screen_offset][0],Ship_list_coords[gr_screen.res][screen_offset][1], 32, 28, sip); draw_brackets_square(Ship_list_coords[gr_screen.res][screen_offset][0], Ship_list_coords[gr_screen.res][screen_offset][1], Ship_list_coords[gr_screen.res][screen_offset][0] + 32, Ship_list_coords[gr_screen.res][screen_offset][1] + 28); //gr_shade(Ship_list_coords[gr_screen.res][screen_offset][0],Ship_list_coords[gr_screen.res][screen_offset][1], 32, 28); } @@ -2764,7 +2767,7 @@ void draw_wing_block(int wb_num, int hot_slot, int selected_slot, int class_sele ship_info *sip = &Ship_info[Wss_slots[slot_index].ship_class]; gr_set_color_fast(color_to_draw); //gr_set_shader(shader_to_use); - draw_model_icon(icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25, Wing_icon_coords[gr_screen.res][slot_index][0], Wing_icon_coords[gr_screen.res][slot_index][1], 32, 28, sip); + draw_model_icon(icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25f, Wing_icon_coords[gr_screen.res][slot_index][0], Wing_icon_coords[gr_screen.res][slot_index][1], 32, 28, sip); draw_brackets_square(Wing_icon_coords[gr_screen.res][slot_index][0], Wing_icon_coords[gr_screen.res][slot_index][1], Wing_icon_coords[gr_screen.res][slot_index][0] + 32, Wing_icon_coords[gr_screen.res][slot_index][1] + 28); //gr_shade(Wing_icon_coords[gr_screen.res][slot_index][0], Wing_icon_coords[gr_screen.res][slot_index][1], 32, 28); } @@ -2833,7 +2836,7 @@ void ss_blit_ship_icon(int x,int y,int ship_class,int bmap_num) ship_info *sip = &Ship_info[ship_class]; gr_set_color_fast(&Icon_colors[bmap_num]); //gr_set_shader(&Icon_shaders[bmap_num]); - draw_model_icon(icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25, x, y, 32, 28, sip); + draw_model_icon(icon->model_index, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING | MR_NO_LIGHTING, sip->closeup_zoom / 1.25f, x, y, 32, 28, sip); draw_brackets_square(x, y, x + 32, y + 28); //gr_shade(x, y, 32, 28); } diff --git a/code/model/modelinterp.cpp b/code/model/modelinterp.cpp index 824daddaa2..a166845c0b 100644 --- a/code/model/modelinterp.cpp +++ b/code/model/modelinterp.cpp @@ -9,13 +9,17 @@ /* * $Logfile: /Freespace2/code/Model/ModelInterp.cpp $ - * $Revision: 2.93 $ - * $Date: 2005-01-28 09:56:44 $ - * $Author: taylor $ + * $Revision: 2.94 $ + * $Date: 2005-01-28 11:39:17 $ + * $Author: Goober5000 $ * * Rendering models, I think. * * $Log: not supported by cvs2svn $ + * Revision 2.93 2005/01/28 09:56:44 taylor + * add model_page_out_textures() for use in techroom + * make model_page_in_textures() load more textures + * * Revision 2.92 2005/01/01 19:45:32 taylor * add MR_NO_FOGGING flag to easily render models without fog (warp model, targetbox models) * @@ -5855,12 +5859,15 @@ void model_resort_index_buffer(ubyte *bsp_data, bool f2b, int texture, short* in //this calculates the angle at wich the rotation should start to slow down //and basicly fills in a bunch of other crap //if anyone wants the calculus behind these numbers I'll provide it -void triggered_rotation::start(queued_animation* q){ +void triggered_rotation::start(queued_animation* q) +{ +#ifndef NDEBUG mprintf(("animation start at %d\n",timestamp())); char ax[]="xyz"; +#endif - for(int axis = 0; axis < 3; axis++){ - + for (int axis = 0; axis < 3; axis++) + { direction.a1d[axis] = (end_angle.a1d[axis]+q->angle.a1d[axis])-current_ang.a1d[axis]; if(direction.a1d[axis])direction.a1d[axis] /= (float)fabs(direction.a1d[axis]); @@ -5875,7 +5882,10 @@ void triggered_rotation::start(queued_animation* q){ rot_accel.a1d[axis] = q->accel.a1d[axis]*direction.a1d[axis]; slow_angle.a1d[axis]=end_angle.a1d[axis]-(((q->vel.a1d[axis]*q->vel.a1d[axis])/(2.0f*q->accel.a1d[axis]))*direction.a1d[axis]); - mprintf(("axis %c: direction=%d, end angle=%f, velocity=%f, acceleration=%f, slow angle=%f\n", ax[axis],(int)direction.a1d[axis],end_angle.a1d[axis],rot_vel.a1d[axis],rot_accel.a1d[axis],slow_angle.a1d[axis])); + +#ifndef NDEBUG + mprintf(("axis %c: direction=%d, end angle=%f, velocity=%f, acceleration=%f, slow angle=%f\n", ax[axis],(int)direction.a1d[axis],end_angle.a1d[axis],rot_vel.a1d[axis],rot_accel.a1d[axis],slow_angle.a1d[axis])); +#endif } } diff --git a/code/ship/shipcontrails.cpp b/code/ship/shipcontrails.cpp index 172aea9901..3ad17a8ccc 100644 --- a/code/ship/shipcontrails.cpp +++ b/code/ship/shipcontrails.cpp @@ -9,13 +9,17 @@ /* * $Logfile: /Freespace2/code/Ship/ShipContrails.cpp $ - * $Revision: 2.14 $ - * $Date: 2005-01-28 11:06:23 $ + * $Revision: 2.15 $ + * $Date: 2005-01-28 11:39:18 $ * $Author: Goober5000 $ * * all sorts of cool stuff about ships * * $Log: not supported by cvs2svn $ + * Revision 2.14 2005/01/28 11:06:23 Goober5000 + * changed a bunch of transpose-rotate sequences to use unrotate instead + * --Goober5000 + * * Revision 2.13 2004/10/12 07:34:45 Goober5000 * added contrail speed threshold * --Goober5000 @@ -310,7 +314,6 @@ void ct_create_contrails(ship *shipp) vector v1; int idx; - matrix m; ship_info *sip; object *objp;