PETKA: added QObjectCursor

This commit is contained in:
Andrei Prykhodko 2019-05-31 09:09:12 +03:00 committed by Eugene Sandulenko
parent cd439b1fe2
commit dbff81f8d5
5 changed files with 72 additions and 1 deletions

View File

@ -8,6 +8,7 @@ MODULE_OBJS = \
q_message_object.o \
q_object.o \
q_object_bg.o \
q_object_cursor.o \
q_system.o
# This module can be built as a plugin

View File

@ -0,0 +1,28 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "petka/q_object_cursor.h"
namespace Petka {
} // End of namespace Petka

View File

@ -0,0 +1,36 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef PETKA_Q_OBJECT_CURSOR_H
#define PETKA_Q_OBJECT_CURSOR_H
#include "petka/q_object.h"
namespace Petka {
class QObjectCursor : public QObject {
};
} // End of namespace Petka
#endif

View File

@ -24,12 +24,13 @@
#include "common/substream.h"
#include "petka/petka.h"
#include "petka/q_object_cursor.h"
#include "petka/q_system.h"
namespace Petka {
QSystem::QSystem(PetkaEngine &vm)
: _vm(vm) {}
: _vm(vm), _cursor(nullptr) {}
QSystem::~QSystem() {
@ -78,6 +79,9 @@ bool QSystem::init() {
}
addMessageForAllObjects(kTotalInit);
_cursor.reset(new QObjectCursor());
_allObjects.push_back(_cursor.get());
return true;
}

View File

@ -29,6 +29,7 @@
namespace Petka {
class PetkaEngine;
class QObjectCursor;
class QSystem {
public:
@ -47,6 +48,7 @@ private:
Common::Array<QObjectBG> _bgs;
Common::Array<QMessageObject *> _allObjects;
Common::Array<QMessage> _messages;
Common::ScopedPtr<QObjectCursor> _cursor;
};
} // End of namespace Petka