From 56970f69c2da52419ae1a185977f5fe996631d5f Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Tue, 24 May 2016 08:18:39 +0300 Subject: [PATCH] Exported more enumerations from teh SDK. Renamed several existing enumerations for consistency. --- source/Constants.cpp | 153 +++++++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 34 deletions(-) diff --git a/source/Constants.cpp b/source/Constants.cpp index a7b4f8f4..f1eafde5 100644 --- a/source/Constants.cpp +++ b/source/Constants.cpp @@ -191,7 +191,21 @@ void Register_Constants(HSQUIRRELVM vm) .Const(_SC("Cleanup"), SQMOD_DESTROY_CLEANUP) ); - ConstTable(vm).Enum(_SC("SqPoolUpdate"), Enumeration(vm) + ConstTable(vm).Enum(_SC("SqServerError"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("None"), vcmpErrorNone) + .Const(_SC("NoSuchEntity"), vcmpErrorNoSuchEntity) + .Const(_SC("BufferTooSmall"), vcmpErrorBufferTooSmall) + .Const(_SC("TooLargeInput"), vcmpErrorTooLargeInput) + .Const(_SC("ArgumentOutOfBounds"), vcmpErrorArgumentOutOfBounds) + .Const(_SC("NullArgument"), vcmpErrorNullArgument) + .Const(_SC("PoolExhausted"), vcmpErrorPoolExhausted) + .Const(_SC("InvalidName"), vcmpErrorInvalidName) + .Const(_SC("RequestDenied"), vcmpErrorRequestDenied) + .Const(_SC("Max"), vcmpErrorRequestDenied) + ); + + ConstTable(vm).Enum(_SC("SqEntityPool"), Enumeration(vm) .Const(_SC("Unknown"), SQMOD_UNKNOWN) .Const(_SC("Vehicle"), vcmpEntityPoolVehicle) .Const(_SC("Object"), vcmpEntityPoolObject) @@ -202,7 +216,16 @@ void Register_Constants(HSQUIRRELVM vm) .Const(_SC("Max"), vcmpEntityPoolCheckPoint) ); - ConstTable(vm).Enum(_SC("SqVehicleUpd"), Enumeration(vm) + ConstTable(vm).Enum(_SC("SqPlayerUpdate"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("Normal"), vcmpPlayerUpdateNormal) + .Const(_SC("Aiming"), vcmpPlayerUpdateAiming) + .Const(_SC("Driver"), vcmpPlayerUpdateDriver) + .Const(_SC("Passenger"), vcmpPlayerUpdatePassenger) + .Const(_SC("Max"), vcmpPlayerUpdatePassenger) + ); + + ConstTable(vm).Enum(_SC("SqVehicleUpdate"), Enumeration(vm) .Const(_SC("Unknown"), SQMOD_UNKNOWN) .Const(_SC("DriverSync"), vcmpVehicleUpdateDriverSync) .Const(_SC("OtherSync"), vcmpVehicleUpdateOtherSync) @@ -214,13 +237,22 @@ void Register_Constants(HSQUIRRELVM vm) .Const(_SC("Max"), vcmpVehicleUpdateRotation) ); - ConstTable(vm).Enum(_SC("SqPlayerUpd"), Enumeration(vm) + ConstTable(vm).Enum(_SC("SqPlayerVehicle"), Enumeration(vm) .Const(_SC("Unknown"), SQMOD_UNKNOWN) - .Const(_SC("Normal"), vcmpPlayerUpdateNormal) - .Const(_SC("Aiming"), vcmpPlayerUpdateAiming) - .Const(_SC("Driver"), vcmpPlayerUpdateDriver) - .Const(_SC("Passenger"), vcmpPlayerUpdatePassenger) - .Const(_SC("Max"), vcmpPlayerUpdatePassenger) + .Const(_SC("Out"), vcmpPlayerVehicleOut) + .Const(_SC("Entering"), vcmpPlayerVehicleEntering) + .Const(_SC("Exiting"), vcmpPlayerVehicleExiting) + .Const(_SC("In"), vcmpPlayerVehicleIn) + .Const(_SC("Max"), vcmpPlayerVehicleIn) + ); + + ConstTable(vm).Enum(_SC("SqVehicleSync"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("None"), vcmpVehicleSyncNone) + .Const(_SC("Driver"), vcmpVehicleSyncDriver) + .Const(_SC("Passenger"), vcmpVehicleSyncPassenger) + .Const(_SC("Near"), vcmpVehicleSyncNear) + .Const(_SC("Max"), vcmpVehicleSyncNear) ); ConstTable(vm).Enum(_SC("SqPartReason"), Enumeration(vm) @@ -233,6 +265,59 @@ void Register_Constants(HSQUIRRELVM vm) .Const(_SC("Max"), vcmpDisconnectReasonAntiCheat) ); + ConstTable(vm).Enum(_SC("SqServerOption"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("SyncFrameLimiter"), vcmpServerOptionSyncFrameLimiter) + .Const(_SC("FrameLimiter"), vcmpServerOptionFrameLimiter) + .Const(_SC("TaxiBoostJump"), vcmpServerOptionTaxiBoostJump) + .Const(_SC("DriveOnWater"), vcmpServerOptionDriveOnWater) + .Const(_SC("FastSwitch"), vcmpServerOptionFastSwitch) + .Const(_SC("FriendlyFire"), vcmpServerOptionFriendlyFire) + .Const(_SC("DisableDriveBy"), vcmpServerOptionDisableDriveBy) + .Const(_SC("PerfectHandling"), vcmpServerOptionPerfectHandling) + .Const(_SC("FlyingCars"), vcmpServerOptionFlyingCars) + .Const(_SC("JumpSwitch"), vcmpServerOptionJumpSwitch) + .Const(_SC("ShowMarkers"), vcmpServerOptionShowMarkers) + .Const(_SC("OnlyShowTeamMarkers"), vcmpServerOptionOnlyShowTeamMarkers) + .Const(_SC("StuntBike"), vcmpServerOptionStuntBike) + .Const(_SC("ShootInAir"), vcmpServerOptionShootInAir) + .Const(_SC("ShowNameTags"), vcmpServerOptionShowNameTags) + .Const(_SC("JoinMessages"), vcmpServerOptionJoinMessages) + .Const(_SC("DeathMessages"), vcmpServerOptionDeathMessages) + .Const(_SC("ChatTagsEnabled"), vcmpServerOptionChatTagsEnabled) + .Const(_SC("UseClasses"), vcmpServerOptionUseClasses) + .Const(_SC("WallGlitch"), vcmpServerOptionWallGlitch) + .Const(_SC("DisableBackfaceCulling"), vcmpServerOptionDisableBackfaceCulling) + .Const(_SC("DisableHeliBladeDamage"), vcmpServerOptionDisableHeliBladeDamage) + .Const(_SC("Max"), vcmpServerOptionDisableHeliBladeDamage) + ); + + ConstTable(vm).Enum(_SC("SqPlayerOption"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("Controllable"), vcmpPlayerOptionControllable) + .Const(_SC("DriveBy"), vcmpPlayerOptionDriveBy) + .Const(_SC("WhiteScanlines"), vcmpPlayerOptionWhiteScanlines) + .Const(_SC("GreenScanlines"), vcmpPlayerOptionGreenScanlines) + .Const(_SC("Widescreen"), vcmpPlayerOptionWidescreen) + .Const(_SC("ShowMarkers"), vcmpPlayerOptionShowMarkers) + .Const(_SC("CanAttack"), vcmpPlayerOptionCanAttack) + .Const(_SC("HasMarker"), vcmpPlayerOptionHasMarker) + .Const(_SC("ChatTagsEnabled"), vcmpPlayerOptionChatTagsEnabled) + .Const(_SC("DrunkEffects"), vcmpPlayerOptionDrunkEffects) + .Const(_SC("Max"), vcmpPlayerOptionDrunkEffects) + ); + + ConstTable(vm).Enum(_SC("SqVehicleOption"), Enumeration(vm) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("DoorsLocked"), vcmpVehicleOptionDoorsLocked) + .Const(_SC("Alarm"), vcmpVehicleOptionAlarm) + .Const(_SC("Lights"), vcmpVehicleOptionLights) + .Const(_SC("RadioLocked"), vcmpVehicleOptionRadioLocked) + .Const(_SC("Ghost"), vcmpVehicleOptionGhost) + .Const(_SC("Siren"), vcmpVehicleOptionSiren) + .Const(_SC("Max"), vcmpVehicleOptionSiren) + ); + ConstTable(vm).Enum(_SC("SqBodyPart"), Enumeration(vm) .Const(_SC("Unknown"), SQMOD_UNKNOWN) .Const(_SC("Body"), vcmpBodyPartBody) @@ -251,35 +336,35 @@ void Register_Constants(HSQUIRRELVM vm) ); ConstTable(vm).Enum(_SC("SqPlayerState"), Enumeration(vm) - .Const(_SC("Unknown"), SQMOD_UNKNOWN) - .Const(_SC("None"), vcmpPlayerStateNone) - .Const(_SC("Normal"), vcmpPlayerStateNormal) - .Const(_SC("Aim"), vcmpPlayerStateAim) - .Const(_SC("Driver"), vcmpPlayerStateDriver) - .Const(_SC("Passenger"), vcmpPlayerStatePassenger) - .Const(_SC("EnterDriver"), vcmpPlayerStateEnterDriver) - .Const(_SC("EnterPassenger"), vcmpPlayerStateEnterPassenger) - .Const(_SC("Exit"), vcmpPlayerStateExit) - .Const(_SC("Unspawned"), vcmpPlayerStateUnspawned) - .Const(_SC("Max"), vcmpPlayerStateUnspawned) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("None"), vcmpPlayerStateNone) + .Const(_SC("Normal"), vcmpPlayerStateNormal) + .Const(_SC("Aim"), vcmpPlayerStateAim) + .Const(_SC("Driver"), vcmpPlayerStateDriver) + .Const(_SC("Passenger"), vcmpPlayerStatePassenger) + .Const(_SC("EnterDriver"), vcmpPlayerStateEnterDriver) + .Const(_SC("EnterPassenger"), vcmpPlayerStateEnterPassenger) + .Const(_SC("Exit"), vcmpPlayerStateExit) + .Const(_SC("Unspawned"), vcmpPlayerStateUnspawned) + .Const(_SC("Max"), vcmpPlayerStateUnspawned) ); ConstTable(vm).Enum(_SC("SqPlayerAction"), Enumeration(vm) - .Const(_SC("Unknown"), SQMOD_UNKNOWN) - .Const(_SC("None"), SQMOD_PLAYER_ACTION_NONE) - .Const(_SC("Normal"), SQMOD_PLAYER_ACTION_NORMAL) - .Const(_SC("Aiming"), SQMOD_PLAYER_ACTION_AIMING) - .Const(_SC("Shooting"), SQMOD_PLAYER_ACTION_SHOOTING) - .Const(_SC("Jumping"), SQMOD_PLAYER_ACTION_JUMPING) - .Const(_SC("LyingOnGround"), SQMOD_PLAYER_ACTION_LYING_ON_GROUND) - .Const(_SC("GettingUp"), SQMOD_PLAYER_ACTION_GETTING_UP) - .Const(_SC("JumpingFromVehicle"), SQMOD_PLAYER_ACTION_JUMPING_FROM_VEHICLE) - .Const(_SC("Driving"), SQMOD_PLAYER_ACTION_DRIVING) - .Const(_SC("Dying"), SQMOD_PLAYER_ACTION_DYING) - .Const(_SC("Wasted"), SQMOD_PLAYER_ACTION_WASTED) - .Const(_SC("EnteringVehicle"), SQMOD_PLAYER_ACTION_ENTERING_VEHICLE) - .Const(_SC("ExitingVehicle"), SQMOD_PLAYER_ACTION_EXITING_VEHICLE) - .Const(_SC("Max"), SQMOD_PLAYER_ACTION_MAX) + .Const(_SC("Unknown"), SQMOD_UNKNOWN) + .Const(_SC("None"), SQMOD_PLAYER_ACTION_NONE) + .Const(_SC("Normal"), SQMOD_PLAYER_ACTION_NORMAL) + .Const(_SC("Aiming"), SQMOD_PLAYER_ACTION_AIMING) + .Const(_SC("Shooting"), SQMOD_PLAYER_ACTION_SHOOTING) + .Const(_SC("Jumping"), SQMOD_PLAYER_ACTION_JUMPING) + .Const(_SC("LyingOnGround"), SQMOD_PLAYER_ACTION_LYING_ON_GROUND) + .Const(_SC("GettingUp"), SQMOD_PLAYER_ACTION_GETTING_UP) + .Const(_SC("JumpingFromVehicle"), SQMOD_PLAYER_ACTION_JUMPING_FROM_VEHICLE) + .Const(_SC("Driving"), SQMOD_PLAYER_ACTION_DRIVING) + .Const(_SC("Dying"), SQMOD_PLAYER_ACTION_DYING) + .Const(_SC("Wasted"), SQMOD_PLAYER_ACTION_WASTED) + .Const(_SC("EnteringVehicle"), SQMOD_PLAYER_ACTION_ENTERING_VEHICLE) + .Const(_SC("ExitingVehicle"), SQMOD_PLAYER_ACTION_EXITING_VEHICLE) + .Const(_SC("Max"), SQMOD_PLAYER_ACTION_MAX) ); ConstTable(vm).Enum(_SC("SqWeather"), Enumeration(vm)