Skip to content

Commit

Permalink
Update AddDecal.md (#1047)
Browse files Browse the repository at this point in the history
* Update AddDecal.md

add descriptions for each parameter and update the unknown ones.

* Update AddDecal.md

Add return value and remove text from inside the enum's fenced code block.

* Update AddDecal.md

Almost forgot to reference the enum.

---------

Co-authored-by: ammonia-cfx <[email protected]>
  • Loading branch information
ook3D and 4mmonium authored Mar 8, 2024
1 parent ad206f1 commit 4f32e5d
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions GRAPHICS/AddDecal.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ ns: GRAPHICS

```c
// 0xB302244A1839BDAD 0xEAD0C412
int ADD_DECAL(int decalType, float posX, float posY, float posZ, float p4, float p5, float p6, float p7, float p8, float p9, float width, float height, float rCoef, float gCoef, float bCoef, float opacity, float timeout, BOOL p17, BOOL p18, BOOL p19);
int ADD_DECAL(int decalType, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float sideX, float sideY, float sideZ, float width, float height, float rCoef, float gCoef, float bCoef, float opacity, float timeout, BOOL isLongRange, BOOL isDynamic, BOOL useComplexColn);
```
```
decal types:
Places a decal into the world
```cs
public enum DecalTypes
{
splatters_blood = 1010,
Expand Down Expand Up @@ -68,25 +69,26 @@ public enum DecalTypes
```

## Parameters
* **decalType**:
* **posX**:
* **posY**:
* **posZ**:
* **p4**:
* **p5**:
* **p6**:
* **p7**:
* **p8**:
* **p9**:
* **width**:
* **height**:
* **rCoef**:
* **gCoef**:
* **bCoef**:
* **opacity**:
* **timeout**:
* **p17**:
* **p18**:
* **p19**:
* **decalType**: which type of decal to place, based on the ID, see `DecalTypes` enum.
* **posX**: X position coordinate.
* **posY**: Y position coordinate.
* **posZ**: Z position coordinate.
* **dirX**: X Orientation.
* **dirY**: Y Orientation.
* **dirZ**: Z Orientation.
* **sideX**: Usually set to 0.
* **sideY**: Usually set to 1.
* **sideZ**: Usually set to 0.
* **width**: Width of the decal.
* **height**: Height of the decal.
* **rCoef**: Red Color.
* **gCoef**: Green Color.
* **bCoef**: Blue Color.
* **opacity**: Alpha Color.
* **timeout**: The lifetime of the decal.
* **isLongRange**: toggle further LOD draw distance.
* **isDynamic**: toggle dynamics.
* **useComplexColn**: use complex coloring.

## Return value
An integer value representing the added decal index, will return `0` if the decal cannot be added.

0 comments on commit 4f32e5d

Please sign in to comment.