Skip to content

Commit 28338bd

Browse files
committed
Merge branch 'develop' into sdl_console
2 parents fb010a5 + e4f3cd9 commit 28338bd

19 files changed

Lines changed: 187 additions & 121 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/changelog.txt merge=union

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ project(dfhack)
88

99
# set up versioning.
1010
set(DF_VERSION "50.14")
11-
set(DFHACK_RELEASE "r1.1")
11+
set(DFHACK_RELEASE "r2")
1212
set(DFHACK_PRERELEASE FALSE)
1313

1414
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")

data/init/dfhack.tools.init

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# Enable system services
88
enable buildingplan
99
enable burrow
10-
enable faststart
1110
enable logistics
1211
enable overlay
1312
enable preserve-rooms

depends/lua/include/dfhack_llimits.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct lua_extra_state {
6060
pthread_mutexattr_init(&attr); \
6161
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \
6262
pthread_mutex_init(luai_mutex(L), &attr); \
63+
pthread_mutexattr_destroy(&attr); \
6364
} while (0)
6465
#define luai_userstateclose(L) do { \
6566
lua_unlock(L); \

docs/about/Removed.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ embark-tools
153153
Replaced by `gui/embark-anywhere`. Other functionality was replaced by the DF
154154
v50 UI.
155155

156+
.. _faststart:
157+
158+
faststart
159+
=========
160+
Sped up the initial DF load sequence. Removed since Bay 12 rewrote the startup
161+
sequence and it is now sufficiently fast on its own.
162+
156163
.. _fix-armory:
157164

158165
fix-armory

docs/changelog.txt

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,24 @@ Template for new versions:
5151

5252
# Future
5353

54+
## New Tools
55+
56+
## New Features
57+
58+
## Fixes
59+
60+
## Misc Improvements
61+
62+
## Documentation
63+
64+
## API
65+
66+
## Lua
67+
68+
## Removed
69+
70+
# 50.14-r2
71+
5472
## New Tools
5573
- `infinite-sky`: (reinstated, renamed from ``infiniteSky``) automatically create new z-levels of sky to build in
5674
- `forceequip`: (reinstated) forcibly move items into a unit's inventory
@@ -59,7 +77,7 @@ Template for new versions:
5977
- `tweak`: ``realistic-melting``: change melting return for inorganic armor parts, shields, weapons, trap components and tools to stop smelters from creating metal, bring melt return for adamantine in line with other metals to ~95% of forging cost. wear reduces melt return by 10% per level
6078

6179
## Fixes
62-
- Fix mouse clicks bleeding through DFHack windows when clicking in the space between the frame and the window content in resizable windows
80+
- Fix mouse clicks bleeding through resizable DFHack windows when clicking in the space between the frame and the window content
6381
- `autobutcher`: don't run a scanning and marking cycle on the first tick of a fortress to allow for all custom configuration to be set first
6482
- `nestboxes`: don't consider eggs to be infertile just because the mother has left the nest; eggs can still hatch in this situation
6583
- `timestream`: adjust the incubation counter on fertile eggs so they hatch at the expected time
@@ -75,12 +93,14 @@ Template for new versions:
7593
- Quickfort blueprint library: ``aquifer_tap`` blueprint now designated at priority 3 and marks the stairway tile below the tap in "blueprint" mode to prevent drips while the drainage pipe is being prepared
7694
- `preserve-rooms`: automatically release room reservations for captured squad members. we were kidding ourselves with our optimistic kept reservations. they're unlikely to come back : ((
7795
- `buildingplan`: add value info to item selection dialog (effectively ungrouping items with different values) and add sorting by value
78-
- `timestream`: reduce CPU utilization
79-
- `fix/occupancy`: additionally handle the case where tile occupancy doesn't reflect the actual existence of a building
96+
- `timestream`: improve FPS by a further 10%
97+
- `fix/occupancy`: additionally handle the case where tile building occupancy needs to be set instead of cleared
98+
- `orders`: ``orders sort`` now moves orders that are tied to a specific workshop to the top of the list in the global manager orders screen
99+
- `gui/pathable`: make wagon path to depot representation more robust
80100

81101
## Documentation
82102
- Dreamfort: add link to Dreamfort tutorial youtube series: https://www.youtube.com/playlist?list=PLzXx9JcB9oXxmrtkO1y8ZXzBCFEZrKxve
83-
- The error message that comes up if there is a version mismatch between DF and the installed DFHack now informs you which DF versions are supported by the installed version of DFHack
103+
- The error message that comes up if there is a version mismatch between DF and DFHack now informs you which DF versions are supported by the installed version of DFHack
84104

85105
## API
86106
- ``DFHack::Units``: new function ``setPathGoal``
@@ -92,6 +112,7 @@ Template for new versions:
92112

93113
## Removed
94114
- UI focus strings for squad panel flows combined into a single tree: ``dwarfmode/SquadEquipment`` -> ``dwarfmode/Squads/Equipment``, ``dwarfmode/SquadSchedule`` -> ``dwarfmode/Squads/Schedule``
115+
- `faststart`: removed since the vanilla startup sequence is now sufficiently fast
95116

96117
# 50.14-r1
97118

docs/plugins/faststart.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

library/Core.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,9 +1669,11 @@ bool Core::InitMainThread() {
16691669
// to faciliate the linux symbol discovery process (which runs without any symbols)
16701670
// or if --skip-size-check is discovered on the command line
16711671

1672-
if (df::global::global_table && df::global::game &&
1673-
df::global::game->command_line.original.find("--skip-size-check") == std::string::npos)
1672+
if (!df::global::global_table || !df::global::game ||
1673+
df::global::game->command_line.original.find("--skip-size-check") != std::string::npos)
16741674
{
1675+
std::cerr << "Skipping structure size verification check." << std::endl;
1676+
} else {
16751677
std::stringstream msg;
16761678
bool gt_error = false;
16771679
static const std::map<const std::string, const size_t> sizechecks{
@@ -1700,6 +1702,8 @@ bool Core::InitMainThread() {
17001702
errorstate = true;
17011703
return false;
17021704
}
1705+
1706+
std::cerr << "Structure size verification check passed." << std::endl;
17031707
}
17041708

17051709
perf_counters.reset();

library/Hooks.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,25 @@ DFhackCExport const int32_t dfhooks_priority = 100;
1111
// and the main event loop is initiated
1212
DFhackCExport void dfhooks_init() {
1313
if (getenv("DFHACK_DISABLE")) {
14-
fprintf(stdout, "dfhack: DFHACK_DISABLE detected in environment; disabling\n");
14+
fprintf(stderr, "dfhack: DFHACK_DISABLE detected in environment; disabling\n");
1515
disabled = true;
1616
return;
1717
}
1818

1919
// we need to init DF globals before we can check the commandline
20-
if (!DFHack::Core::getInstance().InitMainThread() || !df::global::game)
20+
if (!DFHack::Core::getInstance().InitMainThread() || !df::global::game) {
21+
disabled = true;
2122
return;
23+
}
24+
2225
const std::string & cmdline = df::global::game->command_line.original;
2326
if (cmdline.find("--disable-dfhack") != std::string::npos) {
24-
fprintf(stdout, "dfhack: --disable-dfhack specified on commandline; disabling\n");
27+
fprintf(stderr, "dfhack: --disable-dfhack specified on commandline; disabling\n");
2528
disabled = true;
29+
return;
2630
}
31+
32+
fprintf(stderr, "DFHack pre-init successful.\n");
2733
}
2834

2935
// called from the main thread after the main event loops exits

library/modules/DFSDL.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,24 @@ using std::vector;
2222
static DFLibrary *g_sdl_handle = nullptr;
2323
static DFLibrary *g_sdl_image_handle = nullptr;
2424
static const vector<string> SDL_LIBS {
25-
"SDL2.dll",
25+
#ifdef WIN32
26+
"SDL2.dll"
27+
#elif defined(_DARWIN)
2628
"SDL.framework/Versions/A/SDL",
27-
"SDL.framework/SDL",
29+
"SDL.framework/SDL"
30+
#else
2831
"libSDL2-2.0.so.0"
32+
#endif
2933
};
3034
static const vector<string> SDL_IMAGE_LIBS {
31-
"SDL2_image.dll",
35+
#ifdef WIN32
36+
"SDL2_image.dll"
37+
#elif defined(_DARWIN)
3238
"SDL_image.framework/Versions/A/SDL_image",
33-
"SDL_image.framework/SDL_image",
39+
"SDL_image.framework/SDL_image"
40+
#else
3441
"libSDL2_image-2.0.so.0"
42+
#endif
3543
};
3644

3745
SDL_Surface * (*g_IMG_Load)(const char *) = nullptr;

0 commit comments

Comments
 (0)