diff options
Diffstat (limited to 'engines/parallaction/location.cpp')
-rw-r--r-- | engines/parallaction/location.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 67e38c83c1..be8d5902e7 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -236,9 +236,10 @@ void parseWalkNodes(Script& script, Node *list) { if (!scumm_stricmp(_tokens[0], "COORD")) { - WalkNode *v4 = (WalkNode*)malloc(sizeof(WalkNode)); - v4->_x = atoi(_tokens[1]) - _vm->_char._ani.width()/2; - v4->_y = atoi(_tokens[2]) - _vm->_char._ani.height(); + WalkNode *v4 = new WalkNode( + atoi(_tokens[1]) - _vm->_char._ani.width()/2, + atoi(_tokens[2]) - _vm->_char._ani.height() + ); addNode(list, v4); |