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_
|
#define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif // _MSC_VER > 1000
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "DMap.h"
|
#include "DMap.h"
|
||||||
class DBrush;
|
class DBrush;
|
||||||
|
|
|
||||||
|
|
@ -24,19 +24,25 @@ finkgetdeps()
|
||||||
finkgetdeps "$INSTALLDIR/radiant.$EXE"
|
finkgetdeps "$INSTALLDIR/radiant.$EXE"
|
||||||
echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
|
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
|
LAST=$LIB
|
||||||
done
|
done
|
||||||
cp -L "$LAST" "$INSTALLDIR"
|
cp -L "$LAST" "$INSTALLDIR"
|
||||||
finkgetdeps "$LAST"
|
finkgetdeps "$LAST"
|
||||||
|
|
||||||
|
LAST=
|
||||||
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do
|
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do
|
||||||
|
[ -f "$LIB" ] || continue
|
||||||
LAST=$LIB
|
LAST=$LIB
|
||||||
done
|
done
|
||||||
cp -L "$LAST" "$INSTALLDIR"
|
cp -L "$LAST" "$INSTALLDIR"
|
||||||
finkgetdeps "$LAST"
|
finkgetdeps "$LAST"
|
||||||
|
|
||||||
|
LAST=
|
||||||
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do
|
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do
|
||||||
|
[ -f "$LIB" ] || continue
|
||||||
LAST=$LIB
|
LAST=$LIB
|
||||||
done
|
done
|
||||||
cp -L "$LAST" "$INSTALLDIR"
|
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
|
#define INCLUDED_MEMORY_ALLOCATOR_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,59 +186,84 @@ void VFS_Destroy()
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <shlobj.h>
|
#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
|
#endif
|
||||||
void HomePaths_Realise()
|
void HomePaths_Realise()
|
||||||
{
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
||||||
|
if(!string_empty(prefix))
|
||||||
|
{
|
||||||
|
StringOutputStream path(256);
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#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.clear();
|
||||||
path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
|
path << DirectoryCleaned(g_get_home_dir()) << "Library/Application Support" << (prefix+1) << "/";
|
||||||
}
|
if(file_is_directory(path.c_str()))
|
||||||
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))
|
|
||||||
{
|
{
|
||||||
StringOutputStream path(256);
|
|
||||||
path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
|
|
||||||
g_qeglobals.m_userEnginePath = path.c_str();
|
g_qeglobals.m_userEnginePath = path.c_str();
|
||||||
Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
|
break;
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
#elif defined(WIN32)
|
|
||||||
const char* prefix = g_pGameDescription->getKeyValue("prefix");
|
#if defined(WIN32)
|
||||||
if(!string_empty(prefix))
|
|
||||||
{
|
|
||||||
StringOutputStream path(256);
|
|
||||||
TCHAR mydocsdir[MAX_PATH + 1];
|
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))
|
if(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdir))
|
||||||
{
|
{
|
||||||
|
path.clear();
|
||||||
path << DirectoryCleaned(mydocsdir) << "My Games/" << (prefix+1) << "/";
|
path << DirectoryCleaned(mydocsdir) << "My Games/" << (prefix+1) << "/";
|
||||||
// win32: only add it if it already exists
|
// win32: only add it if it already exists
|
||||||
if(file_is_directory(path.c_str()))
|
if(file_is_directory(path.c_str()))
|
||||||
|
{
|
||||||
g_qeglobals.m_userEnginePath = path.c_str();
|
g_qeglobals.m_userEnginePath = path.c_str();
|
||||||
else
|
break;
|
||||||
g_qeglobals.m_userEnginePath = EnginePath_get();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_qeglobals.m_userEnginePath = EnginePath_get();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
#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();
|
g_qeglobals.m_userEnginePath = EnginePath_get();
|
||||||
}
|
}
|
||||||
|
while(0);
|
||||||
|
|
||||||
|
Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
|
||||||
|
|
||||||
{
|
{
|
||||||
StringOutputStream path(256);
|
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 ModifierFlags c_modifier_replace_face = c_modifier_replace | c_modifier_face;
|
||||||
|
|
||||||
const ButtonIdentifier c_button_texture = c_buttonMiddle;
|
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;
|
const ModifierFlags c_modifier_copy_texture = c_modifierNone;
|
||||||
|
|
||||||
class Selector_
|
class Selector_
|
||||||
|
|
@ -4094,7 +4096,7 @@ public:
|
||||||
ConstructSelectionTest(scissored, SelectionBoxForPoint(&devicePosition[0], &m_selector.m_epsilon[0]));
|
ConstructSelectionTest(scissored, SelectionBoxForPoint(&devicePosition[0], &m_selector.m_epsilon[0]));
|
||||||
SelectionVolume volume(scissored);
|
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);
|
Scene_applyClosestTexture(volume);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user