Documentation: General code cleanup for 64bit

This commit is contained in:
Echelon9 committed 2011-11-05 08:12:04 +00:00
1 parent c852d3a466
commit 9f711bf53e
15 files changed
+34 -72

No files matched your search

+2 -2
View File
@@ -7987,8 +7987,8 @@ void ai_chase()
if (esip->class_type > -1)
{
ship_type_info *stp = &Ship_types[sip->class_type];
uint ap_size = stp->ai_actively_pursues.size();
for(uint i = 0; i < ap_size; i++)
size_t ap_size = stp->ai_actively_pursues.size();
for(size_t i = 0; i < ap_size; i++)
{
if(stp->ai_actively_pursues[i] == esip->class_type) {
go_after_it = true;
+3 -3
View File
@@ -835,9 +835,9 @@ int get_nearest_turret_objnum(int turret_parent_objnum, ship_subsys *turret_subs
else
tt = &Ai_tp_list[Weapon_info[priority_weapon_idx].targeting_priorities[i]];
int n_types = tt->ship_type.size();
int n_s_classes = tt->ship_class.size();
int n_w_classes = tt->weapon_class.size();
int n_types = (int)tt->ship_type.size();
int n_s_classes = (int)tt->ship_class.size();
int n_w_classes = (int)tt->weapon_class.size();
bool found_something;
object *ptr = GET_FIRST(&obj_used_list);
+1 -1
View File
@@ -1792,7 +1792,7 @@ void asteroid_parse_tbl()
Assert( Species_info.size() );
// sanity check for debris type sizes
for (i = Species_info.size(); i >= 0; i--) {
for (i = (int)Species_info.size(); i >= 0; i--) {
// must remain in proper order
// 0 - generic debris types
// > 0 - species specific debris types
+2 -2
View File
@@ -261,7 +261,7 @@ void extract_all_files(char *file)
printf("Extracting: %s...\n", file);
for (uint i = 0; i < VP_FileInfo.size(); i++) {
for (size_t i = 0; i < VP_FileInfo.size(); i++) {
// save the file path to a temp location and recursively make the needed directories
if (have_outdir) {
if ( (out_len + 1 + strlen(path)) > MAX_PATH-1 )
@@ -365,7 +365,7 @@ void list_all_files(char *file)
printf(" Name Size Offset Date/Time Path\n");
printf("-------------------------------------------------------------------------------\n");
for (uint i = 0; i < VP_FileInfo.size(); i++) {
for (size_t i = 0; i < VP_FileInfo.size(); i++) {
plat_time = VP_FileInfo[i].write_time; // gets rid of some platform strangeness this way
strftime(out_time, 32, "%F %H:%M", localtime(&plat_time)); // YYYY-mm-dd HH:mm (ISO 8601 date format, 24-hr time)
+2 -2
View File
@@ -443,9 +443,9 @@ void gr_opengl_post_process_end()
void get_post_process_effect_names(SCP_vector<SCP_string> &names)
{
int idx;
size_t idx;
for (idx = 0; idx < (int)Post_effects.size(); idx++) {
for (idx = 0; idx < Post_effects.size(); idx++) {
names.push_back(Post_effects[idx].name);
}
}
+2 -2
View File
@@ -353,7 +353,7 @@ void opengl_shader_set_current(opengl_shader_t *shader_obj)
int opengl_shader_get_index(int flags)
{
uint idx;
size_t idx;
for (idx = 0; idx < GL_shader.size(); idx++) {
if (GL_shader[idx].flags == flags) {
@@ -366,7 +366,7 @@ int opengl_shader_get_index(int flags)
void opengl_shader_shutdown()
{
uint i;
size_t i;
if ( !Use_GLSL ) {
return;
+4 -4
View File
@@ -1467,9 +1467,9 @@ int opengl_check_framebuffer()
static fbo_t *opengl_get_fbo(int width, int height)
{
uint rt_size = RenderTarget.size();
size_t rt_size = RenderTarget.size();
for (uint i = 0; i < rt_size; i++) {
for (size_t i = 0; i < rt_size; i++) {
if ( (RenderTarget[i].width == width) && (RenderTarget[i].height == height) ) {
return &RenderTarget[i];
}
@@ -1491,7 +1491,7 @@ void opengl_kill_render_target(int slot)
}
tcache_slot_opengl *ts = &Textures[slot];
uint idx = 0;
size_t idx = 0;
for (idx = 0; idx < RenderTarget.size(); idx++) {
if ( (RenderTarget[idx].width == ts->w) && (RenderTarget[idx].height == ts->h) ) {
@@ -1527,7 +1527,7 @@ void opengl_kill_render_target(int slot)
void opengl_kill_all_render_targets()
{
for (uint i = 0; i < RenderTarget.size(); i++) {
for (size_t i = 0; i < RenderTarget.size(); i++) {
fbo_t *fbo = &RenderTarget[i];
if (fbo->framebuffer_id) {
+1 -1
View File
@@ -619,7 +619,7 @@ void HudGaugeBrackets::render(float frametime)
if(!in_frame)
g3_start_frame(0);
for(int i = 0; i < (int)target_display_list.size(); i++) {
for(size_t i = 0; i < target_display_list.size(); i++) {
// make sure this point is projected. Otherwise, skip.
if( !(target_display_list[i].target_point.flags & PF_OVERFLOW) ) {
if ( target_display_list[i].objp ) {
+2 -2
View File
@@ -3851,7 +3851,7 @@ void HudGaugeLeadIndicator::render(float frametime)
renderLeadCurrentTarget();
// if extra targetting info is enabled, render lead indicators for objects in the target display list.
for(int i = 0; i < (int)target_display_list.size(); i++) {
for(size_t i = 0; i < target_display_list.size(); i++) {
if ( (target_display_list[i].flags & TARGET_DISPLAY_LEAD) && target_display_list[i].objp ) {
// set the color
@@ -6427,7 +6427,7 @@ void HudGaugeOffscreen::render(float frametime)
g3_start_frame(0);
gr_set_screen_scale(base_w, base_h);
for(int i = 0; i < (int)target_display_list.size(); i++) {
for(size_t i = 0; i < target_display_list.size(); i++) {
if(target_display_list[i].target_point.codes != 0) {
float dist = 0.0f;
+1 -1
View File
@@ -1254,7 +1254,7 @@ void labviewer_populate_flags_window()
void labviewer_update_flags_window()
{
uint i;
size_t i;
if ( (Lab_selected_index < 0) || (Lab_mode == LAB_MODE_NONE) ) {
return;
+3 -3
View File
@@ -2383,12 +2383,12 @@ void model_render_thrusters(polymodel *pm, int objnum, ship *shipp, matrix *orie
ship_info *sip = &Ship_info[shipp->ship_info_index];
particle_emitter pe;
thruster_particles *tp;
int num_particles = 0;
size_t num_particles = 0;
if (Interp_afterburner)
num_particles = (int)sip->afterburner_thruster_particles.size();
num_particles = sip->afterburner_thruster_particles.size();
else
num_particles = (int)sip->normal_thruster_particles.size();
num_particles = sip->normal_thruster_particles.size();
for (k = 0; k < num_particles; k++) {
if (Interp_afterburner)
-38
View File
@@ -2871,44 +2871,6 @@ polymodel_instance* model_get_instance(int model_instance_num)
return Polygon_model_instances[model_instance_num];
}
/*
// Finds the 3d bounding box of a model. If submodel_num is -1,
// then it starts from the root object. If inc_children is non-zero,
// then this will recurse and find the bounding box for all children
// also.
void model_find_bound_box_3d(int model_num,int submodel_num, int inc_children, matrix *orient, vec3d * pos, vec3d * box )
{
polymodel * pm;
vec3d to_root_xlat;
matrix to_root_rotate;
int n_steps, steps[16];
int tmp_sobj;
if ( (model_num < 0) || (model_num >= N_polygon_models) ) return;
pm = &Polygon_models[model_num];
if ( submodel_num < 0 ) submodel_num = pm->detail[0];
// traverse up the model tree to a root object.
// Store this path in n_steps,
n_steps = 0;
tmp_sobj = submodel_num;
while( tmp_sobj > -1 ) {
steps[n_steps++] = tmp_sobj;
tmp_sobj = pm->submodel[tmp_sobj].parent;
}
// vm_copy_transpose_matrix(&to_world_rotate, orient );
// to_world_xlat = *pos;
}
*/
// Returns zero is x1,y1,x2,y2 are valid
// returns 1 for invalid model, 2 for point offscreen.
// note that x1,y1,x2,y2 aren't clipped to 2d screen coordinates!
+6 -6
View File
@@ -8284,7 +8284,7 @@ int test_argument_vector_for_condition(SCP_vector<char*> argument_vector, bool a
*num_known_false = 0;
// loop through all arguments
for (unsigned int i = 0; i < argument_vector.size(); i++)
for (size_t i = 0; i < argument_vector.size(); i++)
{
// since we can't see or modify the validity, assume all are valid
{
@@ -9551,16 +9551,16 @@ void sexp_hud_activate_gauge_type(int n) {
if (config_type != -1) {
if(Ship_info[Player_ship->ship_info_index].hud_gauges.size() > 0) {
int num_gauges = Ship_info[Player_ship->ship_info_index].hud_gauges.size();
size_t num_gauges = Ship_info[Player_ship->ship_info_index].hud_gauges.size();
for(int i = 0; i < num_gauges; i++) {
for(size_t i = 0; i < num_gauges; i++) {
if (Ship_info[Player_ship->ship_info_index].hud_gauges[i]->getObjectType() == config_type)
Ship_info[Player_ship->ship_info_index].hud_gauges[i]->updateSexpOverride(!active);
}
} else {
int num_gauges = default_hud_gauges.size();
size_t num_gauges = default_hud_gauges.size();
for(int i = 0; i < num_gauges; i++) {
for(size_t i = 0; i < num_gauges; i++) {
if (default_hud_gauges[i]->getObjectType() == config_type)
default_hud_gauges[i]->updateSexpOverride(!active);
}
@@ -15167,7 +15167,7 @@ void sexp_ship_copy_damage(int node)
void sexp_activate_deactivate_glow_points(int n, bool activate)
{
int sindex;
uint i;
size_t i;
for ( ; n != -1; n = CDR(n))
{
+3 -3
View File
@@ -445,7 +445,7 @@ void shockwave_render(object *objp)
*/
int shockwave_load(char *s_name, bool shock_3D)
{
uint i;
size_t i;
int s_index = -1;
shockwave_info *si = NULL;
@@ -584,7 +584,7 @@ void shockwave_level_close()
shockwave_delete_all();
uint i;
size_t i;
// unload default shockwave, and erase all others
for (i = 0; i < Shockwave_info.size(); i++) {
@@ -699,7 +699,7 @@ int shockwave_get_flags(int index)
void shockwave_page_in()
{
uint i;
size_t i;
// load in shockwaves
for (i = 0; i < Shockwave_info.size(); i++) {
+2 -2
View File
@@ -150,9 +150,9 @@ int weapon_explosions::GetIndex(char *filename)
return -1;
}
for (uint i = 0; i < ExplosionInfo.size(); i++) {
for (size_t i = 0; i < ExplosionInfo.size(); i++) {
if ( !stricmp(ExplosionInfo[i].lod[0].filename, filename)) {
return i;
return (int)i;
}
}