Quote:
Originally Posted by fiamma00
I have few more questions:
1) How can I hide the console when the game gets booted and make the 'loading screen appear'?
2) Is there any tip on how to make a 'box' have 'item' in it? Like the original upgrading window that can contain an equipment with drag and drop inside the empty box and then show the item inside it or inventories that contain item icons
|
1)
Hiding console:
In main.cpp, find this function:
Code:
void InitLogger()
{
Logger::Load();
Logger::IndentModuleName(" ");
}
and change it for
Code:
void InitLogger(){}
2)
Re-enabling the splashscreen:
It is a bit tricky, you will need to override your ClientModding inherited class:
- OnShowNostaleSplash: you show the splashscreen
- OnFreeNostaleSplash: you hide the splashscreen
What you need to do if you just want the "original" behaviour, is to call the function from the original EWSF.EWS, you can see an explanation here:
[Only registered and activated users can see links. Click Here To Register...]
But the simplest would be to change
extern "C" __declspec(dllexport) void __declspec(naked) ShowNostaleSplash()
and
extern "C" __declspec(dllexport) void __declspec(naked) FreeNostaleSplash()
from main.cpp (not the recommanded way, but well, you will probably be able to improve based on that)
By :
Code:
extern "C" __declspec(dllexport) void __declspec(naked) FreeNostaleSplash() noexcept
{
__asm
{
pushad;
pushfd;
}
example->OnFreeNostaleSplash();
th = new std::thread([]
{
MainThread(hModule);
});
th->detach();
__asm
{
popfd;
popad;
jmp freeNostaleSplash
}
}
and
Code:
extern "C" __declspec(dllexport) void __declspec(naked) ShowNostaleSplash()
{
__asm
{
pushad;
pushfd;
}
InitLogger();
HMODULE origEwsf = LoadLibraryA("EWSF_orig.dll");
freeNostaleSplash = GetProcAddress(origEwsf , "FreeNostaleSplash");
showNostaleSplash = GetProcAddress(origEwsf , "ShowNostaleSplash");
example = new Example(config);
example->OnShowNostaleSplash();
__asm
{
popfd;
popad;
jmp showNostaleSplash
}
}
You will obviously need to define the two functions pointer, so at the top of main.cpp, add
Code:
FARPROC freeNostaleSplash, showNostaleSplash;
2)
There are no tips and it is not easily doable with the current API - I might add something to help with that later on