..........................................................................
	  ___      _     _       _      _    _    
	//   \\  // \\  | \  || | \  || \\  //  
	\\____  ||___|| ||\\ || ||\\ ||  \\//   
	     \\ ||   || || \\|| || \\||   ||	
	\\___// ||   || ||  \_| ||  \_|   ||    
		  ___                       __      ____   __
		||   \\ ||   || || ||     ||  \\  ||     ||  ||
		||___// ||   || || ||     ||   || ||____ ||_ ||
		||   \\ ||   || || ||     ||   || ||     || \\
		||___//  \\__|| || ||____ ||__//  ||____ ||  \\

..........................................................................


		Contents:


		1. About program
		1.1	What is it?
		1.2	Installation and updating	
		2. Coding
		 2.1	Code syntax
		 2.2	Data types
		 2.3	Variables
		 2.4	Classes
		   2.4.1 Basic concepts
		   2.4.2 Conditional commands
		   2.4.3 Methods
		   2.4.4 Properties
		   2.4.5 Class Members
		   2.4.6 'Model' Class
		   2.4.7 Extended parameters (Contants)
		 2.5	Loops
		   2.5.1 FOR..END statement
		   2.5.2 WHILE..END statement
		   2.5.3 REPEAT..UNTIL statement
		   2.5.4 Continue and Break
		 2.6	Additional commands
		 2.7	Keywords
		 2.8	Conditions
		 2.9	HEX..END	
		3. Editor
		4. Opcode Search Tool
		5. Version history
		6. Credits

 .......................................................................... 


			1. 	About program


 .......................................................................... 


	 1.1 	 What is it?
 .......................................................................... 

            
		 Sanny Builder (Sanny) - it's the powerful tool for creating 
	new missions in GTA 3D series (GTA3, VC, SA). There are the fast 
	decompiler which allows to decompile the files MAIN.SCM and 
	SCRIPT.IMG (SA) that contain game scripts; compiler and the 
	convenient editor with huge number of useful functions such as 
	syntax highlighting, player coords reading, fast moving through 
	the code and many others.
	Add to this fast work speed and advanced code syntax that is similar 
	to real programming languages (classes, keywords and high-level 
	statements include) and you can imagine the possibilities of Sanny.
		Have fun.

 .......................................................................... 

	 1.2 	 Installation and updating
 .......................................................................... 


	Simply unzip archive to anywhere and run sanny.exe. 
	
	Command line usage:

	\sa - run as the SA editor (default)
	\vc - run as the VC editor 
	\gta3 - run as the GTA3 editor 

	Also you can change the current mode in Options.
          
	The newest version is always accessible at the homepage (see below)


 .......................................................................... 


			2.	Coding


 .......................................................................... 
 

	 2.1 	Code syntax
 .......................................................................... 


	The information for those who worked with BW's Mission Builder.
	The code syntax is very similar to this one (it's called line-by-line
	syntax), except the labels (they begin with '@' (gtama like)) and the 
	local variables which have '@' in the end.

 .......................................................................... 

	 2.2 	 Data types
 .......................................................................... 


	 $ - global variables
		 0004: $MyVar = 100

	 @ - (in the beginning): a label. Text directly after used to reference 
	this label in the jumps

		 0002: jump @MyLabel

	  - (in the end): a local variable. Number BEFORE denotes a variable
		 0006: 100@ = 10

	 '...' - short string (7 chars max). 
		 03A4: name_thread 'MAIN'
	Empty string is allowed: ''

	 "..." - long string (I don't know real maximum, but it is no more than 255 chars)

	(NEW)
	Long string can contain special symbol constants, that replaced at compilation.
	\n - new line (replaced with ~n~)
	\s - extra space (replaced with a byte #32 - space char)

	Also you can use single or double quotes within the text. Single quotes do not need for
	something special, but to use double quotes you should specify slash \ before a quote.

	Empty string is allowed: ""

	Example: 0662: write_debug_message "Hello, \"world\"! \n 'Here we go!'"


	s$ - 	global string variable
		05A9: s$MyString = 'GLOBAL'

	@s - 	local string variable
		05AA: 1@s = 'LOCAL'

	v$ - 	global long string variable
		06D1: v$MyString = "LONG_GLOBAL"

	@v - 	local long string variable 	
		06D2: 1@v = "LONG_LOCAL"

	# - 	model identifier from '.ide' files
		0247: request_model #CELLPHONE

	& -	ADMA (Advanced Direct Memory Access). 
	Reads/writes the values within the SCM even not in the variable block. 
	Does not affect to the second segment size. 

	(NEW)
	ADMA is able to be used in the same cases as a global variable.
		&57 += &120(&231,4i)

	(NEW)
	0x - a hexadimal number
	-0x - a negative hexadimal number

		0004: $var = -0xBB08

	A number has to be within -80000000..7FFFFFFF range.
	


..........................................................................

	2.3	Variables
..........................................................................

	It allows to declare variables and their types for the advanced using.

	For example, write the following code:

	var
	 $1stIntVar : Integer
	 $2ndIntVar : Integer
	end

	and you can use these variables in the math expressions without any opcodes

	$1stIntVar = $2ndIntVar
	$1stIntVar *= $2ndIntVar

	and so on.


	The following types are supported:

	Integer, Int 		- integer values

	Float	     		- floating-points values

	String, ShortString	- Fixed length string variable
	(only for the arrays, use s$, @s for the variables)

	LongString		- Variable length string variable
	(only for the arrays, use v$, @v for the variables)


	You can declare the arrays. The following syntax is used:

	var
	 <array name>: array <size> of <type>
	end
	
	e.g.:

	var
	 $FloatArray: array 10 of Float
	end

	You can operate with this array without writing of its type and size:

	$FloatArray[$RndIndex] += 100.0

	Also a local variable can be declared. But in this case, in every thread
	this one will have the same type. 
	So, you can redeclare this local variable to set a new type for it:

	;--------------------
	Thread 'Food'
	Var
	 10@ : Float
	 $Var : Float
	End
	$var = 1
	10@ = $Var
	end_thread
	;--------------------
	Thread 'Loop'
	Var
	 10@ : Int
	 $Var : Int
	End
	$var = 1
	10@ = $Var
	end_thread
	;--------------------

	In the thread Food 10@ is the floating-point variable, in the thread
	Loop 10@ is the integer one.

	You can redeclare any variables and arrays as many times as you need.

	Also you can set an initial value for the variable when declaring it.
	For this purpose write symbol = and after them the initial value:

	var
	 $fVar: float = 1.0
	end

	Variable $fVar will be remembered as Float and the compiler write 
	an opcode 0005: $fVar = 1.0 in the SCM simultaneously.

	Initialization is allowed for the variables only, not for the arrays!

 .......................................................................... 

	 2.4	 Classes
 .......................................................................... 

 .......................................................................... 

	 	2.4.1	 Basic concepts
 .......................................................................... 


	Sanny Builder allows to use the classes in a code.
	Class is the group of the opcodes applying to some kind of objects: 
	player, actor, car, etc

	Each class has a set of commands (class members). They can be splitted
	into the following groups:

 	- conditional opcodes
	- regular opcodes (methods)
 	- properties

 .......................................................................... 

		 2.4.2	 Conditional opcodes
 .......................................................................... 


	Conditional opcodes are marked with the word 'Check' in the resizable 
	window that is displayed when you press Ctrl+Space. Many of these ones
	have the only parameter: the class owner handle (name).

	Example:

	if
	 Player.Defined($PLAYER_CHAR)
	jf @anywhere

 .......................................................................... 

		 2.4.3	 Regular opcodes (methods)
 .......................................................................... 


	The regular (procedural) opcodes are used to complete a single action 
	in game: moving an object, destroying this one and so on. 
	The special kind of such opcodes is the constructor that creates an 
	object (an actor, a car) and returns its handle. 
	In SB the constructor can be used both as procedure and property:

	Player.Create($PLAYER_CHAR, #NULL, 2488.5601, -1666.84, 13.38) - procedure
	$PLAYER_CHAR = Player.Create(#NULL, 2488.5601, -1666.84, 13.38) - constructor

	It is the same.

 .......................................................................... 

		 2.4.4	 Properties
 .......................................................................... 

		
	The property allows to read/write some values of the class.

	Example: 
	Property 'Money' of the class 'Player' allows to operate with the
	following opcodes:

	0109: player $PLAYER_CHAR money += 1000000
	010A:   player $PLAYER_CHAR money > 461@
	010B: 4@ = player $PLAYER_CHAR money

 	With the property you can use the following commands without any opcodes:

	player($PLAYER_CHAR).Money += 1000000
	player($PLAYER_CHAR).Money > 461@
	4@ = player($PLAYER_CHAR).Money

 .......................................................................... 

		 2.4.5	 Class members
 .......................................................................... 

	
	Also there is the possibility to initialize the variables as class 
	members and to operate with them as a class.

	For example:

	var
	 $PLAYER_CHAR: Player
	end
	
	It declares the variable $PLAYER_CHAR as member of the class 'Player'. 
	After this the variable can be used instead of this class:

	if
	 $PLAYER_CHAR.Defined
	jf @anywhere

	Pay attention that such variables are compiled as the first parameter, 
	therefore it is not needed to duplicate them.

	Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head) 
	=
	$PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head)

	The variables can be redeclared with another type.

 .......................................................................... 

		 2.4.6	 'Model' class
 .......................................................................... 

	
	The model identifiers are always the members of 'Model' class. 
	So, you can reference to this class using their names:

		...
		#AK47.Load

		:loop
		wait 0
		if
		 #AK47.Available
		jf @loop
		...

		It is the same as:

		...
		Model.Load(#AK47)

		:loop
		wait 0
		if
		 Model.Available(#AK47)
		jf @loop
		...

 .......................................................................... 

		 2.4.7	 Extended parameters (constants)
 .......................................................................... 


	In classes you can use the parameters with special text name.
	They are used instead of the flags in some opcodes. 
	This possibility makes the source code more readable.
	
	For example:

	Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)

	Last parameter (Torso) is 'extended' one.

	Such parameters are defined in the file 'classes.db'.
	The text names are allowed for the integer type parameters only.

	The only extended parameter can be used for each opcode.

	For convenience the extended names are displayed when you press
	Ctrl+Space. Simply put the cursor position where should be an 
	extended parameter, press ctrl+space and the parameters list 
	will be displayed. You can select a name from it and add to your code.


..........................................................................

	2.5	Loop statements
..........................................................................


	Sanny Builder has three kinds of control loop: 
	Repeat, While, For statements.
	
	1. FOR..END
	2. WHILE..END
	3. REPEAT..UNTIL

	The loops can be nested (i.e. one loop inside another).
	
	Do not forget use the delay (wait) in the loops!

..........................................................................

		2.5.1 	FOR..END statement
..........................................................................


	This operator sets the loop with a strictly certain number of iterations.
	The following syntax is used:

	FOR <counter> = <initial value> TO /DOWNTO <final value> [step <int>]
	...
	END

	<counter> - variable that is used as the loop iterations (repeats) 
	counter.

	<initial value> - starting value of the counter.

	TO/DOWNTO - at TO the counter is increased, at DOWNTO - is decreased.

	<final value> - final value of a loop at which it will be finished.
	Pay attention that at DOWNTO the final value should be less than 
	the initial one.

	<step> - value of an increment or reduction of the counter after iteration.
	(optional). By default its value is equal to 1.


		Example:

		...
		var
		 $value: int = 0
		 $final: int = 100
		end

		for $MyCounter = 1 to $final step 2
		 $value += $mycounter
		end
		...

..........................................................................

		2.5.1 	WHILE..END operator
..........................................................................


	Syntax:

	WHILE <condition>
	...
	END

	Loop WHILE is working till the condition returns True. The condition is 
	evaluated before the loop iterations. Hence, if the condition is false, 
	the statement sequence is never executed.

		$var = 10

		while $var > 11
		   Inc($var)
		end

	As the condition is false, the command Inc($var) will be never executed


		while not #AK47.Available
		   wait 0
		end


	Operator WHILE may accept the logic constants True and False:

	While True..End - loop executes infinitely until the 
	loop stopped by command Break.

	While False .. End - loop is ignored by the compiler.
	
	In the current version the only condition is accessible within 
	the loop, but you can check out more conditions inside loop statement 
	and use the commands Break and Continue.

..........................................................................

		2.5.3 	REPEAT..UNTIL statement
..........................................................................


	Syntax:

	REPEAT 
	...
	UNTIL <condition>

	This loop executes till the condition returns False. 
	The condition is evaluated after iterations therefore loop has 
	one iteration minimum.

	Operator Repeat can accept the logic constants True and False:

	Repeat .. Until True - loop has the only iteration
	Repeat .. Until False - loop executes infinitely until it 
	stopped by Break.

	In the current version the only condition is accessible within 
	the loop, but you can check out more conditions inside loop statement 
	and use the commands Break and Continue.

..........................................................................

		2.5.4 	Continue and Break
..........................................................................


	If you want to skip the current iteration and to proceed to the next, 
	use the command Continue. 

	It can be used as the parameter (jf continue) or separate command.

		if
		  $currentactor.dead
		jf continue // uses instead of a label

		if
		  not $currentactor.dead
		then
		  Continue // uses as a jump to the next iteration

	Also there is useful command Break that causes the flow of loop to exit
	It can be used both as a separate command or parameter (jf break).

..........................................................................

	2.6	 Additional commands
..........................................................................


	1. INC - increments first parameter by second one.
	First parameter is a variable.

		Inc ($IntVariable, $Value)
		=
		$IntVariable += $Value

	Second parameter is equal to 1 if doesn't specified.
	
		Inc (1@)
		=
		1@ + = 1
..........................................................................

	2. DEC - decreases a first parameter by second one.
	First parameter is a variable.

		Dec ($IntVariable, $Value)
		=
		$IntVariable - = $Value

	Second parameter is equal to 1 if doesn't specified.

		Dec (1@)
		=
		1@ -= 1
..........................................................................

	3. MUL - multiplies first parameter by second one.
	First parameter is a variable.

		Mul($IntVariable, $Value)
		=
		$IntVariable -= $IntVariable * $Value

	Second parameter is equal to 2 if doesn't specified.

		Mul(1@)
		=
		1@ = 1@ * 2

..........................................................................
	
	4. DIV - divides first parameter by second one.
	First parameter is a variable.

		Div($IntVariable, $Value)
		=
		$IntVariable -= $IntVariable / $Value

	Second parameter is equal to 2 if doesn't specified.

		Div(1@)
		=
		1@ = 1@ / 2
..........................................................................

	5. (internal) ALLOC* - this function sets the memory address for 
	the variable. It should be used only for the ones with custom names 
	(i.e. $text). For the others the memory address is set by name: 
	the variable $40 is always addressed at memory address #40.

	Alloc($MyVar, 40) - the variable $MyVar will be compiled as $40

	See also 'help\examples\alloc.txt'

..........................................................................

	6. SQR - calculates a square of a variable passed as a parameter*.
	It can be used as procedure only.
	
	sqr($var) 
	=
	$var *= $var

	* variable type should be defined. See item 3.10
..........................................................................

	7. RANDOM - this function generates a random number within a range
	specified by the parameters.

	$rnd = random(1, $high)

	This function can be used both for the integer type and float one.
	The opcode is choosen in accordance with the type of a result variable
	($rnd in this case)

..........................................................................
	(NEW)
	8. WriteMem - this command writes any values in San Andreas memory.

	(!) It works only after the Xieon's SA Memory Patch is installed.
	This patch and its readme file are in 'Tools\SA Memory Patch'

	Syntax:
	WriteMem(Address: Integer; Value: Integer/Float; [Size: Integer = 4]; VirtualProtect: True/False)

	Address - memory address where a value to be written. 
	An integer value or a variable can be used as the parameter here

	Value - specified value that will be written by SA memory address
	An integer/float number or a variable  can be used as the parameter here

	Size (optional, by default it is equal to 4) - it is a number specified
	the size of the rewritable memory block. 
	The following values are allowed: 1, 2, 4.

	(!) If you use a variable as parameter here, the compiler can not detect
	used size and write default value. If you really need to use a variable
	try low-level variant of this command (with the opcodes, as it's written in
	the patch'es readme)

	VirtualProtect (optional, by default it's equal to False) - 
	This parameter specified if the memory should be protected while written.
	Allowed values: True, False


	See also 'help\examples\WriteMem.txt'


..........................................................................		
	(NEW)
	9. ReadMem - this command reads any values from San Andreas memory.

	(!) It works only after the Xieon's SA Memory Patch is installed.
	This patch and its readme file are in 'Tools\SA Memory Patch'

	Syntax:
	ReadMem(Address: Integer; var Result: Variable [Size: Integer = 4]; VirtualProtect: True/False)

	Address - memory address from where a value to be read. 
	An integer value or a variable can be used as the parameter here

	var Result - variable where the read result will be stored

	Size (optional, by default it is equal to 4) - it is a number specified
	the size of the readable memory block. 
	The following values are allowed: 1, 2, 4.

	(!) If you use a variable as parameter here, the compiler can not detect
	used size and write default value. If you really need to use a variable
	try low-level variant of this command (with the opcodes, as it's written in
	the patch'es readme)

	VirtualProtect (optional, by default it's equal to False) - 
	This parameter specified if the memory should be protected while read.
	Allowed values: True, False


 ..........................................................................

	2.7	Keywords
 ..........................................................................


	A keyword is a single word that replaces the opcode for the simple commands. 
	For example, keyword WAIT can be used instead of opcode 0001.

	So, you can use

	wait 0

	instead of

	0001: wait 0

	A keywords list is called by pressing Ctrl+Space.

 ..........................................................................

	2.8	Conditions
 ..........................................................................

	There is the operator IF to evaluate the condition.

	Two kinds of syntax of this statement are allowed: 
	1) low-level 
	2) high-level.

	1. The following syntax is used:

	00D6: if <N>
	... <condition 1>
	... <condition 2>
	...
	... <condition N + 1>
	004D: jump_if_false <label>

	<N> - the parameter means total number of the conditions.
	0 	 - 1 condition
	1..6	 - 2 and more conditions (7 max) connected by logic operator AND. 
	The check return true if ALL conditions within this return true.
	21..26 	 - 2 and more conditions (7 max), connected by logic operator OR. 
	The check return true, if even ONE condition within this return true.

	<label> - a name of a label where script jumps if the check is false.

	Sanny Builder allows not to use parameter 0 for the single conditions 
	(so, if = if 0)
	Also you can use keywords AND or OR instead of the conditions number*.
	The compiler will calculate the necessary value itself.

	For example:

	if and 
	 $var > 0
	 $var2 == 10.0
	jf @anywhere

	The compiler will write number 1 instead of 'and'.

	* Option 'Conditions check' should be enabled.
	IF AND - conditions connected with the logic operator AND (1..6)
	IF OR - conditions connected with the logic operator OR (21..26)

	2. Sanny Builder supports high-level constructions
	IF..THEN..END
	IF..THEN..ELSE..END*

	Condition is created by the rules described above.
	After word THEN you should specify the command(-s) that are executed
	if the condition is true. 
	After word ELSE you should specify the command(-s) that are executed
	if the condition is false. 

	The IF statement is closed by word End.

	if $var == 5
	 then 
	  Inc($var)
	 else
	  Dec($var)
	end
	
	* Option 'Conditions check' should be enabled.
	** Nested IF statements are supported.


	You can use the following relational operators*:

	a == b	 a is equal to b
	a >= b 	 a is greater than or equal to b
	a > b	 a is greater than b
	a < b	 a is less than b
	a <= b	 a is less than or equal to b
	a <> b	 a is inequal to b

	*If there is no opcode in the line.


 ..........................................................................

	2.9	HEX..END
 ..........................................................................

	It allows to write the hex values directly in the SCM file*

	For example:

	hex
	 04 00 02 0800 04 01
	end

	It will be compiled as 0004: $2 = 1

	(NEW)
	This construct can accept the labels and the global variables.
	They will be compiled as the numbers (their hex represention as after a compilation) 
	without the data type.

	:get_offset
	hex
	 04 00 02 $PLAYER_CHAR 01 @get_offset
	end

	It will be compiled as 0004: $PLAYER_CHAR = @get_offset


	* It is recommended for the advanced users only. Any mistakes 
	will cause impossibility of decompiling the file and reading this 
	one by game.


 .......................................................................... 


			3.	Editor


 .......................................................................... 


	Sanny Builder IDE grants to the user the following possibilities:


		1. Syntax highlighting

	There is a possibility to highlight the parameters of the opcodes, 
	the comments, the keywords.
	The highlightable words are defined in the file keywords.ini. They
	are highlighted as the keywords.


		2. Fast moving through the code

	There are two ways. First of them is to bookmark the line by pressing 
	Ctrl + Shift + <0..9> and then to pass to this one by pressing 
	Ctrl + <0..9>. 
	To delete all bookmarks use option Edit->Clear All Boookmarks.
	The second way is via an option 'Go To Line'. It is invoked by 
	pressing Ctrl + G. Enter a sequence number of the necessary line 
	and the editor will move cursor to it.


		3. Jump to the label
	
	For this purpose put the cursor on any label, for example @MyLabel. 
	Press Ctrl + Num2 and the editor will move the cursor to the line 
	with this label (:MyLabel). To go back press Ctrl + Num8.

	Also it's possible to find the jumps to the needed label. Put the 
	cursor on the label and press Ctrl+Num4 to go to the line above
	where this label is being present. Or press Ctrl+Num6 to go to the 
	line below. If there are not such lines, the cursor position won't change. 


		4. Display of the different information depending on 
		the cursor position (option 'Show opcode info').

	SB displays a necessary parameter number, digital value of the model 


		5. Converting of the source code written in SAMB

	Current version supports SAMB 0.33 syntax. In order to convert 
	open the source file in Sanny Builder and select menu item
	'Tools->Code converter->MB->SB'.
	Pay attention that the convertor uses the file 'MB.ini'. 
	It contains the variables used by SAMB and their memory addresses. 
	If you added your own variables in the file variables.ini 
	(from the SAMB 0.33), copy them in to 'MB.ini'.


		6. Opcode search 

	Write a word that needed opcode should contain (for example, 'fade') 
	and press F1. The line will be changed to the first line from 
	file 'opcodes.txt' containing this word (0169: set_fade_color 0 0 0). 
	If you need another opcode with this word, press F1 once again. 
	The chars '_' and '.' beetwen words are ignored. 
	If you want to find words with this symbols press Ctrl+F1. 
	(so, if you writes '_thread' and press Ctrl+F1 the line with '_thread' 
	will be found, not with 'thread').
	Also, you can use powerful Opcode Search Tool for searching.
	See clause 4 for more info.


		7. Player coords managing

	Press F4 when SA is running and Coords Manager window will appear.
	Here you can set new player coords and copy the current ones.
	Also you can insert current CJ's coords in the text by pressing Ctrl+Shift+C.


		8. Macroes support

	The macros is the group of the lines that is inserted in the 
	editor when you write a special word and press F2. 
	All macroes are contained in the file 'macroes.txt'. 
	To call the macroes list press Ctrl+J


	Macroes syntax (in macroes.txt):

        The Name of a macros (a special word) is written as simple line. 
	In that line you can also add the short description of the macros. 

	Also it is possible to add the macros to the file 'macroes.txt' 
	directly from the editor. For this purpose it is enough to select the 
	necessary piece of the code (text) and choose "Service->Add macros". 
	Then you should enter the name of new macros (the description is optional) 
	and press OK. New macros will be ready to use just now.

	Each line of the macros is designated by symbol =. The cursor position
	is designated by symbol |.



	--- Macrorecorder

	You can record the key pressing sequence (macros)
	For example, you have the following code:

	$Actor = Actor.Create(CivMale, #MALE01, 100.0, 100.0, 10.0)
	$ActorWithGun = Actor.Create(CivMale, #MALE01, 110.0, 100.0, 20.0)
	$Gang01 = Actor.Create(CivMale, #MALE01, 120.0, 100.0, 30.0)
	$Gang02 = Actor.Create(CivMale, #MALE01, 130.0, 100.0, 40.0)
	$Killer = Actor.Create(CivMale, #MALE01, 140.0, 100.0, 50.0)
	$ActorWithoutGun = Actor.Create(CivMale, #MALE01, 150.0, 100.0, 60.0)

	Perhaps, you need to exchange the actors handles in each pair 
	(i.e to put $ActorWithGun instead of $Actor)

	Put the cursor on the first line and press Ctrl+M. 
	Since this moment the editor is recording all key pressings, so be careful. 

	-Press and hold [Ctrl] and press once an [Right arrow]
	-Now press [Shift]+[Home] and [Ctrl]+[Ins]. 
	-Press an [Down arrow]. The cursor should be on the second line, 
	with the global variable is being in the clipboard. 
	-Press [Ctrl]+[Right arrow]  [Shift]+[Ins].
	-Press [Ctrl]+[Left arrow], [Shift]+[Home], [Ctrl]+[Ins] and [Delete]
	-Press [Up arrow]
	-Press [Ctrl]+[Shift]+[Right arrow] and [Shift]+[Ins]
	-Press [Home] button.
	
	Now first two lines look as:
	$ActorWithGun = Actor.Create(CivMale, 100.0, 100.0, 10.0)
	$Actor = Actor.Create(CivMale, 110.0, 100.0, 20.0)
	and cursor is in the beginning of the first line. Now press Ctrl+M

	The macros is recorded. Now you can repeat the recording keypresses by 
	pressing Ctrl+P. Put the cursor on the third line, press Ctrl+P 
	and the actors handles will be exchanged.

	While processing you can pause the recording by pressing Ctrl+P
	To continue - Ctrl+P once again.


		9. Replacement of the missions numbers with their names. 

	Sanny Builder supposes to use the mission name instead of its number. 
	The mission name is the label that is defined by DEFINE MISSION. 

	For example, if you have:

	DEFINE MISSION 10 AT @MYMISSION

	you can use instead of

	start_mission 10

	command

	start_mission MYMISSION

	Also there is the option Replace Mission Numbers. 
	When it is enabled, the	decompiler automatically replaces 
	all mission numbers. The compiler supports both of the variants.

	To call the mission names list, press Ctrl+Space. The cursor should
	be directly after command start_mission.

	Also it is possible to jump from the mission name to the mission. 
	It is same as jump to the label (3.3) 


		10. The multilingual interface

	Since version 2.98 Sanny Builder has multilingual interface
	(both the windows texts and the engine messages). 
	You can switch languages via options (F10).
	File 'lang\How to translate.txt' contains more information about creation 
	of your own translation.


		11. Different Edit Modes

	Sanny Builder is able to edit the scrips of GTA III, GTA VC, GTA SA. 
        The current edit mode is displayed in the bottom right corner.

	(NEW)
	To switch on another edit mode is possible via context menu, that
        is displayed on click by the current mode name.


		12. External tools menu

        You can add in this menu up to 9 tools which are able to be run
        when you need for it. Every tool has an own hotkey to fast run.
        Also you can pass the parameters to the tool.  

	(NEW)
        As the command line parameter of the tool you can specify special
        word $SB_FileName. It means the name of the current open file.


		13. Code commenting

	The comments are denotes with double slash // 
	Everything that is after that up to the end of a line is ignored 
	by the compiler.

	To comment out the several lines or the part of the line use block comments {}: 

	0001: wait  {comments here} 0 ms

	Also it is possible to comment out the several lines by selecting them 
	and pressing Ctrl+Q. To uncommenting the code repeat it once again. 


		14. Custom labels names (NEW).

	You can give to the labels the custom names that are not depend on the
        decompiler options. The names are specified in the file CustomLabels.ini
	(separate for each game). 
	File syntax reference: <label address>=<custom name> 
	If the decompiler find the label at specified address it will get the custom name.

        To find out the label address toggle the label format "Global Offset"
        After decompiling the number in a label name will be its offset.


		15. Sanny Builder Console (NEW)

        The console can be used in order to switch the advanced SB options.
        Most of them are the options of engine (de-compiler).

        To call the Console press Ctrl + ~.

        The Console accept text commands from the input line.
        More information you will get by typing word HELP in the input line.

	
.......................................................................... 

	Besides the standard hotkeys the following ones works:

	Ctrl + Alt + U/I - move the selected text to left / right (tab)
	Ctrl + Alt + A/D - move the selected text to left / right (symbol)

	Ctrl + Alt + B/N/M - different modes of selection of the text:
	Normal, Columnar (same as selection with fixed Alt), Lines)

	Ctrl + Shift + B - jump between block comments {}
	Ctrl + Shift + Num8/Num2 - to scroll page on one line up / down

	Ctrl + Shift + U/L - make word uppercase / lowercase

	Ctrl + T - delete word
	Ctrl + Y - delete line
	Ctrl + Shift + Y - clear line
	Ctrl + Scroll Up/Down - page up / down

	Ctrl+Space - to show the list of classes/class members/models/labels/variables/missions
	Ctrl+Shift+Space - to show the help for the current command of a class

	Ctrl + Shift + C - insert player's coords (3.7)
	Ctrl + Shift + E - insert player's z_angle (3.7)

	Alt+S (when the list of models is active) - to resort the list

	F1 - search opcode with word at cursor (with ignoring of '_' and '.')
	Ctrl+F1 - search opcode with word at cursor (without ignoring of '_'  '.')

	F2 - use macros
	Ctrl + J - show list of macroes
	Ctrl + M - start/stop record of a macro (key pressings sequence)
	Ctrl + P - replay macro/pause while processing

	Ctrl + ` - call the Console window


 .......................................................................... 


			4.	 Opcode Search Tool


 ..........................................................................
  
   
    You can call it by pressing Ctrl+Alt+2 or via the menu item
    Tools->IDE Tools->Opcode Search
   
   
    To find needed opcode, write the words in the top field,
    for example: 'actor car' (without commas). The tool shows opcodes that contained 
    these words. Also you may use the special search operators.
   
   
   	 Copying
   	-----------
   
    After you've found the needed opcode, select it in the list and press ENTER. 
    Opcode will be copied into the clipboard. 
    If you want to copy yet another opcode, press SHIFT+ENTER. 
    The opcode will be ADDED to the clipboard content.
   
    F2 - copy all opcodes in the list.
   
   
   	Hotkeys:
   
   
    ESC, F12 - close window
   
    ENTER 
    * copy selected opcode into clipboard
   
    SHIFT + ENTER  
    * add selected opcode to the clipboard
   
    SCROLL LOCK - to switch on/off the search 
    (when parameter "extra_search" (in settings.ini) is equal to 1) 
   
    F2 - copy all opcodes in the list into the clipboard
   
    F3 - sort the list by opcodes
    F4 - sort the list alphabetically
   
    F5 - put the cursor to the search edit
    F6 - put the cursor to the list
   
    F11 - cleanup the search edit, show all opcodes
   

   
   	Search operators:
     
   
   		 LOGIC
   
   
   ---------------------------------------------------------------
   
   	AND operator 
   
   ---------------------------------------------------------------
   
    In the program this function is carried out with a single space between words. 
   
   		 Example: @ player
   
    will be shown opcodes with both a symbol '@' and a word 'player'
   
   
   ---------------------------------------------------------------
   
   	OR operator 
   
   ---------------------------------------------------------------
   
    In the program this function is carried out with a symbol | between words. 
   
   		 Example: @ | player
   
    Will be shown opcodes where is EITHER a symbol '@' OR a word 'player'
   
    If to put | as the first element, the program will connect all words 
    by operator OR.
   
   		 Example: | actor player car
   
    will be shown opcodes where there is even one of these words.
   
   ---------------------------------------------------------------
   
   	 NOT operator (NOT)
   
   ---------------------------------------------------------------
   
    For all cases it is two minuses before an excluded word --
   
   		 Example: car -car2
   
    will be shown opcodes where there is a word 'car' and there is no word 'car2'
   
    For words and symbols '$' and '@' it is possible to use one minus. It is made 
    to not mix exclusion with searching of the negative numbers:
   
   		 Example: -10 -@ -car -3
   
    will be shown opcodes where there is number -10 and there is NO symbol '@', 
    word 'car' and number '3'.
   
   
   ---------------------------------------------------------------
   
   		 OTHER OPERATORS 
   
   ---------------------------------------------------------------
   
   	^  :: show all conditions in the list
   
   --------------------------------------------------------------
   
   	^expression  :: to find expression in conditional opcodes
   
   		 Example: ^car ==
   
    will be shown conditional opcodes where there is a word 'car' and a sign '=='
   
   ---------------------------------------------------------------
   
   	-^  :: exclude all conditions from the list
   
   		 Example: player -^
   
    will be shown all opcodes where there is a word 'player', and this opcodes
    are non-conditional.
   
   ----------------------------------------------------------------
   
   	-^expression :: to exclude the conditions containing expression 
   
   		 Example: player -^actor
   
    will be shown all opcodes where there is a word 'player', except the 
    conditional opcodes with a word 'actor'.
   
   ----------------------------------------------------------------
   
   	 % :: to search in the given order
   
   		 Example: % @ = @
   
    will be shown all opcodes where these symbols go in the given order.
   
   

 .......................................................................... 



			5.	 Version history


 ..........................................................................


		Current version:

	Major changes:
	* added new commands WriteMem and ReadMem (2.6) 
	* support of the hexadimal numbers (2.2) 
	* HEX..END statement can accept the labels and the global variables (2.9)
	* full support of &-datatype (ADMA)
	* opportunity to give the custom names to the labels (3.14) 
	* opportunity to choose a different case for the custom names and the strings (Options->Format)
	* added the console in order to switch the special options of SB (3.15)
	* decompiler supports the GXT-files of GTA III & GTA VC
	* added special symbol constants in the long strings (2.2)

	Minor changes:
	- information about an INI file (version, author, date)
	- classes support an original order of the parameters 
	  (like in SASCM.INI from PLPython). In order to support such order 
	  there should be a line {$VERSION x.0.xxxx}, see comments in the INI about this.
	- added option to confirm the exit
	- quick switching of the Edit Mode (3.11)
	- converting of the selected piece of code
	- opportunity to pass the current file name to the external tool (3.12) 
	- corrected some mistakes in the configuration files
	- removed auto-casting of an integer number to a float one 
	  when the variable was declared as Float. Now the compiler chooses an opcode 
	  depending on the number type only (in math expressions without opcodes)
	- reading/writing of the player's z_angle in Coord Manager; 
	  quick insertion of this one in a script by pressing Ctrl+Shift+E (for SA) 

	Other notes:
	(!) The following opcodes were changed in SASCM.INI: 0181, 00c3, 00c4 in order 
	to support the commands WriteMem and ReadMem. In original files these opcodes 
	are not used and the game are not supported them, so there should be no problem.

	(!) The class member Car.SetSpeedInstantly was named incorrectly (with wrong 
	opcode) in the file classes.db for SA. If you will get the error message about 
	this method at compilation, rename it in Actor.DrivingPlane manually. We apologize.



		Previous releases:

	04.08.2006	v. 2.98

	 * Sanny Builder became fully multilingual (3.10)
	 * added menu of the external applications
	 * the special version of Opcode Search Tool is built in SB
	 Details in a file 'OST Readme.txt'
	 * checking of the math expressions while decompiling when the option "Write opcodes"
	   is disabled (to sure that all the opcodes were used correctly)
	 * an opportunity to choose an IMG-file manually if the last one 
	   is not found in a folder with the SCM-file (an option "Manual IMG opening")
	 * an opportunity to add new macroes directly from the editor;
	   added macroes descriptions (3.8)
	 * the list of models can be sorted alphabetically/by value
	   (Alt+S when the list is active)
	 * minor corrections and changes


	11.06.2006	v. 2.97

	* new data type: & that denotes direct byte address (ADMA).
	* minor updates

	01.04.2006	v. 2.96

	* improved the option jump to label (3.3)
	* added an opportunity to call macroes list of macroes (3.8)
	* added an option of replacement of mission numbers with their names (3.9)
	* fixed some bugs


 .......................................................................... 



			6.	Credits


 .......................................................................... 


	Written in Delphi 7.0 Ent.	Borland Software Corp.
 					http://www.borland.com

	SynEdit for Delphi was used	SynEdit Team
					http://synedit.sourceforge.net


	Web	http://sannybuilder.com/
		http://www.gtaforums.com/?showtopic=211077


	E-mail	mail@sannybuilder.com


	Use it at your own risk. In Backup We Trust. 
				Best regards. Seemann, Xieon.

 .......................................................................... 
