Ejemplo n.º 1
0
 public void SwapBytes( )
 {
     op = ( UInt16 )EndianHelper.LittleShort(( Int16 )op);
     a  = EndianHelper.LittleShort(a);
     b  = EndianHelper.LittleShort(b);
     c  = EndianHelper.LittleShort(c);
 }
Ejemplo n.º 2
0
 public void SwapBytes( )
 {
     first_statement = EndianHelper.LittleLong(first_statement);
     parm_start      = EndianHelper.LittleLong(parm_start);
     locals          = EndianHelper.LittleLong(locals);
     s_name          = EndianHelper.LittleLong(s_name);
     s_file          = EndianHelper.LittleLong(s_file);
     numparms        = EndianHelper.LittleLong(numparms);
 }
Ejemplo n.º 3
0
        // MSG_WriteFloat(sizebuf_t* sb, float f)
        public void WriteFloat(Single f)
        {
            NeedRoom(4);
            _Val.f0 = f;
            _Val.i0 = EndianHelper.LittleLong(_Val.i0);

            _Buffer[_Count++] = _Val.b0;
            _Buffer[_Count++] = _Val.b1;
            _Buffer[_Count++] = _Val.b2;
            _Buffer[_Count++] = _Val.b3;
        }
Ejemplo n.º 4
0
        // MSG_ReadFloat (void)
        public Single ReadFloat( )
        {
            if (!HasRoom(4))
            {
                return(0);
            }

            _Val.b0 = _Source.Data[_Count + 0];
            _Val.b1 = _Source.Data[_Count + 1];
            _Val.b2 = _Source.Data[_Count + 2];
            _Val.b3 = _Source.Data[_Count + 3];

            _Count += 4;

            _Val.i0 = EndianHelper.LittleLong(_Val.i0);
            return(_Val.f0);
        }
Ejemplo n.º 5
0
 public void SwapBytes( )
 {
     version        = EndianHelper.LittleLong(version);
     crc            = EndianHelper.LittleLong(crc);
     ofs_statements = EndianHelper.LittleLong(ofs_statements);
     numstatements  = EndianHelper.LittleLong(numstatements);
     ofs_globaldefs = EndianHelper.LittleLong(ofs_globaldefs);
     numglobaldefs  = EndianHelper.LittleLong(numglobaldefs);
     ofs_fielddefs  = EndianHelper.LittleLong(ofs_fielddefs);
     numfielddefs   = EndianHelper.LittleLong(numfielddefs);
     ofs_functions  = EndianHelper.LittleLong(ofs_functions);
     numfunctions   = EndianHelper.LittleLong(numfunctions);
     ofs_strings    = EndianHelper.LittleLong(ofs_strings);
     numstrings     = EndianHelper.LittleLong(numstrings);
     ofs_globals    = EndianHelper.LittleLong(ofs_globals);
     numglobals     = EndianHelper.LittleLong(numglobals);
     entityfields   = EndianHelper.LittleLong(entityfields);
 }
Ejemplo n.º 6
0
 public void SwapBytes( )
 {
     type   = ( UInt16 )EndianHelper.LittleShort(( Int16 )type);
     ofs    = ( UInt16 )EndianHelper.LittleShort(( Int16 )ofs);
     s_name = EndianHelper.LittleLong(s_name);
 }