Merge pull request #1 from adventuregamestudio/master

test
Improve hueristics for x-position portraits

AGS often makes some wrong guess about where the portrait of a character
should be if you choose BasedOnCharacterPosition for Sierra-style
portrait positioning. I made a post about it here:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=49927.0

Basically, when a character is the last character to have spoken, if
nobody else talks in the meantime, it can travel anywhere on the screen
and its portrait position will still be the same. I also found it
strange that some general assumptions (i.e. the first character to speak
could be assumed to be addressing the player instead of a random
character) were not made.
Vsync for Direct3D

Direct3D requires that vsync be initialised when the game is started.
I've added a configuration option to winsetup.exe that determines
whether vsync is active when the game starts. In DirectX 5 mode, this
can be toggled using the System.VSync property. In Direct3D, the
property is now read-only.
Merge pull request #6 from adventuregamestudio/master

Upstream sync
Code region support

Originally from Alan Drake, this adds the ability to fold arbitrary
regions of code using the directives "#region" and "#endregion".
Merge pull request #116 from gurok/code_regions

Code regions
Text Window GUI Padding

This removes the hardcodedness of text window padding.
AGS.Native: fixed import from 2.72 projects

Was broken by: 1c8164d3b11d28a68f9cddcdab521e8be445ecf3
Merge branch 'master' into develop-3.3.1
Merge pull request #118 from gurok/text_window_gui_padding

Text window gui padding
Merge pull request #117 from gurok/portrait_positioning

Portrait positioning
Merge pull request #119 from gurok/vsync

Vsync
Engine + Editor: Added an optional "direction" parameter to Character.ChangeRoom

- Character.ChangeRoom(int room, int x, int y, CharacterDirection direction)
- CharacterDirection is an enum (eDirectionDown, eDirectionLeft...) that actually
represents a loop number
Editor + Engine: IsInteractionAvailable() for Object/Hotspot/Character

Based on Alan v. Drake's suggestion
Script API: exported AudioClips array

Signed-off-by: Ivan Mogilko <ikm_spb@yahoo.com>
Engine: return default value when failed to read config item
WinSetup: use default value parameter
Refactored evaluate assignment

Moved the code that evaluates an assignment into its own function.
Supplemental control statements for scripting

This implements "for", "break" and "continue" using the existing control
structures inside cs_parser.cpp. They are, after all, just ways of
paraphrasing other control statements. The for statement takes the usual
parameters, but they can be omitted. One caveat is that the for
statement cannot include variable declarations (e.g. int x = 0) for the
initialisation part, only assignments.
Fixed undo history deleted when changing dock state.

The problem was that the scintilla editor is disposed by the docking suite whenever there's a dock change to the document. Until now I solved it by reinitializing scintilla when that happens, but indeed the undo history is deleted...
I searched to see if there's another project that uses scintilla with the docking suite together, and found QuickSharp. And they solved it by doing a win api call on dispose that actually cancels the dispose.
I did the same and removed the reinit code (and related hacks), and it seems to work nicely. Thank you QuickSharp!