/*========================================================================= GANIM.CPP Author: Gary Liddon @ Fareham Created: Project: Purpose: Copyright (c) 1997 Gary Liddon ===========================================================================*/ /*---------------------------------------------------------------------- Includes -------- */ /* Std Lib ------- */ /* STL --- */ /* Glib ---- */ #include "gfname.hpp" /* Local ----- */ #include "ganim.hpp" /*---------------------------------------------------------------------- Structure defintions -------------------- */ /*---------------------------------------------------------------------- Tyepdefs && Defines ------------------- */ /*---------------------------------------------------------------------- Function types -------------- */ /*---------------------------------------------------------------------- Vars ---- */ std::vector FilterDetails::AllDetails ; /*---------------------------------------------------------------------- Data ---- */ /*---------------------------------------------------------------------- Function: GAnim::GAnim(void) Notes: Constructor ---------------------------------------------------------------------- */ GAnim::GAnim(void) { TheFrames.reserve(2000); } GAnim::~GAnim(void) { } bool GAnim::Load(GAnimFilter & Af,char const * IoName) { bool RetVal; if (IoName) Af.SetName(IoName); RetVal=Af.Load(*this); return(RetVal); } bool GAnim::Save(GAnimFilter & Af,char const * IoName) { bool RetVal; if (IoName) Af.SetName(IoName); RetVal=Af.Save(*this); return(RetVal); } Frame & GAnim::GetNewFrame(void) { return(operator[](TheFrames.size())); } int GAnim::AddPalette(Palette & P) { for (int f=0;fCreate(Fname); } return(RetFilter); } Frame & GAnim::operator[](int Index) { if (Index >= TheFrames.capacity()) TheFrames.reserve(TheFrames.capacity()+1000); if (Index >= TheFrames.size()) TheFrames.resize(TheFrames.size()+1); return(TheFrames[Index]); } /*=========================================================================== end */