STARK: Add an anim script resource type
This commit is contained in:
parent
7c66c67baf
commit
8fec4a83fe
4 changed files with 134 additions and 0 deletions
62
engines/stark/resources/animscript.cpp
Normal file
62
engines/stark/resources/animscript.cpp
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* ResidualVM - A 3D game interpreter
|
||||
*
|
||||
* ResidualVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the AUTHORS
|
||||
* 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 "common/debug.h"
|
||||
|
||||
#include "engines/stark/resources/animscript.h"
|
||||
#include "engines/stark/xrcreader.h"
|
||||
|
||||
namespace Stark {
|
||||
|
||||
AnimScript::~AnimScript() {
|
||||
}
|
||||
|
||||
AnimScript::AnimScript(Resource *parent, byte subType, uint16 index, const Common::String &name) :
|
||||
Resource(parent, subType, index, name) {
|
||||
_type = TYPE;
|
||||
}
|
||||
|
||||
void AnimScript::printData() {
|
||||
}
|
||||
|
||||
AnimScriptItem::~AnimScriptItem() {
|
||||
}
|
||||
|
||||
AnimScriptItem::AnimScriptItem(Resource *parent, byte subType, uint16 index, const Common::String &name) :
|
||||
Resource(parent, subType, index, name),
|
||||
_opcode(0),
|
||||
_duration(0),
|
||||
_operand(0) {
|
||||
_type = TYPE;
|
||||
}
|
||||
|
||||
void AnimScriptItem::readData(XRCReadStream *stream) {
|
||||
_opcode = stream->readUint32LE();
|
||||
_duration = stream->readUint32LE();
|
||||
_operand = stream->readUint32LE();
|
||||
}
|
||||
|
||||
void AnimScriptItem::printData() {
|
||||
debug("op: %d, duration: %d ms, operand: %d", _opcode, _duration, _operand);
|
||||
}
|
||||
|
||||
} // End of namespace Stark
|
Loading…
Add table
Add a link
Reference in a new issue