Skip to content

Commit

Permalink
[Ikarus] Fixes in setup and constants articles
Browse files Browse the repository at this point in the history
  • Loading branch information
muczc1wek committed Oct 29, 2023
1 parent 71576be commit 32e292c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/zengin/scripts/extenders/ikarus/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ The [`MEM_Debug`](functions/preamble.md#mem_debug) function allows you to set up
- `#!dae const string zERR_DEBUG_PREFIX`
Specifies a prefix to be added to each debug message (default: `"Debug: "`).
- `#!dae const int zERR_DEBUG_TOSPY`
Controls whether `MEM_Debug` messages should be sent to zSpy (default: `1`).
Controls whether `MEM_Debug` messages should be sent to [zSpy](../../../tools/zSpy.md) (default: `1`).
- `#!dae const int zERR_DEBUG_TYPE`
Specifies the [message type](#error-message-types) for `MEM_Debug` messages when sent to zSpy (default: `zERR_TYPE_INFO`).
Specifies the [message type](#error-message-types) for `MEM_Debug` messages when sent to [zSpy](../../../tools/zSpy.md) (default: `zERR_TYPE_INFO`).
- `#!dae const int zERR_DEBUG_TOSCREEN`
Determines whether `MEM_Debug` messages should be printed to the screen (default: `0`).
- `#!dae const int zERR_DEBUG_ERRORBOX`
Expand Down
12 changes: 6 additions & 6 deletions docs/zengin/scripts/extenders/ikarus/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ title: Setup
First you need to download ikarus from the [official github repository](https://github.com/Lehona/Ikarus). We recommend using the master branch as it contains the latest and most up-to-date version of Ikarus. However, you can also download a specific release if needed.

## File location
Before unpacking the downloaded archive it's needed to create a dedicated folder in `<Gothic-dir>\_work\Data\Scripts\Content` directory. You can name this folder as you wish; in this guide, we'll refer to it as the "MOD" folder. Unpack the downloaded files into this newly created folder. The unarchiver should create a folder named `Ikarus-master` or `Ikarus-X.X.X`. For beter readability change its name to the much simpler `Ikarus`.
Before unpacking the downloaded archive it's needed to create a dedicated folder in `<Gothic-dir>\_work\Data\Scripts\Content` directory. You can name this folder as you wish; in this guide, we'll refer to it as the "MOD" folder. Unpack the downloaded files into this newly created folder. The archiver should create a folder named `Ikarus-master` or `Ikarus-X.X.X`. For better readability change its name to the much simpler `Ikarus`.

!!! Tip
It's a good practice to delete any unused files, so delete files for other gothic version than this you are using.

## Parsing
Ikarus consists of three main parts, [constants](./constants.md), classes and the Ikarus core. It's essential to parse these in a specific order. Additionally, there is a [floats package](floats.md) which isn't essential, but is is highly recommended to parse it, especially if you are working with [LeGo](../lego/index.md) that depends on it.
Ikarus consists of three main parts, [constants](./constants.md), classes and the Ikarus core. It's essential to parse these in a specific order. Additionally, there is a [floats package](floats.md) which isn't essential, but it is highly recommended to parse it, especially if you are working with [LeGo](../lego/index.md) that depends on it.

The Ikarus Core is identical for both Gothic 1 and 2 and is contained in a single file, `Ikarus.d`. However, there are separate files for the constants and classes for each engine, and they must be parsed correctly. Ikarus uses a C_NPC and therefore has to parsed after the C_NPC class (after the `classes.d` file). There are no other dependencies.
The Ikarus Core is identical for both Gothic 1 and 2 and is contained in a single file, `Ikarus.d`. However, there are separate files for the constants and classes for each engine, and they must be parsed correctly. Ikarus uses a C_NPC and therefore has to be parsed after the C_NPC class (after the `classes.d` file). There are no other dependencies.

Since Ikarus 1.2.1 there is additional `.src` file for each game engine, to simplify adding files to `Gothic.src`

Expand All @@ -43,9 +43,9 @@ Since Ikarus 1.2.1 there is additional `.src` file for each game engine, to simp
Before you can use Ikarus in your scripts, it must be properly initialized. The initialization process differs between Gothic 1 and Gothic 2.

### Gothic 1
To intialize Ikarus in Gothic 1 you must define your own `INIT_GLOBAL` fuction at the top of the `Startup.d` file. Then the `INIT_GLOBAL` should be called in every `INIT_<location>` function (e.g. `INIT_SURFACE`,`INIT_OLDCAMP` etc.). `INIT_SUB_<location>` functions can be skiped in that process.
To initialize Ikarus in Gothic 1 you must define your own `INIT_GLOBAL` function at the top of the `Startup.d` file. Then the `INIT_GLOBAL` should be called in every `INIT_<location>` function (e.g. `INIT_SURFACE`,`INIT_OLDCAMP` etc.). `INIT_SUB_<location>` functions can be skipped in that process.

Then in your `INIT_GLOBAL` fuction you call `MEM_InitAll()` initialization function.
Then in your `INIT_GLOBAL` function you call `MEM_InitAll()` initialization function.

```dae title="Startup.d"
FUNC VOID INIT_GLOBAL()
Expand All @@ -65,7 +65,7 @@ func VOID INIT_SURFACE ()
```

### Gothic 2
Gothic 2 has its own `INIT_GLOBAL` function, so the initialization proces is much simpler. All you have to do is to call `MEM_InitAll()` in `INIT_GLOBAL` function located in the `Startup.d` file.
Gothic 2 has its own `INIT_GLOBAL` function, so the initialization process is much simpler. All you have to do is to call `MEM_InitAll()` in `INIT_GLOBAL` function located in the `Startup.d` file.

```dae title="Startup.d"
FUNC VOID INIT_GLOBAL()
Expand Down

0 comments on commit 32e292c

Please sign in to comment.