HUGO: Fix CID 1003560, 1002882
This commit is contained in:
parent
ba50475dfa
commit
40c6569940
3 changed files with 16 additions and 3 deletions
|
@ -398,9 +398,9 @@ void Parser::command(const char *format, ...) {
|
||||||
* Locate any member of object name list appearing in command line
|
* Locate any member of object name list appearing in command line
|
||||||
*/
|
*/
|
||||||
bool Parser::isWordPresent(char **wordArr) const {
|
bool Parser::isWordPresent(char **wordArr) const {
|
||||||
|
if (wordArr != 0) {
|
||||||
debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]);
|
debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]);
|
||||||
|
|
||||||
if (wordArr != 0) {
|
|
||||||
for (int i = 0; strlen(wordArr[i]); i++) {
|
for (int i = 0; strlen(wordArr[i]); i++) {
|
||||||
if (strstr(_vm->_line, wordArr[i]))
|
if (strstr(_vm->_line, wordArr[i]))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -45,6 +45,17 @@ Route::Route(HugoEngine *vm) : _vm(vm) {
|
||||||
_routeIndex = -1; // Hero not following a route
|
_routeIndex = -1; // Hero not following a route
|
||||||
_routeType = kRouteSpace; // Hero walking to space
|
_routeType = kRouteSpace; // Hero walking to space
|
||||||
_routeObjId = -1; // Hero not walking to anything
|
_routeObjId = -1; // Hero not walking to anything
|
||||||
|
|
||||||
|
for (int i = 0; i < kMaxSeg; i++)
|
||||||
|
_segment[i]._y = _segment[i]._x1 = _segment[i]._x2 = 0;
|
||||||
|
|
||||||
|
_segmentNumb = 0;
|
||||||
|
_routeListIndex = 0;
|
||||||
|
_destX = _destY = 0;
|
||||||
|
_heroWidth = 0;
|
||||||
|
_routeFoundFl = false;
|
||||||
|
_fullStackFl = false;
|
||||||
|
_fullSegmentFl = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Route::resetRoute() {
|
void Route::resetRoute() {
|
||||||
|
|
|
@ -79,9 +79,11 @@ private:
|
||||||
int16 _destY;
|
int16 _destY;
|
||||||
int16 _heroWidth; // Hero width
|
int16 _heroWidth; // Hero width
|
||||||
bool _routeFoundFl; // TRUE when path found
|
bool _routeFoundFl; // TRUE when path found
|
||||||
bool _fullStackFl; // TRUE if stack exhausted
|
|
||||||
bool _fullSegmentFl; // Segments exhausted
|
bool _fullSegmentFl; // Segments exhausted
|
||||||
|
|
||||||
|
// CHECKME: Never set to true, could be removed
|
||||||
|
bool _fullStackFl; // TRUE if stack exhausted
|
||||||
|
|
||||||
void segment(int16 x, int16 y);
|
void segment(int16 x, int16 y);
|
||||||
bool findRoute(const int16 cx, const int16 cy);
|
bool findRoute(const int16 cx, const int16 cy);
|
||||||
Common::Point *newNode();
|
Common::Point *newNode();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue