00001 /* Orx - Portable Game Engine 00002 * 00003 * Copyright (c) 2008-2011 Orx-Project 00004 * 00005 * This software is provided 'as-is', without any express or implied 00006 * warranty. In no event will the authors be held liable for any damages 00007 * arising from the use of this software. 00008 * 00009 * Permission is granted to anyone to use this software for any purpose, 00010 * including commercial applications, and to alter it and redistribute it 00011 * freely, subject to the following restrictions: 00012 * 00013 * 1. The origin of this software must not be misrepresented; you must not 00014 * claim that you wrote the original software. If you use this software 00015 * in a product, an acknowledgment in the product documentation would be 00016 * appreciated but is not required. 00017 * 00018 * 2. Altered source versions must be plainly marked as such, and must not be 00019 * misrepresented as being the original software. 00020 * 00021 * 3. This notice may not be removed or altered from any source 00022 * distribution. 00023 */ 00024 00047 #ifndef _orxBANK_H_ 00048 #define _orxBANK_H_ 00049 00050 00051 #include "orxInclude.h" 00052 #include "memory/orxMemory.h" 00053 00054 00055 /* Internal Bank structure */ 00056 typedef struct __orxBANK_t orxBANK; 00057 00058 /* Define flags */ 00059 #define orxBANK_KU32_FLAG_NONE 0x00000000 00060 #define orxBANK_KU32_FLAG_NOT_EXPANDABLE 0x00000001 00064 extern orxDLLAPI void orxFASTCALL orxBank_Setup(); 00065 00069 extern orxDLLAPI orxSTATUS orxFASTCALL orxBank_Init(); 00070 00073 extern orxDLLAPI void orxFASTCALL orxBank_Exit(); 00074 00082 extern orxDLLAPI orxBANK *orxFASTCALL orxBank_Create(orxU16 _u16NbElem, orxU32 _u32Size, orxU32 _u32Flags, orxMEMORY_TYPE _eMemType); 00083 00087 extern orxDLLAPI void orxFASTCALL orxBank_Delete(orxBANK *_pstBank); 00088 00093 extern orxDLLAPI void *orxFASTCALL orxBank_Allocate(orxBANK *_pstBank); 00094 00100 extern orxDLLAPI void orxFASTCALL orxBank_Free(orxBANK *_pstBank, void *_pCell); 00101 00105 extern orxDLLAPI void orxFASTCALL orxBank_Clear(orxBANK *_pstBank); 00106 00110 extern orxDLLAPI void orxFASTCALL orxBank_Compact(orxBANK *_pstBank); 00111 00114 extern orxDLLAPI void orxFASTCALL orxBank_CompactAll(); 00115 00121 extern orxDLLAPI void *orxFASTCALL orxBank_GetNext(const orxBANK *_pstBank, const void *_pCell); 00122 00128 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetIndex(const orxBANK *_pstBank, const void *_pCell); 00129 00135 extern orxDLLAPI void *orxFASTCALL orxBank_GetAtIndex(const orxBANK *_pstBank, orxU32 _u32Index); 00136 00141 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetCounter(const orxBANK *_pstBank); 00142 00143 00144 /******************************************************************************* 00145 * DEBUG FUNCTION 00146 ******************************************************************************/ 00147 00148 #ifdef __orxDEBUG__ 00149 00153 extern orxDLLAPI void orxFASTCALL orxBank_DebugPrint(const orxBANK *_pstBank); 00154 00155 #endif /* __orxDEBUG__ */ 00156 00157 #endif /* _orxBANK_H_ */ 00158
1.5.6