Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0 Release Plan #277

Closed
59 tasks done
x87 opened this issue Oct 13, 2023 · 8 comments
Closed
59 tasks done

4.0.0 Release Plan #277

x87 opened this issue Oct 13, 2023 · 8 comments
Labels
Milestone

Comments

@x87
Copy link
Collaborator

x87 commented Oct 13, 2023

Download

Features

Bug Fixes

Third-party

  • update CLEO library to CLEO5 removed from archive due to false virus reports
  • 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 (inconsistent result of var declarations #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 or const 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

@x87 x87 added the roadmap label Oct 13, 2023
@x87
Copy link
Collaborator Author

x87 commented Oct 13, 2023

Tabs Preview

sb-tabs-preview.mp4

@x87 x87 added this to the v4.0.0 milestone Oct 13, 2023
@x87 x87 pinned this issue Oct 13, 2023
@x87
Copy link
Collaborator Author

x87 commented Oct 29, 2023

DEV CHANGELOG

rc.0

  • fix an issue with enum autocomplete in some expressions
  • fix an issue with exported functions throwing a compiler error when used in current script
  • CLEO library removed from Sanny Builder archive, separate download from the official website is required

beta.14

  • fix a bug in compiler preventing compilation of strings with a comma in it
  • small fixes to error messages

beta.13

Download

  • 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's end (previously was 0051: return)
  • fix a compiler error with return command in missions
  • change template hotkey from F2 to Tab 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

Download

  • 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

beta.7

Download

  • (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 the 0051: 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
  • An option to allow trailing spaces #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

Download

function foo
end

cleo_call @foo

beta.5

Download

beta.4

Download

  • 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 (Potential improvements and features #253)
  • update to some color themes by Vital
  • improve support for functions in language service [LS] rethink document model and support variable types core#16
    • local variables are highlighted and listed only inside the function that declated them
    • variables types and function signatures can be viewed in autocomplete (Ctrl+Space)
    • functions can be annotated with ///
    • function arguments and annotations can be seen in the arguments popup (Ctrl+Shift+Space)
      function-annotation

beta.3

Download

  • 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

Download

  • 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 Function Syntax RFC #263 (function..end)
  • variables and functions declared inside function..end are scoped (not visible to outside)
  • var a: int now mirrors int a behavior, previously was ignored (inconsistent result of var declarations #289)

beta.1

Download

  • switch statement elseif and switch Support #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

Download

alpha.3

Download

  • 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
  • Binary Number support #31
  • crash during SBL update #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

Download

  • 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) and Player.CanMove(0) = True) for backward compatibility
  • 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

Download

@MatiDragon-YT
Copy link
Member

The version you passed is removing members from some classes

image

Either he is omitting them or I don't know what is going on. Why is it not appearing in the autocomplete

image

the error only disappears if the following syntax is followed.

image
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 😆

my edit mode: sa_cp.zip
my proyect adapted to SB4: DYOS.zip

@x87
Copy link
Collaborator Author

x87 commented Oct 29, 2023

@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.

#150

@MatiDragon-YT
Copy link
Member

MatiDragon-YT commented Oct 29, 2023

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 👍

@x87
Copy link
Collaborator Author

x87 commented Oct 29, 2023

@MatiDragon-YT use this core.dll for the autocomplete fix, should display SetCollisionDetection now
core.zip

@MatiDragon-YT
Copy link
Member

runing with't problem! Epic :D

@x87
Copy link
Collaborator Author

x87 commented Nov 4, 2023

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)

@x87 x87 closed this as completed Aug 4, 2024
@x87 x87 unpinned this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants