mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
* Add optional 3d panorama background
This commit is contained in:
@@ -134,7 +134,7 @@ static void handle_events()
|
||||
}
|
||||
|
||||
// GUI Scale
|
||||
static void calulate_gui_scale()
|
||||
static void calculate_gui_scale()
|
||||
{
|
||||
int width = Minecraft::width;
|
||||
|
||||
@@ -207,6 +207,8 @@ static EM_BOOL main_loop(double time, void *user_data)
|
||||
}
|
||||
}
|
||||
|
||||
extern bool g_bIsMenuBackgroundAvailable; // client/gui/Screen.cpp
|
||||
|
||||
// Main
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -235,6 +237,8 @@ int main(int argc, char *argv[])
|
||||
Minecraft::height = std::stoi(argv[2]);
|
||||
#endif
|
||||
|
||||
g_bIsMenuBackgroundAvailable = XPL_ACCESS("assets/gui/background/panorama_0.png", 0) == 0;
|
||||
|
||||
// Create Window
|
||||
window = SDL_CreateWindow("ReMinecraftPE", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, Minecraft::width, Minecraft::height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
|
||||
if (!window)
|
||||
|
||||
@@ -70,6 +70,8 @@ void UpdateMouse()
|
||||
Mouse::_y = g_MousePosY;
|
||||
}
|
||||
|
||||
extern bool g_bIsMenuBackgroundAvailable;
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (iMsg)
|
||||
@@ -218,6 +220,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = g_WindowClassName;
|
||||
|
||||
g_bIsMenuBackgroundAvailable = XPL_ACCESS("assets/gui/background/panorama_0.png", 0) == 0;
|
||||
|
||||
RECT wr = { 0,0, g_AppPlatform.getScreenWidth(), g_AppPlatform.getScreenHeight() };
|
||||
AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, false);
|
||||
int w = wr.right - wr.left;
|
||||
|
||||
Reference in New Issue
Block a user