mirror of
https://github.com/celisej567/mcpe.git
synced 2026-02-25 02:32:38 +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;
|
||||
}
|
||||
|
||||
Mouse::ButtonType AppPlatform_sdlbase::GetMouseButtonType(SDL_Event event)
|
||||
MouseButtonType AppPlatform_sdlbase::GetMouseButtonType(SDL_Event event)
|
||||
{
|
||||
switch (event.button.button)
|
||||
{
|
||||
case SDL_BUTTON_LEFT:
|
||||
return Mouse::LEFT;
|
||||
return BUTTON_LEFT;
|
||||
case SDL_BUTTON_RIGHT:
|
||||
return Mouse::RIGHT;
|
||||
return BUTTON_RIGHT;
|
||||
case SDL_BUTTON_MIDDLE:
|
||||
return Mouse::MIDDLE;
|
||||
return BUTTON_MIDDLE;
|
||||
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)
|
||||
{
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
result = Mouse::DOWN;
|
||||
result = true;
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
result = Mouse::UP;
|
||||
result = false;
|
||||
break;
|
||||
case SDL_MOUSEWHEEL:
|
||||
{
|
||||
short wheelDelta = event.wheel.y;
|
||||
if (wheelDelta > 0)
|
||||
{
|
||||
// "A positive value indicates that the wheel was rotated forward, away from the user."
|
||||
result = Mouse::UP;
|
||||
}
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
// "A negative value indicates that the wheel was rotated backward, toward the user."
|
||||
result = Mouse::DOWN;
|
||||
}
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
result = Mouse::UP;
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
bool shiftPressed() override;
|
||||
void setShiftPressed(bool b, bool isLeft);
|
||||
|
||||
static Mouse::ButtonType GetMouseButtonType(SDL_Event event);
|
||||
static Mouse::ButtonState GetMouseButtonState(SDL_Event event);
|
||||
static MouseButtonType GetMouseButtonType(SDL_Event event);
|
||||
static bool GetMouseButtonState(SDL_Event event);
|
||||
static Keyboard::KeyState GetKeyState(SDL_Event event);
|
||||
private:
|
||||
SDL_Window *_window;
|
||||
|
||||
@@ -107,13 +107,13 @@ static void handle_events()
|
||||
float scale = g_fPointToPixelScale;
|
||||
float x = event.motion.x * 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);
|
||||
break;
|
||||
}
|
||||
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;
|
||||
}
|
||||
case SDL_TEXTINPUT:
|
||||
|
||||
@@ -11,6 +11,7 @@ add_library(reminecraftpe-core STATIC
|
||||
common/CThread.cpp
|
||||
common/Util.cpp
|
||||
common/Logger.cpp
|
||||
common/SmoothFloat.cpp
|
||||
client/app/App.cpp
|
||||
client/app/AppPlatform.cpp
|
||||
client/app/Minecraft.cpp
|
||||
@@ -89,6 +90,21 @@ add_library(reminecraftpe-core STATIC
|
||||
client/player/input/MouseTurnInput.cpp
|
||||
client/player/input/KeyboardInput.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
|
||||
network/packets/UpdateBlockPacket.cpp
|
||||
network/packets/RequestChunkPacket.cpp
|
||||
|
||||
@@ -12,6 +12,7 @@ class IArea
|
||||
{
|
||||
public:
|
||||
IArea() : field_4(true) {}
|
||||
virtual ~IArea() {}
|
||||
virtual bool isInside(float, float) = 0;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user