mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-04 03:34:18 +03:00
* Fix CMake build issues.
* Remove accidentally packed in binary.
This commit is contained in:
Binary file not shown.
@@ -154,50 +154,46 @@ int AppPlatform_sdlbase::getUserInputStatus()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mouse::ButtonType AppPlatform_sdlbase::GetMouseButtonType(SDL_Event event)
|
MouseButtonType AppPlatform_sdlbase::GetMouseButtonType(SDL_Event event)
|
||||||
{
|
{
|
||||||
switch (event.button.button)
|
switch (event.button.button)
|
||||||
{
|
{
|
||||||
case SDL_BUTTON_LEFT:
|
case SDL_BUTTON_LEFT:
|
||||||
return Mouse::LEFT;
|
return BUTTON_LEFT;
|
||||||
case SDL_BUTTON_RIGHT:
|
case SDL_BUTTON_RIGHT:
|
||||||
return Mouse::RIGHT;
|
return BUTTON_RIGHT;
|
||||||
case SDL_BUTTON_MIDDLE:
|
case SDL_BUTTON_MIDDLE:
|
||||||
return Mouse::MIDDLE;
|
return BUTTON_MIDDLE;
|
||||||
default:
|
default:
|
||||||
return Mouse::NONE;
|
return BUTTON_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Mouse::ButtonState AppPlatform_sdlbase::GetMouseButtonState(SDL_Event event)
|
bool AppPlatform_sdlbase::GetMouseButtonState(SDL_Event event)
|
||||||
{
|
{
|
||||||
Mouse::ButtonState result;
|
bool result;
|
||||||
|
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
result = Mouse::DOWN;
|
result = true;
|
||||||
break;
|
break;
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
result = Mouse::UP;
|
result = false;
|
||||||
break;
|
break;
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
{
|
{
|
||||||
short wheelDelta = event.wheel.y;
|
short wheelDelta = event.wheel.y;
|
||||||
if (wheelDelta > 0)
|
if (wheelDelta > 0)
|
||||||
{
|
|
||||||
// "A positive value indicates that the wheel was rotated forward, away from the user."
|
// "A positive value indicates that the wheel was rotated forward, away from the user."
|
||||||
result = Mouse::UP;
|
result = false;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
// "A negative value indicates that the wheel was rotated backward, toward the user."
|
// "A negative value indicates that the wheel was rotated backward, toward the user."
|
||||||
result = Mouse::DOWN;
|
result = true;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
result = Mouse::UP;
|
result = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ public:
|
|||||||
bool shiftPressed() override;
|
bool shiftPressed() override;
|
||||||
void setShiftPressed(bool b, bool isLeft);
|
void setShiftPressed(bool b, bool isLeft);
|
||||||
|
|
||||||
static Mouse::ButtonType GetMouseButtonType(SDL_Event event);
|
static MouseButtonType GetMouseButtonType(SDL_Event event);
|
||||||
static Mouse::ButtonState GetMouseButtonState(SDL_Event event);
|
static bool GetMouseButtonState(SDL_Event event);
|
||||||
static Keyboard::KeyState GetKeyState(SDL_Event event);
|
static Keyboard::KeyState GetKeyState(SDL_Event event);
|
||||||
private:
|
private:
|
||||||
SDL_Window *_window;
|
SDL_Window *_window;
|
||||||
|
|||||||
@@ -107,13 +107,13 @@ static void handle_events()
|
|||||||
float scale = g_fPointToPixelScale;
|
float scale = g_fPointToPixelScale;
|
||||||
float x = event.motion.x * scale;
|
float x = event.motion.x * scale;
|
||||||
float y = event.motion.y * scale;
|
float y = event.motion.y * scale;
|
||||||
Mouse::feed(Mouse::NONE, Mouse::UP, x, y);
|
Mouse::feed(BUTTON_NONE, false, x, y);
|
||||||
g_pAppPlatform->setMouseDiff(event.motion.xrel * scale, event.motion.yrel * scale);
|
g_pAppPlatform->setMouseDiff(event.motion.xrel * scale, event.motion.yrel * scale);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
{
|
{
|
||||||
Mouse::feed(Mouse::SCROLLWHEEL, AppPlatform_sdlbase::GetMouseButtonState(event), Mouse::getX(), Mouse::getY());
|
Mouse::feed(BUTTON_SCROLLWHEEL, AppPlatform_sdlbase::GetMouseButtonState(event), Mouse::getX(), Mouse::getY());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_TEXTINPUT:
|
case SDL_TEXTINPUT:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ add_library(reminecraftpe-core STATIC
|
|||||||
common/CThread.cpp
|
common/CThread.cpp
|
||||||
common/Util.cpp
|
common/Util.cpp
|
||||||
common/Logger.cpp
|
common/Logger.cpp
|
||||||
|
common/SmoothFloat.cpp
|
||||||
client/app/App.cpp
|
client/app/App.cpp
|
||||||
client/app/AppPlatform.cpp
|
client/app/AppPlatform.cpp
|
||||||
client/app/Minecraft.cpp
|
client/app/Minecraft.cpp
|
||||||
@@ -89,6 +90,21 @@ add_library(reminecraftpe-core STATIC
|
|||||||
client/player/input/MouseTurnInput.cpp
|
client/player/input/MouseTurnInput.cpp
|
||||||
client/player/input/KeyboardInput.cpp
|
client/player/input/KeyboardInput.cpp
|
||||||
client/player/input/ITurnInput.cpp
|
client/player/input/ITurnInput.cpp
|
||||||
|
client/player/input/IBuildInput.cpp
|
||||||
|
client/player/input/IncludeExcludeArea.cpp
|
||||||
|
client/player/input/MouseHandler.cpp
|
||||||
|
client/player/input/PolygonArea.cpp
|
||||||
|
client/player/input/RectangleArea.cpp
|
||||||
|
client/player/input/MouseDevice.cpp
|
||||||
|
client/player/input/Multitouch.cpp
|
||||||
|
client/player/input/CustomInputHolder.cpp
|
||||||
|
client/player/input/IInputHolder.cpp
|
||||||
|
client/player/input/IMoveInput.cpp
|
||||||
|
client/player/input/ITouchScreenModel.cpp
|
||||||
|
client/player/input/TouchAreaModel.cpp
|
||||||
|
client/player/input/TouchInputHolder.cpp
|
||||||
|
client/player/input/TouchscreenInput_TestFps.cpp
|
||||||
|
client/player/input/UnifiedTurnBuild.cpp
|
||||||
client/network/ClientSideNetworkHandler.cpp
|
client/network/ClientSideNetworkHandler.cpp
|
||||||
network/packets/UpdateBlockPacket.cpp
|
network/packets/UpdateBlockPacket.cpp
|
||||||
network/packets/RequestChunkPacket.cpp
|
network/packets/RequestChunkPacket.cpp
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class IArea
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IArea() : field_4(true) {}
|
IArea() : field_4(true) {}
|
||||||
|
virtual ~IArea() {}
|
||||||
virtual bool isInside(float, float) = 0;
|
virtual bool isInside(float, float) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user