[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.4,1.5 speech.cpp,1.6,1.7 sync.cpp,1.2,1.3 walker.cpp,1.3,1.4
Jonathan Gray
khalek at users.sourceforge.net
Mon Jul 28 04:22:23 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv20444
Modified Files:
anims.cpp speech.cpp sync.cpp walker.cpp
Log Message:
fix some VC7 warnings
Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- anims.cpp 28 Jul 2003 09:49:45 -0000 1.4
+++ anims.cpp 28 Jul 2003 11:21:25 -0000 1.5
@@ -520,9 +520,9 @@
Con_fatal_error("FN_add_sequence_text ran out of lines (%s line %u)",__FILE__,__LINE__);
#endif
- sequence_text_list[sequenceTextLines].textNumber = params[0];
- sequence_text_list[sequenceTextLines].startFrame = params[1];
- sequence_text_list[sequenceTextLines].endFrame = params[2];
+ sequence_text_list[sequenceTextLines].textNumber = params[0];
+ sequence_text_list[sequenceTextLines].startFrame = params[1];
+ sequence_text_list[sequenceTextLines].endFrame = (uint16) params[2];
sequenceTextLines++;
return(IR_CONT); // continue script
Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/speech.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- speech.cpp 28 Jul 2003 09:49:45 -0000 1.6
+++ speech.cpp 28 Jul 2003 11:21:25 -0000 1.7
@@ -215,11 +215,11 @@
{
// Zdebug(" ICON res %d for %d", subject_list[j].res, j);
icon = res_man.Res_open( subject_list[j].res ) + sizeof(_standardHeader) + RDMENU_ICONWIDE*RDMENU_ICONDEEP;
- SetMenuIcon(RDMENU_BOTTOM, j, icon);
+ SetMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
res_man.Res_close( subject_list[j].res );
}
else
- { SetMenuIcon(RDMENU_BOTTOM, j, NULL); //no icon here
+ { SetMenuIcon(RDMENU_BOTTOM, (uint8) j, NULL); //no icon here
//Zdebug(" NULL for %d", j);
}
}
@@ -275,7 +275,7 @@
if (j!=hit) //change all others to grey
{
icon = res_man.Res_open( subject_list[j].res ) + sizeof(_standardHeader); //now grey
- SetMenuIcon(RDMENU_BOTTOM, j, icon);
+ SetMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
res_man.Res_close( subject_list[j].res );
}
}
@@ -360,7 +360,7 @@
// restart george's base script
// LLogic.Total_restart();
- if (params);
+ // if (params); what is this supposed to do? - khalek
return(IR_CONT); //drop out without saving pc and go around again
}
@@ -1809,11 +1809,11 @@
ob_mega = (Object_mega*) params[S_OB_MEGA]; // this may be NULL
// calc scale at which to print the sprite, based on feet y-coord & scaling constants (NB. 'scale' is actually 256*true_scale, to maintain accuracy)
- scale = (ob_mega->scale_a * ob_mega->feet_y + ob_mega->scale_b)/256; // Ay+B gives 256*scale ie. 256*256*true_scale for even better accuracy, ie. scale = (Ay+B)/256
+ scale = (uint16) ((ob_mega->scale_a * ob_mega->feet_y + ob_mega->scale_b)/256); // Ay+B gives 256*scale ie. 256*256*true_scale for even better accuracy, ie. scale = (Ay+B)/256
// calc suitable centre point above the head, based on scaled height
- text_x = ob_mega->feet_x; // just use 'feet_x' as centre
- text_y = ob_mega->feet_y + (cdt_entry->y * scale)/256; // add scaled y-offset to feet_y coord to get top of sprite
+ text_x = (int16) (ob_mega->feet_x); // just use 'feet_x' as centre
+ text_y = (int16) (ob_mega->feet_y + (cdt_entry->y * scale)/256); // add scaled y-offset to feet_y coord to get top of sprite
}
else // it's a non-scaling anim
{
Index: sync.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sync.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sync.cpp 28 Jul 2003 03:12:49 -0000 1.2
+++ sync.cpp 28 Jul 2003 11:21:25 -0000 1.3
@@ -135,14 +135,14 @@
for (j=0;j<MAX_syncs;j++)
- if (sync_list[j].id == ID)
- { RESULT=sync_list[j].sync;
+ if (sync_list[j].id == ID) {
+ RESULT=sync_list[j].sync;
return(IR_CONT); //return sync value waiting
}
RESULT=0;
- if (params);
+ // if (params); what is the point of this... khalek
return(IR_CONT); //no sync found
@@ -163,14 +163,15 @@
// Zdebug("%d waits", ID);
- for (j=0;j<MAX_syncs;j++)
- if (sync_list[j].id == ID)
- { RESULT=sync_list[j].sync;
+ for (j=0;j<MAX_syncs;j++) {
+ if (sync_list[j].id == ID) {
+ RESULT=sync_list[j].sync;
//Zdebug(" go");
return(IR_CONT); //return sync value waiting
}
+ }
- if (params);
+ // if (params); // what is the point of this... - khalek
return(IR_REPEAT); //back again next cycle
Index: walker.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/walker.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- walker.cpp 28 Jul 2003 03:12:49 -0000 1.3
+++ walker.cpp 28 Jul 2003 11:21:25 -0000 1.4
@@ -121,9 +121,9 @@
ob_graph = (Object_graphic *)params[1];
ob_mega = (Object_mega *)params[2];
- target_x = params[4];
- target_y = params[5];
- target_dir = params[6];
+ target_x = (int16) params[4];
+ target_y = (int16) params[5];
+ target_dir = (uint8) params[6];
//----------------------------------------------------------------------------------------
// if this is the start of the walk, calculate route
@@ -154,7 +154,7 @@
ob_mega->walk_pc=0; //always
AllocateRouteMem(); // set up mem for _walkData in route_slots[] & set mega's 'route_slot_id' accordingly
- route = RouteFinder(ob_mega, ob_walkdata, target_x, target_y, target_dir);
+ route = (int8) RouteFinder(ob_mega, ob_walkdata, target_x, target_y, target_dir);
/*
if (id == PLAYER)
@@ -923,9 +923,9 @@
//----------------------------------------------------------------------------------------
- standby_x = params[0];
- standby_y = params[1];
- standby_dir = params[2];
+ standby_x = (int16) params[0];
+ standby_y = (int16) params[1];
+ standby_dir = (uint8) params[2];
return(IR_CONT); // continue script
}
More information about the Scummvm-git-logs
mailing list