Commit Graph

10192 Commits

Author SHA1 Message Date
Lasse Öörni
e6d971139d Fixed incorrect stencil clearing in deferred rendering when there is a point light which has some sides unshadowed.
Fixed particle emitter network update.
Completely removed garbage collection support from CScriptArray.
Garbage collection will first detect garbage using one step, then destroy garbage fully.
2011-02-03 17:05:55 +00:00
Lasse Öörni
7b30e4ca01 Fixed C++ NinjaSnowWar to use updateFixed() instead of postUpdateFixed(), like the script version. This ensures no forces are accumulated to be applied next frame (these would not be replicated properly.)
Fixed enemy ninjas' initial heading.
Added parameter passing to the script example batch files.
Added a profiling block to C++ NinjaSnowWar gameobject update, to be able to compare between C++ & script.
2011-02-02 07:57:17 +00:00
Lasse Öörni
43e374b4a3 Execute removal of scripted entities inside a scope block so that the array shouldn't keep the entities alive. 2011-02-01 23:01:23 +00:00
Lasse Öörni
bb67b6d7fe Playable scripted NinjaSnowWar.
Disabled garbage collection from CScriptArray again because of some very odd "objects not getting deleted" bugs.
Unprepare script contexts before garbage collection.
2011-02-01 22:51:45 +00:00
Lasse Öörni
c73c30fde1 Added the script-only function Entity::createScriptObject() for convenience. This is for cases where only the script object is significant, instead of the ScriptInstance component that is also created at the same time. 2011-02-01 07:07:34 +00:00
Lasse Öörni
bd1e1d879a Minor script bugfixes. 2011-01-31 22:39:37 +00:00
Lasse Öörni
7cc3d7d842 Script API fixes and additions.
Changed ScriptInstance to hold a weak pointer to the ScriptFile to avoid circular references.
Fixed missing RigidBody pointers in entity collision event.
More objects for scripted NinjaSnowWar.
2011-01-31 22:29:36 +00:00
Lasse Öörni
91eb98128d Removed unnecessary try-catch. 2011-01-31 09:10:37 +00:00
Lasse Öörni
21152191ac Added Engine::setDefaultScene(). The default scene will always be accessible as the "scene" global property.
Exposed functions to get number of entities & components, and to return all components of an entity.
2011-01-31 07:34:37 +00:00
Lasse Öörni
080d52e93c Exposed Model::getSkeleton() to script.
Added possibility to throw an exception without logging an error.
Added function to retrieve the last log message.
Added check for ScriptFile loading successfully in the Urho3D Shell.
2011-01-30 22:50:34 +00:00
Lasse Öörni
e4bb607126 Console & DebugHUD code cleanup. 2011-01-30 21:56:48 +00:00
Lasse Öörni
ffce296795 Further cleanup of exceptions. 2011-01-30 21:19:44 +00:00
Lasse Öörni
bac80cd8eb Handle window resize in the script examples. 2011-01-30 18:49:53 +00:00
Lasse Öörni
fba7a7dba1 Removed some exceptions. Now failing to load a resource returns a null pointer instead of throwing an exception. 2011-01-30 18:38:43 +00:00
Lasse Öörni
d4666eaacb Added snowballs to the scripted NinjaSnowWar.
Documentation update.
2011-01-30 16:26:54 +00:00
Lasse Öörni
6d015d064a ScriptFile method search cache.
Documentation update.
2011-01-30 11:49:03 +00:00
Lasse Öörni
dcc4765d6a Tweaked garbage collection.
Exposed immediate execution & running a full garbage collection cycle to script.
2011-01-29 23:11:26 +00:00
Lasse Öörni
f119d7b275 Split functionality to GameObject base class.
Updated documentation.
2011-01-29 22:16:39 +00:00
Lasse Öörni
56f39329cc GCC fixes. 2011-01-29 19:43:16 +00:00
Lasse Öörni
b8bc819b71 Removed ScriptTest. 2011-01-29 18:29:25 +00:00
Lasse Öörni
e7a3473066 Examples restructuring. The old Test is now remade in script and called GraphicsTest. The ScriptTest has been renamed to NSWRemake. The executable for running the script examples is renamed to Urho3D.exe.
Various script API fixes. CScriptArray is again garbage collected. 
More file & ProcessUtils functions exposed to script.
More random functions exposed to script.
VolumeNode & GeometryNode exposed to script.
2011-01-29 18:28:10 +00:00
Lasse Öörni
21e87d6a1b Made the debug console manually toggleable.
Registered convenience forms of print() to script (print int / float / bool.)
2011-01-28 23:20:06 +00:00
Lasse Öörni
74b348c0a5 Fixed bug with rendering nontextured UI elements.
Fixed EVENT_TEXTFINISHED being sent for every change in LineEdit.
Added possibility to specify less than fully opaque colors for UI elements, instead of having to use the opacity property, which is always inherited.
Added variant userdata to UI elements.
Added defocusable flag to LineEdit. This makes it possible to disable the default ESC-defocusing.
Added debug console, which prints log output, and executes AngelScript from the input prompt.
2011-01-28 22:19:33 +00:00
Lasse Öörni
ba3d4d726d Log resource paths in fixed form. 2011-01-27 20:35:22 +00:00
Lasse Öörni
52c5055c4e Fixed show/hide bugs with popup menu hierarchies. 2011-01-27 20:16:34 +00:00
Lasse Öörni
92c4f706c1 Added mouse wheel input. 2011-01-27 19:10:42 +00:00
Lasse Öörni
79df63289c ScriptInstance & ScriptFile no longer allocate own script contexts. Instead ScriptEngine preallocates a fixed number of script contexts, to account for the maximum allowed script execution nesting level.
Removed the need to delay entity removes from Scene.
2011-01-27 18:27:32 +00:00
Lasse Öörni
8f67b457c6 Removal of self from script is now properly delayed until the end of the scene update. 2011-01-27 08:50:28 +00:00
Lasse Öörni
174ba5cdb5 Refactoring of script object creation. 2011-01-26 21:17:49 +00:00
Lasse Öörni
956cac7648 Script reloading support. ScriptInstances register themselves with ScriptFile so that on reload, objects can be deleted and recreated.
Automatic caching for ScriptFile::getFunction() into a std::map.
2011-01-26 21:00:16 +00:00
Lasse Öörni
2ebe2a36b4 Fixed constness of some Scene & Entity functions exposed to script.
Exposed functions to get all scene entities, or scene entities with a specific script class.
2011-01-26 19:09:48 +00:00
Lasse Öörni
044ef4d5a9 Exposed Engine's runFrame() and associated sub-functions to script.
Moved ScriptTest scene init & frame iteration fully to script.
Added optional retained mode script engine logging. This is used for collecting errors during script module compile.
2011-01-26 18:35:02 +00:00
Lasse Öörni
5d53f2240a Check that script classes implement the empty "ScriptObject" interface. 2011-01-26 06:59:59 +00:00
Lasse Öörni
c13916474e Allow access to the ScriptInstance's object from script. The object should implement the empty interface "ScriptObject", so that a handle to it can be correctly returned.
Script context userdata is no longer used to identify the active ScriptInstance.
Removed ExecuteCache from ScriptInstance, as execute() should now be mostly unnecessary from script, and C++ code should perform its own method pointer caching in any case.
Removed the use of execute() from ScriptTest script code in favor of direct method calls.
2011-01-25 21:43:19 +00:00
Lasse Öörni
27a21e140e Made the CScriptArray a non-garbage collected type; otherwise a full garbage collection cycle would be required each frame to prevent memory use build up.
Release ScriptFile resources at ScriptTest exit to prevent memory leaks being reported.
2011-01-25 20:12:22 +00:00
Lasse Öörni
613d51b7bb Added pause toggle. 2011-01-25 19:22:14 +00:00
Lasse Öörni
b9250e7c04 Ninja movement, controls & camera update in ScriptTest.
Method pointer cache for ScriptInstance::execute().
Script interface additions & bugfixes.
Changed LineEdit & Text constructors to take the UI element name as the first argument.
2011-01-25 19:05:07 +00:00
Lasse Öörni
bdb5f427c0 Create overlays in script. 2011-01-25 15:49:38 +00:00
Lasse Öörni
19d0ed0e45 Added ScriptTest example, which will be a script-based (partial) reimplementation of NinjaSnowWar.
Script interface bugfixes.
2011-01-25 15:14:56 +00:00
Lasse Öörni
9f91d37518 Moved bringToFront() to UIElement.
Added getRootElement() to UIElement.
Cleaned up menu popup code.
To optimize UI rendering, only ScrollView & LineEdit clip child UI elements by default.
2011-01-25 07:58:38 +00:00
Lasse Öörni
8c780caa0e Added MenuItem UI element.
Added TryFocus UI event, sent whenever the focus element is attempted to be changed.
Added setBringToBack() & getCombinedScreenRect() functions to UIElement.
Do not transmit hover to other UI elements during mouse drag.
Minor UI code cleanup.
Documentation update.
2011-01-24 21:39:54 +00:00
Lasse Öörni
3eb7da1993 Fixed bug where a child UI element completely outside the parent element's bounding box would not be found by UI::getElementAt().
Exposed UIElement's isInside() & isInsideCombined() to script.
2011-01-24 13:46:04 +00:00
Lasse Öörni
f638f5cbf9 Added clear() to UI, which removes all UI elements except cursor.
Added layoutHorizontal() & layoutVertical() to UIElement.
2011-01-24 11:54:16 +00:00
Lasse Öörni
152c641d24 Restart cursor blink cycle when text edited. 2011-01-23 21:27:54 +00:00
Lasse Öörni
b0642caa78 Added LineEdit UI element.
Added getNumLogicalProcessors() to ProcessUtils.
Lose UI element focus when left-clicking over an inactive or nonexistent UI element.
Include cleanup.
2011-01-23 13:32:37 +00:00
Lasse Öörni
ceb2475a01 File/PackageFile refactoring. PackageFile no longer keeps a file handle open constantly, instead handles are opened for individual files as necessary.
Documentation update.
2011-01-22 13:30:49 +00:00
Lasse Öörni
a7628dcc73 Removed special case forced animation update if animation blending changes. 2011-01-21 17:20:24 +00:00
Lasse Öörni
8e5cfdc68e Added ScrollView UI element.
Added ClipBorder-setting to UIElement, which controls the scissor clipping of child elements.
Fixed not being able to move a non-resizable Window by dragging from the top or bottom.
2011-01-21 14:40:39 +00:00
Lasse Öörni
5c8ef686de Fixed local animation mode under higher latency. 2011-01-20 19:45:45 +00:00
Lasse Öörni
ffb2908516 Added AnimationController component.
Removed animation code from GameObject.
Improved the local animation mode. Now it is active only for predicted components.
Added getLength() to AnimationState.
2011-01-20 17:52:56 +00:00