62589 Commits

Author SHA1 Message Date
Ignacio R. Morelle
d966b68d64 cmake: Fix unclosed if block
Introduced in commit aae8e70c7aff84117f48271dedbd1f2189fd7509. Oops.
2015-12-01 06:16:29 -03:00
gfgtdf
76da10bd44 split early finishing bonus between players in LoW 2015-11-30 03:10:16 +01:00
gfgtdf
d755d3b820 add [endlevel] bonus=number
instead of bonus=yes/no you can also pass a number, so bonus=0.5 will
give you only half of the bonus gold.
2015-11-30 02:49:08 +01:00
gfgtdf
15df645d02 More LoW cleanups 2015-11-30 02:49:04 +01:00
gfgtdf
91943451c7 move most of [endlevel] implementation to lua
as a side effect we get read/write fields
side.carryover_bonus/carryover_add/carryover_percentage in lua sides.
2015-11-30 02:49:01 +01:00
gfgtdf
554547beac more LoW cleanups 2015-11-30 02:48:57 +01:00
gfgtdf
9bc839e6b1 more LoW clenaups 2015-11-30 02:48:54 +01:00
gfgtdf
d8c679c5db make allied human side sides 2,3,4 in scenario 6,9,10,11 in LoW
this was already done in the other scenarios.
2015-11-29 17:18:03 +01:00
gfgtdf
44179a2cbb add lua getter for side save_id 2015-11-29 17:18:00 +01:00
gfgtdf
da163512f9 fix mp connect beeing shown before LoW scenario8 2015-11-29 17:17:57 +01:00
gfgtdf
a3bc17a9fe more LoW cleanups 2015-11-29 17:17:55 +01:00
Ignacio R. Morelle
7caf603d20 pofix: Add download path string fixes for the 1.12.5 release 2015-11-28 04:37:56 -03:00
Charles Dang
f3003cf83a LoW: small fixup to 1e45c14e6825 2015-11-28 12:08:42 +11:00
gfgtdf
889d6edb4a attempt to fix an assertion failue in mp connect engine. 2015-11-28 02:03:35 +01:00
gfgtdf
816df4d706 more LoW cleanups 2015-11-28 02:03:03 +01:00
Charles Dang
f751739aea Manually reapply 730453cf01c242b 2015-11-28 09:18:57 +11:00
Charles Dang
691c4c4ae4 Manually reapply a1e66d6f2a4ca 2015-11-28 09:18:56 +11:00
Charles Dang
9f8b702828 Manually reapply 376ffc16efd1c36 2015-11-28 09:18:55 +11:00
Charles Dang
adb894dd21 wmlindent pass 2015-11-28 09:18:54 +11:00
Charles Dang
1e45c14e68 Manually reapply d6c67db110b6ed37 2015-11-28 09:18:54 +11:00
Charles Dang
498a79060e LoW: moved North Elves common village setup into a file 2015-11-28 09:03:26 +11:00
gfgtdf
fe3adedcf6 more LoW cleanups 2015-11-27 22:18:31 +01:00
gfgtdf
6d47bd0780 LoW cleanups
removed attributes that were already defined by the {PLAYABLE} macro.
2015-11-27 21:09:22 +01:00
gfgtdf
59233ce903 attempt to fix bug in [message]
previously this bug http://i.imgur.com/9B7bquA.png happend in LoW scenario3.
2015-11-27 18:13:07 +01:00
gfgtdf
be68ebc0a7 merge LoW from 1.12 into master
This commit manually merges all LoW commits from the 1.12 branch into
master.

This might revert some 1.13 commits which i wasn't able to merge
correctly.
2015-11-27 17:17:53 +01:00
Ignacio R. Morelle
de44790d7d Make [*time_area] Lua API functions take a single time area id
This means the Lua code implementing the WML tags are now solely
responsible for parsing the comma-separated id list. It just so happens
that I added code for that without realizing that I was duplicating
existing functionality on the C++ side.

As a result:
 * wesnoth.add_time_area and wesnoth.remove_time_area can operate on
   time area ids that contain commas (if someone feels this is needed
   for some weird reason)
 * [time_area] no longer warns about adding time areas with commas in
   their ids (actually adding the first id of the list instead)
 * [time_area] remove=yes and [remove_time_area] still handle
   comma-separated lists of ids, in the Lua side instead of C++.

This makes the Lua API for this consistent with [event]/[remove_event].

Since the Lua API functions in question are undocumented at this moment,
it's unlikely this impacts anyone, really.
2015-11-26 23:29:16 -03:00
Ignacio R. Morelle
9d85887ed1 Add [remove_time_area] and allow [time_area] remove=yes to take an id list
[remove_time_area] is syntatic sugar but it's used to implement
[time_area] remove=yes now, just like [remove_event]/[event].
2015-11-26 22:38:03 -03:00
gfgtdf
8a04442ce2 Fix Low Carryover
http://gna.org/bugs/?23674

We don't want to use the units and gold stored in the global variables if we already get them from normal carryover becasue that results in having them twice.
2015-11-26 21:58:22 -03:00
Ignacio R. Morelle
bb87a306e9 log/windows: Drop test code that was never meant to be pushed upstream 2015-11-25 04:53:08 -03:00
Ignacio R. Morelle
edb8be4bce log/windows: Leave Windows version unspecified
If this breaks compilation for MSVC++ users, make sure MSVC++ passes
-D_WIN32_WINNT=0x0501 to the compiler, or revert this commit. CB and SCons
already do that, so...
2015-11-25 04:50:50 -03:00
aquileia
5d825d4aca vcproj: Update for 53ed94d & aae8e70
[skip ci]
2015-11-24 22:02:33 +01:00
Ignacio R. Morelle
03648f7f9e Remove a few superfluous includes 2015-11-23 20:00:40 -03:00
Ignacio R. Morelle
da9a3c4b6e Make libc_error a subclass of std::exception 2015-11-23 18:48:43 -03:00
gfgtdf
b7f9775872 fix crash in [set_variables]
http://gna.org/bugs/?24100
2015-11-23 17:29:02 +01:00
gfgtdf
3f37e4a51d Revert "fix crash in set_variables"
This reverts commit a7bb6b1fa57fe736115820fbdbdff56a50acaf0a.

This didn't really fix it, it just made the code more complicated.
2015-11-23 17:27:04 +01:00
Ignacio R. Morelle
71009d939f Merge branch 'feature/win32-stdio-redir' 2015-11-23 03:42:28 -03:00
Ignacio R. Morelle
758f929a7b Update changelog and RELEASE_NOTES 2015-11-23 03:42:15 -03:00
Ignacio R. Morelle
baae0bd708 log/windows: Auto-disable log file if a console is attached at startup
This change only actually concerns binaries built with the console
subsystem flag, which isn't the case with our official project files or
SCons recipe.
2015-11-23 03:42:14 -03:00
Ignacio R. Morelle
53ed94da25 log/windows: Integrate implementation of --wconsole
This makes it so we no longer try to steal the console back to a log
file when using --wconsole with the new redirection code. Now the
--wconsole switch triggers a special mode of the log file manager that
uses a native console instead of log files.

As a necessary bonus to appease compilers, the GUI2 version info dialog
now uses the correct log file path when not started with the --wconsole
switch. Yay!
2015-11-23 03:42:14 -03:00
Ignacio R. Morelle
bc9fb0c111 log/windows: Close stdout and stderr on destruction if redirected
No real reason to do this since these resources should be automatically
released on process exit anyway, but, better safe than sorry I guess.
2015-11-23 03:21:48 -03:00
Ignacio R. Morelle
900dc5b070 log/windows: Implement log file rotation
A maximum of 8 previous log files are kept around in the logs directory.
Older files are automatically deleted during initialization.

I could've achieved this with stat calls, really, but the log filenames
are simpler and faster to process.
2015-11-23 03:21:48 -03:00
Ignacio R. Morelle
aae8e70c7a log/windows: Add our own stdout/stderr redirection on Windows
This replaces SDL 1.2's built-in stdout/stderr redirection, which writes
the log file to the process working directory (usually an
admin-restricted location) instead of a more accessible user-writable
location.

My approach combines stdout and stderr into a single log file which
includes the process id and timestamp in its filename in order to
accomodate multiple instances and (coming later) log rotation. The log
file is created in the user's temporary directory defined by Windows,
and then relocated to the game user data dir as soon as it is set-up the
first time, placed in the Windows-specific logs/ subdir.

The most pressing issues this solves are the lack of built-in
stdout/stderr redirection in SDL 2's SDL2main.lib entry point, and
Unicode path issues with SDL 1.2 (bug #22897). Additionally, it allows
us to not have to rely on UAC virtualization anymore; this is arguably
far more important because it has been known to break on occasion (e.g.
<http://r.wesnoth.org/t42970>), and starting with version 1.13.2 we want
to declare Windows Vista - 10 compatibility in our side-by-side manifest
(see commit e119f4071f047c6d740ebec4636985fdf39349bc).

Currently missing features coming later:

 * Log rotation (otherwise the logs/ dir may grow forever)
 * wesnothd support (although the code is already required to be linked
   into wesnothd due to it being required by the FS API)
 * Integration with the version info dialog
2015-11-23 03:21:42 -03:00
gfgtdf
a7bb6b1fa5 fix crash in set_variables
http://gna.org/bugs/?24100

This only changes the vit == vit_const case.
2015-11-23 00:49:22 +01:00
gfgtdf
729d17a783 remove outcommented code 2015-11-17 21:21:57 +01:00
gfgtdf
8e78def64d Add a comment 2015-11-17 21:10:39 +01:00
gfgtdf
9ce59881d2 fix wesnothd::game::send_data_sides 2015-11-17 20:59:36 +01:00
loonycyborg
296c217e5d scons: change sdl check so it sets up pkg-config and PATH if passed non-empty sdldir
Needed for specifying local installs of sdl on non-windows platforms.
2015-11-17 15:32:08 +03:00
gfgtdf
c26e139091 attempt to fix a compiler warning 2 2015-11-15 20:31:22 +01:00
gfgtdf
29ff731327 attempt to fix a compiler warning 2015-11-15 20:30:05 +01:00
loonycyborg
627acb9b0b scons: Add SDL calls to SDL test program 2015-11-15 17:54:28 +03:00