mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
STARK: Add a bones mesh resource type
This commit is contained in:
parent
3fadd5833f
commit
77a72075fa
@ -15,6 +15,7 @@ MODULE_OBJS := \
|
||||
resources/anim.o \
|
||||
resources/animhierarchy.o \
|
||||
resources/animscript.o \
|
||||
resources/bonesmesh.o \
|
||||
resources/bookmark.o \
|
||||
resources/camera.o \
|
||||
resources/command.o \
|
||||
|
45
engines/stark/resources/bonesmesh.cpp
Normal file
45
engines/stark/resources/bonesmesh.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
/* 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 "engines/stark/resources/bonesmesh.h"
|
||||
#include "engines/stark/xrcreader.h"
|
||||
|
||||
namespace Stark {
|
||||
|
||||
BonesMesh::~BonesMesh() {
|
||||
}
|
||||
|
||||
BonesMesh::BonesMesh(Resource *parent, byte subType, uint16 index, const Common::String &name) :
|
||||
Resource(parent, subType, index, name) {
|
||||
_type = TYPE;
|
||||
}
|
||||
|
||||
void BonesMesh::readData(XRCReadStream *stream) {
|
||||
_filename = stream->readString();
|
||||
_archiveName = stream->getArchiveName();
|
||||
}
|
||||
|
||||
void BonesMesh::printData() {
|
||||
debug("filename: %s", _filename.c_str());
|
||||
}
|
||||
|
||||
} // End of namespace Stark
|
53
engines/stark/resources/bonesmesh.h
Normal file
53
engines/stark/resources/bonesmesh.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef STARK_RESOURCES_BONES_MESH_H
|
||||
#define STARK_RESOURCES_BONES_MESH_H
|
||||
|
||||
#include "common/str.h"
|
||||
|
||||
#include "engines/stark/resources/resource.h"
|
||||
|
||||
namespace Stark {
|
||||
|
||||
class XRCReadStream;
|
||||
|
||||
class BonesMesh : public Resource {
|
||||
public:
|
||||
static const ResourceType::Type TYPE = ResourceType::kBonesMesh;
|
||||
|
||||
BonesMesh(Resource *parent, byte subType, uint16 index, const Common::String &name);
|
||||
virtual ~BonesMesh();
|
||||
|
||||
// Resource API
|
||||
void readData(XRCReadStream *stream);
|
||||
|
||||
protected:
|
||||
void printData() override;
|
||||
|
||||
Common::String _filename;
|
||||
Common::String _archiveName;
|
||||
};
|
||||
|
||||
} // End of namespace Stark
|
||||
|
||||
#endif // STARK_RESOURCES_BONES_MESH_H
|
@ -71,7 +71,7 @@ const char *ResourceType::getName() {
|
||||
{ ResourceType::kSpeech, "Speech" },
|
||||
{ ResourceType::kLight, "Light" },
|
||||
{ ResourceType::kCursor, "Cursor" },
|
||||
{ ResourceType::kBoneMesh, "BoneMesh" },
|
||||
{ ResourceType::kBonesMesh, "BonesMesh" },
|
||||
{ ResourceType::kScroll, "Scroll" },
|
||||
{ ResourceType::kFMV, "FMV" },
|
||||
{ ResourceType::kLipSynch, "LipSynch" },
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
kSpeech = 29,
|
||||
kLight = 30,
|
||||
kCursor = 31, // Not sure about this one
|
||||
kBoneMesh = 32,
|
||||
kBonesMesh = 32,
|
||||
kScroll = 33,
|
||||
kFMV = 34,
|
||||
kLipSynch = 35,
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "engines/stark/resources/anim.h"
|
||||
#include "engines/stark/resources/animhierarchy.h"
|
||||
#include "engines/stark/resources/animscript.h"
|
||||
#include "engines/stark/resources/bonesmesh.h"
|
||||
#include "engines/stark/resources/bookmark.h"
|
||||
#include "engines/stark/resources/camera.h"
|
||||
#include "engines/stark/resources/command.h"
|
||||
@ -220,6 +221,9 @@ Resource *XRCReader::createResource(XRCReadStream *stream, Resource *parent) {
|
||||
case ResourceType::kCommand:
|
||||
resource = new Command(parent, subType, index, name);
|
||||
break;
|
||||
case ResourceType::kBonesMesh:
|
||||
resource = new BonesMesh(parent, subType, index, name);
|
||||
break;
|
||||
default:
|
||||
resource = new UnimplementedResource(parent, type, subType, index, name);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user