[Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.50,1.51 events.cpp,1.24,1.25 function.cpp,1.50,1.51 icons.cpp,1.30,1.31 interpreter.h,1.13,1.14 logic.cpp,1.39,1.40 speech.cpp,1.56,1.57 sync.cpp,1.16,1.17 walker.cpp,1.33,1.34
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Fri Jan 9 06:54:00 CET 2004
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1:/tmp/cvs-serv6633
Modified Files:
anims.cpp events.cpp function.cpp icons.cpp interpreter.h
logic.cpp speech.cpp sync.cpp walker.cpp
Log Message:
Removed redundant comments.
Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/anims.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- anims.cpp 6 Jan 2004 13:44:17 -0000 1.50
+++ anims.cpp 9 Jan 2004 14:52:38 -0000 1.51
@@ -303,8 +303,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= NO_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -316,8 +314,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= BGP0_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -329,8 +325,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= BGP1_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -342,8 +336,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= BACK_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -355,8 +347,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= SORT_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -368,8 +358,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= FORE_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -381,8 +369,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= FGP0_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -394,8 +380,6 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0xffff0000;
ob_graphic->type |= FGP1_SPRITE;
-
- // continue script
return IR_CONT;
}
@@ -405,13 +389,10 @@
ObjectGraphic *ob_graphic = (ObjectGraphic *) _vm->_memory->intToPtr(params[0]);
// remove previous status (but don't affect the shading upper-word)
- ob_graphic->type &= 0x0000ffff;
- ob_graphic->type |= SHADED_SPRITE;
-
// note that drivers may still shade mega frames automatically, even
// when not sent 'RDSPR_SHADOW'
-
- // continue script
+ ob_graphic->type &= 0x0000ffff;
+ ob_graphic->type |= SHADED_SPRITE;
return IR_CONT;
}
@@ -423,26 +404,9 @@
// remove previous status (but don't affect the shading upper-word)
ob_graphic->type &= 0x0000ffff;
ob_graphic->type |= UNSHADED_SPRITE;
-
- // continue script
return IR_CONT;
}
-// Notes on PlaySmacker()
-
-// 1st param is filename of sequence file
-// 2nd param is a pointer to a null-terminated array of pointers to
-// MovieTextObject structures
-
-//int32 PlaySmacker(char *filename, MovieTextObject *textObjects[]);
-
-// struct MovieTextObject {
-// uint16 startFrame;
-// uint16 endFrame;
-// SpriteInfo *textSprite;
-// _wavHeader *speech;
-// };
-
int32 Logic::fnAddSequenceText(int32 *params) {
// params: 0 text number
// 1 frame number to start the text displaying
@@ -454,8 +418,6 @@
_sequenceTextList[_sequenceTextLines].startFrame = params[1];
_sequenceTextList[_sequenceTextLines].endFrame = (uint16) params[2];
_sequenceTextLines++;
-
- // continue script
return IR_CONT;
}
@@ -637,8 +599,6 @@
// fade out any music that is currently playing
fnStopMusic(NULL);
-
- // continue script
return IR_CONT;
}
@@ -647,8 +607,6 @@
// ready for use in fnPlaySequence
_smackerLeadOut = params[0];
-
- // continue script
return IR_CONT;
}
@@ -751,8 +709,6 @@
_vm->_graphics->setPalette(0, 256, (uint8 *) pal, RDPAL_INSTANT);
debug(5, "fnPlaySequence FINISHED");
-
- // continue script
return IR_CONT;
}
Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/events.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- events.cpp 6 Jan 2004 13:44:17 -0000 1.24
+++ events.cpp 9 Jan 2004 14:52:38 -0000 1.25
@@ -199,7 +199,6 @@
// start the pause
if (ob_logic->looping == 0) {
ob_logic->looping = 1;
- // no. of game cycles
ob_logic->pause = params[1];
}
@@ -207,14 +206,10 @@
if (ob_logic->pause) {
// decrement the pause count
ob_logic->pause--;
-
- // drop out of script, but call this again next cycle
return IR_REPEAT;
} else {
- // pause count is zerp
+ // pause count is zero
ob_logic->looping = 0;
-
- // continue script
return IR_CONT;
}
}
Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/function.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- function.cpp 8 Jan 2004 13:03:50 -0000 1.50
+++ function.cpp 9 Jan 2004 14:52:38 -0000 1.51
@@ -56,8 +56,6 @@
PLAYER_ACTION = 0;
logicReplace(params[0]);
-
- // drop out no pc save - and around again
return IR_TERMINATE;
}
@@ -153,13 +151,9 @@
if (ob_logic->pause) {
// decrement the pause count
ob_logic->pause--;
-
- // drop out of script, but call this again next cycle
return IR_REPEAT;
} else {
ob_logic->looping = 0;
-
- // continue script
return IR_CONT;
}
}
@@ -227,8 +221,6 @@
ObjectMega *ob_mega = (ObjectMega *) _vm->_memory->intToPtr(params[0]);
ob_mega->megaset_res = params[1];
-
- // continue script
return IR_CONT;
}
Index: icons.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/icons.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- icons.cpp 6 Jan 2004 13:44:17 -0000 1.30
+++ icons.cpp 9 Jan 2004 14:52:38 -0000 1.31
@@ -33,7 +33,6 @@
memcpy(&_vm->_tempList[_vm->_totalTemp], _vm->_memory->intToPtr(params[0]), sizeof(MenuObject));
_vm->_totalTemp++;
- // script continue
return IR_CONT;
}
@@ -54,7 +53,6 @@
_vm->buildMenu();
_vm->_examiningMenuIcon = false;
- // script continue
return IR_CONT;
}
Index: interpreter.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/interpreter.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- interpreter.h 6 Jan 2004 13:44:17 -0000 1.13
+++ interpreter.h 9 Jan 2004 14:52:38 -0000 1.14
@@ -25,11 +25,11 @@
// Interpreter return codes
enum {
- IR_STOP = 0,
- IR_CONT = 1,
- IR_TERMINATE = 2,
- IR_REPEAT = 3,
- IR_GOSUB = 4
+ IR_STOP = 0, // Quit for a cycle
+ IR_CONT = 1, // Continue as normal
+ IR_TERMINATE = 2, // Return without updating the offset
+ IR_REPEAT = 3, // Return; offset at start of function call
+ IR_GOSUB = 4 // Return with updated offset
};
// Get parameter fix so that the playstation version can handle words not on
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/logic.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- logic.cpp 6 Jan 2004 13:44:17 -0000 1.39
+++ logic.cpp 9 Jan 2004 14:52:38 -0000 1.40
@@ -365,8 +365,6 @@
// params: none
totalRestart();
-
- // drop out without saving pc and go around again
return IR_TERMINATE;
}
@@ -397,11 +395,8 @@
// (otherwise finish)
if (entry == _kills) {
-#ifdef _SWORD2_DEBUG
// no room at the inn
- if (_kills == OBJECT_KILL_LIST_SIZE)
- error("List full in fnAddToKillList(%u)", ID);
-#endif
+ assert(_kills < OBJECT_KILL_LIST_SIZE);
// add this 'ID' to the kill list
_objectKillList[_kills] = ID;
@@ -417,7 +412,6 @@
}
}
- // continue script
return IR_CONT;
}
Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/speech.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- speech.cpp 6 Jan 2004 13:44:17 -0000 1.56
+++ speech.cpp 9 Jan 2004 14:52:39 -0000 1.57
@@ -173,8 +173,6 @@
_vm->setMouse(NORMAL_MOUSE_ID);
_choosing = true;
-
- // again next cycle
return IR_REPEAT;
}
@@ -272,7 +270,6 @@
// restart george's base script
// totalRestart();
- //drop out without saving pc and go around again
return IR_CONT;
}
@@ -420,8 +417,6 @@
// debug flag to indicate who we're waiting for - see debug.cpp
_speechScriptWaiting = target;
-
- // see ya next cycle
return IR_REPEAT;
}
@@ -595,7 +590,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_turn:
pars[0] = params[2]; // ob_logic
@@ -612,7 +606,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_face:
pars[0] = params[2]; // ob_logic
@@ -629,7 +622,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_anim:
pars[0] = params[2]; // ob_logic
@@ -644,7 +636,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_reverse_anim:
pars[0] = params[2]; // ob_logic
@@ -659,7 +650,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_table_anim:
pars[0] = params[2]; // ob_logic
@@ -675,7 +665,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_reverse_table_anim:
pars[0] = params[2]; // ob_logic
@@ -691,7 +680,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_no_sprite:
fnNoSprite(params); // ob_graphic
@@ -732,7 +720,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_walk_to_anim:
pars[0] = params[2]; // ob_logic
@@ -751,7 +738,6 @@
ob_speech->wait_state = 1;
}
- // come back again next cycle
return IR_REPEAT;
case INS_stand_after_anim:
pars[0] = params[0]; // ob_graphic
@@ -760,7 +746,7 @@
fnStandAfterAnim(pars);
ob_speech->command = 0; // command finished
ob_speech->wait_state = 1; // waiting for command
- return IR_REPEAT; // come back again next cycle
+ return IR_REPEAT;
case INS_set_frame:
pars[0] = params[0]; // ob_graphic
pars[1] = ob_speech->ins1; // anim_resource
@@ -768,7 +754,7 @@
fnSetFrame(pars);
ob_speech->command = 0; // command finished
ob_speech->wait_state = 1; // waiting for command
- return IR_REPEAT; // come back again next cycle
+ return IR_REPEAT;
case INS_quit:
debug(5, "speech-process - quit");
@@ -814,8 +800,6 @@
// now free
ob_speech->wait_state = 1;
-
- // come back again next cycle
return IR_REPEAT;
}
}
@@ -1273,7 +1257,6 @@
if (_rightClickDelay)
_rightClickDelay--;
- // back again next cycle
return IR_REPEAT;
}
Index: sync.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sync.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sync.cpp 6 Jan 2004 13:44:17 -0000 1.16
+++ sync.cpp 9 Jan 2004 14:52:39 -0000 1.17
@@ -109,7 +109,6 @@
}
}
- // back again next cycle
return IR_REPEAT;
}
Index: walker.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/walker.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- walker.cpp 6 Jan 2004 13:44:17 -0000 1.33
+++ walker.cpp 9 Jan 2004 14:52:39 -0000 1.34
@@ -227,8 +227,6 @@
// allow _walkData array to float about memory again
_router->floatRouteMem();
-
- // stop the script, but repeat this call next cycle
return IR_REPEAT;
}
More information about the Scummvm-git-logs
mailing list