[Sphere-axis-commits] CVS: Axis/S_Sphere52 WorldItem.cpp,1.5,1.6 WorldItem.h,1.3,1.4
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2003-09-03 02:54:34
|
Update of /cvsroot/sphere-axis/Axis/S_Sphere52 In directory sc8-pr-cvs1:/tmp/cvs-serv5099/S_Sphere52 Modified Files: WorldItem.cpp WorldItem.h Log Message: no message Index: WorldItem.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/WorldItem.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** WorldItem.cpp 5 Aug 2003 20:43:05 -0000 1.5 --- WorldItem.cpp 3 Sep 2003 02:54:29 -0000 1.6 *************** *** 27,55 **** #include "item.h" ! bool CWorldItem::Read(CStdioFile &csfInput) { ! LoadBase(); ! static const TCHAR * szWorldItemKeys [] = ! { ! _T("SERIAL"), ! _T("NAME"), ! _T("COLOR"), ! _T("TIMER"), ! _T("DISPID"), ! _T("AMOUNT"), ! _T("TYPE"), ! _T("LINK"), ! _T("ATTR"), ! _T("MORE1"), ! _T("MORE2"), ! _T("MOREP"), ! _T("LAYER"), ! _T("CONT"), ! _T("P"), ! _T("REGION.FLAGS"), ! _T("AGE"), ! }; BOOL bStatus = TRUE; --- 27,56 ---- #include "item.h" ! const TCHAR * CWorldItem::szWorldItemKeys [] = { ! _T("SERIAL"), ! _T("NAME"), ! _T("COLOR"), ! _T("TIMER"), ! ! _T("DISPID"), ! _T("AMOUNT"), ! _T("TYPE"), ! _T("LINK"), ! _T("ATTR"), ! _T("MORE1"), ! _T("MORE2"), ! _T("MOREP"), ! _T("LAYER"), ! _T("CONT"), ! _T("P"), ! _T("REGION.FLAGS"), ! _T("AGE"), ! }; ! bool CWorldItem::Read(CStdioFile &csfInput) ! { ! LoadBase(); BOOL bStatus = TRUE; *************** *** 74,100 **** switch( FindTable(csKey, &szWorldItemKeys[0], 15) ) { ! case 0: m_dwSerial = (DWORD) ahextoi(csValue); break; ! case 1: m_csName = csValue; break; ! case 2: m_wColor = (WORD) ahextoi(csValue); break; ! case 3: m_dwTimer = (DWORD) ahextoi(csValue); break; ! case 4: m_wArtID = (WORD) ahextoi(csValue); break; ! case 5: m_wAmount = (WORD) _tstoi(csValue); break; ! case 6: m_dwItemType = (DWORD) DefLookup(csValue); break; ! case 7: m_dwLink = (DWORD) ahextoi(csValue); break; ! case 8: m_dwAttr = (DWORD) ahextoi(csValue); break; ! case 9: m_dwMore1 = (DWORD) ahextoi(csValue); break; ! case 10: m_dwMore2 = (DWORD) ahextoi(csValue); break; ! case 11: // Need to parse this data out into the X, Y, and Z components. { --- 75,101 ---- switch( FindTable(csKey, &szWorldItemKeys[0], 15) ) { ! case Serial: m_dwSerial = (DWORD) ahextoi(csValue); break; ! case Name: m_csName = csValue; break; ! case Color: m_wColor = (WORD) ahextoi(csValue); break; ! case Timer: m_dwTimer = (DWORD) ahextoi(csValue); break; ! case DispID: m_wArtID = (WORD) ahextoi(csValue); break; ! case Amount: m_wAmount = (WORD) _tstoi(csValue); break; ! case Type: m_dwItemType = (DWORD) DefLookup(csValue); break; ! case Link: m_dwLink = (DWORD) ahextoi(csValue); break; ! case Attr: m_dwAttr = (DWORD) ahextoi(csValue); break; ! case More1: m_dwMore1 = (DWORD) ahextoi(csValue); break; ! case More2: m_dwMore2 = (DWORD) ahextoi(csValue); break; ! case MoreP: // Need to parse this data out into the X, Y, and Z components. { *************** *** 126,134 **** } } ! case 12: m_bLayer = (BYTE) _tstoi(csValue); break; ! case 13: m_dwContainer = (DWORD) ahextoi(csValue); break; ! case 14: // Need to parse this data out into the X, Y, and Z components. { --- 127,135 ---- } } ! case Layer: m_bLayer = (BYTE) _tstoi(csValue); break; ! case Cont: m_dwContainer = (DWORD) ahextoi(csValue); break; ! case P: // Need to parse this data out into the X, Y, and Z components. { *************** *** 160,166 **** } } ! case 15: m_wRegionFlags = (WORD) ahextoi(csValue); break; ! case 16: m_dwAge = ahextoi(csValue); break; default: --- 161,167 ---- } } ! case RegionFlags: m_wRegionFlags = (WORD) ahextoi(csValue); break; ! case Age: m_dwAge = ahextoi(csValue); break; default: Index: WorldItem.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/S_Sphere52/WorldItem.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** WorldItem.h 23 Jul 2003 19:10:57 -0000 1.3 --- WorldItem.h 3 Sep 2003 02:54:29 -0000 1.4 *************** *** 59,61 **** --- 59,84 ---- WORD m_wRegionFlags; DWORD m_dwAge; + + static const TCHAR * szWorldItemKeys []; + + enum WorldItemKeys + { + Serial, + Name, + Color, + Timer, + DispID, + Amount, + Type, + Link, + Attr, + More1, + More2, + MoreP, + Layer, + Cont, + P, + RegionFlags, + Age + }; }; |