fixed reflector size & android game starting
This commit is contained in:
parent
3d0bbe7ca8
commit
64faf81a0d
@ -7,7 +7,7 @@
|
|||||||
"width": "match_parent",
|
"width": "match_parent",
|
||||||
"height": "match_parent",
|
"height": "match_parent",
|
||||||
"visible": 1,
|
"visible": 1,
|
||||||
"touchTransparency": 0,
|
"touchTransparency": 1,
|
||||||
"marginTop": 20,
|
"marginTop": 20,
|
||||||
"horizontalAlignment": "HA_CENTER",
|
"horizontalAlignment": "HA_CENTER",
|
||||||
"verticalAlignment": "VA_TOP",
|
"verticalAlignment": "VA_TOP",
|
||||||
|
@ -287,7 +287,6 @@ void GalaxyMenu::InteractWithGalaxy(size_t dt) {
|
|||||||
// OnTapDown->
|
// OnTapDown->
|
||||||
|
|
||||||
/*../hover\..*/
|
/*../hover\..*/
|
||||||
GetConsole() << std::to_string(lastTapPos[0]) + " | " + std::to_string(lastTapPos[1]) + " | " + std::to_string(totalTapShift[0]) + " | " + std::to_string(totalTapShift[1]);
|
|
||||||
int phi = findPlanetByPos(lastTapPos - totalTapShift);
|
int phi = findPlanetByPos(lastTapPos - totalTapShift);
|
||||||
if (phi != -1) {
|
if (phi != -1) {
|
||||||
planetHoverIndex = phi;
|
planetHoverIndex = phi;
|
||||||
@ -302,7 +301,6 @@ void GalaxyMenu::InteractWithGalaxy(size_t dt) {
|
|||||||
//totalTapShift = Eigen::Vector2f(totalTapShift(0) + currentTapShift(0), totalTapShift(1) + currentTapShift(1));
|
//totalTapShift = Eigen::Vector2f(totalTapShift(0) + currentTapShift(0), totalTapShift(1) + currentTapShift(1));
|
||||||
|
|
||||||
/*../hover\..*/
|
/*../hover\..*/
|
||||||
GetConsole() << std::to_string(lastTapPos[0]) + " | " + std::to_string(lastTapPos[1]) + " | " + std::to_string(totalTapShift[0]) + " | " + std::to_string(totalTapShift[1]);
|
|
||||||
int phi = findPlanetByPos(lastTapPos - totalTapShift);
|
int phi = findPlanetByPos(lastTapPos - totalTapShift);
|
||||||
if (phi != -1) {
|
if (phi != -1) {
|
||||||
planetHoverIndex = phi;
|
planetHoverIndex = phi;
|
||||||
@ -342,7 +340,6 @@ void GalaxyMenu::InteractWithGalaxy(size_t dt) {
|
|||||||
// OnTapDown->OnTapUp
|
// OnTapDown->OnTapUp
|
||||||
|
|
||||||
/*..level select menu open..*/
|
/*..level select menu open..*/
|
||||||
GetConsole() << std::to_string(lastTapPos[0]) + " | " + std::to_string(lastTapPos[1]) + " | " + std::to_string(totalTapShift[0]) + " | " + std::to_string(totalTapShift[1]);
|
|
||||||
starIndex = findPlanetByPos(lastTapPos - totalTapShift);
|
starIndex = findPlanetByPos(lastTapPos - totalTapShift);
|
||||||
|
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
|
|||||||
float scale;
|
float scale;
|
||||||
if (screenRatioToFixedRatio > 1.f)
|
if (screenRatioToFixedRatio > 1.f)
|
||||||
{
|
{
|
||||||
offset[0] = (screenWidth - screenWidth / screenRatioToFixedRatio) / 2.f;
|
offset[0] = (Renderer->GetScreenWidth() - screenWidth / screenRatioToFixedRatio) / 2.f;
|
||||||
offset[1] = 0;
|
offset[1] = 0;
|
||||||
scale = matrixHeight / 480.f;
|
scale = matrixHeight / 480.f;
|
||||||
}
|
}
|
||||||
@ -1043,11 +1043,11 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
|
|||||||
//float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
|
//float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_REFLECTOR_TEXTURE]);
|
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_REFLECTOR_TEXTURE]);
|
||||||
float xRW = 210.f * tSW/700.f; // x Reflector Width
|
float xRW = 210.f; // x Reflector Width
|
||||||
float yRH = 45.f * tSH/480.f; // y Reflector Height
|
float yRH = 45.f; // y Reflector Height
|
||||||
Vector2f matrixSize = ReflectorPos.cwiseProduct(Vector2f(Application->GetGameLevelScreenWidth(), Application->GetGameLevelScreenHeight()));
|
Vector2f matrixSize = ReflectorPos.cwiseProduct(Vector2f(768, 480));
|
||||||
Renderer->DrawRect(Vector2f(-xRW * 0.5f, -yRH * 0.5f) + matrixSize + offset,
|
Renderer->DrawRect(Vector2f(-xRW * 0.5f, -yRH * 0.5f) * scale + offset + matrixSize,
|
||||||
Vector2f(xRW*0.5f, yRH*0.5f) + matrixSize + offset, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
|
Vector2f(xRW*0.5f, yRH*0.5f) * scale + offset + matrixSize, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
|
||||||
|
|
||||||
const Vector2f wallUpPos1(xlOffset, tSH-ylOffset-uWTW);
|
const Vector2f wallUpPos1(xlOffset, tSH-ylOffset-uWTW);
|
||||||
const Vector2f wallUpPos2(tSW + xlOffset, tSH-ylOffset);
|
const Vector2f wallUpPos2(tSW + xlOffset, tSH-ylOffset);
|
||||||
|
Loading…
Reference in New Issue
Block a user