Added: loadBackground(string) lua function to change the texture of next teleport
--HG-- branch : compatibility-develop
This commit is contained in:
parent
b640c0ce97
commit
27364b29d2
5 changed files with 26 additions and 10 deletions
|
@ -65,6 +65,7 @@ bool InitCloudScape = true; // tells that the cloud scape must be reinitial
|
||||||
CEntityAnimationManager *EAM = NULL;
|
CEntityAnimationManager *EAM = NULL;
|
||||||
CProgress ProgressBar;
|
CProgress ProgressBar;
|
||||||
TBackground LoadingBackground = StartBackground;
|
TBackground LoadingBackground = StartBackground;
|
||||||
|
string LoadingBackgroundBG;
|
||||||
string LoadingMusic;
|
string LoadingMusic;
|
||||||
CContinent *LoadingContinent = NULL;
|
CContinent *LoadingContinent = NULL;
|
||||||
bool ConnectionReadySent= false;
|
bool ConnectionReadySent= false;
|
||||||
|
|
|
@ -62,7 +62,7 @@ enum TBackground
|
||||||
ResurectKamiBackground,
|
ResurectKamiBackground,
|
||||||
ResurectKaravanBackground,
|
ResurectKaravanBackground,
|
||||||
EndBackground,
|
EndBackground,
|
||||||
IntroNevrax,
|
CustomBackground,
|
||||||
IntroNVidia,
|
IntroNVidia,
|
||||||
LoadBackground,
|
LoadBackground,
|
||||||
};
|
};
|
||||||
|
@ -119,6 +119,7 @@ extern bool InitCloudScape; // tells that the cloud scape must be reinitia
|
||||||
extern CEntityAnimationManager *EAM;
|
extern CEntityAnimationManager *EAM;
|
||||||
extern CProgress ProgressBar;
|
extern CProgress ProgressBar;
|
||||||
extern TBackground LoadingBackground;
|
extern TBackground LoadingBackground;
|
||||||
|
extern std::string LoadingBackgroundBG;
|
||||||
extern std::string LoadingMusic;
|
extern std::string LoadingMusic;
|
||||||
extern CContinent *LoadingContinent;
|
extern CContinent *LoadingContinent;
|
||||||
extern bool ConnectionReadySent;
|
extern bool ConnectionReadySent;
|
||||||
|
|
|
@ -1464,8 +1464,8 @@ void loadBackgroundBitmap (TBackground background)
|
||||||
case EndBackground:
|
case EndBackground:
|
||||||
filename = ClientCfg.End_BG;
|
filename = ClientCfg.End_BG;
|
||||||
break;
|
break;
|
||||||
case IntroNevrax:
|
case CustomBackground: // SpecialCase
|
||||||
filename = ClientCfg.IntroNevrax_BG;
|
filename = LoadingBackgroundBG;
|
||||||
break;
|
break;
|
||||||
case IntroNVidia:
|
case IntroNVidia:
|
||||||
filename = ClientCfg.IntroNVidia_BG;
|
filename = ClientCfg.IntroNVidia_BG;
|
||||||
|
@ -1535,7 +1535,15 @@ void loadBackgroundBitmap (TBackground background)
|
||||||
void beginLoading (TBackground background)
|
void beginLoading (TBackground background)
|
||||||
{
|
{
|
||||||
LoadingContinent = NULL;
|
LoadingContinent = NULL;
|
||||||
loadBackgroundBitmap (background);
|
if (!LoadingBackgroundBG.empty())
|
||||||
|
{
|
||||||
|
loadBackgroundBitmap(CustomBackground);
|
||||||
|
LoadingBackgroundBG = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
loadBackgroundBitmap (background);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -513,6 +513,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
||||||
LUABIND_FUNC(unpauseBGDownloader),
|
LUABIND_FUNC(unpauseBGDownloader),
|
||||||
LUABIND_FUNC(requestBGDownloaderPriority),
|
LUABIND_FUNC(requestBGDownloaderPriority),
|
||||||
LUABIND_FUNC(getBGDownloaderPriority),
|
LUABIND_FUNC(getBGDownloaderPriority),
|
||||||
|
LUABIND_FUNC(loadBackground),
|
||||||
LUABIND_FUNC(getPatchLastErrorMessage),
|
LUABIND_FUNC(getPatchLastErrorMessage),
|
||||||
LUABIND_FUNC(getPlayerSelectedSlot),
|
LUABIND_FUNC(getPlayerSelectedSlot),
|
||||||
LUABIND_FUNC(isInGame),
|
LUABIND_FUNC(isInGame),
|
||||||
|
@ -2047,7 +2048,8 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
|
||||||
float x = 0.0f, y = 0.0f, z = 0.0f;
|
float x = 0.0f, y = 0.0f, z = 0.0f;
|
||||||
float scale = 1.0f;
|
float scale = 1.0f;
|
||||||
string context, url, skeleton, texture;
|
string context, url, skeleton, texture;
|
||||||
bool highlight, transparency, collision = false;
|
bool highlight, transparency = false;
|
||||||
|
bool collision = true;
|
||||||
|
|
||||||
if (ls.getTop() >= 2)
|
if (ls.getTop() >= 2)
|
||||||
{
|
{
|
||||||
|
@ -2138,11 +2140,6 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
|
||||||
skeleton = ls.toString(13);
|
skeleton = ls.toString(13);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ???????????????
|
|
||||||
transparency = false;
|
|
||||||
highlight = false;
|
|
||||||
collision = true;
|
|
||||||
|
|
||||||
CShapeInstanceReference instref = EntitiesMngr.createInstance(shape, CVector(x, y, z), context, url, collision, idx);
|
CShapeInstanceReference instref = EntitiesMngr.createInstance(shape, CVector(x, y, z), context, url, collision, idx);
|
||||||
UInstance instance = instref.Instance;
|
UInstance instance = instref.Instance;
|
||||||
|
|
||||||
|
@ -3004,6 +3001,14 @@ sint CLuaIHMRyzom::getBGDownloaderPriority()
|
||||||
return CBGDownloaderAccess::getInstance().getDownloadThreadPriority();
|
return CBGDownloaderAccess::getInstance().getDownloadThreadPriority();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
void CLuaIHMRyzom::loadBackground(const std::string &bg)
|
||||||
|
{
|
||||||
|
LoadingBackground = CustomBackground;
|
||||||
|
LoadingBackgroundBG = bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
ucstring CLuaIHMRyzom::getPatchLastErrorMessage()
|
ucstring CLuaIHMRyzom::getPatchLastErrorMessage()
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,6 +169,7 @@ private:
|
||||||
static void unpauseBGDownloader();
|
static void unpauseBGDownloader();
|
||||||
static void requestBGDownloaderPriority(uint priority);
|
static void requestBGDownloaderPriority(uint priority);
|
||||||
static sint getBGDownloaderPriority();
|
static sint getBGDownloaderPriority();
|
||||||
|
static void loadBackground(const std::string &bg);
|
||||||
static ucstring getPatchLastErrorMessage();
|
static ucstring getPatchLastErrorMessage();
|
||||||
static bool isInGame();
|
static bool isInGame();
|
||||||
static uint32 getPlayerSelectedSlot();
|
static uint32 getPlayerSelectedSlot();
|
||||||
|
|
Loading…
Reference in a new issue