public static void Draw() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); // walk through the list and render SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive(); while (pSpriteBatch != null) { SBNodeMan pSBNodeMan = pSpriteBatch.GetSBNodeMan(); Debug.Assert(pSBNodeMan != null); if (pSpriteBatch.GetisDraw()) { pSBNodeMan.Draw(); } pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext; //SBNode pNode = (SBNode)pSBNodeMan.BaseGetActive(); //while (pNode != null) //{ // // Assumes someone before here called update() on each sprite // // Draw me. // pNode.getSpriteBase().Render(); // pNode = (SBNode)pNode.pNext; //} //pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext; } }
public static void Dump() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); pMan.BaseDump(); }
public static void Remove(SpriteBatch pNode) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); Debug.Assert(pNode != null); pMan.BaseRemove(pNode); }
private void PrivStatBatchDump() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); Debug.WriteLine(""); Debug.WriteLine("Sprite Batch Manager Stats---------------------"); pMan.BaseStatDump(); }
public static void DumpBatches() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); Debug.WriteLine(""); Debug.WriteLine("Sprite Batch Manager Stats---------------------"); pMan.BaseDumpNodes(); }
public static SpriteBatch Find(SpriteBatch.Name name) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); pMan.poNodeCompare.SetName(name); SpriteBatch pData = (SpriteBatch)pMan.BaseFind(pMan.poNodeCompare); return(pData); }
public static SpriteBatch Add(SpriteBatch.Name name) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); SpriteBatch pSBatch = (SpriteBatch)pMan.BaseAdd(); pSBatch.SetName(name); return(pSBatch); }
public static SpriteBatch Add(SpriteBatch.Name name, int reserveNum = 3, int reserveGrow = 1) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); SpriteBatch pNode = (SpriteBatch)pMan.BaseAdd(); Debug.Assert(pNode != null); pNode.Set(name, reserveNum, reserveGrow); return(pNode); }
private static SpriteBatch Add(SpriteBatch.Name name, SpriteBatch pSB) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); SpriteBatch pNode = (SpriteBatch)pMan.BaseAdd(); Debug.Assert(pNode != null); pNode = pSB; return(pSB); }
public static SpriteBatch Replace(SpriteBatch.Name name, SpriteBatch pSB) { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); pMan.poNodeCompare.SetName(name); SpriteBatch pData = (SpriteBatch)pMan.BaseFind(pMan.poNodeCompare); SpriteBatch tmp = pData; SpriteBatchMan.Remove(pData); SpriteBatchMan.Add(name, pSB); return(tmp); }
public static void Destroy() { // Get the instance SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); #if (TRACK_DESTRUCTOR_MAN) Debug.WriteLine("--->SpriteBatchMan.Destroy()"); #endif pMan.BaseDestroy(); #if (TRACK_DESTRUCTOR_MAN) Debug.WriteLine(" {0} ({1})", pMan.poNodeCompare, pMan.poNodeCompare.GetHashCode()); Debug.WriteLine(" {0} ({1})", SpriteBatchMan.pInstance, SpriteBatchMan.pInstance.GetHashCode()); #endif pMan.poNodeCompare = null; SpriteBatchMan.pInstance = null; }
public static void Draw() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); //need access to the Sprites, //in the SpriteBatch to render SpriteBatch pSBatch = (SpriteBatch)pMan.BaseGetActive(); while (pSBatch != null) { if (pSBatch.bToggle == true) { SBNodeMan pSBNodeMan = pSBatch.GetSBNodeMan(); Debug.Assert(pSBNodeMan != null); pSBNodeMan.Draw(); } pSBatch = (SpriteBatch)pSBatch.pNext; } }
public static void Update() { SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance(); Debug.Assert(pMan != null); SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive(); while (pSpriteBatch != null) { SBNodeMan pSBNodeMan = pSpriteBatch.GetSBNodeMan(); Debug.Assert(pSBNodeMan != null); SBNode pNode = (SBNode)pSBNodeMan.BaseGetActive(); while (pNode != null) { pNode.GetSpriteBase().Update(); pNode = (SBNode)pNode.pNext; } pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext; } }