00001 00005 /* Copyright, 2001 Nevrax Ltd. 00006 * 00007 * This file is part of NEVRAX NEL. 00008 * NEVRAX NEL is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2, or (at your option) 00011 * any later version. 00012 00013 * NEVRAX NEL is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * General Public License for more details. 00017 00018 * You should have received a copy of the GNU General Public License 00019 * along with NEVRAX NEL; see the file COPYING. If not, write to the 00020 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00021 * MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef NL_MOVE_CELL_H 00025 #define NL_MOVE_CELL_H 00026 00027 #include "nel/misc/types_nl.h" 00028 00029 00030 namespace NLPACS 00031 { 00032 00033 class CMoveElement; 00034 00042 class CMoveCell 00043 { 00044 public: 00045 00047 CMoveCell(); 00048 00050 void linkFirstX (CMoveElement *element) 00051 { 00052 linkX (NULL, element, _FirstX); 00053 } 00054 00056 void linkLastX (CMoveElement *element) 00057 { 00058 linkX (_LastX, element, NULL); 00059 } 00060 00061 /*/// Update sorted lists for an element 00062 void linkFirstY (CMoveElement *element) 00063 { 00064 linkY (NULL, element, _FirstY); 00065 } 00066 00068 void linkLastY (CMoveElement *element) 00069 { 00070 linkY (_LastY, element, NULL); 00071 }*/ 00072 00074 void updateSortedLists (CMoveElement *element, uint8 worldImage); 00075 00076 // Link / unlink method 00077 void unlinkX (CMoveElement *element); 00078 00079 // Link / unlink method 00080 //void unlinkY (CMoveElement *element); 00081 00082 // Get first X 00083 CMoveElement *getFirstX () const 00084 { 00085 return _FirstX; 00086 } 00087 00088 // Get last X 00089 CMoveElement *getLastX () const 00090 { 00091 return _LastX; 00092 } 00093 00094 // Get root X 00095 CMoveElement *getRootX () 00096 { 00097 return _FirstX; 00098 } 00099 00100 private: 00101 00102 // Link / unlink method 00103 void linkX (CMoveElement *previous, CMoveElement *element, CMoveElement *next); 00104 00105 // Link / unlink method 00106 //void linkY (CMoveElement *previous, CMoveElement *element, CMoveElement *next); 00107 00108 CMoveElement *_FirstX; 00109 CMoveElement *_LastX; 00110 /*CMoveElement *_FirstY; 00111 CMoveElement *_LastY;*/ 00112 }; 00113 00114 00115 } // NLPACS 00116 00117 00118 #endif // NL_MOVE_CELL_H 00119 00120 /* End of move_cell.h */
1.6.1