Files
firestorm/Gameleap/code/mw4/Libraries/gosFX/EffectLibrary.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

103 lines
3.0 KiB
C++

//==========================================================================//
// File: EffectLibrary.hpp //
// Project: gosFX //
// Contents: Base Effect Component //
//--------------------------------------------------------------------------//
// Date Who Modification //
// 10/07/98 JMA Created //
// //
//--------------------------------------------------------------------------//
// Copyright (C) 1997-1998, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//==========================================================================//
#pragma once
#pragma warning(push)
#include <stlport\map>
#pragma warning(pop)
#include "gosFX.hpp"
#include "Effect.hpp"
namespace MidLevelRenderer
{
class MLRShape;
}
namespace gosFX
{
class DebrisCloud__Specification;
class EffectLibrary
#if defined(_ARMOR)
: public Stuff::Signature
#endif
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Initialization
//
public:
static void InitializeClass();
static void TerminateClass();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
public:
EffectLibrary(bool preload=true);
virtual ~EffectLibrary();
static EffectLibrary* Instance;
protected:
EffectLibrary(EffectLibrary &source)
{STOP(("Shouldn't be called"));}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// File goodies
//
public:
void Load(Stuff::MemoryStream* stream);
void Save(Stuff::MemoryStream* stream);
void SetLength(unsigned index);
unsigned GetLength()
{Check_Object(this); return m_effects.GetLength();}
Stuff::FileDependencies m_fileDependencies;
bool m_preloadEffects;
//----------------------------------------------------------------------------
// Shape table
//
public:
virtual MidLevelRenderer::MLRShape* UseShape(Stuff::MString& shape_file)=0;
virtual void LoadDebrisArray(
gosFX::DebrisCloud__Specification *spec,
Stuff::MString& debris_file
)=0;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Effect management
//
public:
int Find(const char* name);
Effect::Specification* Find(int id)
{Check_Object(this); return m_effects[id];}
Effect* MakeEffect(unsigned index, unsigned flags);
Stuff::DynamicArrayOf<Effect::Specification*> m_effects;
Stuff::DynamicArrayOf<Stuff::MString> m_effectNames;
stlport::map<Stuff::MString, int> m_effectMap;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void
TestInstance() const
{}
};
}