Skip to content

Commit

Permalink
Some comments updated.
Browse files Browse the repository at this point in the history
Fixed example scripts to follow function argument type grammar rules.
  • Loading branch information
MiranDMC committed Jan 12, 2025
1 parent 1ba70ec commit 33ce9b7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions cleo_sdk/CLEO.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
CLEO 5 header file
Copyright (c) 2023 Alien, Deji, Junior_Djjr, Miran, Seemann
Copyright (c) 2025 Alien, Deji, Junior_Djjr, Miran, Seemann
*/
#pragma once

Expand Down Expand Up @@ -58,13 +58,13 @@ enum eDataType : BYTE
DT_FLOAT, // literal float 32
DT_VAR_ARRAY, // globalArr $(,)
DT_LVAR_ARRAY, // localArr @(,)
DT_TEXTLABEL, // literal string up to 7 chars
DT_TEXTLABEL, // literal string up to 8 chars
DT_VAR_TEXTLABEL, // globalVarSString s$
DT_LVAR_TEXTLABEL, // localVarSString @s
DT_VAR_TEXTLABEL_ARRAY, // globalVarSStringArr s$(,)
DT_LVAR_TEXTLABEL_ARRAY, // localVarSStringArr @s(,)
DT_VARLEN_STRING, // literal vstring ""
DT_STRING, // literal string up to 15 chars
DT_STRING, // literal string up to 16 chars
DT_VAR_STRING, // globalVarVString v$
DT_LVAR_STRING, // localVarVString @v
DT_VAR_STRING_ARRAY, // globalVarStringArr v$(,)
Expand Down
6 changes: 3 additions & 3 deletions examples/Free_ID_Lister.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ while true
end


function LIST_FREE_IDS() : logical
function LIST_FREE_IDS(): logical
// clear old output file
if
does_file_exist {path} Output_Filename
Expand Down Expand Up @@ -129,10 +129,10 @@ function LIST_FREE_IDS() : logical
end


function CModelInfo__GetModelInfo<cdecl, 0x00403DA0>(modelIdx :int) : int
function CModelInfo__GetModelInfo<cdecl, 0x00403DA0>(modelIdx: int): int


function DRAW_PROGRESS(title :string, startValue :int, currValue :int, endValue :int)
function DRAW_PROGRESS(title: string, startValue: int, currValue: int, endValue: int)
int iTmp = currValue - startValue
float progress =# iTmp

Expand Down
2 changes: 1 addition & 1 deletion examples/Homie_Help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function CHEAT_SPAWN_HELP()
end


function SPAWN_GROVE_MEMBER(modelIdx :int) : int
function SPAWN_GROVE_MEMBER(modelIdx: int): int
request_model {modelId} modelIdx
load_all_models_now
int charHandle = create_char {pedType} PedType.Gang2 {modelId} modelIdx {pos} 0.0 0.0 0.0
Expand Down
10 changes: 5 additions & 5 deletions examples/Limits_Info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end
terminate_this_script


function DRAW_COUNT_LINE(vPos :float, txt :string, count :int, total :int) : float
function DRAW_COUNT_LINE(vPos: float, txt: string, count: int, total: int): float
set_text_right_justify {state} true
set_text_scale {widthScale} 0.25 {heightScale} 1.0
set_text_edge {size} 1 {red} 0 {green} 0 {blue} 0 {alpha} 240
Expand All @@ -58,7 +58,7 @@ function DRAW_COUNT_LINE(vPos :float, txt :string, count :int, total :int) : flo
end


function DRAW_MISSION_CLEANUP_LIST_INFO(vPos :float) : float
function DRAW_MISSION_CLEANUP_LIST_INFO(vPos: float): float
int count = read_memory_with_offset {address} 0x00A90850 {offset} 0x258 {size} 1 // CTheScripts::MissionCleanUp.m_Count
int size = 75 // CMissionCleanup max size

Expand All @@ -67,7 +67,7 @@ function DRAW_MISSION_CLEANUP_LIST_INFO(vPos :float) : float
end


function DRAW_POOL_INFO(poolAddres :int, txt :string, vPos :float) : float
function DRAW_POOL_INFO(poolAddres: int, txt: string, vPos: float): float
int count, size
count, size = GET_POOL_INFO(poolAddres)

Expand All @@ -78,7 +78,7 @@ end


// blend color from green to red
function SET_TEXT_COLOR(count :int, size :int)
function SET_TEXT_COLOR(count: int, size: int)
//float countF, sizeF
float countF =# count
float sizeF =# size
Expand Down Expand Up @@ -131,7 +131,7 @@ function SET_TEXT_COLOR(count :int, size :int)
end


function GET_POOL_INFO(address :int) : int, int
function GET_POOL_INFO(address: int): int, int
int pool = read_memory address {size} 4 {vp} false // dereference pointer
if
pool == 0
Expand Down
10 changes: 5 additions & 5 deletions examples/Skin_Selector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ while true
end


function INITIALIZE() : logical
function INITIALIZE(): logical
// undo any hacks in case previous game session was interrupted (like alt+tab then starting new game)
SCREEN_OFFSET_SET(0.0, 0.0)
PLAYER_MODEL_REBUILD_ENABLE(true)
Expand Down Expand Up @@ -114,7 +114,7 @@ function INITIALIZE() : logical
end


function MENU_SKIN(modelNamePtr :int) : string
function MENU_SKIN(modelNamePtr: int): string
int iTmp, iTmp2, iTmp3
int str = allocate_memory {size} 260

Expand Down Expand Up @@ -512,7 +512,7 @@ function MENU_SKIN(modelNamePtr :int) : string
end


function PLAYER_MODEL_SET(modelName :string) : logical
function PLAYER_MODEL_SET(modelName: string): logical
int result = true

int len = get_text_length {text} modelName
Expand Down Expand Up @@ -566,7 +566,7 @@ end
// enable/disable function for rebuilding player's model
// called to update model after fat or muscles stat was changed
// messes up bones structure in case if player uses models other than CJ
function PLAYER_MODEL_REBUILD_ENABLE(enable :int)
function PLAYER_MODEL_REBUILD_ENABLE(enable: int)
if
enable == true
then
Expand All @@ -578,7 +578,7 @@ end


// set xy offset of screen position (GTA SA 1.0)
function SCREEN_OFFSET_SET(x :float, y: float)
function SCREEN_OFFSET_SET(x: float, y: float)
int ptr = read_memory_with_offset {address} 0x00B6F028 {offset} 0x954 {size} 4 // TheCamera.rwCamera
if
ptr <> 0
Expand Down
4 changes: 2 additions & 2 deletions examples/Train_Spawner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end
terminate_this_script


function TRAIN_CREATE(type :int, posX :int, posY :int, posZ :int, direction :int) : int
function TRAIN_CREATE(type: int, posX: int, posY: int, posZ: int, direction: int): int
request_model #TRAM
request_model #FREIGHT // freight train locomotive
request_model #STREAK // passenger train locomotive
Expand Down Expand Up @@ -88,7 +88,7 @@ function TRAIN_CREATE(type :int, posX :int, posY :int, posZ :int, direction :int
end


function TRAIN_PAINT(handle :int, color1 :int, color2 :int)
function TRAIN_PAINT(handle: int, color1: int, color2: int)
change_car_colour handle {color1} color1 {color2} color2

int idx = 1
Expand Down

0 comments on commit 33ce9b7

Please sign in to comment.