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