Julius Michaelis
8d2f2846b5
Fix mac build
...
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Julius Michaelis
5b7c5b48ee
Fix mape and mac build
...
Attempt #1 .
2016-10-20 20:36:52 +02:00
Julius Michaelis
34a9a1de8d
Twiddle with header organization: lib{misc,c4script} do no longer include GL/glew.h
...
(Yes, it is just that complicated.)
2016-10-20 18:46:32 +02:00
Nicolas Hake
e2fd7095c1
Merge branch 'ast'
...
# Conflicts:
# src/C4Include.h
# src/script/C4AulCompiler.cpp
# src/script/C4AulParse.cpp
# src/script/C4AulParse.h
# src/script/C4ScriptHost.cpp
# src/script/C4ScriptHost.h
# tests/CMakeLists.txt
2016-10-20 17:33:02 +02:00
Nicolas Hake
266feeda4d
Aul: Add AST generation tests
...
Just making sure the parser creates the AST the way we expect before we
hand off the code to the codegen.
2016-10-20 17:20:55 +02:00
Nicolas Hake
118961d0b7
Aul: fix octal escape parsing
...
Bet you didn't know C4Script supported octal escapes inside strings.
Well, it didn't; or at least not correctly.
2016-10-20 16:53:23 +02:00
Nicolas Hake
5915f79960
Don't entirely recreate global vars in second compile pass
...
This allows people to properly cross-reference two proplists from each
proplist's initializer.
2016-10-19 14:20:48 +02:00
Nicolas Hake
021a6e89f5
Implement direct execution of whole function definitions
...
This implements the changes made in c6e4bfd
on the AST-based parser.
2016-10-19 14:20:47 +02:00
Nicolas Hake
1a8db9e109
Make C4ScriptHost store C4Value refs to owned functions
...
C4Value already handles refcounting properly for us, so we don't need to
do it manually. It might still be worth manually refcounting them
to avoid the boxing/unboxing overhead, but it's only needed at load and
unload so it's not a priority at the moment.
2016-10-19 14:20:46 +02:00
Nicolas Hake
5f3dbdd417
Reject function expressions inside proplists inside functions
...
These aren't supported by the codegen on account of not working in
savegames.
2016-10-19 14:20:45 +02:00
Nicolas Hake
9caaf1e298
Aul: Split out error handling into a separate class for easier testing
...
By using an extern error handler in the script engine, we can mock that
handler and make sure something that should fail actually does, instead
of having to parse log messages.
2016-10-19 14:20:41 +02:00
Nicolas Hake
b2d5164a0f
Remove re namespace alias
...
This alias is a legacy from when we were using Boost.Regexp to
workaround a broken implementation in GCC's libstdc++ earlier than 4.9.
2016-10-19 13:46:03 +02:00
Nicolas Hake
a188500609
Remove MS CRT memory management debugging
...
Redefining new breaks perfectly valid code, but only on MSVC and only in
one particular configuration (Debug). This is very annoying because it
means people not using MSVC, or even people doing Release builds, can
write standards-conforming code which then may fail to build for other
people.
2016-10-19 13:46:01 +02:00
Nicolas Hake
f7a04624eb
Remove references to functions defined in unloading defs ( #1776 )
2016-10-19 13:45:59 +02:00
Nicolas Hake
ab1e6bd5a4
Allow proplist-local funcs to access vars of their owner's prototype
...
Thanks to JCaesar for providing this test case.
2016-10-19 13:45:35 +02:00
Nicolas Hake
1b32633806
Add C4LangStringTable::system_string_table def'n to standalone stubs
2016-10-16 20:11:13 +02:00
Armin Burgmeier
2362a73e60
FnSetSky: open Graphics.ocg before re-loading sky ( #1827 )
...
Needed to load shader slices in C4Sky::Init.
2016-10-16 10:04:54 -07:00
Armin Burgmeier
8f61918219
Initialize graphics when re-loading sky ( #1827 )
...
Need this so that C4Sky::Init can read the shaders.
2016-10-16 10:04:54 -07:00
Nicolas Hake
8f47edc1e3
Fix destruction order of system string table vs. editor
...
Depending on the mood of the linker, the editor may have been
constructed before and destroyed after the system-wide string table
because they weren't defined in the same file. Destruction of the editor
tries to load some strings, which would then access the already
destroyed string table and thus crash.
2016-10-16 18:40:51 +02:00
Sven Eberhardt
24c386c67f
Editor: Fix recent scenario display on welcome page if a recent entry was opened via path including Scenario.txt
...
Always show the name of the enclosing .ocs file.
2016-10-16 09:52:48 -04:00
Sven Eberhardt
cd9d6f5c6f
Editor: Show full path name in sound delegate display string
2016-10-16 01:15:38 -04:00
Sven Eberhardt
38cf275de7
Editor: Implement saving of editable enum delegates
2016-10-16 01:12:21 -04:00
Sven Eberhardt
386f178568
Editor: Auto-focus enum child editors for int, string, color and any types
2016-10-15 18:26:03 -04:00
Sven Eberhardt
028b576ab3
Editor: Change initial tool to "object edit"
2016-10-15 11:43:55 -04:00
Sven Eberhardt
c44a776090
Editor: Fix object list update on object removal
2016-10-15 11:43:12 -04:00
Sven Eberhardt
978afbc4a2
Editor: Focus object script box on double-clicking item in object list
2016-10-15 10:39:33 -04:00
Sven Eberhardt
d24afbe835
Editor: Fix display of non-object properties
...
Fixes property display of definitions, Global and Scenario.
2016-10-15 10:06:44 -04:00
Sven Eberhardt
06a438e05e
Editor object list: Remove effects; add Global and Scenario
2016-10-15 10:06:44 -04:00
Sven Eberhardt
4b3f8c0fef
Remove EditCursorSelection and EditCursorDeselection callbacks
...
They never worked properly in network mode because all users would see the changes.
EditorProps, EditorActions and shape delegates now provide the functionality to have custom object editing widgets.
This also fixes a bug with the selection callback causing the object list to act up.
2016-10-15 10:06:43 -04:00
Lukas Werling
59b5525a41
Rework sky definition parsing
...
This also adds a broken SetSky() script function which was the main
motivation for the rework. See #1827
2016-10-15 13:34:39 +02:00
Sven Eberhardt
15d850e4ec
Editor: Add effects to property viewer
2016-10-14 10:50:17 -04:00
Nicolas Hake
66d5ef8b08
Reset codegen target after parsing nested function
...
Parsing a function expression inside another function failed to reset
the code generator target to the containing function, so all following
bytecode would still be appended to the nested function, leaving the
container broken.
2016-10-12 14:56:54 +02:00
Nicolas Hake
d9696d2f88
Reorder game cleanup
...
The order in which game components were cleaned up seemed rather
arbitrary, so let's change that into blocks of reasonably connected
parts.
2016-10-11 19:44:29 +02:00
Nicolas Hake
14bfd7ea59
Clear console pointers earlier
...
It doesn't make a lot of sense to keep console pointers around while the
objects and scripts have already been deleted. Clear them earlier so we
don't have any dangling pointers.
2016-10-11 19:44:27 +02:00
Lukas Werling
170a793a44
Windows: Only write to stdout if there is no debugger
2016-10-11 18:07:31 +02:00
Sven Eberhardt
510d91fd00
Editor: Allow movement of HorizontalFix items by holding Shift and on object duplication
2016-10-10 21:46:17 -04:00
Sven Eberhardt
5e4aefddb2
Editor: Fix Ctrl+Click in object creation mode to create contents
2016-10-10 21:35:04 -04:00
Sven Eberhardt
4eae2b28d7
Editor: Fix drop cursor drawing
2016-10-10 21:26:10 -04:00
Sven Eberhardt
d670291aba
Implement tool tips for EditorActions
2016-10-10 16:45:23 -04:00
Sven Eberhardt
20d234e324
Editor: Replace | by line breaks in descriptions and EditorHelp texts
2016-10-10 16:45:22 -04:00
Nicolas Hake
a6b65f0dee
Merge pull request GH #28 from aburgm:fix-proplist-leak
...
Don't leak static proplists with cyclic references
2016-10-10 19:32:30 +02:00
Lukas Werling
f5613c350e
Windows: Write console output to stdout
...
This is useful for third-party editor UIs.
See http://forum.openclonk.org/topic_show.pl?tid=3344
2016-10-10 16:03:49 +02:00
Lukas Werling
4d5bb7304c
Fix game controllers not working with the editor
2016-10-10 14:16:18 +02:00
Sven Eberhardt
5e3730fc3e
Editor: Store+Restore maximized state
2016-10-08 20:53:01 -04:00
Sven Eberhardt
765648877f
Editor: Fix window shutdown to correctly save editor geometry even if quitting via Application.Quit (e.g. Ctrl+Q)
2016-10-08 20:52:25 -04:00
Sven Eberhardt
cf7134e60e
Fix a few warnings / possible divisions by zero
2016-10-08 20:51:51 -04:00
Sven Eberhardt
45718ee44d
Change tool hotkeys from <number> to to <Ctrl>+<number>
...
This allows better combined playing+editing experience [Maikel]
2016-10-08 19:15:28 -04:00
Sven Eberhardt
685513816f
Editor: Raise focused viewport dock.
...
When switching viewports using F10, the selected dock may have been hidden
2016-10-08 19:15:27 -04:00
Sven Eberhardt
9e150f2bfb
Viewport zoom towards center and fix scrolling
2016-10-08 19:15:26 -04:00
Lukas Werling
eff406a181
Fix plain --lobby not working
2016-10-06 21:19:31 +02:00