Merge branch 'master' of git://git.xonotic.org/xonotic/netradiant
Conflicts: tools/quake3/q3map2/path_init.c
This commit is contained in:
commit
2ceb6c1c5a
|
|
@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_
|
||||
|
||||
#include <list>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "mathlib.h"
|
||||
#include "DMap.h"
|
||||
class DBrush;
|
||||
|
|
|
|||
|
|
@ -24,19 +24,25 @@ finkgetdeps()
|
|||
finkgetdeps "$INSTALLDIR/radiant.$EXE"
|
||||
echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
|
||||
|
||||
for LIB in "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so; do
|
||||
LAST=
|
||||
for LIB in "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$MACLIBDIR"/gdk-pixbuf-2.0/*/loaders/libpixbufloader-bmp.so; do
|
||||
[ -f "$LIB" ] || continue
|
||||
LAST=$LIB
|
||||
done
|
||||
cp -L "$LAST" "$INSTALLDIR"
|
||||
finkgetdeps "$LAST"
|
||||
|
||||
LAST=
|
||||
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do
|
||||
[ -f "$LIB" ] || continue
|
||||
LAST=$LIB
|
||||
done
|
||||
cp -L "$LAST" "$INSTALLDIR"
|
||||
finkgetdeps "$LAST"
|
||||
|
||||
LAST=
|
||||
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do
|
||||
[ -f "$LIB" ] || continue
|
||||
LAST=$LIB
|
||||
done
|
||||
cp -L "$LAST" "$INSTALLDIR"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define INCLUDED_MEMORY_ALLOCATOR_H
|
||||
|
||||
#include <memory>
|
||||
#include <stddef.h>
|
||||
|
||||
#if 0
|
||||
|
||||
|
|
|
|||
|
|
@ -186,59 +186,84 @@ void VFS_Destroy()
|
|||
|
||||
#ifdef WIN32
|
||||
#include <shlobj.h>
|
||||
const GUID qFOLDERID_SavedGames = {0x4C5C32FF, 0xBB9D, 0x43b0, {0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4}};
|
||||
#define qREFKNOWNFOLDERID GUID
|
||||
#define qKF_FLAG_CREATE 0x8000
|
||||
#define qKF_FLAG_NO_ALIAS 0x1000
|
||||
static HRESULT (WINAPI *qSHGetKnownFolderPath) (qREFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath);
|
||||
#endif
|
||||
void HomePaths_Realise()
|
||||
{
|
||||
do
|
||||
{
|
||||
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
||||
if(!string_empty(prefix))
|
||||
{
|
||||
StringOutputStream path(256);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
||||
if(!string_empty(prefix))
|
||||
{
|
||||
StringOutputStream path(256);
|
||||
path << DirectoryCleaned(g_get_home_dir()) << "Library/Application Support" << (prefix+1) << "/";
|
||||
if(!file_is_directory(path.c_str()))
|
||||
{
|
||||
path.clear();
|
||||
path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
|
||||
}
|
||||
g_qeglobals.m_userEnginePath = path.c_str();
|
||||
Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
|
||||
}
|
||||
else
|
||||
#elif defined(POSIX)
|
||||
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
||||
if(!string_empty(prefix))
|
||||
path << DirectoryCleaned(g_get_home_dir()) << "Library/Application Support" << (prefix+1) << "/";
|
||||
if(file_is_directory(path.c_str()))
|
||||
{
|
||||
StringOutputStream path(256);
|
||||
path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
|
||||
g_qeglobals.m_userEnginePath = path.c_str();
|
||||
Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
|
||||
break;
|
||||
}
|
||||
else
|
||||
#elif defined(WIN32)
|
||||
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
||||
if(!string_empty(prefix))
|
||||
{
|
||||
StringOutputStream path(256);
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
TCHAR mydocsdir[MAX_PATH + 1];
|
||||
wchar_t *mydocsdirw;
|
||||
HMODULE shfolder = LoadLibrary("shfolder.dll");
|
||||
if(shfolder)
|
||||
qSHGetKnownFolderPath = GetProcAddress("SHGetKnownFolderPath");
|
||||
else
|
||||
qSHGetKnownFolderPath = NULL;
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
if(qSHGetKnownFolderPath && qSHGetKnownFolderPath(&qFOLDERID_SavedGames, qKF_FLAG_CREATE | qKF_FLAG_NO_ALIAS, NULL, &mydocsdirw) == S_OK)
|
||||
{
|
||||
memset(mydocsdir, 0, sizeof(mydocsdir));
|
||||
wctombs(mydocsdir, mydocsdirw, sizeof(mydocsdir)-1);
|
||||
CoTaskMemFree(mydocsdirw);
|
||||
path.clear();
|
||||
path << DirectoryCleaned(mydocsdir) << (prefix+1) << "/";
|
||||
if(file_is_directory(path.c_str()))
|
||||
{
|
||||
g_qeglobals.m_userEnginePath = path.c_str();
|
||||
CoUninitialize();
|
||||
FreeLibrary(shfolder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
CoUninitialize();
|
||||
if(shfolder)
|
||||
FreeLibrary(shfolder);
|
||||
if(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdir))
|
||||
{
|
||||
path.clear();
|
||||
path << DirectoryCleaned(mydocsdir) << "My Games/" << (prefix+1) << "/";
|
||||
// win32: only add it if it already exists
|
||||
if(file_is_directory(path.c_str()))
|
||||
{
|
||||
g_qeglobals.m_userEnginePath = path.c_str();
|
||||
else
|
||||
g_qeglobals.m_userEnginePath = EnginePath_get();
|
||||
}
|
||||
else
|
||||
{
|
||||
g_qeglobals.m_userEnginePath = EnginePath_get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
||||
#if defined(POSIX)
|
||||
path.clear();
|
||||
path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
|
||||
g_qeglobals.m_userEnginePath = path.c_str();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
g_qeglobals.m_userEnginePath = EnginePath_get();
|
||||
}
|
||||
while(0);
|
||||
|
||||
Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
|
||||
|
||||
{
|
||||
StringOutputStream path(256);
|
||||
|
|
|
|||
|
|
@ -3872,7 +3872,9 @@ const ModifierFlags c_modifier_toggle_face = c_modifier_toggle | c_modifier_face
|
|||
const ModifierFlags c_modifier_replace_face = c_modifier_replace | c_modifier_face;
|
||||
|
||||
const ButtonIdentifier c_button_texture = c_buttonMiddle;
|
||||
const ModifierFlags c_modifier_apply_texture = c_modifierControl | c_modifierShift;
|
||||
const ModifierFlags c_modifier_apply_texture1 = c_modifierControl | c_modifierShift;
|
||||
const ModifierFlags c_modifier_apply_texture2 = c_modifierControl;
|
||||
const ModifierFlags c_modifier_apply_texture3 = c_modifierShift;
|
||||
const ModifierFlags c_modifier_copy_texture = c_modifierNone;
|
||||
|
||||
class Selector_
|
||||
|
|
@ -4094,7 +4096,7 @@ public:
|
|||
ConstructSelectionTest(scissored, SelectionBoxForPoint(&devicePosition[0], &m_selector.m_epsilon[0]));
|
||||
SelectionVolume volume(scissored);
|
||||
|
||||
if(modifiers == c_modifier_apply_texture)
|
||||
if(modifiers == c_modifier_apply_texture1 || modifiers == c_modifier_apply_texture2 || modifiers == c_modifier_apply_texture3)
|
||||
{
|
||||
Scene_applyClosestTexture(volume);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user