Skip to content

Commit

Permalink
update to 1.0.5-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
x87 committed Dec 12, 2022
1 parent a00096d commit c4d1ac4
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 17 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
### 1.0.5

- add [TypeScript support](https://re.cleo.li/docs/en/typescript.html)
- add support for commands using global SCM variables (e.g. counters or timers).
- delete previously deprecated variable `GAME`. Use `HOST` instead
- update script watcher: changing `.mjs` files in a script directory or any nested directories triggers script reload
- `FxtStore` can be forced to mutate global FXT keys by setting the last argument in `FxtStore.insert` and `FxtStore.delete` to true
- `is_variadic` attribute is no longer used in JIT compilation of commands with the `arguments` type

**SDK AND PLUGINS**
- update IdeLoader to 1.2: fixed a parser bug that prevented `.ide` files with a `2dfx` section to be loaded
- update Frontend to 1.1: reduce timeout during a check for updates to 10 seconds
- IdeLoader 1.2: fixed a parser bug that prevented `.ide` files with a `2dfx` section to be loaded
- Frontend 1.1: reduce timeout during a check for updates to 10 seconds
- ImGuiRedux: two new commands `IMGUI_SET_IMAGE_BG_COLOR` and `IMGUI_SET_IMAGE_TINT_COLOR`

**BREAKING CHANGES**

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Discord](https://img.shields.io/discord/911487285990674473?style=for-the-badge)](https://discord.gg/d5dZSfgBZr)
[![YouTube Channel](https://img.shields.io/badge/YouTube-Channel-FF0000?style=for-the-badge)](https://www.youtube.com/playlist?list=PLNxQuEFtVkeizoLEQiok7qzr1f0mcwfFb)

CLEO Redux is an experimental JavaScript runtime for GTA 3D era games and, with limited functionality, [other games or applications](https://re.cleo.li/docs/en/embedding.html).
CLEO Redux is an experimental runtime for GTA 3D era games and, with limited functionality, [other games or applications](https://re.cleo.li/docs/en/embedding.html). It supports [JavaScript](https://re.cleo.li/docs/en/javascript.html) and [TypeScript](https://re.cleo.li/docs/en/typescript.html) languages.

Its flexible, extensible and secure environment provides rich scripting capabilities and allows easily add and remove countless mini-scripts.

Expand Down
1 change: 1 addition & 0 deletions docs/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [Memory Object](./using-memory.md)
- [Memory Object (x64)](./using-memory-64.md)
- [Deprecated](./deprecated-bindings.md)
- [TypeScript](./typescript.md)

- [Troubleshooting](./troubleshooting.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/en/custom-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ CLEO Redux supports all original opcodes available in the given game. On top of
- 0AA8 [CALL_METHOD_RETURN](https://library.sannybuilder.com/#/gta3/CLEO/0AA8) (**UNSAFE** - requires `mem` permission)
- 0AB0 [IS_KEY_PRESSED](https://library.sannybuilder.com/#/gta3/CLEO/0AB0)

This list might not be complete as there are custom plugins with extra commands (see [Using SDK](./using-sdk.md)). Refer to [Sanny Builder Library](https://library.sannybuilder.com) for the complete list of available commands for each game.
This list might not be complete as there are [custom plugins with extra commands](./using-sdk.md). Refer to [Sanny Builder Library](https://library.sannybuilder.com) for the complete list of available commands for each game.

12 changes: 6 additions & 6 deletions docs/en/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ At start CLEO validates that a definition file is present and correct and if not

| Game | File | Minimum Required Version |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------ |
| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.243` |
| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.249` |
| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.288` |
| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.246` |
| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.252` |
| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.291` |
| GTA IV | [gta_iv.json](https://github.com/sannybuilder/library/blob/master/gta_iv/gta_iv.json) | `0.46` |
| GTA III: The Definitive Edition | [gta3_unreal.json](https://github.com/sannybuilder/library/blob/master/gta3_unreal/gta3_unreal.json) | `0.222` |
| Vice City: The Definitive Edition | [vc_unreal.json](https://github.com/sannybuilder/library/blob/master/vc_unreal/vc_unreal.json) | `0.228` |
| San Andreas: The Definitive Edition | [sa_unreal.json](https://github.com/sannybuilder/library/blob/master/sa_unreal/sa_unreal.json) | `0.250` |
| Bully: Scholarship Edition | [bully.json](https://github.com/sannybuilder/library/blob/master/bully/bully.json) | `0.29` |
| Unknown (32-bit) | [unknown_x86.json](https://github.com/sannybuilder/library/blob/master/unknown_x86/unknown_x86.json) | `0.216` |
| Unknown (64-bit) | [unknown_x64.json](https://github.com/sannybuilder/library/blob/master/unknown_x64/unknown_x64.json) | `0.220` |
| Bully: Scholarship Edition | [bully.json](https://github.com/sannybuilder/library/blob/master/bully/bully.json) | `0.32` |
| Unknown (32-bit) | [unknown_x86.json](https://github.com/sannybuilder/library/blob/master/unknown_x86/unknown_x86.json) | `0.217` |
| Unknown (64-bit) | [unknown_x64.json](https://github.com/sannybuilder/library/blob/master/unknown_x64/unknown_x64.json) | `0.221` |

Starting from v1.0.0 CLEO Redux uses compound definitions (a combination of the primary JSON file for the current game and a JSON file for the Unknown host). It lets SDK commands to work in JS scripts regardless of them being defined or not in the primary JSON file. You should notice that during updates CLEO downloads both `<game>.json` and `unknown.json` as well as the accompanying `enums.js` files. It should not affect any existing scripts.
4 changes: 2 additions & 2 deletions docs/en/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Go to the [CLEO directory](./cleo-directory.md) and create a new file named `int
log("Hello world");
```

Lines starting with `//` are comments and ignored by the game. The only meaningful line is the second that instructs JavaScript runtime to print a message in the log file.
Lines starting with `//` are comments and ignored by the game. The only meaningful line is the second that instructs the JavaScript runtime to print a message in the log file.

Now save the file and run the game. Start a new game or load a save file, play a few seconds and then go to `cleo_redux.log` (do not exit the game yet). You should now see a new line like:

Expand All @@ -25,7 +25,7 @@ If you see the message, open `intro.js` again and change "Hello world" to anothe

## Concurrency

There is so little fun in a single script, so let's explore another important aspect. CLEO Redux can load and run many scripts concurrently. But they do not run in parallel, or at the same time. Instead there is a queue of scripts to execute them sequentually on each game iteration. This happens to minimize number of issues caused by accessing shared resources from multiple parallel scripts. The game's main loop is also locked while scripts get processed.
There is so little fun in a single script, so let's explore another important aspect. CLEO Redux can load and run many scripts concurrently. But they do not run in parallel, or at the same time. Instead there is a queue of scripts to execute them sequentually on each game loop iteration. It reduces a number of possible issues caused due to the use of shared resources from multiple parallel scripts. The game's main loop is also locked while CLEO scripts get processed.

When the script is ready to return control to the main script or another script in the queue, it must call the `wait(n)` command where `n` is a number greater than or equal to zero. This command pauses the current script for at least `n` milliseconds:

Expand Down
2 changes: 1 addition & 1 deletion docs/en/imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ You can import other scripts and some custom file formats in your code to make t

## Importing scripts

- Extensions: `.js`, `.mjs`
- Extensions: `.js`, `.mjs`, `.ts`

The runtime supports the `import` statement as described in [this article](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import).

Expand Down
5 changes: 2 additions & 3 deletions docs/en/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

CLEO Redux is an [embeddable](./embedding.md) and [extensible](./using-sdk.md) JavaScript runtime capable of running user-made scripts in games and desktop applications. It is inspired by [CLEO Library](https://cleo.li/) and is [partially compatible](./relation-to-cleo-library.md) with its scripts and plugins. CLEO Redux, however, aims to provide a better experience for developers and users and support games beyond just GTA 3D series.
CLEO Redux is an [embeddable](./embedding.md) and [extensible](./using-sdk.md) runtime capable of running user-made scripts in games and desktop applications. It supports [JavaScript](./javascript.md) and TypeScript languages. Inspired by [CLEO Library](https://cleo.li/) and [partially compatible](./relation-to-cleo-library.md) with its scripts and plugins CLEO Redux, however, aims to provide a better experience for developers and users and support games beyond just GTA 3D series.

Follow the [first steps tutorial](./first-steps.md) to learn how to write and run your first script. Also check our [YouTube playlist](https://www.youtube.com/playlist?list=PLNxQuEFtVkeizoLEQiok7qzr1f0mcwfFb) for video guides.

Expand All @@ -20,8 +20,7 @@ Grand Theft Auto: The Trilogy - The Definitive Edition:
Other games and applications:

- Bully: Scholarship Edition 1.200
- re3 (see [details](./troubleshooting.md#cleo-does-not-work-with-re3-or-revc))
- reVC (see [details](./troubleshooting.md#cleo-does-not-work-with-re3-or-revc))
- re3 & reVC (see [details](./troubleshooting.md#cleo-does-not-work-with-re3-or-revc))
- unknown host (see [details](./embedding.md))

For the complete reference on supported features [refer to this page](https://github.com/cleolibrary/CLEO-Redux/wiki/Feature-Support-Matrix). Also there are known limitations [listed here](unsupported.md).
Expand Down
2 changes: 2 additions & 0 deletions docs/en/other-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ For `Unknown` host

This line instructs VS Code where to look for the commands definitions for the autocomplete feature. The `path` can be relative to the script file or be absolute. Examples above assume JS files are located in the CLEO directory. [Find out more information](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-path-) on the official TypeScript portal.

> This line is not needed for TS scripts as VS Code automatically imports `*.d.ts` files with the help of [`tsconfig.json`](./typescript.md#ts-config) file in the CLEO directory.
## SCM Log

CLEO Redux has built-in support for basic tracing of SCM instructions. To trace opcodes in all running CS scripts open up [`cleo.ini`](./config.md) and change `LogOpcodes` to 1. Note that it can greatly impact game performance due to frequent microdelays during writes to the log file. Use this option only for debugging purposes.
Expand Down
11 changes: 11 additions & 0 deletions docs/en/typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# TypeScript

Since v1.0.5 CLEO Redux adds first-class support for TypeScript. TypeScript is a superset of JavaScript with static types and other features. It is compiled to JavaScript and can be efficiently used in large-scale projects. TypeScript has excellent IDE support so you get autocompletion, type checking and other features in your editor for free.

TypeScript website: [https://www.typescriptlang.org/](https://www.typescriptlang.org/).

TS scripts have `.ts` extension and can be used anywhere [where JS scripts are supported](./script-lifecycle.md). They can be imported directly in both JS and TS scripts using [`import`](./imports.md) statements.

## TS Config

CLEO Redux creates `tsconfig.json` file in the [CLEO directory](./cleo-directory.md) when you run it for the first time. It contains necessary information for VS Code and other IDEs on where to look for typing files, so you don't have to include `/// <reference path="..." />` lines in your scripts. You can edit it to change the default settings.
2 changes: 1 addition & 1 deletion installer/cleo_redux.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define AppName "CLEO Redux"
#define AppVersion "1.0.5-dev.20221208"
#define AppVersion "1.0.5-dev.20221212"
#define AppPublisher "Seemann"
#define AppURL "https://re.cleo.li"
#define SourceDir "..\"
Expand Down

0 comments on commit c4d1ac4

Please sign in to comment.