mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 03:44:05 +00:00
- changed the ffmpeg included in cpp_avcodec.cpp
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@93 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
4df567309e
commit
d3dd588958
3 changed files with 46 additions and 9 deletions
|
@ -219,7 +219,6 @@ class NiUVController : Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*
|
|
||||||
// If there was more than four of these, I would template it.
|
// If there was more than four of these, I would template it.
|
||||||
class NiKeyframeController : Controller
|
class NiKeyframeController : Controller
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,6 +66,8 @@ struct MeshLoader
|
||||||
{
|
{
|
||||||
baseName = name;
|
baseName = name;
|
||||||
|
|
||||||
|
writefln("Loading mesh '%s'", name);
|
||||||
|
|
||||||
// Check if the first record is a node
|
// Check if the first record is a node
|
||||||
Node n = cast(Node) nifMesh.records[0];
|
Node n = cast(Node) nifMesh.records[0];
|
||||||
|
|
||||||
|
@ -134,9 +136,12 @@ struct MeshLoader
|
||||||
NiStringExtraData d = cast(NiStringExtraData) data.extra;
|
NiStringExtraData d = cast(NiStringExtraData) data.extra;
|
||||||
if(d !is null)
|
if(d !is null)
|
||||||
{
|
{
|
||||||
|
// Marker objects are only visible in the editor. We
|
||||||
|
// completely ignore them.
|
||||||
if(d.string == "MRK")
|
if(d.string == "MRK")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// No collision
|
||||||
if(d.string == "NCO")
|
if(d.string == "NCO")
|
||||||
flags |= 0x800; // Temporary internal marker
|
flags |= 0x800; // Temporary internal marker
|
||||||
}
|
}
|
||||||
|
@ -150,6 +155,47 @@ struct MeshLoader
|
||||||
// skeleton. The nodes can then be moved one by one over to the
|
// skeleton. The nodes can then be moved one by one over to the
|
||||||
// appropriate bones.
|
// appropriate bones.
|
||||||
|
|
||||||
|
// Check the controller
|
||||||
|
auto cont = data.controller;
|
||||||
|
while(cont !is null)
|
||||||
|
{
|
||||||
|
auto kc = cast(NiKeyframeController)data.controller;
|
||||||
|
auto pc = cast(NiPathController)data.controller;
|
||||||
|
if(kc !is null)
|
||||||
|
{
|
||||||
|
writefln("Found keyframe controller");
|
||||||
|
writefln(" Node name was: %s", data.name);
|
||||||
|
assert(cont.target is data);
|
||||||
|
|
||||||
|
auto kcd = kc.data;
|
||||||
|
writefln(" Types: %s %s %s",
|
||||||
|
kcd.rotType, kcd.traType, kcd.scaleType);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Adding keyframes:
|
||||||
|
|
||||||
|
Skeleton -> Animation -> NodeAnimationTrack nt;
|
||||||
|
|
||||||
|
TransformKeyFrame * tf = nt->createNodeKeyFrame(time);
|
||||||
|
tf->setTranslate(Vector3);
|
||||||
|
tf->setScale(Vector3);
|
||||||
|
tf->setRotation(Quaternion);
|
||||||
|
|
||||||
|
nt->applyToNode(node, time);
|
||||||
|
evt
|
||||||
|
Animation an;
|
||||||
|
an->apply(skeleton, time);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
else if(pc !is null)
|
||||||
|
{
|
||||||
|
writefln("Found path controller");
|
||||||
|
assert(cont.target is data);
|
||||||
|
}
|
||||||
|
else writefln("Other controller (%s)", cont);
|
||||||
|
cont = cont.next;
|
||||||
|
}
|
||||||
|
|
||||||
// Loop through children
|
// Loop through children
|
||||||
foreach(Node n; data.children)
|
foreach(Node n; data.children)
|
||||||
insertNode(n, node, flags);
|
insertNode(n, node, flags);
|
||||||
|
|
|
@ -25,16 +25,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
extern "C" { // the headers don't do this..
|
extern "C" { // the headers don't do this..
|
||||||
#ifdef WIN32
|
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
#else
|
|
||||||
// FIXME: This works on Ubuntu (given the switches from pkg-config),
|
|
||||||
// but apparently there are some problems on other systems (eg
|
|
||||||
// Archlinux).
|
|
||||||
#include <avcodec.h>
|
|
||||||
#include <avformat.h>
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
Loading…
Reference in a new issue