Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Kopraa authored May 20, 2024
2 parents 937659d + 4304774 commit 4067293
Show file tree
Hide file tree
Showing 21 changed files with 495 additions and 220 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,8 @@ dist
.tern-port

#macOS files
.DS_Store
.DS_Store


#Test
/test/**/*
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages/*"
],
"npmClient": "pnpm",
"version": "2.1.6"
"version": "2.1.7"
}
1 change: 1 addition & 0 deletions packages/client/enums.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/// <reference path="enums/console.d.ts" />
/// <reference path="enums/controls.d.ts" />
/// <reference path="enums/explosions.d.ts" />
/// <reference path="enums/camera.d.ts" />
/// <reference path="enums/hud.d.ts" />
/// <reference path="enums/inputGroup.d.ts" />
/// <reference path="enums/markers.d.ts" />
Expand Down
33 changes: 33 additions & 0 deletions packages/client/enums/camera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
declare namespace RageEnums.Camera {
enum GraphTypes {
TYPE_LINEAR = 0,
TYPE_SIN_ACCEL_DECEL,
TYPE_ACCEL,
TYPE_DECEL,
TYPE_SLOW_IN,
TYPE_SLOW_OUT,
TYPE_SLOW_IN_OUT,
TYPE_VERY_SLOW_IN,
TYPE_VERY_SLOW_OUT,
TYPE_VERY_SLOW_IN_SLOW_OUT,
TYPE_SLOW_IN_VERY_SLOW_OUT,
TYPE_VERY_SLOW_IN_VERY_SLOW_OUT,
TYPE_EASE_IN,
TYPE_EASE_OUT,
TYPE_QUADRATIC_EASE_IN,
TYPE_QUADRATIC_EASE_OUT,
TYPE_QUADRATIC_EASE_IN_OUT,
TYPE_CUBIC_EASE_IN,
TYPE_CUBIC_EASE_OUT,
TYPE_CUBIC_EASE_IN_OUT,
TYPE_QUARTIC_EASE_IN,
TYPE_QUARTIC_EASE_OUT,
TYPE_QUARTIC_EASE_IN_OUT,
TYPE_QUINTIC_EASE_IN,
TYPE_QUINTIC_EASE_OUT,
TYPE_QUINTIC_EASE_IN_OUT,
TYPE_CIRCULAR_EASE_IN,
TYPE_CIRCULAR_EASE_OUT,
TYPE_CIRCULAR_EASE_IN_OUT
}
}
32 changes: 32 additions & 0 deletions packages/client/enums/hud.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,38 @@ declare namespace RageEnums.Hud {
WEAPON_WHEEL = 19,
WEAPON_WHEEL_STATS = 20
}

enum DisplayHelpId {
STANDARD = 0,
FLOATING_1,
FLOATING_2,
FLOATING_3,
}

enum ArrowDirection {
NORTH = 1,
EAST,
SOUTH,
WEST
}

enum GpsFlags {
NONE = 0,
IGNORE_ONE_WAY = 1,
FOLLOW_RULES = 2,
AVOID_HIGHWAY = 4,
NO_ROUTE_SHIFT = 8,
CUSTOM_PROXIMITY = 16,
NO_PULL_PATH_TO_RIGHT_LANE = 32,
AVOID_OFF_ROAD = 64,
IGNORE_DESTINATION_Z = 128
}

enum PM_PedPosition {
LEFT = 0,
CENTER,
RIGHT
}
}

declare namespace RageEnums {
Expand Down
5 changes: 5 additions & 0 deletions packages/client/enums/props.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ declare namespace RageEnums {
*/
BRACELETS = 7
}

const enum PropDamage {
LOSE_ON_DAMAGE = 0,
LOSE_HELMET_ON_HS = 1
}
}
7 changes: 7 additions & 0 deletions packages/client/enums/vehicle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4594,6 +4594,13 @@ declare namespace RageEnums.Vehicle {
*/
YOUGA3 = 0x6b73a9be
}

enum vStuckType {
STUCK_ON_ROOF = 0,
STUCK_ON_SIDE,
STUCK_HUNG_UP,
STUCK_JAMMED,
}
}

declare namespace RageEnums.Hashes {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/game/audio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ declare interface GameAudio extends GameAudioLegacy {
hasMultiplayerDataUnloaded(): boolean;
getVehicleDefaultHornVariation(vehicle: number): number;
setVehicleHornVariation(vehicle: number, value: number): void;

playPoliceCrimeReport(position: Vector3, crimeIndex: number, playDelay: number, localPlayer: boolean): void;
unk: GameAudioUnk;
}

declare interface GameAudioMp extends GameAudio {}
declare interface GameAudioMp extends GameAudio { }
1 change: 1 addition & 0 deletions packages/client/game/entity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ declare interface GameEntity extends GameEntityLegacy {
setRotation(entity: number, pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void;
setVisible(entity: number, toggle: boolean, unk: boolean): void;
setVelocity(entity: number, x: number, y: number, z: number): void;
setAngularVelocity(entity:number, x: number, y: number, z: number): void;
setHasGravity(entity: number, toggle: boolean): void;
setLodDist(entity: number, value: number): void;
getLodDist(entity: number): number;
Expand Down
72 changes: 55 additions & 17 deletions packages/client/game/graphics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ declare interface GameGraphicsLegacy {

declare interface GameGraphics extends GameGraphicsLegacy {
setDebugLinesAndSpheresDrawingActive(enabled: boolean): void;
drawDebugLine(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number): void;
drawDebugLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void;
drawDebugLineWithTwoColours(
x1: number,
y1: number,
Expand All @@ -312,7 +312,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
alpha2: number
): void;
drawDebugSphere(x: number, y: number, z: number, radius: number, red: number, green: number, blue: number, alpha: number): void;
drawDebugBox(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number): void;
drawDebugBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void;
drawDebugCross(x: number, y: number, z: number, size: number, red: number, green: number, blue: number, alpha: number): void;
drawDebugText(text: string, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void;
drawDebugText2D(text: string, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void;
Expand Down Expand Up @@ -465,7 +465,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
falloff: number,
shadowId: number
): void;
fadeUpPedLight(p0: number): void;
fadeUpPedLight(seconds: number): void;
updateLightsOnEntity(entity: number): void;
drawMarker(
type: number,
Expand Down Expand Up @@ -543,7 +543,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
setCheckpointRgba(checkpoint: number, red: number, green: number, blue: number, alpha: number): void;
setCheckpointRgba2(checkpoint: number, red: number, green: number, blue: number, alpha: number): void;
deleteCheckpoint(checkpoint: number): void;
dontRenderInGameUi(p0: boolean): void;
dontRenderInGameUi(val: boolean): void;
forceRenderInGameUi(toggle: boolean): void;
requestStreamedTextureDict(textureDict: string, p1: boolean): void;
hasStreamedTextureDictLoaded(textureDict: string): boolean;
Expand Down Expand Up @@ -619,7 +619,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
setBinkShouldSkip(binkMovie: number, bShouldSkip: boolean): void;
loadMovieMeshSet(movieMeshSetName: string): number;
releaseMovieMeshSet(movieMeshSet: number): void;
queryMovieMeshSetState(p0: number): number;
queryMovieMeshSetState(meshsetid: number): number;
getScreenResolution(): GetScreenResolutionResult;
getActiveScreenResolution(): GetActiveScreenResolutionResult;
getAspectRatio(b: boolean): number;
Expand All @@ -633,7 +633,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
getScreenCoordFromWorldCoord(worldX: number, worldY: number, worldZ: number): GetScreenCoordFromWorldCoordResult;
getTextureResolution(textureDict: string, textureName: string): Vector3;
overridePedBadgeTexture(ped: number, txd: string, txn: string): boolean;
setFlash(p0: number, p1: number, fadeIn: number, duration: number, fadeOut: number): void;
setFlash(minExposure: number, maxExposure: number, rampUpDuration: number, rampDownDuration: number, holdDuration: number): void;
disableOcclusionThisFrame(): void;
setArtificialLightsState(state: boolean): void;
setArtificialLightsStateAffectsVehicles(toggle: boolean): void;
Expand All @@ -644,17 +644,17 @@ declare interface GameGraphics extends GameGraphicsLegacy {
grassLodShrinkScriptAreas(x: number, y: number, z: number, radius: number, p4: number, p5: number, p6: number): void;
grassLodResetScriptAreas(): void;
cascadeShadowsInitSession(): void;
cascadeShadowsSetCascadeBounds(p0: number, p1: boolean, p2: number, p3: number, p4: number, p5: number, p6: boolean, p7: number): void;
cascadeShadowsSetCascadeBoundsScale(p0: number): void;
cascadeShadowsSetEntityTrackerScale(p0: number): void;
cascadeShadowsSetCascadeBounds(cascade: number, enabled: boolean, x: number, y: number, z: number, scale: number, interpolateToDisabled: boolean, interpolateTime: number): void;
cascadeShadowsSetCascadeBoundsScale(scale: number): void;
cascadeShadowsSetEntityTrackerScale(scale: number): void;
cascadeShadowsEnableEntityTracker(toggle: boolean): void;
cascadeShadowsSetShadowSampleType(type: string): void;
cascadeShadowsClearShadowSampleType(): void;
cascadeShadowsSetAircraftMode(p0: boolean): void;
cascadeShadowsSetDynamicDepthMode(p0: boolean): void;
cascadeShadowsSetDynamicDepthValue(p0: number): void;
cascadeShadowsSetAircraftMode(enable: boolean): void;
cascadeShadowsSetDynamicDepthMode(enable: boolean): void;
cascadeShadowsSetDynamicDepthValue(distance: number): void;
golfTrailSetEnabled(toggle: boolean): void;
golfTrailSetPath(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean): void;
golfTrailSetPath(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, scale: number, idx: number, ascending: boolean): void;
golfTrailSetRadius(p0: number, p1: number, p2: number): void;
golfTrailSetColour(
p0: number,
Expand Down Expand Up @@ -1201,6 +1201,7 @@ declare interface GameGraphics extends GameGraphicsLegacy {
animpostfxIsRunning(effectName: string): boolean;
animpostfxStopAll(): void;
animpostfxStopAndDoUnk(effectName: string): void;
togglePlayerDamageOverlay(enable: boolean): void;

/**
* Convert a world coordinate into its relative screen coordinate. (WorldToScreen)
Expand Down Expand Up @@ -1241,18 +1242,55 @@ declare interface GameGraphics extends GameGraphicsLegacy {

/**
* This function allows you to disable the state of an artificial lightId (granular control over lights instead of e.g. setBlackout turning all on/off)
*
*
* @param lightId The lightId (valid 0 through 16) to change the state of
* @param disable true to disable; false to enable (defaults to false)
*/
setLightsState(lightId: number, disable: boolean): void
setLightsState(lightId: number, disable: boolean): void;
/**
* This function resets the light state back to default.
*/
resetLightsState(): void;
/**
* This function allows you to get the state of a given light id, whether they're on or off.
*
* @param lightId The lightId (valid 0 through 16) to get the state of.
*/
getLightsState(lightId: number): boolean;

/**
* @param layer Only layer 4 works
*/
set2dLayer(layer: number): void
set2dLayer(layer: number): void;

unk: GameGraphicsUnk;

/**
* This function will create a texture swap in the world
*
* @param oldTextureDict The old texture dictionary
* @param oldTextureName The old texture name
* @param newTextureDict The new texture dictionary
* @param newTextureName The new texture name
*/
createWorldTextureSwap(oldTextureDict: string, oldTextureName: string, newTextureDict: string, newTextureName: string): void;

/**
* This function will remove the specified texture swap from the world
*
* @param oldTextureDict The old texture dictionary
* @param oldTextureName The old texture name
*/
removeWorldTextureSwap(oldTextureDict: string, oldTextureName: string): void;

/**
* This function will reset all texture swaps in the world
*/
resetWorldTextureSwaps(): void;
doesLatestBriefStringExist(type: number): boolean;
registerTextFontId(fontname: string): number;
setNumberPlateTexture(txDict: string, txName: string, txDictNormal: string, txNameNorma: string): void;
setParticleFxBloodScale(scale: number): void;
}

declare interface GameGraphicsMp extends GameGraphics {}
declare interface GameGraphicsMp extends GameGraphics { }
Loading

0 comments on commit 4067293

Please sign in to comment.