예제 #1
0
파일: Version.cs 프로젝트: SisyFox/sisycol
 public static Offset <Version> CreateVersion(FlatBufferBuilder builder, byte High, byte Low)
 {
     builder.Prep(1, 2);
     builder.PutByte(Low);
     builder.PutByte(High);
     return(new Offset <Version>(builder.Offset));
 }
예제 #2
0
 public static Offset <UdpMessages.ServerClientMessages.Version> CreateVersion(FlatBufferBuilder builder, byte MajorVersion, byte MinorVersion, byte PatchVersion)
 {
     builder.Prep(1, 3);
     builder.PutByte(PatchVersion);
     builder.PutByte(MinorVersion);
     builder.PutByte(MajorVersion);
     return(new Offset <UdpMessages.ServerClientMessages.Version>(builder.Offset));
 }
예제 #3
0
 public static Offset <Color32> CreateColor32(FlatBufferBuilder builder, byte A, byte B, byte G, byte R)
 {
     builder.Prep(1, 4);
     builder.PutByte(R);
     builder.PutByte(G);
     builder.PutByte(B);
     builder.PutByte(A);
     return(new Offset <Color32>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.ControlPointTakenMessageFix> CreateControlPointTakenMessageFix(FlatBufferBuilder builder, byte ControlPointId, byte Team, float TeamOneControlProgression, float TeamTwoControlProgression, float TimeToDraw)
 {
     builder.Prep(4, 16);
     builder.PutFloat(TimeToDraw);
     builder.PutFloat(TeamTwoControlProgression);
     builder.PutFloat(TeamOneControlProgression);
     builder.Pad(2);
     builder.PutByte(Team);
     builder.PutByte(ControlPointId);
     return(new Offset <UdpMessages.ServerClientMessages.ControlPointTakenMessageFix>(builder.Offset));
 }
예제 #5
0
 public static Offset <DmxDeviceChannel> CreateDmxDeviceChannel(FlatBufferBuilder builder, int StorageRef, uint Channel, byte Test, byte Norm, uint RuleCount)
 {
     builder.Prep(4, 16);
     builder.PutUint(RuleCount);
     builder.Pad(2);
     builder.PutByte(Norm);
     builder.PutByte(Test);
     builder.PutUint(Channel);
     builder.PutInt(StorageRef);
     return(new Offset <DmxDeviceChannel>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.ControlPointContestingChangedMessageFix> CreateControlPointContestingChangedMessageFix(FlatBufferBuilder builder, byte ControlPointId, byte Team, bool IsContesting, byte ProgressedTeam, float Progression, float TimeToDraw)
 {
     builder.Prep(4, 12);
     builder.PutFloat(TimeToDraw);
     builder.PutFloat(Progression);
     builder.PutByte(ProgressedTeam);
     builder.PutBool(IsContesting);
     builder.PutByte(Team);
     builder.PutByte(ControlPointId);
     return(new Offset <UdpMessages.ServerClientMessages.ControlPointContestingChangedMessageFix>(builder.Offset));
 }
예제 #7
0
 public static Offset <UdpMessages.ServerClientMessages.ProjectileState> CreateProjectileState(FlatBufferBuilder builder, byte Owner, float position_X, float position_Y, float Direction, UdpMessages.ServerClientMessages.ProjectileType Type)
 {
     builder.Prep(4, 20);
     builder.Pad(3);
     builder.PutByte((byte)Type);
     builder.PutFloat(Direction);
     builder.Prep(4, 8);
     builder.PutFloat(position_Y);
     builder.PutFloat(position_X);
     builder.Pad(3);
     builder.PutByte(Owner);
     return(new Offset <UdpMessages.ServerClientMessages.ProjectileState>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.PlayerConnectionChangedMessageFix> CreatePlayerConnectionChangedMessageFix(FlatBufferBuilder builder, byte PlayerNumber, bool IsConnected)
 {
     builder.Prep(1, 2);
     builder.PutBool(IsConnected);
     builder.PutByte(PlayerNumber);
     return(new Offset <UdpMessages.ServerClientMessages.PlayerConnectionChangedMessageFix>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.SpaceshipLifePointsChangedMessageFix> CreateSpaceshipLifePointsChangedMessageFix(FlatBufferBuilder builder, byte Owner, float LifePoints)
 {
     builder.Prep(4, 8);
     builder.PutFloat(LifePoints);
     builder.Pad(3);
     builder.PutByte(Owner);
     return(new Offset <UdpMessages.ServerClientMessages.SpaceshipLifePointsChangedMessageFix>(builder.Offset));
 }
예제 #10
0
 public static Offset <DmxChannelRule> CreateDmxChannelRule(FlatBufferBuilder builder, int StorageRef, DmxChannelRuleType Type, int On, int CalcOn, int Off, int CalcOff, byte Start, byte CalcStart, float Step, float CalcStep)
 {
     builder.Prep(4, 36);
     builder.PutFloat(CalcStep);
     builder.PutFloat(Step);
     builder.Pad(2);
     builder.PutByte(CalcStart);
     builder.PutByte(Start);
     builder.PutInt(CalcOff);
     builder.PutInt(Off);
     builder.PutInt(CalcOn);
     builder.PutInt(On);
     builder.Pad(3);
     builder.PutSbyte((sbyte)Type);
     builder.PutInt(StorageRef);
     return(new Offset <DmxChannelRule>(builder.Offset));
 }
예제 #11
0
 public static Offset <FiveByteStruct> CreateFiveByteStruct(FlatBufferBuilder builder, int Int, byte Byte)
 {
     builder.Prep(4, 8);
     builder.Pad(3);
     builder.PutByte(Byte);
     builder.PutInt(Int);
     return(new Offset <FiveByteStruct>(builder.Offset));
 }
예제 #12
0
 public static Offset <TestStruct1> CreateTestStruct1(FlatBufferBuilder builder, int IntProp, byte ByteProp, short ShortProp)
 {
     builder.Prep(4, 8);
     builder.PutShort(ShortProp);
     builder.Pad(1);
     builder.PutByte(ByteProp);
     builder.PutInt(IntProp);
     return(new Offset <TestStruct1>(builder.Offset));
 }
예제 #13
0
 public static Offset <FlatSharpTests.Oracle.AlignmentTestInner> CreateAlignmentTestInner(FlatBufferBuilder builder, byte A, int B, sbyte C)
 {
     builder.Prep(4, 12);
     builder.Pad(3);
     builder.PutSbyte(C);
     builder.PutInt(B);
     builder.Pad(3);
     builder.PutByte(A);
     return(new Offset <FlatSharpTests.Oracle.AlignmentTestInner>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.ProjectileDirectionChangedMessageFix> CreateProjectileDirectionChangedMessageFix(FlatBufferBuilder builder, byte ProjectileId, float position_X, float position_Y, float Direction)
 {
     builder.Prep(4, 16);
     builder.PutFloat(Direction);
     builder.Prep(4, 8);
     builder.PutFloat(position_Y);
     builder.PutFloat(position_X);
     builder.Pad(3);
     builder.PutByte(ProjectileId);
     return(new Offset <UdpMessages.ServerClientMessages.ProjectileDirectionChangedMessageFix>(builder.Offset));
 }
예제 #15
0
파일: game.cs 프로젝트: ckissane/IOGame
 public static Offset <NetBody> CreateNetBody(FlatBufferBuilder builder, uint Id, uint DefinitionTime, short originalPosition_X, short originalPosition_Y, short velocity_X, short velocity_Y, sbyte OriginalAngle, sbyte AngularVelocity, byte Size, byte Sprite, byte Mode, uint Group)
 {
     builder.Prep(4, 28);
     builder.PutUint(Group);
     builder.Pad(3);
     builder.PutByte(Mode);
     builder.PutByte(Sprite);
     builder.PutByte(Size);
     builder.PutSbyte(AngularVelocity);
     builder.PutSbyte(OriginalAngle);
     builder.Prep(2, 4);
     builder.PutShort(velocity_Y);
     builder.PutShort(velocity_X);
     builder.Prep(2, 4);
     builder.PutShort(originalPosition_Y);
     builder.PutShort(originalPosition_X);
     builder.PutUint(DefinitionTime);
     builder.PutUint(Id);
     return(new Offset <NetBody>(builder.Offset));
 }
예제 #16
0
 public static Offset <TestStruct2> CreateTestStruct2(FlatBufferBuilder builder, int IntProp, int TestStruct1Prop_IntProp, byte TestStruct1Prop_ByteProp, short TestStruct1Prop_ShortProp)
 {
     builder.Prep(4, 12);
     builder.Prep(4, 8);
     builder.PutShort(TestStruct1Prop_ShortProp);
     builder.Pad(1);
     builder.PutByte(TestStruct1Prop_ByteProp);
     builder.PutInt(TestStruct1Prop_IntProp);
     builder.PutInt(IntProp);
     return(new Offset <TestStruct2>(builder.Offset));
 }
예제 #17
0
 public static Offset <FlatSharpTests.Oracle.AlignmentTestOuter> CreateAlignmentTestOuter(FlatBufferBuilder builder, byte A, ushort B, byte C, uint D, byte E, ulong F, byte g_A, int g_B, sbyte g_C)
 {
     builder.Prep(8, 40);
     builder.Pad(4);
     builder.Prep(4, 12);
     builder.Pad(3);
     builder.PutSbyte(g_C);
     builder.PutInt(g_B);
     builder.Pad(3);
     builder.PutByte(g_A);
     builder.PutUlong(F);
     builder.Pad(3);
     builder.PutByte(E);
     builder.PutUint(D);
     builder.Pad(3);
     builder.PutByte(C);
     builder.PutUshort(B);
     builder.Pad(1);
     builder.PutByte(A);
     return(new Offset <FlatSharpTests.Oracle.AlignmentTestOuter>(builder.Offset));
 }
        //Custom implementation of copying bytearray, faster than generated code
        public static VectorOffset CreateDataVectorAndAddAllDataAtOnce(FlatBufferBuilder builder, byte[] data)
        {
            builder.StartVector(1, data.Length, 1);
            var additional_bytes = data.Length - 2;

            builder.Prep(sizeof(byte), additional_bytes * sizeof(byte));
            //Buffer.BlockCopy (data, 0, builder.DataBuffer.Data, builder.Offset, data.Length); // Would be even better
            for (var i = data.Length - 1; i >= 0; i--)
            {
                builder.PutByte(data[i]);
            }
            return(builder.EndVector());
        }
예제 #19
0
 public static Offset <DmxRuleBoolSetting> CreateDmxRuleBoolSetting(FlatBufferBuilder builder, int StorageRef, uint Channel, uint RuleNo, int On, int Off, byte Start, float Step)
 {
     builder.Prep(4, 28);
     builder.PutFloat(Step);
     builder.Pad(3);
     builder.PutByte(Start);
     builder.PutInt(Off);
     builder.PutInt(On);
     builder.PutUint(RuleNo);
     builder.PutUint(Channel);
     builder.PutInt(StorageRef);
     return(new Offset <DmxRuleBoolSetting>(builder.Offset));
 }
예제 #20
0
 public static Offset <UdpMessages.ServerClientMessages.InitGameMessageFix> CreateInitGameMessageFix(FlatBufferBuilder builder, byte PlayerNumber, byte TeamSize, byte NormalProjectileAmmo, float NormalProjectileReloadTimeRemaining, byte BouncingProjectileAmmo, float BouncingProjectileReloadTimeRemaining, byte SpaceshipRespawnTime, float SpaceshipMaxLifePoints, float SpaceshipRadius, float NormalProjectileRadius, float NormalProjectileSpeed, byte NormalProjectileClipSize, float NormalProjectileReloadDelay, float NormalProjectileReloadSpeed, float BouncingProjectileRadius, float BouncingProjectileSpeed, byte BouncingProjectileClipSize, float BouncingProjectileAutoReloadSpeed, float ControlPointRadius, float ControlPointCapturingLimit, float ControlPointCapturingSpeed, float ControlPointTimeBeforeCooldown, float ControlPointCooldownSpeed, float ControlProgressionGoal, float ControlProgressionSpeed, float ReinstallDuration, float teamOneRespawnPoint_position_X, float teamOneRespawnPoint_position_Y, float teamOneRespawnPoint_Width, float teamOneRespawnPoint_Height, float teamTwoRespawnPoint_position_X, float teamTwoRespawnPoint_position_Y, float teamTwoRespawnPoint_Width, float teamTwoRespawnPoint_Height, float TeamOneControlProgression, float TeamTwoControlProgression, float TeamOneReinstallRemaining, float TeamTwoReinstallRemaining, float TimeToDraw)
 {
     builder.Prep(4, 148);
     builder.PutFloat(TimeToDraw);
     builder.PutFloat(TeamTwoReinstallRemaining);
     builder.PutFloat(TeamOneReinstallRemaining);
     builder.PutFloat(TeamTwoControlProgression);
     builder.PutFloat(TeamOneControlProgression);
     builder.Prep(4, 16);
     builder.PutFloat(teamTwoRespawnPoint_Height);
     builder.PutFloat(teamTwoRespawnPoint_Width);
     builder.Prep(4, 8);
     builder.PutFloat(teamTwoRespawnPoint_position_Y);
     builder.PutFloat(teamTwoRespawnPoint_position_X);
     builder.Prep(4, 16);
     builder.PutFloat(teamOneRespawnPoint_Height);
     builder.PutFloat(teamOneRespawnPoint_Width);
     builder.Prep(4, 8);
     builder.PutFloat(teamOneRespawnPoint_position_Y);
     builder.PutFloat(teamOneRespawnPoint_position_X);
     builder.PutFloat(ReinstallDuration);
     builder.PutFloat(ControlProgressionSpeed);
     builder.PutFloat(ControlProgressionGoal);
     builder.PutFloat(ControlPointCooldownSpeed);
     builder.PutFloat(ControlPointTimeBeforeCooldown);
     builder.PutFloat(ControlPointCapturingSpeed);
     builder.PutFloat(ControlPointCapturingLimit);
     builder.PutFloat(ControlPointRadius);
     builder.PutFloat(BouncingProjectileAutoReloadSpeed);
     builder.Pad(3);
     builder.PutByte(BouncingProjectileClipSize);
     builder.PutFloat(BouncingProjectileSpeed);
     builder.PutFloat(BouncingProjectileRadius);
     builder.PutFloat(NormalProjectileReloadSpeed);
     builder.PutFloat(NormalProjectileReloadDelay);
     builder.Pad(3);
     builder.PutByte(NormalProjectileClipSize);
     builder.PutFloat(NormalProjectileSpeed);
     builder.PutFloat(NormalProjectileRadius);
     builder.PutFloat(SpaceshipRadius);
     builder.PutFloat(SpaceshipMaxLifePoints);
     builder.Pad(3);
     builder.PutByte(SpaceshipRespawnTime);
     builder.PutFloat(BouncingProjectileReloadTimeRemaining);
     builder.Pad(3);
     builder.PutByte(BouncingProjectileAmmo);
     builder.PutFloat(NormalProjectileReloadTimeRemaining);
     builder.Pad(1);
     builder.PutByte(NormalProjectileAmmo);
     builder.PutByte(TeamSize);
     builder.PutByte(PlayerNumber);
     return(new Offset <UdpMessages.ServerClientMessages.InitGameMessageFix>(builder.Offset));
 }
예제 #21
0
 public static Offset <Dragapult.Models.PokecampIdentifierStruct> CreatePokecampIdentifierStruct(FlatBufferBuilder builder, int Unknown1, short Unknown2, short Unknown3, ushort Unknown4, ushort Unknown5, ushort Unknown6, ushort Unknown7, byte Unknown8)
 {
     builder.Prep(4, 20);
     builder.Pad(3);
     builder.PutByte(Unknown8);
     builder.PutUshort(Unknown7);
     builder.PutUshort(Unknown6);
     builder.PutUshort(Unknown5);
     builder.PutUshort(Unknown4);
     builder.PutShort(Unknown3);
     builder.PutShort(Unknown2);
     builder.PutInt(Unknown1);
     return(new Offset <Dragapult.Models.PokecampIdentifierStruct>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.ControlPointStateFix> CreateControlPointStateFix(FlatBufferBuilder builder, float position_X, float position_Y, bool ContestedByTeamOne, bool ContestedByTeamTwo, byte ProgressedTeam, float Progression, float TimeBeforeCooldown)
 {
     builder.Prep(4, 20);
     builder.PutFloat(TimeBeforeCooldown);
     builder.PutFloat(Progression);
     builder.Pad(1);
     builder.PutByte(ProgressedTeam);
     builder.PutBool(ContestedByTeamTwo);
     builder.PutBool(ContestedByTeamOne);
     builder.Prep(4, 8);
     builder.PutFloat(position_Y);
     builder.PutFloat(position_X);
     return(new Offset <UdpMessages.ServerClientMessages.ControlPointStateFix>(builder.Offset));
 }
예제 #23
0
 public static Offset <FlatSharpTests.Oracle.StructVectors> CreateStructVectors(FlatBufferBuilder builder, int[] AlignmentVec_Int, byte[] AlignmentVec_Byte, ulong[] HashVec)
 {
     builder.Prep(8, 56);
     for (int _idx0 = 4; _idx0 > 0; _idx0--)
     {
         builder.PutUlong(HashVec[_idx0 - 1]);
     }
     for (int _idx0 = 3; _idx0 > 0; _idx0--)
     {
         builder.Prep(4, 8);
         builder.Pad(3);
         builder.PutByte(AlignmentVec_Byte[_idx0 - 1]);
         builder.PutInt(AlignmentVec_Int[_idx0 - 1]);
     }
     return(new Offset <FlatSharpTests.Oracle.StructVectors>(builder.Offset));
 }
예제 #24
0
 public static Offset <MyGame.Example.Vec3> CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, MyGame.Example.Color Test2, short test3_A, sbyte test3_B)
 {
     builder.Prep(8, 32);
     builder.Pad(2);
     builder.Prep(2, 4);
     builder.Pad(1);
     builder.PutSbyte(test3_B);
     builder.PutShort(test3_A);
     builder.Pad(1);
     builder.PutByte((byte)Test2);
     builder.PutDouble(Test1);
     builder.Pad(4);
     builder.PutFloat(Z);
     builder.PutFloat(Y);
     builder.PutFloat(X);
     return(new Offset <MyGame.Example.Vec3>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.VersionMessageFix> CreateVersionMessageFix(FlatBufferBuilder builder, byte minVersion_MajorVersion, byte minVersion_MinorVersion, byte minVersion_PatchVersion, byte maxVersion_MajorVersion, byte maxVersion_MinorVersion, byte maxVersion_PatchVersion, bool NewMatchesAllowed)
 {
     builder.Prep(1, 7);
     builder.PutBool(NewMatchesAllowed);
     builder.Prep(1, 3);
     builder.PutByte(maxVersion_PatchVersion);
     builder.PutByte(maxVersion_MinorVersion);
     builder.PutByte(maxVersion_MajorVersion);
     builder.Prep(1, 3);
     builder.PutByte(minVersion_PatchVersion);
     builder.PutByte(minVersion_MinorVersion);
     builder.PutByte(minVersion_MajorVersion);
     return(new Offset <UdpMessages.ServerClientMessages.VersionMessageFix>(builder.Offset));
 }
예제 #26
0
 public static Offset <FSimulatorConfiguration> CreateFSimulatorConfiguration(FlatBufferBuilder builder, int Width, int Height, bool FullScreen, int QualityLevel, float TimeScale, float TargetFrameRate, FSimulationType SimulationType, int FrameSkips, int ResetIterations, int NumOfEnvironments, bool DoSerialiseIndividualSensors, bool DoSerialiseUnobservables)
 {
     builder.Prep(4, 44);
     builder.Pad(2);
     builder.PutBool(DoSerialiseUnobservables);
     builder.PutBool(DoSerialiseIndividualSensors);
     builder.PutInt(NumOfEnvironments);
     builder.PutInt(ResetIterations);
     builder.PutInt(FrameSkips);
     builder.Pad(3);
     builder.PutByte((byte)SimulationType);
     builder.PutFloat(TargetFrameRate);
     builder.PutFloat(TimeScale);
     builder.PutInt(QualityLevel);
     builder.Pad(3);
     builder.PutBool(FullScreen);
     builder.PutInt(Height);
     builder.PutInt(Width);
     return(new Offset <FSimulatorConfiguration>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.ProjectileDisappearedMessageFix> CreateProjectileDisappearedMessageFix(FlatBufferBuilder builder, byte ProjectileId)
 {
     builder.Prep(1, 1);
     builder.PutByte(ProjectileId);
     return(new Offset <UdpMessages.ServerClientMessages.ProjectileDisappearedMessageFix>(builder.Offset));
 }
예제 #28
0
 public static Offset <UdpMessages.ServerClientMessages.MatchStartMessageFix> CreateMatchStartMessageFix(FlatBufferBuilder builder, byte SecondsToWait)
 {
     builder.Prep(1, 1);
     builder.PutByte(SecondsToWait);
     return(new Offset <UdpMessages.ServerClientMessages.MatchStartMessageFix>(builder.Offset));
 }
 public static Offset <UdpMessages.ServerClientMessages.MatchFinishedMessageFix> CreateMatchFinishedMessageFix(FlatBufferBuilder builder, byte Winner)
 {
     builder.Prep(1, 1);
     builder.PutByte(Winner);
     return(new Offset <UdpMessages.ServerClientMessages.MatchFinishedMessageFix>(builder.Offset));
 }
예제 #30
0
 public static Offset <UdpMessages.Utilities.UInt8Struct> CreateUInt8Struct(FlatBufferBuilder builder, byte Value)
 {
     builder.Prep(1, 1);
     builder.PutByte(Value);
     return(new Offset <UdpMessages.Utilities.UInt8Struct>(builder.Offset));
 }