[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26161] branches/nurbs25: These files seem to have been missed in last merge.
Emmanuel Stone
emmanuel.stone at gmail.com
Thu Jan 21 11:19:57 CET 2010
Revision: 26161
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26161
Author: eman
Date: 2010-01-21 11:19:54 +0100 (Thu, 21 Jan 2010)
Log Message:
-----------
These files seem to have been missed in last merge.
Added Paths:
-----------
branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.cpp
branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.h
branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.cpp
branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.h
branches/nurbs25/intern/ghost/intern/GHOST_DropTargetWin32.cpp
branches/nurbs25/intern/ghost/intern/GHOST_DropTargetWin32.h
branches/nurbs25/intern/ghost/intern/GHOST_EventDragnDrop.h
branches/nurbs25/source/gameengine/Converter/KX_SoftBodyDeformer.cpp
branches/nurbs25/source/gameengine/Converter/KX_SoftBodyDeformer.h
Added: branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.cpp
===================================================================
--- branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.cpp (rev 0)
+++ branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.cpp 2010-01-21 10:19:54 UTC (rev 26161)
@@ -0,0 +1,45 @@
+/*
+ * $Id: AUD_RectifyFactory.cpp 25547 2009-12-24 21:15:27Z gsrb3d $
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_RectifyFactory.h"
+#include "AUD_RectifyReader.h"
+
+AUD_RectifyFactory::AUD_RectifyFactory(AUD_IFactory* factory) :
+ AUD_EffectFactory(factory) {}
+
+AUD_RectifyFactory::AUD_RectifyFactory() :
+ AUD_EffectFactory(0) {}
+
+AUD_IReader* AUD_RectifyFactory::createReader()
+{
+ AUD_IReader* reader = getReader();
+
+ if(reader != 0)
+ {
+ reader = new AUD_RectifyReader(reader); AUD_NEW("reader")
+ }
+
+ return reader;
+}
Added: branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.h
===================================================================
--- branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.h (rev 0)
+++ branches/nurbs25/intern/audaspace/FX/AUD_RectifyFactory.h 2010-01-21 10:19:54 UTC (rev 26161)
@@ -0,0 +1,51 @@
+/*
+ * $Id: AUD_RectifyFactory.h 25547 2009-12-24 21:15:27Z gsrb3d $
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#ifndef AUD_RECTIFYFACTORY
+#define AUD_RECTIFYFACTORY
+
+#include "AUD_EffectFactory.h"
+
+/**
+ * This factory rectifies another factory.
+ */
+class AUD_RectifyFactory : public AUD_EffectFactory
+{
+public:
+ /**
+ * Creates a new rectify factory.
+ * \param factory The input factory.
+ */
+ AUD_RectifyFactory(AUD_IFactory* factory = 0);
+
+ /**
+ * Creates a new rectify factory.
+ */
+ AUD_RectifyFactory();
+
+ virtual AUD_IReader* createReader();
+};
+
+#endif //AUD_RECTIFYFACTORY
Added: branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.cpp
===================================================================
--- branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.cpp (rev 0)
+++ branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.cpp 2010-01-21 10:19:54 UTC (rev 26161)
@@ -0,0 +1,82 @@
+/*
+ * $Id: AUD_RectifyReader.cpp 25547 2009-12-24 21:15:27Z gsrb3d $
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_RectifyReader.h"
+#include "AUD_Buffer.h"
+
+#include <cstring>
+
+AUD_RectifyReader::AUD_RectifyReader(AUD_IReader* reader) :
+ AUD_EffectReader(reader)
+{
+ int bigendian = 1;
+ bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian
+
+ switch(m_reader->getSpecs().format)
+ {
+ case AUD_FORMAT_S16:
+ m_rectify = AUD_rectify<int16_t>;
+ break;
+ case AUD_FORMAT_S32:
+ m_rectify = AUD_rectify<int32_t>;
+ break;
+ case AUD_FORMAT_FLOAT32:
+ m_rectify = AUD_rectify<float>;
+ break;
+ case AUD_FORMAT_FLOAT64:
+ m_rectify = AUD_rectify<double>;
+ break;
+ case AUD_FORMAT_U8:
+ m_rectify = AUD_rectify_u8;
+ break;
+ case AUD_FORMAT_S24:
+ m_rectify = bigendian ? AUD_rectify_s24_be : AUD_rectify_s24_le;
+ break;
+ default:
+ delete m_reader;
+ AUD_THROW(AUD_ERROR_READER);
+ }
+
+ m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
+}
+
+AUD_RectifyReader::~AUD_RectifyReader()
+{
+ delete m_buffer; AUD_DELETE("buffer")
+}
+
+void AUD_RectifyReader::read(int & length, sample_t* & buffer)
+{
+ sample_t* buf;
+ AUD_Specs specs = m_reader->getSpecs();
+
+ m_reader->read(length, buf);
+ if(m_buffer->getSize() < length*AUD_SAMPLE_SIZE(specs))
+ m_buffer->resize(length*AUD_SAMPLE_SIZE(specs));
+
+ buffer = m_buffer->getBuffer();
+
+ m_rectify(buffer, buf, length * specs.channels);
+}
Added: branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.h
===================================================================
--- branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.h (rev 0)
+++ branches/nurbs25/intern/audaspace/FX/AUD_RectifyReader.h 2010-01-21 10:19:54 UTC (rev 26161)
@@ -0,0 +1,65 @@
+/*
+ * $Id: AUD_RectifyReader.h 25547 2009-12-24 21:15:27Z gsrb3d $
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#ifndef AUD_RECTIFYREADER
+#define AUD_RECTIFYREADER
+
+#include "AUD_EffectReader.h"
+#include "AUD_ConverterFunctions.h"
+class AUD_Buffer;
+
+/**
+ * This class reads another reader and rectifies it.
+ */
+class AUD_RectifyReader : public AUD_EffectReader
+{
+private:
+ /**
+ * The playback buffer.
+ */
+ AUD_Buffer *m_buffer;
+
+ /**
+ * Rectifying function.
+ */
+ AUD_rectify_f m_rectify;
+
+public:
+ /**
+ * Creates a new rectify reader.
+ * \param reader The reader to read from.
+ * \exception AUD_Exception Thrown if the reader specified is NULL.
+ */
+ AUD_RectifyReader(AUD_IReader* reader);
+
+ /**
+ * Destroys the reader.
+ */
+ virtual ~AUD_RectifyReader();
+
+ virtual void read(int & length, sample_t* & buffer);
+};
+
+#endif //AUD_RECTIFYREADER
Added: branches/nurbs25/intern/ghost/intern/GHOST_DropTargetWin32.cpp
===================================================================
--- branches/nurbs25/intern/ghost/intern/GHOST_DropTargetWin32.cpp (rev 0)
+++ branches/nurbs25/intern/ghost/intern/GHOST_DropTargetWin32.cpp 2010-01-21 10:19:54 UTC (rev 26161)
@@ -0,0 +1,426 @@
+/**
+ * $Id: GHOST_DropTargetWin32.cpp 25060 2009-12-02 01:23:29Z gsrb3d $
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "GHOST_Debug.h"
+#include "GHOST_DropTargetWin32.h"
+
+#ifdef GHOST_DEBUG
+// utility
+void printLastError(void);
+#endif // GHOST_DEBUG
+
+
+GHOST_DropTargetWin32::GHOST_DropTargetWin32(GHOST_WindowWin32 * window, GHOST_SystemWin32 * system)
+:
+m_window(window),
+m_system(system)
+{
+ m_cRef = 1;
+ m_hWnd = window->getHWND();
+ m_draggedObjectType = GHOST_kDragnDropTypeUnknown;
+
+ // register our window as drop target
+ ::RegisterDragDrop(m_hWnd, this);
+}
+
+GHOST_DropTargetWin32::~GHOST_DropTargetWin32()
+{
+ ::RevokeDragDrop(m_hWnd);
+}
+
+
+/*
+ * IUnknown::QueryInterface
+ */
+HRESULT __stdcall GHOST_DropTargetWin32::QueryInterface (REFIID riid, void ** ppvObj)
+{
+
+ if (!ppvObj)
+ return E_INVALIDARG;
+ *ppvObj = NULL;
+
+ if(riid == IID_IUnknown || riid == IID_IDropTarget)
+ {
+ AddRef();
+ *ppvObj = (void*)this;
+ return S_OK;
+ }
+ else
+ {
+ *ppvObj = 0;
+ return E_NOINTERFACE;
+ }
+}
+
+
+/*
+ * IUnknown::AddRef
+ */
+
+ULONG __stdcall GHOST_DropTargetWin32::AddRef(void)
+{
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list