4.0.0 Release Plan
x87 opened this issue ยท 8 comments
Download
Features
- debugger for SCM scripts
- implement #263 (
function..end
)- function annotations with
///
- language service support (local vars highlighting, autocomplete, showing param descriptions)
- string arguments
- documentation
- function annotations with
- initial support for #264
- compiler support for Custom CLEO Header
- import and export commands
- disassembler support
- docs
- #170
- new SBL modes for GTA III, VC and SA See the difference between legacy and SBL modes
- delete SA SCR mode (use SA SBL mode instead)
- #271
- use of CLEO extension (via
{$USE CLEO}
or{$CLEO}
) also enables all standard CLEO extensions (bitwise, ini, file, debug, memory) - #305
- docs
- language features and improvements
- new tabs #121
- can reorder and pin tabs
- context menu with various closing options (Close Others, Close to the right)
- Open in Windows Explorer
- themes sannybuilder/themes#14
- Keep last active tab when Sanny starts
- increase max number of tabs restored at startup from
8
to24
- New hotkey Ctrl+Shift+T to reopen Last closed file
- Make language service aware of the new
$INCLUDE_ONCE
directive added in 3.9.0 - remove the ability to put the mouse cursor past the end of line (#253)
Bug Fixes
- Compiler now correctly reports Max Main size for SA Mobile (270,000 instead of 200,000)
- When decompiling a file that was previously open in Sanny with different edit mode, current edit mode should not switch
- fix cast assignment operator (
=#
) not working with arrays - #66
- #186 (new Strict IF validation option, disabled by default)
- #250
- #272
- #286
- #150
- #278
- #288
- #289
- VCS main.scm does not compile due to a syntax error in callable functions 99RED...()
- see the Breaking changes section. main.scm needs to be disassembled again, or all
99RED
have to replaced with_99RED
- see the Breaking changes section. main.scm needs to be disassembled again, or all
Third-party
- update CLEO library to CLEO5
- update CLEO+ plugin to v1.2.0
- update SASCM.INI
- new theme NeoDark by JaggerJam and Johnnie
- update some existing themes by @VitalRus95
- update Portuguese translation by @johnnie-br
- update Chinese translation by @BengbuGuards
Breaking Changes
- Alloc command allowed ADMA type as a noop command: e.g.
Alloc(&2, 4)
. Now this is a compile error. - Typed array elements allowed hexadecimal notation for
size
: e.g.array(index,0xff)
(float array of size 0xf). Now this is a compile error. - String literals in opcode argument now support escape sequences similar to strings inside hex..end. This behavior can be disabled with
SB3_COMPAT
debug option - second argument in Alloc command is now required (previously was optional and 0 by default). This behavior can be disabled with
SB3_COMPAT
debug option. - hardcoded indexes in opcodes 05B6, 0A66, 0A67, 0A68, 0A6E are no longer supported. This behavior can be disabled with
SB3_COMPAT
debug option - constant can not be used in a new variable name (#289)
const a = $100
int a = 0
is now a compile error (0090) in 4.0.0 beta.0
- variable and constant names can not match class names (
int car
orconst car
) is now a compile error) - callable labels starting with a number are now a syntax error. Previously you can do the following:
:1
1() // gosub @1
this won't compile now. It is still possible to reference such label using @ prefix (e.g. jump @1
or gosub @1
)
Also disassembler checks script names (opcode 03A4) and if the name starts with a number, it prefixes all labels with an underscore (_
). It should solve the compilation issue in the original script of Vice City Stories that has a script named '99RED'. All labels of this script now start with _99RED
Tabs Preview
sb-tabs-preview.mp4
DEV CHANGELOG
beta.12
- fix an issue with the arguments of the built-in Random function being out of order when compiling in a SBL mode
- fix a memory issue in disassembler
- reserved words from compiler.ini now appear in the autocomplete list
beta.11
- fix a regression issue in beta.10 with Tab button not working
beta.10
- emit
0AB2: 0
as function'send
(previously was0051: return
) - fix a compiler error with
return
command in missions - change template hotkey from
F2
toTab
for easier access, also configurable in Options->Hotkeys - rename some templates (
ifthen
->if
,fn
->function
) - update Turkish translation by Bloodriver the Conqueror
beta.9
- fix autocomplete for classes not working inside a function prefixed with
export
keyword
beta.8
- implement automatic install of updates published under multiple channels (Stable/Beta)
- support
export function ...
syntax for CLEO Modules - support opaque function imports from CLEO Modules:
import foo from "file.s" // foo is an opaque function
foo(1,2,3)
int z = foo(1) // both lines are accepted
An opaque function gets a special handling in the compiler. It accepts any number of arguments and can be used with any number of outputs. Compiler does not validate anything, besides converting the call into 0AB1: cleo_call opcode
- allow custom variable declaration in SCM missions and external scripts (#284)
- fix a compiler error when a function name is used as an argument to another function call
- fix #322
- #316
- #320
- #321
- update core.dll to fix a runtime error introduced in beta.6 on Windows 7
- do not use class syntax for getters with reordered arguments when disassembling a file (only affects legacy non-SBL modes). See SB3 Quirks
- installer enables High DPI scaling for sanny.exe via Windows compatibility settings
- disable Ctrl+Alt+B/N/M hotkeys as they clash with AltGr+B/N combo for
{
and}
on QWERTZ keyboards
beta.7
- (BREAKING) function pointers (variables defined with a function name as the type) now require
()
to be compiled as a function call. otherwise they are compiled as regular variables
define function myFunction<stdcall>
myFunction f
f = 0x400000
f() // () is required now
- (BREAKING) function's
end
keyword is now compiled with opcode 0051: return, not 2003: cleo_return_fail. CLEO5 is required for the0051: return
command to support SCM functions - (BREAKING) new
return
semantic in functions - (BREAKING) function calls require
()
. Function name without()
will be compiled as a number. For SCM functions it will be function offset (like a label), for static foreign functions it will be the address. - (BREAKING) SCM function name prefixed with
@
is not a valid label. use function name without@
instead - new function return type modifier
optional
- new function return type
logical
- (BREAKING) define function is not supported. Use
function
directly - function declarations are available anywhere in the scope they are defined in (some languages call such behavior hoisting)
- Shift+Backspace now works as expected in the editor
- #314
- fix a compilation issue when an array element defined as a constant wasn't fully compiled:
const a = 1@(0@,1i)
a = 1 // was compiled as 1@ = 1
beta.6
function foo
end
cleo_call @foo
- support single
return
(opcode 0051) to exit from a function cleolibrary/CLEO5#96 - allow string type in function arguments again, since now CLEO5 adds support for string pointers in native opcodes
- support foreign function declarations
beta.5
- basic debugger for SCM scripts (docs, video)
- increase max number of tabs restored at startup from
8
to24
- disable string type for arguments in function declaration #263
- disassembler prefixes labels starting with a number with '_' to allow for callable labels syntax (e.g.
_1()
) - custom variables can be used in
main.scm
scripts when declared and used insidefunction..end
- fix an issue blocking auto-update of SBL files if the edit mode's JSON file is corrupted
- add a link to https://tutorial.sannybuilder.com/ in Help menu
- new Strict IF validation option, disabled by default. Fixes #186
- use of CLEO extension (via
{$USE CLEO}
or{$CLEO}
) also enables all standard CLEO extensions (bitwise
,ini
,file
,debug
,memory
)
beta.4
- fix reported issues related to functions
- fix cast assignment operator (
=#
) not working with arrays - remove the ability to put the mouse cursor past the end of line (#253)
- update to some color themes by Vital
- improve support for functions in language service sannybuilder/core#16
beta.3
- fix several issues related to autocomplete
- functions can exit with the result of a single expression:
function isEvenNumber(num: int)
{$use bitwise}
int rem = num % 2
return rem == 0
end
beta.2
- disallow variable names matching class names (
car
,char
, etc) - allow declaring variables with the class type using the class name (
car handle
,char myPed
) - function syntax #263 (
function..end
) - variables and functions declared inside function..end are scoped (not visible to outside)
var a: int
now mirrorsint a
behavior, previously was ignored (#289)
beta.1
switch
statement #160 (comment)- new GTA III SBL mode
- update CustomVariables.ini in VC SBL mode (thanks @OrionSR)
- make language service aware of the new
$INCLUDE_ONCE
directive added in 3.9.0, and binary number format (0b
) - fix some parsing issues in GTA III with non-standard global variable and model names
- fix class autocomplete not working when variable was declared using a new inline syntax (
var $player: Player
)
beta.0
- delete SA SCR mode (SA SBL can be used instead)
- shortcut for binary number conversion (Ctrl+B) can be redefined in options
- fix compilation issues reported from previous builds (#290)
- fix wrong variable name in sa sbl's stripped.txt
- sa sbl mode is now selected by default for the new installation
- fix default font color for the new installation
- #286
alpha.3
- make SA SBL mode default for SA decompilation
- new VC SBL mode
- disassembler flips the operator in comparison opcodes, instead of using
not
:
before
not 0@ == 1
not 0@ > 1
not 0@ >= 1
now
0@ <> 1
0@ <= 1
0@ < 1
- #31
- #288
- reorder edit mode list to put SBL modes on top
- fix template list displaying only one word of description
- path argument in the import statement can be a constant
- validate operators and operands in certain kinds of expressions (i.e. assignments)
- add stripped.txt in SA SBL mode
- updated Portuguese translation (by @johnnie-br)
alpha.2
- new SA SBL mode (does not use SASCM.INI)
- introduce new SB3_COMPAT debug option (enabled by default) to enable some old quirks and ease transition to the new version
- support dual syntax for setters (
Player.CanMove(0, True)
andPlayer.CanMove(0) = True
) for backward compatibility
- support dual syntax for setters (
- support getter expressions with SCR/SBL modes (original param order)
-
int value = read_memory 0xDEADD0D0 4 false
-
$x, $y, $z = Object.GetCoordinates(0@)
-
- support getters with multiple results
$x, $y, $z = Object.GetCoordinates(0@)
- support enums in keywords/opcode commands
-
clear_mission_audio MissionAudioSlot.Slot1
-
- *SCM.ini and extensions.txt are now optional, SBL JSON will be used instead
alpha.1
The version you passed is removing members from some classes
Either he is omitting them or I don't know what is going on. Why is it not appearing in the autocomplete
the error only disappears if the following syntax is followed.
but I emphasize that the class member does not appear in the autocomplete.
Also now SB4 does not allow to compile classes with extra parameters written by mistake. Previously SB3 removed these extra parameters, which made the editor more user friendly.
As usual, I'm passing you the code of DYOS (the same project that always detects bugs) and the editing mode I use ๐
@MatiDragon-YT this is correct behavior. You define SetCollisionDetection as a prop (using ^ syntax) and require a '=' operator to be used
^SetCollisionDetection,[0619,=,1,2,0],("self: Actor" "state%b")
Compiler previously allowed two-way form of writing this command:
Actor.SetCollisionDetection(handle, false)
or
Actor.SetCollisionDetection(handle) = false
But this was a bug. Only the second form should be used.
If you want to use SetCollisionDetection
as a method, use method syntax in classes.db:
SetCollisionDetection,0619,0,0,("self: Actor", "state%b")
but I emphasize that the class member does not appear in the autocomplete.
I'll take a look. It should appear
Also now SB4 does not allow to compile classes with extra parameters written by mistake. Previously SB3 removed these extra parameters, which made the editor more user friendly.
But this was a bug. Only the second form should be used.
@x87 What? that was a bug? I thought it was syntactic sugar. I know it's easy to fix, but can't that be added back?
well, if this is not a bug, then I have nothing to report. excellent update ๐
@MatiDragon-YT use this core.dll for the autocomplete fix, should display SetCollisionDetection now
core.zip
runing with't problem! Epic :D
But this was a bug. Only the second form should be used.
@x87 What? that was a bug? I thought it was syntactic sugar. I know it's easy to fix, but can't that be added back? well, if this is not a bug, then I have nothing to report. excellent update ๐
it was added back under SB3_COMPAT debug option (enabled by default) in alpha.2. So you can still write
Actor.SetCollisionDetection(handle, false)