Commit Graph

2664 Commits (0b9d46712f9c95fcf1ba30a7b572e4e47ce63549)

Author SHA1 Message Date
Ben Lubar 0b9d46712f
Run DfLinkedList::end's computations only when needed. 2018-06-30 23:04:26 -05:00
Ben Lubar 31d22967f8
Linked list 2018-06-30 23:04:26 -05:00
lethosor 1a4440859c Update xml (viewscreen_civlistst) 2018-06-29 22:33:15 -04:00
lethosor 105ddd86d8 Merge remote-tracking branch 'suokko/jsoncpp_upgrade_to_submodule' into develop 2018-06-29 22:33:00 -04:00
Pauli c39a882b57 Add missing Unit::isDiplomat
Fixes #1324
2018-06-29 16:19:18 +03:00
lethosor 3c2bfb6f47 Bump to 0.44.11-alpha1, update changelog, xml 2018-06-28 13:31:56 -04:00
lethosor f9dfb5907b Update submodules, authors 2018-06-27 13:57:34 -04:00
lethosor 19627b9221 Bump to 0.44.11 2018-06-24 17:42:31 -04:00
lethosor 854f467f56 Merge remote-tracking branch 'suokko/check_jobs_on_mapcache_commit_1229' into develop 2018-06-21 15:03:51 -04:00
lethosor 7a5e7c7c86 Rename unit_flags1.dead to killed, update submodules/changelog
Follow-up for dfhack/df-structures#247
2018-06-21 11:17:09 -04:00
lethosor 1deb6ab024 Update xml 2018-06-20 16:19:00 -04:00
lethosor 7fda8506f0 Merge remote-tracking branch 'suokko/cmake_option_to_enable_all_symbols' into develop 2018-06-20 16:16:03 -04:00
lethosor 6077a8ce4c Merge remote-tracking branch 'suokko/printf_warnings' into develop 2018-06-20 11:25:14 -04:00
lethosor 2f1d3c68c6 Merge remote-tracking branch 'suokko/stl_vsnprintf' into develop 2018-06-20 11:23:57 -04:00
lethosor b9df6fae85 Update xml, authors 2018-06-20 10:51:24 -04:00
Pauli 87e7c0f7aa Add cmake configuration to select if stubs include symbols
G++ generates structure debug symbols for a few df namespace classes to
generated stub source files. I decided to test how much symbols from
those files would increase binary size. When the result was about double
size I decided to add cmake configuration option to let user easily
select if they prefer complete symbols or reduced size.
2018-06-19 16:16:38 +03:00
Pauli bcf9387ce9 Only remove jobs that were created from a designation 2018-06-18 19:57:00 +03:00
Pauli 1b5ec7ce69 Update jobs when committing MapCache changes
The map_block->designation.{dig,smooth} are reset to zeros when a job
posting is created for the designation. The job is then used to override
the designation state in the map_block. To make the new designation set
propogate to jobs the job structure would require updating. The update
would be possible a complex operation. The simple alternative is to
remove the job and let df create a new job in the next tick.

Fixes #1229
2018-06-18 16:34:09 +03:00
Pauli 6a151353e3 Use automatic return type for index_tile 2018-06-18 16:23:57 +03:00
Pauli 0bc2b3ab1b Update toSimpleString to use a the new builder API 2018-06-14 21:20:54 +03:00
Pauli 2b79b4cce7 Use jsoncpp 1.8.4 as a submodule
This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.

jsoncpp library name changes to jsoncpp_lib_static.

jsoncpp version is the latest tagged release.
2018-06-14 21:20:46 +03:00
lethosor aac892c560 Adapted to changed Units functions
Squashed version of #1307

Closes #1307
2018-06-14 10:30:35 -04:00
Pauli 4cfdd7d92e Check if second vsnprintf does something unexpected 2018-06-13 23:33:13 +03:00
lethosor 10e6016989 Merge branch 'units_dead' into develop
Closes #1297
2018-06-13 15:38:35 -04:00
PatrikLundell 51584c2d9e Corrected isGhost 2018-06-13 15:37:45 -04:00
PatrikLundell f329774059 dead & killed flag separation
squashed 4 commits from #1297
2018-06-13 15:37:45 -04:00
Pauli 8f2cf3ad26 Fix printf format warnings 2018-06-11 19:57:06 +03:00
Pauli 8484b5dc8a Add parameter type checks to printf style functions
gcc supports type checks for printf parameters which can catch some hard
to reproduce bugs. Possible bugs happen when the parameter value is
intepreted differently to the variable value.

Example warnings follow
../library/LuaWrapper.cpp:1011:86: warning: format ‘%llu’ expects argument
    of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t
    {aka long unsigned int}’ [-Wformat=]
../plugins/follow.cpp:159:35: warning: format not a string literal and no
    format arguments [-Wformat-security]
2018-06-11 19:27:35 +03:00
Pauli 82e7b8300a Make stl_vsprintf return if there is an vsnprintf error
vsnprintf man page claims:
"If an output error is encountered, a negative value is returned."

That means we has to call vsnprintf twice at most to have whole output
written to a string. But in case of error we return an empty string.

The code also optimizes an expected common case of outputting single
line with a small stack allocated buffer. If the stack buffer is too
small then it uses std::string::resize to allocate exactly enough memory
and writes directly to std::string.

Second call could use vsprintf because memory is known to be large
enough. But I think that difference isn't detectable outside micro
benchmarks.
2018-06-10 16:23:31 +03:00
lethosor fe458d3ac1 Merge remote-tracking branch 'grubsteak/patch-2' into develop 2018-06-08 22:05:20 -04:00
lethosor 1fe6c3b880 Merge remote-tracking branch 'suokko/profiler' into develop
Closes #1296
2018-06-08 22:01:21 -04:00
Pauli e3df5cd765 Port profiler to lua 5.3 and dfhack
Changes include
* table.getn(obj) -> #obj
* Making sure string.rep gets an integer parameter
* Optimized profiling hooks (call profiler cost from factor 40 to 10)
* Specialized parameter name lookup code for c++ __index metamod calls
* Collect source lines in time sampling variant
* Simplified prevent to always filter all children
2018-06-06 19:18:18 +03:00
Daniel Silverstone 96ba5116f7 Add lua Pepperfish Profiler code
Pepperfish Profiler can produce time sampled profiles and call entry
exit profiles. Code is verbatim copy from the lua wiki [1]. This commit
won't work alone but it exists to give author credit correctly to
Daniel.

[1] http://lua-users.org/wiki/PepperfishProfiler

Authors:
Daniel Silverstone <dsilvers@pepperfish.net>
Tom Spilman <tom@sickheadgames.com>
Ben Wilhelm <zorba-pepperfish@pavlovian.net>
2018-06-06 17:27:40 +03:00
lethosor 03968db344 Fix GCC warnings in 'tweak kitchen-prefs-all' and dev plugins 2018-06-01 10:02:38 -04:00
lethosor 7a04fefb0b Remove Vermin module (unused and obsolete) 2018-06-01 00:22:10 -04:00
lethosor eb199d97b5 Prepend script name to qerror messages, if applicable
Resolves #1282
2018-05-20 09:30:46 -04:00
grubsteak 7e3c8c9965
added fast keys for workshop gui overlay 2018-05-19 20:25:24 -05:00
lethosor badc0e3a3d Update changelog, submodules for r1 2018-05-18 14:30:09 -04:00
Lethosor 9ca79d050d
Merge pull request #1259 from AtomicChicken/syndrome-util-updates
syndrome-util: added function to remove syndrome wound data
2018-05-18 14:10:14 -04:00
lethosor e44bca0fb4 Merge remote-tracking branch 'grubsteak/patch-1' into develop 2018-05-18 00:48:04 -04:00
grubsteak fe0049db8c
enable lua api construction functions
it seems this has been left out on accident?
2018-05-17 23:29:10 -05:00
lethosor 50a863a48e Fix Kitchen.h include (case-sensitive) 2018-05-17 20:11:46 -04:00
lethosor 17ba492992 Add some exclusion functions to Kitchen module, expose to Lua, fix build 2018-05-17 19:34:03 -04:00
lethosor 97a79893e7 Change Kitchen.{h,cpp} to title case 2018-05-17 11:08:13 -04:00
lethosor fcd8c9606e Fix some warnings on OS X 2018-05-12 18:46:58 -04:00
lethosor e9ec08f419 Add Buildings::getRoomDescription(), moved from search plugin, +cleanup 2018-05-12 17:00:21 -04:00
lethosor c15571caa0 Move isRouteVehicle, isSquadEquipment from workflow to Items module 2018-05-12 14:49:30 -04:00
lethosor a34b34d3cb Move a few item functions from autotrade/stocks into DFHack::Items 2018-05-12 12:04:46 -04:00
Dan Amlund 759df34fce fix potential segfault 2018-05-11 17:51:32 +02:00
lethosor ceaa518be9 Fix a potential segfault in getAnyUnit
See #1218
2018-05-11 10:04:10 -04:00