Skip to content

Commit

Permalink
Update links and correct mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
muczc1wek committed Nov 26, 2023
1 parent 5d1195b commit a78cc6d
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 93 deletions.
18 changes: 9 additions & 9 deletions docs/zengin/scripts/extenders/ikarus/functions/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ The usage of these functions is probably obvious, they checks if the given objec
Inserts a Vob with the visual `vis` at the waypoint `wp`. If the visual or waypoint does not exist, this is the behaviour this function undefined.

!!! Note
The inserted Vob is even an `oCMob`, so it can be given a focus name, for example. But you can treat it like a `zCVob`, if you don't need the additional properties.
The inserted Vob is even an `oCMob`, so it can be given a focus name, for example. But you can treat it like a [`zCVob`](../../../../worlds/Classes/zCVob.md)), if you don't need the additional properties.
```dae
func int MEM_InsertVob(var string vis, var string wp)
```
Expand All @@ -194,7 +194,7 @@ func void MEM_DeleteVob(var int vobPtr)
**Parameters**

- `#!dae var int vobPtr`
Pointer to a `zCVob` object to be deleted
Pointer to a [`zCVob`](./../../../worlds/Classes/zCVob.md) object to be deleted

### `MEM_RenameVob`
Renames the passed Vob to the `newName` that is also passed.
Expand All @@ -206,7 +206,7 @@ func void MEM_RenameVob(var int vobPtr, var string newName)
**Parameters**

- `#!dae var int vobPtr`
Pointer to a `zCVob` object to be renamed
Pointer to a [`zCVob`](./../../../worlds/Classes/zCVob.md) object to be renamed
- `#!dae var string newName`
The new Name of the Vob

Expand All @@ -220,7 +220,7 @@ func void MEM_RenameVob(var int vobPtr, var string newName)
**Parameters**

- `#!dae var int vobPtr`
Pointer to a triggered `zCVob`
Pointer to a triggered [`zCVob`](./../../../worlds/Classes/zCVob.md)

!!! Danger
If triggering the Vob has immediate effects (even before MEM_TriggerVob is exited), the name of the Vob is corrupted during this time. It is not advisable to rename, trigger again or destroy the object at this moment, the behavior in such cases is untested.
Expand All @@ -234,24 +234,24 @@ func void MEM_RenameVob(var int vobPtr, var string newName)
**Parameters**

- `#!dae var int vobPtr`
Pointer to an untriggered `zCVob`
Pointer to an untriggered [`zCVob`](./../../../worlds/Classes/zCVob.md)

!!! Danger
If untriggering the Vob has immediate effects (even before MEM_TriggerVob is exited), the name of the Vob is corrupted during this time. It is not advisable to rename, trigger again or destroy the object at this moment, the behavior in such cases is untested.

### `MEM_SearchVobByName`
Returns the address of a `zCVob` named `str` if such a Vob exists.
Returns the address of a [`zCVob`](./../../../worlds/Classes/zCVob.md) named `str` if such a Vob exists.
```dae
func int MEM_SearchVobByName(var string str)
```
**Parameters**

- `#!dae var string str`
Name of searched `zCVob`
Name of searched [`zCVob`](./../../../worlds/Classes/zCVob.md)

**Return value**

The function returns a pointer to the `zCVob` if the object with the given name exist. `0` is returned otherwise.
The function returns a pointer to the [`zCVob`](./../../../worlds/Classes/zCVob.md) if the object with the given name exist. `0` is returned otherwise.


### `MEM_SearchAllVobsByName`
Expand All @@ -262,7 +262,7 @@ func int MEM_SearchAllVobsByName(var string str)
**Parameters**

- `#!dae var string str`
Name of searched `zCVob`
Name of searched [`zCVob`](./../../../worlds/Classes/zCVob.md)

**Return value**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The function returns `TRUE` if there is a corresponding function, `FALSE` is ret
## Examples

### Basic command example
As a basic example - let us create a version command, which prints a version of our modification.
As a basic example - let us create a **version** command, which prints a version of our modification.
Firstly, we declare a constant `string` variable to hold the version string to be shown.
```dae
const string Mod_Version = "My mod version 0.1alpha";
Expand All @@ -78,7 +78,7 @@ We then have to register the functions. For convenience, I created a new `Regist
```dae
func void RegisterConsoleFunctions()
{
CC_Register (CC_ModVersion, "mod_version", "Version of my amazing mod.");
CC_Register (CC_ModVersion, "version", "Version of my amazing mod.");
};
```
Lastly, we have to call this function from `INIT_GLOBAL` function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ Funkcja zwraca `TRUE` jeśli znajdzie odpowiednią funkcję, inaczej `FALSE`.
## Przykłady

### Proste polecenie konsoli
Jako prosty przykład stwórzmy polecenie version, które wyświetli nam wersję modyfikacji.
Jako prosty przykład stwórzmy polecenie **version**, które wyświetli nam wersję modyfikacji.
Po pierwsze, deklarujemy stałą zmienną `string` do przechowywania informacji o wersji.
```dae
const string Mod_Version = "Wersja modyfikacji - 0.1alpha";
```
Następnie tworzymy nową funkcję.

!!! Note
Zwróć uwagę na poprawną sygnaturę funkcji. Jeśli nie będzie błędna, polecenie spowoduje awarię gry.
Zwróć uwagę na poprawną sygnaturę funkcji. Jeśli będzie ona błędna, polecenie spowoduje awarię gry.

```dae
// Ta funkcja jest wywoływana przez nasze nowe polecenie
Expand All @@ -82,7 +82,7 @@ Następnie musimy zarejestrować polecenie. Dla wygody stworzyłem nową funkcj
```dae
func void RegisterConsoleFunctions()
{
CC_Register (CC_ModVersion, "wersja_moda", "Wersja mojej modyfikacji.");
CC_Register (CC_ModVersion, "version", "Wersja mojej modyfikacji.");
};
```
Na koniec musimy wywołać tę funkcję w `INIT_GLOBAL`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func void Gamestate_RemoveListener(var func listener)

## Przykłady
Istnieją teraz dwie możliwości. Wszystko można zrobić bezpośrednio w `Init_Global` lub za pomocą [EventHandler](../tools/event_handler.md).
### `Init_Global`
### Init_Global
```dae
func void Init_Global()
{
Expand All @@ -69,8 +69,6 @@ func void Init_Global()
};
```

Może to być przydatne podczas pracy z PermMem, gdzie obiekty PermMem nie muszą być odtwarzane po załadowaniu gry.

Można to również zrobić tak:
```dae
func void Init_Global()
Expand Down Expand Up @@ -99,7 +97,7 @@ func void Init_Global()
};
```

### EventHandler - obsługa zdarzeń
### EventHandler
```dae
func void Init_Global()
{
Expand Down
10 changes: 5 additions & 5 deletions docs/zengin/scripts/extenders/lego/applications/trialoge.pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Resetuje kamery dialogowe do ustawień domyślnych.
func void DiaCAM_Enable()
```
### `TRIA_Wait`
Makes `self` and `other` wait for each other, e.g. for `AI_GotoWP` actions for synchronization.
Sprawia że `self` i `other` czekają na siebie, np. podaczas dla synchronizacji po wywołaniu `AI_GotoWP`.
```dae
func void TRIA_Wait()
```
Expand Down Expand Up @@ -167,10 +167,10 @@ Kończy trwający trialog. Musi być zawsze wywoływana na końcu, w przeciwnym
func void TRIA_Finish()
```

## Examples
## Przykłady

### A Simple Trialogue
The following conversation is resolved via the trialogues:
### Prosty Trialog
Poniższa konwersacja zostanie zaimplementowana za pomocą trialogów:

1. **Arto:** Wybacz bohaterze, ale nie możesz tędy przejść.
2. **Bohater:** Dlaczego nie?
Expand Down Expand Up @@ -271,4 +271,4 @@ func void TRIA_Test_info()
};
```
!!! Note
In addition, here are still [Dialoggestures](dialoggestures.md) used.
Dodatkowo w powyższym przykładzie użyty jest też pakiet [Dialoggestures](dialoggestures.md).
44 changes: 22 additions & 22 deletions docs/zengin/scripts/extenders/lego/tools/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Decimal: `1.5707...`
### `atan2f`
Calculates the arcus tangent of an angle between the origin and (x, y) point.
```dae
func float atan2f(var int x, var int y)
func int atan2f(var int x, var int y)
```
**Parameters**

Expand All @@ -45,73 +45,73 @@ The function returns arcus tangent in radians as Ikarus `float`.
### `sin`
Calculates the sine of an angle given in radians.
```dae
func float sin(var float angle)
func int sin(var int angle)
```
**Parameters**

- `#!dae var float angle`
- `#!dae var int angle`
The angle in radians as a Ikarus `float`

**Return value**

The function returns sine of the angle.
The function returns sine of the angle as Ikarus `float`.

### `cos`
Calculates the cosine of an angle given in radians.
```dae
func float cos(var float angle)
func int cos(var int angle)
```
**Parameters**

- `#!dae var float angle`
- `#!dae var int angle`
The angle in radians as a Ikarus `float`

**Return value**

The function returns cosine of the angle.
The function returns cosine of the angle as Ikarus `float`.


### `tan`
Calculates the tangent of an angle given in radians.
```dae
func float tan(var float angle)
func int tan(var int angle)
```
**Parameters**

- `#!dae var float angle`
- `#!dae var int angle`
The angle in radians as a Ikarus `float`

**Return value**

The function returns tangent of the angle.
The function returns tangent of the angle as Ikarus `float`.

### `asin`
Calculates the arcus sine
Calculates the arcus sine.
```dae
func float asin(var float sine)
func int asin(var int sine)
```
**Parameters**

- `#!dae var float sine`
- `#!dae var int sine`
The sine of an angle as a Ikarus `float`

**Return value**

The function returns arcus sine of the angle.
The function returns arcus sine of the angle as Ikarus `float`.

### `acos`
Calculates the arcus cosine
```dae
func float acos(var float cosine)
func int acos(var int cosine)
```
**Parameters**

- `#!dae var float cosine`
- `#!dae var int cosine`
The cosine of an angle as a Ikarus `float`

**Return value**

The function returns arcus cosine of the angle.
The function returns arcus cosine of the angle as Ikarus `float`.


### `distance2D`
Expand All @@ -137,17 +137,17 @@ The function returns the distance between the two points.
### `distance2Df`
Calculates the distance between two points on a two-dimensional plane but parameters and return values are Ikarus `floats`.
```dae
func float distance2Df(var float x1, var float x2, var float y1, var float y2)
func int distance2Df(var int x1, var int x2, var int y1, var int y2)
```
**Parameters**

- `#!dae var float x1`
- `#!dae var int x1`
X-coordinate of the first point
- `#!dae var float x2`
- `#!dae var int x2`
X-coordinate of the second point
- `#!dae var float y1`
- `#!dae var int y1`
Y-coordinate of the first point
- `#!dae var float y2`
- `#!dae var int y2`
Y-coordinate of the second point

**Return value**
Expand Down
Loading

0 comments on commit a78cc6d

Please sign in to comment.