Merge 'NetHack-3.6' changes into NetHack-3.7-Jan2020
This commit is contained in:
@@ -25,7 +25,7 @@ Fixes to Post-3.6.4 Problems that Were Exposed Via git Repository
|
||||
Platform- and/or Interface-Specific Fixes or Features
|
||||
-----------------------------------------------------
|
||||
Windows OPTIONS=map_mode:fit_to_screen could cause a game start failure
|
||||
|
||||
Windows users with C-locale unmappable names could get game start failure
|
||||
|
||||
General New Features
|
||||
--------------------
|
||||
|
||||
@@ -123,8 +123,11 @@ spec_levs:
|
||||
quest_levs:
|
||||
touch quest_levs
|
||||
|
||||
spotless:
|
||||
-rm -f spec_levs quest_levs *.lev $(VARDAT)
|
||||
# gitinfo.txt is optionally made by src/Makefile when creating date.h
|
||||
clean:
|
||||
-rm -f gitinfo.txt
|
||||
|
||||
spotless: clean
|
||||
-rm -f nhdat x11tiles beostiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm
|
||||
-rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad
|
||||
-rm -f nhsplash.xpm nhtiles.bmp
|
||||
|
||||
@@ -308,6 +308,7 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
|
||||
clean:
|
||||
( cd src ; $(MAKE) clean )
|
||||
( cd util ; $(MAKE) clean )
|
||||
( cd dat ; $(MAKE) clean )
|
||||
( cd doc ; $(MAKE) clean )
|
||||
( cd lib/lua-$(LUA_VERSION)/src && $(MAKE) clean )
|
||||
|
||||
|
||||
@@ -151,6 +151,14 @@
|
||||
54FCE8292223261F00F393C8 /* isaac64.c in Sources */ = {isa = PBXBuildFile; fileRef = 54FCE8282223261F00F393C8 /* isaac64.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
316B91CA21A3BD7C00EC3E81 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
@@ -976,7 +984,7 @@
|
||||
3189576921A1FCC100FB2ABE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1120;
|
||||
LastUpgradeCheck = 1130;
|
||||
ORGANIZATIONNAME = "Bart House";
|
||||
TargetAttributes = {
|
||||
3189577021A1FCC100FB2ABE = {
|
||||
@@ -1837,6 +1845,10 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
31B8A44F21A26A4B0055BD01 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -78,24 +78,34 @@ static struct stat hbuf;
|
||||
|
||||
extern char orgdir[];
|
||||
|
||||
void
|
||||
int
|
||||
get_known_folder_path(
|
||||
const KNOWNFOLDERID * folder_id,
|
||||
char * path
|
||||
, size_t path_size)
|
||||
{
|
||||
PWSTR wide_path;
|
||||
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path)))
|
||||
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path))) {
|
||||
error("Unable to get known folder path");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
size_t converted;
|
||||
errno_t err;
|
||||
|
||||
err = wcstombs_s(&converted, path, path_size, wide_path, path_size - 1);
|
||||
err = wcstombs_s(&converted, path, path_size, wide_path, _TRUNCATE);
|
||||
|
||||
CoTaskMemFree(wide_path);
|
||||
|
||||
if (err != 0) error("Failed folder path string conversion");
|
||||
if (err == STRUNCATE || err == EILSEQ) {
|
||||
// silently handle this problem
|
||||
return FALSE;
|
||||
} else if (err != 0) {
|
||||
error("Failed folder (%u) path string conversion, unexpected err = %d", folder_id->Data1, err);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -107,14 +117,16 @@ create_directory(const char * path)
|
||||
error("Unable to create directory '%s'", path);
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
build_known_folder_path(
|
||||
const KNOWNFOLDERID * folder_id,
|
||||
char * path,
|
||||
size_t path_size,
|
||||
boolean versioned)
|
||||
{
|
||||
get_known_folder_path(folder_id, path, path_size);
|
||||
if(!get_known_folder_path(folder_id, path, path_size))
|
||||
return FALSE;
|
||||
|
||||
strcat(path, "\\NetHack\\");
|
||||
create_directory(path);
|
||||
if (versioned) {
|
||||
@@ -122,6 +134,7 @@ build_known_folder_path(
|
||||
VERSION_MAJOR, VERSION_MINOR);
|
||||
create_directory(path);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -249,17 +262,22 @@ set_default_prefix_locations(const char *programPath)
|
||||
g.fqn_prefix[TROUBLEPREFIX] = portable_device_path;
|
||||
g.fqn_prefix[DATAPREFIX] = executable_path;
|
||||
} else {
|
||||
build_known_folder_path(&FOLDERID_Profile, profile_path,
|
||||
sizeof(profile_path), FALSE);
|
||||
if(!build_known_folder_path(&FOLDERID_Profile, profile_path,
|
||||
sizeof(profile_path), FALSE))
|
||||
strcpy(profile_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
|
||||
sizeof(profile_path), TRUE);
|
||||
if(!build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
|
||||
sizeof(profile_path), TRUE))
|
||||
strcpy(versioned_profile_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_LocalAppData,
|
||||
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE);
|
||||
if(!build_known_folder_path(&FOLDERID_LocalAppData,
|
||||
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE))
|
||||
strcpy(versioned_user_data_path, executable_path);
|
||||
|
||||
if(!build_known_folder_path(&FOLDERID_ProgramData,
|
||||
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE))
|
||||
strcpy(versioned_global_data_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_ProgramData,
|
||||
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE);
|
||||
g.fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path;
|
||||
g.fqn_prefix[CONFIGPREFIX] = profile_path;
|
||||
g.fqn_prefix[HACKPREFIX] = versioned_profile_path;
|
||||
|
||||
Reference in New Issue
Block a user