Chris Beck
40a4a6538f
move the "get_str" shim to the plugins/context header
2014-12-19 19:47:18 -05:00
Chris Beck
425e0ef315
add plugins bindings to titlescreen and mp lobby
2014-12-19 19:47:17 -05:00
Chris Beck
2a8759126a
add accessor functions to plugins contexts
...
This allows scripts to request more info from the engine.
2014-12-19 19:47:17 -05:00
Chris Beck
6032372e4a
add plugins context, manager, create lua thread object
...
This collection of classes provides a framework whereby the engine
may provide scripting capabilities in any "context". A C++
function may declare a plugin context by providing a list of names
function objects, then may call "play_slice()" on this context to
transfer control to lua. A lua script may generate some arguments
and request to call some of these, then yield to the engine. C++
will run them until one of them signals an error, or that the
context is now invalid (using a boolean return value).
The intended semantics is that lua may only make requests
corresponding to the current context. As soon as a new context
is used (play_slice() is called again) the old context is invalid
from lua's point of view -- calling those functions is a lua
error but not undefined behavior. This should be the case even if
the old context has not been destroyed yet in C++, for instance
if a lua request resulted in a new context being created. There is
a system of locks in place to ensure that when old contexts are
invalidated, stale requests are discarded.
We also add the coroutine library to our lua base. This because
threads are run as coroutines, and writing them requires the use
of coroutine yield from the standard library.
2014-12-19 19:47:17 -05:00
Chris Beck
63631b4a66
allow to open the app lua kernel in the multiplayer lobby
2014-12-19 19:40:32 -05:00
Chris Beck
77e846976b
bugfix: fix an infinite loop in gui1 textbox when run with no gui
...
The infinite loop was that when the textbox has no space, we word
wrap a single character infinitely and run out of memory by
printing endlines.
2014-12-19 19:40:32 -05:00
Chris Beck
c6d8f03c5f
minor fixup: add braces to an if statement, in lua load file
2014-12-19 19:40:11 -05:00
gfgtdf
8692e8f0e1
Merge pull request #343 from gfgtdf/lock_settings
...
make force_lock_settings default to true for [scenario]
2014-12-19 21:42:35 +01:00
Charles Dang
5eab596d52
THoT: no need to include all util files individually
2014-12-19 01:12:39 +11:00
Charles Dang
52d38ea408
LoW: removed a redundant inclusion file
2014-12-19 01:04:51 +11:00
Charles Dang
d9f37f236a
DiD: no need to include all util files individually
2014-12-19 01:01:50 +11:00
Charles Dang
4ba112a413
DiD S3: fixed an outdoors hex being excluded in the local time area
2014-12-19 00:32:09 +11:00
Charles Dang
f360e9b421
DiD: improved implementation of MODIFY_ONE_UNIT and fixed an issue with SUFs I accidentally introduced
2014-12-19 00:16:30 +11:00
Charles Dang
4bfa4c2a89
Merge branch 'master' of github.com:wesnoth/wesnoth
2014-12-18 22:51:39 +11:00
Charles Dang
531c93cf8f
Dropped unused SPEAK macro
...
Technically, it still is used in the commented S2 Ed/Shaun joke line,
but that's not coming back
2014-12-18 22:49:31 +11:00
Charles Dang
8ec9792ead
Fixed some backwards logic in CREATE_ADVISOR
2014-12-18 22:47:32 +11:00
Charles Dang
dd12b0f52e
DiD S11: code cleanup, and yes, [filter_condition]
2014-12-18 22:37:21 +11:00
Charles Dang
5a1cb9b044
DiD S10: code cleanup, and made use of [filter_condition]
2014-12-18 22:31:57 +11:00
Charles Dang
c93d5500fe
Did S9.3: made more use of [filter_condition]
2014-12-18 22:26:52 +11:00
Charles Dang
20c8dcd24a
Made more use of [filter_condition]
2014-12-18 22:13:33 +11:00
Charles Dang
75b5ded35a
DiD S6: simplified some code
2014-12-18 22:13:18 +11:00
Charles Dang
f1cf0dd2c4
DiD S5: made use of filter_condition
2014-12-18 19:56:49 +11:00
Chris Beck
c9d655a567
travis: remove apt-get upgrade
2014-12-17 23:35:18 -05:00
Chris Beck
844f79501e
travis: fixup previous commit
2014-12-17 23:12:29 -05:00
Chris Beck
57b3154c80
travis: fixup previous commit
2014-12-17 23:06:07 -05:00
Chris Beck
df57b4b546
travis: fix obscure bug related to apt-get ugprade
...
http://serverfault.com/questions/563073/postgresql-9-3-installation-fails
2014-12-17 22:45:24 -05:00
Charles Dang
b8e9805bbf
DiD S3: used [filter_condition] to reduce excessive [if] indent
2014-12-18 14:28:16 +11:00
Charles Dang
e5ac97ab58
DiD S2: create Volk before start, thereby removing a noticeable delay before the initial dialog
2014-12-18 14:10:18 +11:00
Charles Dang
b6b3833408
DiD S1: used a victory event instead of including the whole cutscene code twice
2014-12-18 13:51:52 +11:00
Charles Dang
58fd57e151
DiD S12: used [switch] instead of multiple [if]s where applicable
2014-12-18 13:36:01 +11:00
Alarantalara
b56b044a3e
Fix typo which put comment partially on the wrong line.
2014-12-17 20:40:32 -05:00
Alarantalara
3e6c00b104
Speculative change to support homebrew.
...
I don't actually have it, so hopefully it works.
Conditionally added because I don't know if all compilers even hope to compile
Objective-C++ and I don't want to incidentally break other builds.
2014-12-17 20:37:52 -05:00
Alarantalara
ecc6241b96
Require __APPLE__ to build apple_notification.mm in case another compiler runs into it.
...
File assumes the presence of many OS X specific headers and definitions.
2014-12-17 20:33:32 -05:00
Alarantalara
48b286328c
Move apple_notifications.mm somewhere easy to find for scons.
2014-12-17 20:26:11 -05:00
Ignacio R. Morelle
7db1de5421
cmake: Replace another bogus check for MSVC with WIN32
...
Otherwise attempting to compile with any other compiler targeting Win32
results in build errors with the Lua code, unless (presumably) you are
targeting Cygwin or another full POSIX implementation on Win32.
2014-12-16 04:38:33 -03:00
Ignacio R. Morelle
00f0322690
cmake: Replace a bogus check for MSVC with WIN32
...
MSVC++ isn't the only compiler that targets Win32, and the file in
question is needed for all of them.
2014-12-16 04:38:28 -03:00
Matthias Schoeck
7257462ff5
Update Xcode project file
2014-12-15 19:40:05 -08:00
Matthias Schoeck
bad5e79f67
Lurkers Micro AI: bug fix for attempting to attack petrified units
2014-12-15 19:23:06 -08:00
Chris Beck
8447ebbb88
sever external pointer links in game_events::pump
2014-12-15 06:45:40 -05:00
Chris Beck
c5e31e83f1
sever external pointer links in game_events::manager
2014-12-15 06:15:58 -05:00
Charles Dang
db39fd57ec
Merge pull request #344 from Vultraz/vult-remove-savegame-exceptions
...
Optimize and improve loadgame interface
2014-12-15 17:11:38 +11:00
Charles Dang
552d1bf7b7
Updated changelog
2014-12-15 17:03:33 +11:00
Charles Dang
ec72d91bb1
Don't show version check when reloading via 'Back to [...]' menu items
2014-12-15 16:59:34 +11:00
Chris Beck
615d4024ce
don't ask the user twice about old version when loading a save
...
The issue only affected saves loaded from the in-game menu.
2014-12-14 22:45:07 -05:00
Charles Dang
41d9b045c2
Use utf8 arrows instead of < > for help Back/Forward buttons
2014-12-15 14:33:06 +11:00
Charles Dang
8dc07866ad
Updated codeblocks projectfile with files from aff3cb8da5ec
...
Codeblocks also changed all forward slashes to backslashes
2014-12-15 14:31:24 +11:00
Chris Beck
469f859240
travis: enable x2 build parallelism
...
Travis claims the linux build environment has two cores available,
this is an experiment to see if jobs=2 improves the build time.
2014-12-14 22:18:35 -05:00
Chris Beck
a7347b2261
fix gcc build: rename class game_events::pump -> t_pump
2014-12-14 21:22:07 -05:00
Chris Beck
f5481ce961
make game_events::pump not a singleton
...
Instances of this are now owned by the manager.
It would be nice to refactor this to provide all of the front-
facing methods in the manager instead of in the pump, since the
pump itself is somewhat an implementation detail. But this is
nearly the "smallest" diff change that would remove the singleton
restriction.
2014-12-14 20:50:40 -05:00
Chris Beck
34abfe2a67
refactor game_events::context
...
- Move the implementation details out of header
- Use standard C++ data structures
2014-12-14 20:50:40 -05:00