diff options
Diffstat (limited to 'engines/pegasus/MMShell')
-rwxr-xr-x | engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.cpp | 48 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.h | 51 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Utilities/MMIDObject.h | 68 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Utilities/MMTimeValue.cpp | 60 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Utilities/MMTimeValue.h | 52 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Utilities/MMUtilities.cpp | 63 | ||||
-rwxr-xr-x | engines/pegasus/MMShell/Utilities/MMUtilities.h | 43 |
7 files changed, 0 insertions, 385 deletions
diff --git a/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.cpp b/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.cpp deleted file mode 100755 index 9a2543db7b..0000000000 --- a/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 "pegasus/MMShell/Base_Classes/MMFunctionPtr.h" - -namespace Pegasus { - -MMFunctionPtr::MMFunctionPtr() { - fTheFunction = 0; - fFunctionArg = 0; -} - -MMFunctionPtr::~MMFunctionPtr() { -} - -void MMFunctionPtr::SetFunctionPtr(tFunctionPtr theFunction, void *functionArg) { - fTheFunction = theFunction; - fFunctionArg = functionArg; -} - -void MMFunctionPtr::CallFunction() { - if (fTheFunction != 0) - (*fTheFunction)(this, fFunctionArg); -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.h b/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.h deleted file mode 100755 index 4aa18cac81..0000000000 --- a/engines/pegasus/MMShell/Base_Classes/MMFunctionPtr.h +++ /dev/null @@ -1,51 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 PEGASUS_MMSHELL_BASECLASSES_MMFUNCTIONPTR_H -#define PEGASUS_MMSHELL_BASECLASSES_MMFUNCTIONPTR_H - -namespace Pegasus { - -class MMFunctionPtr; - -typedef void (*tFunctionPtr)(MMFunctionPtr *theFunction, void *functionArg); - -class MMFunctionPtr { -public: - MMFunctionPtr(); - virtual ~MMFunctionPtr(); - - void SetFunctionPtr(tFunctionPtr theFunction, void *functionArg); - -protected: - void CallFunction(); - - tFunctionPtr fTheFunction; - void *fFunctionArg; -}; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/MMShell/Utilities/MMIDObject.h b/engines/pegasus/MMShell/Utilities/MMIDObject.h deleted file mode 100755 index 112d3b8275..0000000000 --- a/engines/pegasus/MMShell/Utilities/MMIDObject.h +++ /dev/null @@ -1,68 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 PEGASUS_MMSHELL_MMIDOBJECT_H -#define PEGASUS_MMSHELL_MMIDOBJECT_H - -#include "pegasus/types.h" - -namespace Pegasus { - -class MMIDObject { -friend inline int operator==(const MMIDObject &arg1, const MMIDObject &arg1); -friend inline int operator!=(const MMIDObject &arg2, const MMIDObject &arg2); - -public: - MMIDObject(const tMM32BitID id); - ~MMIDObject(); - - tMM32BitID getObjectID() const; - -private: - tMM32BitID _objectID; -}; - -inline MMIDObject::MMIDObject(const tMM32BitID id) { - _objectID = id; -} - -inline MMIDObject::~MMIDObject() { -} - -inline tMM32BitID MMIDObject::getObjectID() const { - return _objectID; -} - -inline int operator==(const MMIDObject &arg1, const MMIDObject &arg2) { - return arg1._objectID == arg2._objectID; -} - -inline int operator!=(const MMIDObject &arg1, const MMIDObject &arg2) { - return arg1._objectID != arg2._objectID; -} - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp b/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp deleted file mode 100755 index 92971a6636..0000000000 --- a/engines/pegasus/MMShell/Utilities/MMTimeValue.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 "pegasus/constants.h" -#include "pegasus/MMShell/Utilities/MMTimeValue.h" - -namespace Pegasus { - -MMTimeValue::MMTimeValue() { - fTheTime = 0; - fTheScale = kDefaultTimeScale; -} - -TimeValue MMTimeValue::GetTime() const { - return fTheTime; -} - -void MMTimeValue::GetTime(TimeValue &time, const TimeScale scale) const { - time = fTheTime * fTheScale / scale; -} - -void MMTimeValue::SetTime(const TimeValue time) { - fTheTime = time; -} - -void MMTimeValue::SetTime(const TimeValue time, const TimeScale scale) { - fTheTime = time * scale / fTheScale; -} - -TimeScale MMTimeValue::GetScale() const { - return fTheScale; -} - -void MMTimeValue::SetScale(const TimeScale scale) { - fTheScale = scale; -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/MMShell/Utilities/MMTimeValue.h b/engines/pegasus/MMShell/Utilities/MMTimeValue.h deleted file mode 100755 index a112f9c233..0000000000 --- a/engines/pegasus/MMShell/Utilities/MMTimeValue.h +++ /dev/null @@ -1,52 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 PEGASUS_MMSHELL_MMTIMEVALUE_H -#define PEGASUS_MMSHELL_MMTIMEVALUE_H - -#include "pegasus/types.h" - -namespace Pegasus { - -class MMTimeValue { -public: - MMTimeValue(); - - TimeValue GetTime() const; - void GetTime(TimeValue &time, const TimeScale scale) const; - void SetTime(const TimeValue time); - void SetTime(const TimeValue time, const TimeScale scale); - - TimeScale GetScale() const; - void SetScale(const TimeScale scale); - -protected: - TimeValue fTheTime; - TimeScale fTheScale; -}; - -} // End of namespace Pegasus - -#endif diff --git a/engines/pegasus/MMShell/Utilities/MMUtilities.cpp b/engines/pegasus/MMShell/Utilities/MMUtilities.cpp deleted file mode 100755 index e6bd146a08..0000000000 --- a/engines/pegasus/MMShell/Utilities/MMUtilities.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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/random.h" -#include "common/util.h" - -#include "pegasus/MMShell/Utilities/MMUtilities.h" - -namespace Pegasus { - -inline int32 Round(const int32 a, const int32 b) { - if (b < 0) - if (a < 0) - return -((a - (-b >> 1)) / -b); - else - return -((a + (-b >> 1)) / -b); - else - if (a < 0) - return (a - (b >> 1)) / b; - else - return (a + (b >> 1)) / b; -} - -int32 LinearInterp(const int32 start1, const int32 stop1, const int32 current1, const int32 start2, const int32 stop2) { - if (start2 == stop2) - return start2; - else - return start2 + Round((current1 - start1) * (stop2 - start2), (stop1 - start1)); -} - -void ShuffleArray(int32 *arr, int32 count, Common::RandomSource &random) { - if (count > 1) { - for (int32 i = 1; i < count; ++i) { - int32 j = random.getRandomNumber(i); - if (j != i) - SWAP(arr[i], arr[j]); - } - } -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/MMShell/Utilities/MMUtilities.h b/engines/pegasus/MMShell/Utilities/MMUtilities.h deleted file mode 100755 index d5f7e541de..0000000000 --- a/engines/pegasus/MMShell/Utilities/MMUtilities.h +++ /dev/null @@ -1,43 +0,0 @@ -/* 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. - * - * Additional copyright for this file: - * Copyright (C) 1995-1997 Presto Studios, Inc. - * - * 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 PEGASUS_MMSHELL_UTILITIES_MMUTILITIES_H -#define PEGASUS_MMSHELL_UTILITIES_MMUTILITIES_H - -#include "common/scummsys.h" - -namespace Common { - class RandomSource; -} - -namespace Pegasus { - -int32 LinearInterp(const int32 start1, const int32 stop1, const int32 current1, const int32 start2, const int32 stop2); - -void ShuffleArray(int32 *arr, int32 count, Common::RandomSource &random); - -} // End of namespace Pegasus - -#endif |